diff --git a/.release-please-manifest.json b/.release-please-manifest.json index bb5b899b1be..3a48ae64c2a 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,5 +1,6 @@ { "packages/gapic-node-templating": "0.0.0", + "packages/google-analytics-admin": "4.3.0", "packages/google-analytics-data": "3.1.1", "packages/google-api-apikeys": "0.1.3", "packages/google-area120-tables": "2.1.2", diff --git a/packages/google-analytics-admin/.OwlBot.yaml b/packages/google-analytics-admin/.OwlBot.yaml new file mode 100644 index 00000000000..dc3c48b26b6 --- /dev/null +++ b/packages/google-analytics-admin/.OwlBot.yaml @@ -0,0 +1,21 @@ +# Copyright 2021 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +deep-remove-regex: + - /owl-bot-staging + +deep-copy-regex: + - source: /google/analytics/admin/(.*)/.*-nodejs + dest: /owl-bot-staging/google-analytics-admin/$1 + diff --git a/packages/google-analytics-admin/.eslintignore b/packages/google-analytics-admin/.eslintignore new file mode 100644 index 00000000000..ea5b04aebe6 --- /dev/null +++ b/packages/google-analytics-admin/.eslintignore @@ -0,0 +1,7 @@ +**/node_modules +**/coverage +test/fixtures +build/ +docs/ +protos/ +samples/generated/ diff --git a/packages/google-analytics-admin/.eslintrc.json b/packages/google-analytics-admin/.eslintrc.json new file mode 100644 index 00000000000..78215349546 --- /dev/null +++ b/packages/google-analytics-admin/.eslintrc.json @@ -0,0 +1,3 @@ +{ + "extends": "./node_modules/gts" +} diff --git a/packages/google-analytics-admin/.gitattributes b/packages/google-analytics-admin/.gitattributes new file mode 100644 index 00000000000..33739cb74e4 --- /dev/null +++ b/packages/google-analytics-admin/.gitattributes @@ -0,0 +1,4 @@ +*.ts text eol=lf +*.js text eol=lf +protos/* linguist-generated +**/api-extractor.json linguist-language=JSON-with-Comments diff --git a/packages/google-analytics-admin/.gitignore b/packages/google-analytics-admin/.gitignore new file mode 100644 index 00000000000..5d32b23782f --- /dev/null +++ b/packages/google-analytics-admin/.gitignore @@ -0,0 +1,14 @@ +**/*.log +**/node_modules +.coverage +coverage +.nyc_output +docs/ +out/ +build/ +system-test/secrets.js +system-test/*key.json +*.lock +.DS_Store +package-lock.json +__pycache__ diff --git a/packages/google-analytics-admin/.jsdoc.js b/packages/google-analytics-admin/.jsdoc.js new file mode 100644 index 00000000000..59f18fd52c1 --- /dev/null +++ b/packages/google-analytics-admin/.jsdoc.js @@ -0,0 +1,55 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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 2022 Google LLC', + includeDate: false, + sourceFiles: false, + systemName: '@google-analytics/admin', + theme: 'lumen', + default: { + outputSourceFiles: false + } + }, + markdown: { + idInHeadings: true + } +}; diff --git a/packages/google-analytics-admin/.mocharc.js b/packages/google-analytics-admin/.mocharc.js new file mode 100644 index 00000000000..cdb7b752160 --- /dev/null +++ b/packages/google-analytics-admin/.mocharc.js @@ -0,0 +1,29 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +const config = { + "enable-source-maps": true, + "throw-deprecation": true, + "timeout": 10000, + "recursive": true +} +if (process.env.MOCHA_THROW_DEPRECATION === 'false') { + delete config['throw-deprecation']; +} +if (process.env.MOCHA_REPORTER) { + config.reporter = process.env.MOCHA_REPORTER; +} +if (process.env.MOCHA_REPORTER_OUTPUT) { + config['reporter-option'] = `output=${process.env.MOCHA_REPORTER_OUTPUT}`; +} +module.exports = config diff --git a/packages/google-analytics-admin/.nycrc b/packages/google-analytics-admin/.nycrc new file mode 100644 index 00000000000..b18d5472b62 --- /dev/null +++ b/packages/google-analytics-admin/.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 +} diff --git a/packages/google-analytics-admin/.prettierignore b/packages/google-analytics-admin/.prettierignore new file mode 100644 index 00000000000..9340ad9b86d --- /dev/null +++ b/packages/google-analytics-admin/.prettierignore @@ -0,0 +1,6 @@ +**/node_modules +**/coverage +test/fixtures +build/ +docs/ +protos/ diff --git a/packages/google-analytics-admin/.prettierrc.js b/packages/google-analytics-admin/.prettierrc.js new file mode 100644 index 00000000000..d546a4ad546 --- /dev/null +++ b/packages/google-analytics-admin/.prettierrc.js @@ -0,0 +1,17 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +module.exports = { + ...require('gts/.prettierrc.json') +} diff --git a/packages/google-analytics-admin/.repo-metadata.json b/packages/google-analytics-admin/.repo-metadata.json new file mode 100644 index 00000000000..4cffee7850b --- /dev/null +++ b/packages/google-analytics-admin/.repo-metadata.json @@ -0,0 +1,16 @@ +{ + "client_documentation": "https://googleapis.dev/nodejs/analytics-admin/latest/index.html", + "api_id": "analyticsadmin.googleapis.com", + "distribution_name": "@google-analytics/admin", + "release_level": "preview", + "default_version": "v1alpha", + "language": "nodejs", + "name_pretty": "Google Analytics Admin", + "repo": "googleapis/google-cloud-node", + "product_documentation": "https://developers.google.com/analytics", + "requires_billing": false, + "name": "analytics-admin", + "issue_tracker": "", + "api_shortname": "analyticsadmin", + "library_type": "GAPIC_AUTO" +} diff --git a/packages/google-analytics-admin/CHANGELOG.md b/packages/google-analytics-admin/CHANGELOG.md new file mode 100644 index 00000000000..d28a097632a --- /dev/null +++ b/packages/google-analytics-admin/CHANGELOG.md @@ -0,0 +1,272 @@ +# Changelog + +## [4.3.0](https://github.com/googleapis/nodejs-analytics-admin/compare/v4.2.0...v4.3.0) (2022-11-11) + + +### Features + +* add `GetAttributionSettings`, `UpdateAttributionSettings` methods to the Admin API v1alpha ([6d911ce](https://github.com/googleapis/nodejs-analytics-admin/commit/6d911cea4e0a1a1201847dba549634e535b078b0)) +* add `GetAudience`, 'ListAudience', 'CreateAudience', 'UpdateAudience', 'ArchiveAudience' methods to the Admin API v1alpha ([6d911ce](https://github.com/googleapis/nodejs-analytics-admin/commit/6d911cea4e0a1a1201847dba549634e535b078b0)) +* add `RunAccessReport` method to the Admin API v1alpha ([6d911ce](https://github.com/googleapis/nodejs-analytics-admin/commit/6d911cea4e0a1a1201847dba549634e535b078b0)) + + +### Bug Fixes + +* Allow passing gax instance to client constructor ([#222](https://github.com/googleapis/nodejs-analytics-admin/issues/222)) ([c17ef19](https://github.com/googleapis/nodejs-analytics-admin/commit/c17ef19c7ca0c1e8514229f5341d339123a64c03)) +* Better support for fallback mode ([#216](https://github.com/googleapis/nodejs-analytics-admin/issues/216)) ([6d911ce](https://github.com/googleapis/nodejs-analytics-admin/commit/6d911cea4e0a1a1201847dba549634e535b078b0)) +* Change import long to require ([#217](https://github.com/googleapis/nodejs-analytics-admin/issues/217)) ([77aaecb](https://github.com/googleapis/nodejs-analytics-admin/commit/77aaecb625ca557207e3fdbad906d4d50e9b4704)) +* **deps:** Use google-gax v3.5.2 ([#230](https://github.com/googleapis/nodejs-analytics-admin/issues/230)) ([7bbe484](https://github.com/googleapis/nodejs-analytics-admin/commit/7bbe4845a8b2e70bdd55f739c6af57eb080ea5e7)) +* Do not import the whole google-gax from proto JS ([#1553](https://github.com/googleapis/nodejs-analytics-admin/issues/1553)) ([#221](https://github.com/googleapis/nodejs-analytics-admin/issues/221)) ([2341928](https://github.com/googleapis/nodejs-analytics-admin/commit/23419288e37ce931b72bbeb3e5f6d229f1b249fa)) +* Preserve default values in x-goog-request-params header ([#224](https://github.com/googleapis/nodejs-analytics-admin/issues/224)) ([22f8b45](https://github.com/googleapis/nodejs-analytics-admin/commit/22f8b45606451281e237c4625b1248cb65ec02e6)) +* Regenerated protos JS and TS definitions ([#233](https://github.com/googleapis/nodejs-analytics-admin/issues/233)) ([3a1d10c](https://github.com/googleapis/nodejs-analytics-admin/commit/3a1d10cc4cffb56dbb86a74ac4cc2d6d179268cf)) +* use google-gax v3.3.0 ([2341928](https://github.com/googleapis/nodejs-analytics-admin/commit/23419288e37ce931b72bbeb3e5f6d229f1b249fa)) + +## [4.2.0](https://github.com/googleapis/nodejs-analytics-admin/compare/v4.1.0...v4.2.0) (2022-07-04) + + +### Features + +* release the Google Analytics Admin API V1 Beta ([bb17208](https://github.com/googleapis/nodejs-analytics-admin/commit/bb17208fbd0a9dd945bb51e8e9281886da35a9cc)) + +## [4.1.0](https://github.com/googleapis/nodejs-analytics-admin/compare/v4.0.0...v4.1.0) (2022-06-29) + + +### Features + +* support regapic LRO ([#210](https://github.com/googleapis/nodejs-analytics-admin/issues/210)) ([a783ccd](https://github.com/googleapis/nodejs-analytics-admin/commit/a783ccd7c69123b337813c0ee751e292bdb5be5c)) + +## [4.0.0](https://github.com/googleapis/nodejs-analytics-admin/compare/v3.2.0...v4.0.0) (2022-05-13) + + +### ⚠ BREAKING CHANGES + +* update library to use Node 12 (#205) + +### Bug Fixes + +* CustomDimension and CustomMetric resource configuration in Analytics Admin API ([#204](https://github.com/googleapis/nodejs-analytics-admin/issues/204)) ([ff521a5](https://github.com/googleapis/nodejs-analytics-admin/commit/ff521a5d7658e8b7a8c8995a8049a074d911a127)) + + +### Build System + +* update library to use Node 12 ([#205](https://github.com/googleapis/nodejs-analytics-admin/issues/205)) ([002c8b7](https://github.com/googleapis/nodejs-analytics-admin/commit/002c8b7ec24b3539378eeeff1ced553780c6aebe)) + +## [3.2.0](https://github.com/googleapis/nodejs-analytics-admin/compare/v3.1.0...v3.2.0) (2022-04-11) + + +### ⚠ BREAKING CHANGES + +* move the `GlobalSiteTag` resource from the property level to the data stream level +* remove WebDataStream, IosAppDataStream, AndroidAppDataStream resources +* remove `GetEnhancedMeasurementSettings`, `UpdateEnhancedMeasurementSettingsRequest`, `UpdateEnhancedMeasurementSettingsRequest` operations from the API + +### Features + +* add `CreateDataStream`, `DeleteDataStream`, `UpdateDataStream`, `ListDataStreams` operations to support the new `DataStream` resource ([33ead79](https://github.com/googleapis/nodejs-analytics-admin/commit/33ead795301a343a80af8f8838c7677679b9f3fe)) +* add `DISPLAY_VIDEO_360_ADVERTISER_LINK`, `DISPLAY_VIDEO_360_ADVERTISER_LINK_PROPOSAL` fields to `ChangeHistoryResourceType` enum ([33ead79](https://github.com/googleapis/nodejs-analytics-admin/commit/33ead795301a343a80af8f8838c7677679b9f3fe)) +* add `restricted_metric_type` field to the `CustomMetric` resource ([948d37d](https://github.com/googleapis/nodejs-analytics-admin/commit/948d37d068263595a198006764a5d7d7d6afd884)) +* add the `account` field to the `Property` type docs: update the documentation with a new list of valid values for `UserLink.direct_roles` field ([33ead79](https://github.com/googleapis/nodejs-analytics-admin/commit/33ead795301a343a80af8f8838c7677679b9f3fe)) +* add the `AcknowledgeUserDataCollection` operation which acknowledges the terms of user data collection for the specified property ([#166](https://github.com/googleapis/nodejs-analytics-admin/issues/166)) ([33ead79](https://github.com/googleapis/nodejs-analytics-admin/commit/33ead795301a343a80af8f8838c7677679b9f3fe)) +* add the new resource type `DataStream`, which is planned to eventually replace `WebDataStream`, `IosAppDataStream`, `AndroidAppDataStream` resources ([33ead79](https://github.com/googleapis/nodejs-analytics-admin/commit/33ead795301a343a80af8f8838c7677679b9f3fe)) +* move the `GlobalSiteTag` resource from the property level to the data stream level ([948d37d](https://github.com/googleapis/nodejs-analytics-admin/commit/948d37d068263595a198006764a5d7d7d6afd884)) +* remove WebDataStream, IosAppDataStream, AndroidAppDataStream resources ([948d37d](https://github.com/googleapis/nodejs-analytics-admin/commit/948d37d068263595a198006764a5d7d7d6afd884)) + + +### Bug Fixes + +* remove `GetEnhancedMeasurementSettings`, `UpdateEnhancedMeasurementSettingsRequest`, `UpdateEnhancedMeasurementSettingsRequest` operations from the API ([33ead79](https://github.com/googleapis/nodejs-analytics-admin/commit/33ead795301a343a80af8f8838c7677679b9f3fe)) + +## [3.1.0](https://www.github.com/googleapis/nodejs-analytics-admin/compare/v3.0.6...v3.1.0) (2021-08-23) + + +### Features + +* turns on self-signed JWT feature flag ([#148](https://www.github.com/googleapis/nodejs-analytics-admin/issues/148)) ([d0382e4](https://www.github.com/googleapis/nodejs-analytics-admin/commit/d0382e4cc29fb304f2d90be0f4b354a2e65ace3c)) + +### [3.0.6](https://www.github.com/googleapis/nodejs-analytics-admin/compare/v3.0.5...v3.0.6) (2021-08-17) + + +### Bug Fixes + +* **deps:** google-gax v2.24.1 ([#146](https://www.github.com/googleapis/nodejs-analytics-admin/issues/146)) ([604e333](https://www.github.com/googleapis/nodejs-analytics-admin/commit/604e3335ed05b198e6e9f3eafd6eaf405126bd2f)) + +### [3.0.5](https://www.github.com/googleapis/nodejs-analytics-admin/compare/v3.0.4...v3.0.5) (2021-08-09) + + +### Bug Fixes + +* **build:** migrate to using main branch ([#144](https://www.github.com/googleapis/nodejs-analytics-admin/issues/144)) ([537d20a](https://www.github.com/googleapis/nodejs-analytics-admin/commit/537d20a623b026f68e08160af95cac31a7cd52db)) + +### [3.0.4](https://www.github.com/googleapis/nodejs-analytics-admin/compare/v3.0.3...v3.0.4) (2021-07-16) + + +### Bug Fixes + +* Updating WORKSPACE files to use the newest version of the Typescript generator. ([#136](https://www.github.com/googleapis/nodejs-analytics-admin/issues/136)) ([2518d10](https://www.github.com/googleapis/nodejs-analytics-admin/commit/2518d10d640a60e2577f3af0cd517e4f52ed185a)) + +### [3.0.3](https://www.github.com/googleapis/nodejs-analytics-admin/compare/v3.0.2...v3.0.3) (2021-07-12) + + +### Bug Fixes + +* **deps:** google-gax v2.17.1 ([#133](https://www.github.com/googleapis/nodejs-analytics-admin/issues/133)) ([ad5ad4d](https://www.github.com/googleapis/nodejs-analytics-admin/commit/ad5ad4da8348f36364cb1f67751bee70161d6c61)) + +### [3.0.2](https://www.github.com/googleapis/nodejs-analytics-admin/compare/v3.0.1...v3.0.2) (2021-06-29) + + +### Bug Fixes + +* **deps:** google-gax v2.17.0 with mTLS ([#130](https://www.github.com/googleapis/nodejs-analytics-admin/issues/130)) ([81533f3](https://www.github.com/googleapis/nodejs-analytics-admin/commit/81533f3e69471170414406cfe1dca00a36d7a6b8)) + +### [3.0.1](https://www.github.com/googleapis/nodejs-analytics-admin/compare/v3.0.0...v3.0.1) (2021-06-24) + + +### Bug Fixes + +* make request optional in all cases ([#126](https://www.github.com/googleapis/nodejs-analytics-admin/issues/126)) ([a66c927](https://www.github.com/googleapis/nodejs-analytics-admin/commit/a66c927492a3186df97c52823e4a6db67c60e65b)) + +## [3.0.0](https://www.github.com/googleapis/nodejs-analytics-admin/compare/v2.0.3...v3.0.0) (2021-05-27) + + +### ⚠ BREAKING CHANGES + +* remove `CreateIosAppDataStream`, `CreateAndroidAppDataStream` methods from the API (#105) + +### Features + +* add several new functions and types ([#119](https://www.github.com/googleapis/nodejs-analytics-admin/issues/119)) ([d7c4e29](https://www.github.com/googleapis/nodejs-analytics-admin/commit/d7c4e290bf88b6db9f6c67379c811390cc3b4783)) + + +### Bug Fixes + +* **deps:** require google-gax v2.12.0 ([#110](https://www.github.com/googleapis/nodejs-analytics-admin/issues/110)) ([cec8b6a](https://www.github.com/googleapis/nodejs-analytics-admin/commit/cec8b6ae04200a57d90586cd58f2fe6d3c94f684)) +* GoogleAdsError missing using generator version after 1.3.0 ([#118](https://www.github.com/googleapis/nodejs-analytics-admin/issues/118)) ([f69d3e9](https://www.github.com/googleapis/nodejs-analytics-admin/commit/f69d3e9bea2a10ecfd6bf3d9edfdf17c6fda168a)) +* remove `CreateIosAppDataStream`, `CreateAndroidAppDataStream` methods from the API ([#105](https://www.github.com/googleapis/nodejs-analytics-admin/issues/105)) ([c6c1883](https://www.github.com/googleapis/nodejs-analytics-admin/commit/c6c1883cdcdbeacce0112c7142758806078cd431)) +* use require() to load JSON protos ([#112](https://www.github.com/googleapis/nodejs-analytics-admin/issues/112)) ([904aaf6](https://www.github.com/googleapis/nodejs-analytics-admin/commit/904aaf6bd48de4f404203aeaeadda1ba8cc62ac9)) + +### [2.0.3](https://www.github.com/googleapis/nodejs-analytics-admin/compare/v2.0.2...v2.0.3) (2021-03-08) + + +### Bug Fixes + +* **deps:** update dependency open to v8 ([#83](https://www.github.com/googleapis/nodejs-analytics-admin/issues/83)) ([e8643f6](https://www.github.com/googleapis/nodejs-analytics-admin/commit/e8643f61c5135f03ff75a4bc3361a4cfc8e2b97d)) + +### [2.0.2](https://www.github.com/googleapis/nodejs-analytics-admin/compare/v2.0.1...v2.0.2) (2021-03-07) + + +### Bug Fixes + +* add `https://www.googleapis.com/auth/analytics.edit` OAuth2 scope to the list of acceptable scopes for all read only methods of the Admin API docs: update the documentation of the `update_mask` field used by Update() methods ([#81](https://www.github.com/googleapis/nodejs-analytics-admin/issues/81)) ([655a893](https://www.github.com/googleapis/nodejs-analytics-admin/commit/655a893e8c89a9a18b32db256df2ba28adafc948)) + +### [2.0.1](https://www.github.com/googleapis/nodejs-analytics-admin/compare/v2.0.0...v2.0.1) (2021-02-09) + + +### Bug Fixes + +* **deps:** update dependency google-auth-library to v7 ([#79](https://www.github.com/googleapis/nodejs-analytics-admin/issues/79)) ([8e0e55b](https://www.github.com/googleapis/nodejs-analytics-admin/commit/8e0e55b1ac2c69cee0eaac6102efdc7a105e758e)) + +## [2.0.0](https://www.github.com/googleapis/nodejs-analytics-admin/compare/v1.4.0...v2.0.0) (2021-01-19) + + +### ⚠ BREAKING CHANGES + +* `update_mask` field is required for all Update operations +* rename `country_code` field to `region_code` in `Account` +* rename `url_query_parameter` field to `uri_query_parameter` in `EnhancedMeasurementSettings` +* remove `parent` field from `GoogleAdsLink` (#73) +* remove unused fields from `EnhancedMeasurementSettings` + +### Features + +* add pagination support for `ListFirebaseLinks` operation ([57205d1](https://www.github.com/googleapis/nodejs-analytics-admin/commit/57205d16409af361342f77261767d77e84582965)) + + +### Bug Fixes + +* `update_mask` field is required for all Update operations ([57205d1](https://www.github.com/googleapis/nodejs-analytics-admin/commit/57205d16409af361342f77261767d77e84582965)) +* remove `parent` field from `GoogleAdsLink` ([#73](https://www.github.com/googleapis/nodejs-analytics-admin/issues/73)) ([57205d1](https://www.github.com/googleapis/nodejs-analytics-admin/commit/57205d16409af361342f77261767d77e84582965)) +* remove unused fields from `EnhancedMeasurementSettings` ([57205d1](https://www.github.com/googleapis/nodejs-analytics-admin/commit/57205d16409af361342f77261767d77e84582965)) +* rename `country_code` field to `region_code` in `Account` ([57205d1](https://www.github.com/googleapis/nodejs-analytics-admin/commit/57205d16409af361342f77261767d77e84582965)) +* rename `url_query_parameter` field to `uri_query_parameter` in `EnhancedMeasurementSettings` ([57205d1](https://www.github.com/googleapis/nodejs-analytics-admin/commit/57205d16409af361342f77261767d77e84582965)) + +## [1.4.0](https://www.github.com/googleapis/nodejs-analytics-admin/compare/v1.3.0...v1.4.0) (2021-01-09) + + +### Features + +* adds style enumeration ([#70](https://www.github.com/googleapis/nodejs-analytics-admin/issues/70)) ([cffd8f5](https://www.github.com/googleapis/nodejs-analytics-admin/commit/cffd8f53db7a24c1741a2818c168adb674c27c85)) +* adds style enumeration ([#71](https://www.github.com/googleapis/nodejs-analytics-admin/issues/71)) ([fd88f82](https://www.github.com/googleapis/nodejs-analytics-admin/commit/fd88f826f3d5cf37c5f1ed7a32a997e7ec6441ed)) + +## [1.3.0](https://www.github.com/googleapis/nodejs-analytics-admin/compare/v1.2.3...v1.3.0) (2021-01-07) + + +### Features + +* added name field to GlobalSiteTag ([#65](https://www.github.com/googleapis/nodejs-analytics-admin/issues/65)) ([a4baba5](https://www.github.com/googleapis/nodejs-analytics-admin/commit/a4baba570e07b637ec5d8be0a9d98ebec5969559)) + +### [1.2.3](https://www.github.com/googleapis/nodejs-analytics-admin/compare/v1.2.2...v1.2.3) (2020-11-25) + + +### Bug Fixes + +* do not modify options object, use defaultScopes docs: regenerated jsdoc comments with examples build: use gapic-generator-typescript v1.2.1 ([#55](https://www.github.com/googleapis/nodejs-analytics-admin/issues/55)) ([126618a](https://www.github.com/googleapis/nodejs-analytics-admin/commit/126618a4a1fb1c17be5a6a3e3a4b96cdc844b361)) + +### [1.2.2](https://www.github.com/googleapis/nodejs-analytics-admin/compare/v1.2.1...v1.2.2) (2020-11-11) + + +### Bug Fixes + +* 'requests' field of CreateUserLink, UpdateUserLink, DeleteUserLink methods is now required docs: minor documentation updates ([#49](https://www.github.com/googleapis/nodejs-analytics-admin/issues/49)) ([ae75c0c](https://www.github.com/googleapis/nodejs-analytics-admin/commit/ae75c0c053ed203c0f8b142ce87a8622e0b6ee93)) + +### [1.2.1](https://www.github.com/googleapis/nodejs-analytics-admin/compare/v1.2.0...v1.2.1) (2020-11-07) + + +### Bug Fixes + +* do not modify options object, use defaultScopes ([#50](https://www.github.com/googleapis/nodejs-analytics-admin/issues/50)) ([47d0a11](https://www.github.com/googleapis/nodejs-analytics-admin/commit/47d0a119803f52208f4dfa2b053937214d021ec6)) + +## [1.2.0](https://www.github.com/googleapis/nodejs-analytics-admin/compare/v1.1.2...v1.2.0) (2020-10-20) + +### Features + +* added ListAccountSummaries method ([#40](https://www.github.com/googleapis/nodejs-analytics-admin/issues/40)) ([f55c2bf](https://www.github.com/googleapis/nodejs-analytics-admin/commit/f55c2bfaacb6203bcb31094c61e71a166b0ddeda)) + +### [1.1.2](https://www.github.com/googleapis/nodejs-analytics-admin/compare/v1.1.1...v1.1.2) (2020-08-28) + + +### Bug Fixes + +* move system and samples test from Node 10 to Node 12 ([#31](https://www.github.com/googleapis/nodejs-analytics-admin/issues/31)) ([bcb2061](https://www.github.com/googleapis/nodejs-analytics-admin/commit/bcb20619c7e13be336bf915c4821004016f67337)) + +### [1.1.1](https://www.github.com/googleapis/nodejs-analytics-admin/compare/v1.1.0...v1.1.1) (2020-08-04) + + +### Bug Fixes + +* samples and tests updated ([#13](https://www.github.com/googleapis/nodejs-analytics-admin/issues/13)) ([55f4366](https://www.github.com/googleapis/nodejs-analytics-admin/commit/55f4366d75a09b697ac1b7d1ef416cf27448832a)) +* **docs:** update docs with current samples ([24a452c](https://www.github.com/googleapis/nodejs-analytics-admin/commit/24a452c9472f521e8164911ba4f8e2a3d77e2fca)) + +## [1.1.0](https://www.github.com/googleapis/nodejs-analytics-admin/compare/v1.0.0...v1.1.0) (2020-07-29) + + +### Features + +* initial release of library from googleapis organization ([#12](https://www.github.com/googleapis/nodejs-analytics-admin/issues/12)) ([f741199](https://www.github.com/googleapis/nodejs-analytics-admin/commit/f741199acb8544367d61e579ddad40eed45baf45)) + +## 1.0.0 (2020-07-28) + + +### ⚠ BREAKING CHANGES + +* initial generation of full library (#1) + +### Features + +* add samples ([#10](https://www.github.com/googleapis/nodejs-analytics-admin/issues/10)) ([1de6156](https://www.github.com/googleapis/nodejs-analytics-admin/commit/1de615633769fe75fdea819bc01f374b65447276)) +* initial generation of full library ([#1](https://www.github.com/googleapis/nodejs-analytics-admin/issues/1)) ([563ad77](https://www.github.com/googleapis/nodejs-analytics-admin/commit/563ad77b0d57edfebee51b66183d63a7ef1cd1d7)) +* initial stubbed out version of library ([0bb2cfd](https://www.github.com/googleapis/nodejs-analytics-admin/commit/0bb2cfd203d065765a07f8f34fa7d82d6dad9726)) + + +### Bug Fixes + +* broken docs test ([#11](https://www.github.com/googleapis/nodejs-analytics-admin/issues/11)) ([51f990f](https://www.github.com/googleapis/nodejs-analytics-admin/commit/51f990f6bbf1b7e1cf5cb5bb66c745d01244f4e5)) diff --git a/packages/google-analytics-admin/CODE_OF_CONDUCT.md b/packages/google-analytics-admin/CODE_OF_CONDUCT.md new file mode 100644 index 00000000000..2add2547a81 --- /dev/null +++ b/packages/google-analytics-admin/CODE_OF_CONDUCT.md @@ -0,0 +1,94 @@ + +# Code of Conduct + +## Our Pledge + +In the interest of fostering an open and welcoming environment, we as +contributors and maintainers pledge to making participation in our project and +our community a harassment-free experience for everyone, regardless of age, body +size, disability, ethnicity, gender identity and expression, level of +experience, education, socio-economic status, nationality, personal appearance, +race, religion, or sexual identity and orientation. + +## Our Standards + +Examples of behavior that contributes to creating a positive environment +include: + +* Using welcoming and inclusive language +* Being respectful of differing viewpoints and experiences +* Gracefully accepting constructive criticism +* Focusing on what is best for the community +* Showing empathy towards other community members + +Examples of unacceptable behavior by participants include: + +* The use of sexualized language or imagery and unwelcome sexual attention or + advances +* Trolling, insulting/derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or electronic + address, without explicit permission +* Other conduct which could reasonably be considered inappropriate in a + professional setting + +## Our Responsibilities + +Project maintainers are responsible for clarifying the standards of acceptable +behavior and are expected to take appropriate and fair corrective action in +response to any instances of unacceptable behavior. + +Project maintainers have the right and responsibility to remove, edit, or reject +comments, commits, code, wiki edits, issues, and other contributions that are +not aligned to this Code of Conduct, or to ban temporarily or permanently any +contributor for other behaviors that they deem inappropriate, threatening, +offensive, or harmful. + +## Scope + +This Code of Conduct applies both within project spaces and in public spaces +when an individual is representing the project or its community. Examples of +representing a project or community include using an official project e-mail +address, posting via an official social media account, or acting as an appointed +representative at an online or offline event. Representation of a project may be +further defined and clarified by project maintainers. + +This Code of Conduct also applies outside the project spaces when the Project +Steward has a reasonable belief that an individual's behavior may have a +negative impact on the project or its community. + +## Conflict Resolution + +We do not believe that all conflict is bad; healthy debate and disagreement +often yield positive results. However, it is never okay to be disrespectful or +to engage in behavior that violates the project’s code of conduct. + +If you see someone violating the code of conduct, you are encouraged to address +the behavior directly with those involved. Many issues can be resolved quickly +and easily, and this gives people more control over the outcome of their +dispute. If you are unable to resolve the matter for any reason, or if the +behavior is threatening or harassing, report it. We are dedicated to providing +an environment where participants feel welcome and safe. + +Reports should be directed to *googleapis-stewards@google.com*, the +Project Steward(s) for *Google Cloud Client Libraries*. It is the Project Steward’s duty to +receive and address reported violations of the code of conduct. They will then +work with a committee consisting of representatives from the Open Source +Programs Office and the Google Open Source Strategy team. If for any reason you +are uncomfortable reaching out to the Project Steward, please email +opensource@google.com. + +We will investigate every complaint, but you may not receive a direct response. +We will use our discretion in determining when and how to follow up on reported +incidents, which may range from not taking action to permanent expulsion from +the project and project-sponsored spaces. We will notify the accused of the +report and provide them an opportunity to discuss it before any action is taken. +The identity of the reporter will be omitted from the details of the report +supplied to the accused. In potentially harmful situations, such as ongoing +harassment or threats to anyone's safety, we may take action without notice. + +## Attribution + +This Code of Conduct is adapted from the Contributor Covenant, version 1.4, +available at +https://www.contributor-covenant.org/version/1/4/code-of-conduct.html \ No newline at end of file diff --git a/packages/google-analytics-admin/CONTRIBUTING.md b/packages/google-analytics-admin/CONTRIBUTING.md new file mode 100644 index 00000000000..bd6935b707a --- /dev/null +++ b/packages/google-analytics-admin/CONTRIBUTING.md @@ -0,0 +1,75 @@ +# 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 the Google Analytics Admin 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=analyticsadmin.googleapis.com +[auth]: https://cloud.google.com/docs/authentication/getting-started \ No newline at end of file diff --git a/packages/google-analytics-admin/LICENSE b/packages/google-analytics-admin/LICENSE new file mode 100644 index 00000000000..d6456956733 --- /dev/null +++ b/packages/google-analytics-admin/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/packages/google-analytics-admin/README.md b/packages/google-analytics-admin/README.md new file mode 100644 index 00000000000..c9e3251c711 --- /dev/null +++ b/packages/google-analytics-admin/README.md @@ -0,0 +1,313 @@ +[//]: # "This README.md file is auto-generated, all changes to this file will be lost." +[//]: # "To regenerate it, use `python -m synthtool`." +Google Cloud Platform logo + +# [Google Analytics Admin: Node.js Client](https://github.com/googleapis/google-cloud-node) + +[![release level](https://img.shields.io/badge/release%20level-preview-yellow.svg?style=flat)](https://cloud.google.com/terms/launch-stages) +[![npm version](https://img.shields.io/npm/v/@google-analytics/admin.svg)](https://www.npmjs.org/package/@google-analytics/admin) + + + + +Admin client for Node.js + + +A comprehensive list of changes in each version may be found in +[the CHANGELOG](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-analytics-admin/CHANGELOG.md). + +* [Google Analytics Admin Node.js Client API Reference][client-docs] +* [Google Analytics Admin Documentation][product-docs] +* [github.com/googleapis/google-cloud-node/packages/google-analytics-admin](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-analytics-admin) + +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) + * [Using the client library](#using-the-client-library) +* [Samples](#samples) +* [Versioning](#versioning) +* [Contributing](#contributing) +* [License](#license) + +## Quickstart + +### Before you begin + +1. [Select or create a Cloud Platform project][projects]. +1. [Enable the Google Analytics Admin API][enable_api]. +1. [Set up authentication with a service account][auth] so you can access the + API from your local workstation. + +### Installing the client library + +```bash +npm install @google-analytics/admin +``` + + +### Using the client library + +```javascript +// Imports the Google Analytics Admin API client library +const analyticsAdmin = require('@google-analytics/admin'); + +async function main() { + // Instantiates a client using default credentials. + // TODO(developer): uncomment and use the following line in order to + // manually set the path to the service account JSON file instead of + // using the value from the GOOGLE_APPLICATION_CREDENTIALS environment + // variable. + // const analyticsAdminClient = new analyticsAdmin.AnalyticsAdminServiceClient( + // {keyFilename: "your_key_json_file_path"}); + const analyticsAdminClient = new analyticsAdmin.AnalyticsAdminServiceClient(); + + // Calls listAccounts() method of the Google Analytics Admin API and prints + // the response for each account. + const [accounts] = await analyticsAdminClient.listAccounts(); + + console.log('Accounts:'); + accounts.forEach(account => { + console.log(account); + }); +} + +main(...process.argv.slice(2)).catch(err => { + console.error(err.message); + process.exitCode = 1; +}); +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); + + +``` + + + +## Samples + +Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/tree/main/samples) directory. Each sample's `README.md` has instructions for running its sample. + +| Sample | Source Code | Try it | +| --------------------------- | --------------------------------- | ------ | +| Analytics_admin_service.acknowledge_user_data_collection | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.acknowledge_user_data_collection.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.acknowledge_user_data_collection.js,samples/README.md) | +| Analytics_admin_service.approve_display_video360_advertiser_link_proposal | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.approve_display_video360_advertiser_link_proposal.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.approve_display_video360_advertiser_link_proposal.js,samples/README.md) | +| Analytics_admin_service.archive_audience | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.archive_audience.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.archive_audience.js,samples/README.md) | +| Analytics_admin_service.archive_custom_dimension | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.archive_custom_dimension.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.archive_custom_dimension.js,samples/README.md) | +| Analytics_admin_service.archive_custom_metric | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.archive_custom_metric.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.archive_custom_metric.js,samples/README.md) | +| Analytics_admin_service.audit_user_links | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.audit_user_links.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.audit_user_links.js,samples/README.md) | +| Analytics_admin_service.batch_create_user_links | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.batch_create_user_links.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.batch_create_user_links.js,samples/README.md) | +| Analytics_admin_service.batch_delete_user_links | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.batch_delete_user_links.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.batch_delete_user_links.js,samples/README.md) | +| Analytics_admin_service.batch_get_user_links | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.batch_get_user_links.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.batch_get_user_links.js,samples/README.md) | +| Analytics_admin_service.batch_update_user_links | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.batch_update_user_links.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.batch_update_user_links.js,samples/README.md) | +| Analytics_admin_service.cancel_display_video360_advertiser_link_proposal | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.cancel_display_video360_advertiser_link_proposal.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.cancel_display_video360_advertiser_link_proposal.js,samples/README.md) | +| Analytics_admin_service.create_audience | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_audience.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_audience.js,samples/README.md) | +| Analytics_admin_service.create_conversion_event | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_conversion_event.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_conversion_event.js,samples/README.md) | +| Analytics_admin_service.create_custom_dimension | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_custom_dimension.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_custom_dimension.js,samples/README.md) | +| Analytics_admin_service.create_custom_metric | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_custom_metric.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_custom_metric.js,samples/README.md) | +| Analytics_admin_service.create_data_stream | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_data_stream.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_data_stream.js,samples/README.md) | +| Analytics_admin_service.create_display_video360_advertiser_link | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_display_video360_advertiser_link.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_display_video360_advertiser_link.js,samples/README.md) | +| Analytics_admin_service.create_display_video360_advertiser_link_proposal | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_display_video360_advertiser_link_proposal.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_display_video360_advertiser_link_proposal.js,samples/README.md) | +| Analytics_admin_service.create_firebase_link | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_firebase_link.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_firebase_link.js,samples/README.md) | +| Analytics_admin_service.create_google_ads_link | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_google_ads_link.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_google_ads_link.js,samples/README.md) | +| Analytics_admin_service.create_measurement_protocol_secret | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_measurement_protocol_secret.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_measurement_protocol_secret.js,samples/README.md) | +| Analytics_admin_service.create_property | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_property.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_property.js,samples/README.md) | +| Analytics_admin_service.create_user_link | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_user_link.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_user_link.js,samples/README.md) | +| Analytics_admin_service.create_web_data_stream | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_web_data_stream.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_web_data_stream.js,samples/README.md) | +| Analytics_admin_service.delete_account | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_account.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_account.js,samples/README.md) | +| Analytics_admin_service.delete_android_app_data_stream | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_android_app_data_stream.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_android_app_data_stream.js,samples/README.md) | +| Analytics_admin_service.delete_conversion_event | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_conversion_event.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_conversion_event.js,samples/README.md) | +| Analytics_admin_service.delete_data_stream | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_data_stream.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_data_stream.js,samples/README.md) | +| Analytics_admin_service.delete_display_video360_advertiser_link | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_display_video360_advertiser_link.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_display_video360_advertiser_link.js,samples/README.md) | +| Analytics_admin_service.delete_display_video360_advertiser_link_proposal | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_display_video360_advertiser_link_proposal.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_display_video360_advertiser_link_proposal.js,samples/README.md) | +| Analytics_admin_service.delete_firebase_link | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_firebase_link.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_firebase_link.js,samples/README.md) | +| Analytics_admin_service.delete_google_ads_link | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_google_ads_link.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_google_ads_link.js,samples/README.md) | +| Analytics_admin_service.delete_ios_app_data_stream | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_ios_app_data_stream.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_ios_app_data_stream.js,samples/README.md) | +| Analytics_admin_service.delete_measurement_protocol_secret | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_measurement_protocol_secret.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_measurement_protocol_secret.js,samples/README.md) | +| Analytics_admin_service.delete_property | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_property.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_property.js,samples/README.md) | +| Analytics_admin_service.delete_user_link | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_user_link.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_user_link.js,samples/README.md) | +| Analytics_admin_service.delete_web_data_stream | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_web_data_stream.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_web_data_stream.js,samples/README.md) | +| Analytics_admin_service.get_account | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_account.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_account.js,samples/README.md) | +| Analytics_admin_service.get_android_app_data_stream | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_android_app_data_stream.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_android_app_data_stream.js,samples/README.md) | +| Analytics_admin_service.get_attribution_settings | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_attribution_settings.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_attribution_settings.js,samples/README.md) | +| Analytics_admin_service.get_audience | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_audience.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_audience.js,samples/README.md) | +| Analytics_admin_service.get_conversion_event | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_conversion_event.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_conversion_event.js,samples/README.md) | +| Analytics_admin_service.get_custom_dimension | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_custom_dimension.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_custom_dimension.js,samples/README.md) | +| Analytics_admin_service.get_custom_metric | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_custom_metric.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_custom_metric.js,samples/README.md) | +| Analytics_admin_service.get_data_retention_settings | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_data_retention_settings.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_data_retention_settings.js,samples/README.md) | +| Analytics_admin_service.get_data_sharing_settings | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_data_sharing_settings.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_data_sharing_settings.js,samples/README.md) | +| Analytics_admin_service.get_data_stream | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_data_stream.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_data_stream.js,samples/README.md) | +| Analytics_admin_service.get_display_video360_advertiser_link | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_display_video360_advertiser_link.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_display_video360_advertiser_link.js,samples/README.md) | +| Analytics_admin_service.get_display_video360_advertiser_link_proposal | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_display_video360_advertiser_link_proposal.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_display_video360_advertiser_link_proposal.js,samples/README.md) | +| Analytics_admin_service.get_enhanced_measurement_settings | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_enhanced_measurement_settings.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_enhanced_measurement_settings.js,samples/README.md) | +| Analytics_admin_service.get_global_site_tag | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_global_site_tag.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_global_site_tag.js,samples/README.md) | +| Analytics_admin_service.get_google_signals_settings | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_google_signals_settings.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_google_signals_settings.js,samples/README.md) | +| Analytics_admin_service.get_ios_app_data_stream | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_ios_app_data_stream.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_ios_app_data_stream.js,samples/README.md) | +| Analytics_admin_service.get_measurement_protocol_secret | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_measurement_protocol_secret.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_measurement_protocol_secret.js,samples/README.md) | +| Analytics_admin_service.get_property | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_property.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_property.js,samples/README.md) | +| Analytics_admin_service.get_user_link | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_user_link.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_user_link.js,samples/README.md) | +| Analytics_admin_service.get_web_data_stream | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_web_data_stream.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_web_data_stream.js,samples/README.md) | +| Analytics_admin_service.list_account_summaries | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_account_summaries.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_account_summaries.js,samples/README.md) | +| Analytics_admin_service.list_accounts | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_accounts.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_accounts.js,samples/README.md) | +| Analytics_admin_service.list_android_app_data_streams | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_android_app_data_streams.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_android_app_data_streams.js,samples/README.md) | +| Analytics_admin_service.list_audiences | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_audiences.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_audiences.js,samples/README.md) | +| Analytics_admin_service.list_conversion_events | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_conversion_events.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_conversion_events.js,samples/README.md) | +| Analytics_admin_service.list_custom_dimensions | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_custom_dimensions.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_custom_dimensions.js,samples/README.md) | +| Analytics_admin_service.list_custom_metrics | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_custom_metrics.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_custom_metrics.js,samples/README.md) | +| Analytics_admin_service.list_data_streams | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_data_streams.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_data_streams.js,samples/README.md) | +| Analytics_admin_service.list_display_video360_advertiser_link_proposals | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_display_video360_advertiser_link_proposals.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_display_video360_advertiser_link_proposals.js,samples/README.md) | +| Analytics_admin_service.list_display_video360_advertiser_links | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_display_video360_advertiser_links.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_display_video360_advertiser_links.js,samples/README.md) | +| Analytics_admin_service.list_firebase_links | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_firebase_links.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_firebase_links.js,samples/README.md) | +| Analytics_admin_service.list_google_ads_links | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_google_ads_links.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_google_ads_links.js,samples/README.md) | +| Analytics_admin_service.list_ios_app_data_streams | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_ios_app_data_streams.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_ios_app_data_streams.js,samples/README.md) | +| Analytics_admin_service.list_measurement_protocol_secrets | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_measurement_protocol_secrets.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_measurement_protocol_secrets.js,samples/README.md) | +| Analytics_admin_service.list_properties | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_properties.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_properties.js,samples/README.md) | +| Analytics_admin_service.list_user_links | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_user_links.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_user_links.js,samples/README.md) | +| Analytics_admin_service.list_web_data_streams | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_web_data_streams.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_web_data_streams.js,samples/README.md) | +| Analytics_admin_service.provision_account_ticket | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.provision_account_ticket.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.provision_account_ticket.js,samples/README.md) | +| Analytics_admin_service.run_access_report | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.run_access_report.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.run_access_report.js,samples/README.md) | +| Analytics_admin_service.search_change_history_events | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.search_change_history_events.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.search_change_history_events.js,samples/README.md) | +| Analytics_admin_service.update_account | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_account.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_account.js,samples/README.md) | +| Analytics_admin_service.update_android_app_data_stream | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_android_app_data_stream.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_android_app_data_stream.js,samples/README.md) | +| Analytics_admin_service.update_attribution_settings | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_attribution_settings.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_attribution_settings.js,samples/README.md) | +| Analytics_admin_service.update_audience | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_audience.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_audience.js,samples/README.md) | +| Analytics_admin_service.update_custom_dimension | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_custom_dimension.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_custom_dimension.js,samples/README.md) | +| Analytics_admin_service.update_custom_metric | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_custom_metric.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_custom_metric.js,samples/README.md) | +| Analytics_admin_service.update_data_retention_settings | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_data_retention_settings.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_data_retention_settings.js,samples/README.md) | +| Analytics_admin_service.update_data_stream | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_data_stream.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_data_stream.js,samples/README.md) | +| Analytics_admin_service.update_display_video360_advertiser_link | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_display_video360_advertiser_link.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_display_video360_advertiser_link.js,samples/README.md) | +| Analytics_admin_service.update_enhanced_measurement_settings | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_enhanced_measurement_settings.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_enhanced_measurement_settings.js,samples/README.md) | +| Analytics_admin_service.update_google_ads_link | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_google_ads_link.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_google_ads_link.js,samples/README.md) | +| Analytics_admin_service.update_google_signals_settings | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_google_signals_settings.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_google_signals_settings.js,samples/README.md) | +| Analytics_admin_service.update_ios_app_data_stream | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_ios_app_data_stream.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_ios_app_data_stream.js,samples/README.md) | +| Analytics_admin_service.update_measurement_protocol_secret | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_measurement_protocol_secret.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_measurement_protocol_secret.js,samples/README.md) | +| Analytics_admin_service.update_property | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_property.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_property.js,samples/README.md) | +| Analytics_admin_service.update_user_link | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_user_link.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_user_link.js,samples/README.md) | +| Analytics_admin_service.update_web_data_stream | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_web_data_stream.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_web_data_stream.js,samples/README.md) | +| Analytics_admin_service.acknowledge_user_data_collection | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.acknowledge_user_data_collection.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.acknowledge_user_data_collection.js,samples/README.md) | +| Analytics_admin_service.archive_custom_dimension | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.archive_custom_dimension.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.archive_custom_dimension.js,samples/README.md) | +| Analytics_admin_service.archive_custom_metric | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.archive_custom_metric.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.archive_custom_metric.js,samples/README.md) | +| Analytics_admin_service.create_conversion_event | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.create_conversion_event.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.create_conversion_event.js,samples/README.md) | +| Analytics_admin_service.create_custom_dimension | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.create_custom_dimension.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.create_custom_dimension.js,samples/README.md) | +| Analytics_admin_service.create_custom_metric | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.create_custom_metric.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.create_custom_metric.js,samples/README.md) | +| Analytics_admin_service.create_data_stream | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.create_data_stream.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.create_data_stream.js,samples/README.md) | +| Analytics_admin_service.create_firebase_link | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.create_firebase_link.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.create_firebase_link.js,samples/README.md) | +| Analytics_admin_service.create_google_ads_link | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.create_google_ads_link.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.create_google_ads_link.js,samples/README.md) | +| Analytics_admin_service.create_measurement_protocol_secret | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.create_measurement_protocol_secret.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.create_measurement_protocol_secret.js,samples/README.md) | +| Analytics_admin_service.create_property | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.create_property.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.create_property.js,samples/README.md) | +| Analytics_admin_service.delete_account | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.delete_account.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.delete_account.js,samples/README.md) | +| Analytics_admin_service.delete_conversion_event | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.delete_conversion_event.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.delete_conversion_event.js,samples/README.md) | +| Analytics_admin_service.delete_data_stream | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.delete_data_stream.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.delete_data_stream.js,samples/README.md) | +| Analytics_admin_service.delete_firebase_link | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.delete_firebase_link.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.delete_firebase_link.js,samples/README.md) | +| Analytics_admin_service.delete_google_ads_link | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.delete_google_ads_link.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.delete_google_ads_link.js,samples/README.md) | +| Analytics_admin_service.delete_measurement_protocol_secret | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.delete_measurement_protocol_secret.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.delete_measurement_protocol_secret.js,samples/README.md) | +| Analytics_admin_service.delete_property | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.delete_property.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.delete_property.js,samples/README.md) | +| Analytics_admin_service.get_account | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.get_account.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.get_account.js,samples/README.md) | +| Analytics_admin_service.get_conversion_event | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.get_conversion_event.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.get_conversion_event.js,samples/README.md) | +| Analytics_admin_service.get_custom_dimension | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.get_custom_dimension.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.get_custom_dimension.js,samples/README.md) | +| Analytics_admin_service.get_custom_metric | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.get_custom_metric.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.get_custom_metric.js,samples/README.md) | +| Analytics_admin_service.get_data_retention_settings | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.get_data_retention_settings.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.get_data_retention_settings.js,samples/README.md) | +| Analytics_admin_service.get_data_sharing_settings | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.get_data_sharing_settings.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.get_data_sharing_settings.js,samples/README.md) | +| Analytics_admin_service.get_data_stream | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.get_data_stream.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.get_data_stream.js,samples/README.md) | +| Analytics_admin_service.get_measurement_protocol_secret | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.get_measurement_protocol_secret.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.get_measurement_protocol_secret.js,samples/README.md) | +| Analytics_admin_service.get_property | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.get_property.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.get_property.js,samples/README.md) | +| Analytics_admin_service.list_account_summaries | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.list_account_summaries.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.list_account_summaries.js,samples/README.md) | +| Analytics_admin_service.list_accounts | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.list_accounts.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.list_accounts.js,samples/README.md) | +| Analytics_admin_service.list_conversion_events | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.list_conversion_events.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.list_conversion_events.js,samples/README.md) | +| Analytics_admin_service.list_custom_dimensions | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.list_custom_dimensions.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.list_custom_dimensions.js,samples/README.md) | +| Analytics_admin_service.list_custom_metrics | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.list_custom_metrics.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.list_custom_metrics.js,samples/README.md) | +| Analytics_admin_service.list_data_streams | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.list_data_streams.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.list_data_streams.js,samples/README.md) | +| Analytics_admin_service.list_firebase_links | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.list_firebase_links.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.list_firebase_links.js,samples/README.md) | +| Analytics_admin_service.list_google_ads_links | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.list_google_ads_links.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.list_google_ads_links.js,samples/README.md) | +| Analytics_admin_service.list_measurement_protocol_secrets | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.list_measurement_protocol_secrets.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.list_measurement_protocol_secrets.js,samples/README.md) | +| Analytics_admin_service.list_properties | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.list_properties.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.list_properties.js,samples/README.md) | +| Analytics_admin_service.provision_account_ticket | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.provision_account_ticket.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.provision_account_ticket.js,samples/README.md) | +| Analytics_admin_service.search_change_history_events | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.search_change_history_events.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.search_change_history_events.js,samples/README.md) | +| Analytics_admin_service.update_account | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.update_account.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.update_account.js,samples/README.md) | +| Analytics_admin_service.update_custom_dimension | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.update_custom_dimension.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.update_custom_dimension.js,samples/README.md) | +| Analytics_admin_service.update_custom_metric | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.update_custom_metric.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.update_custom_metric.js,samples/README.md) | +| Analytics_admin_service.update_data_retention_settings | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.update_data_retention_settings.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.update_data_retention_settings.js,samples/README.md) | +| Analytics_admin_service.update_data_stream | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.update_data_stream.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.update_data_stream.js,samples/README.md) | +| Analytics_admin_service.update_google_ads_link | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.update_google_ads_link.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.update_google_ads_link.js,samples/README.md) | +| Analytics_admin_service.update_measurement_protocol_secret | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.update_measurement_protocol_secret.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.update_measurement_protocol_secret.js,samples/README.md) | +| Analytics_admin_service.update_property | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.update_property.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.update_property.js,samples/README.md) | +| Quickstart | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/quickstart.js,samples/README.md) | +| Quickstart.test | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/test/quickstart.test.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/test/quickstart.test.js,samples/README.md) | + + + +The [Google Analytics Admin Node.js Client API Reference][client-docs] documentation +also contains samples. + +## Supported Node.js Versions + +Our client libraries follow the [Node.js release schedule](https://nodejs.org/en/about/releases/). +Libraries are compatible with all current _active_ and _maintenance_ versions of +Node.js. +If you are using an end-of-life version of Node.js, we recommend that you update +as soon as possible to an actively supported LTS version. + +Google's client libraries support legacy versions of Node.js runtimes on a +best-efforts basis with the following warnings: + +* Legacy versions are not tested in continuous integration. +* Some security patches and features cannot be backported. +* Dependencies cannot be kept up-to-date. + +Client libraries targeting some end-of-life versions of Node.js are available, and +can be installed through npm [dist-tags](https://docs.npmjs.com/cli/dist-tag). +The dist-tags follow the naming convention `legacy-(version)`. +For example, `npm install @google-analytics/admin@legacy-8` installs client libraries +for versions compatible with Node.js 8. + +## Versioning + +This library follows [Semantic Versioning](http://semver.org/). + + + + + + + +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. + + +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/CONTRIBUTING.md). + +Please note that this `README.md`, the `samples/README.md`, +and a variety of configuration files in this repository (including `.nycrc` and `tsconfig.json`) +are generated from a central template. To edit one of these files, make an edit +to its templates in +[directory](https://github.com/googleapis/synthtool). + +## License + +Apache Version 2.0 + +See [LICENSE](https://github.com/googleapis/google-cloud-node/blob/main/LICENSE) + +[client-docs]: https://googleapis.dev/nodejs/analytics-admin/latest/index.html +[product-docs]: https://developers.google.com/analytics +[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=analyticsadmin.googleapis.com +[auth]: https://cloud.google.com/docs/authentication/getting-started diff --git a/packages/google-analytics-admin/linkinator.config.json b/packages/google-analytics-admin/linkinator.config.json new file mode 100644 index 00000000000..befd23c8633 --- /dev/null +++ b/packages/google-analytics-admin/linkinator.config.json @@ -0,0 +1,16 @@ +{ + "recurse": true, + "skip": [ + "https://codecov.io/gh/googleapis/", + "www.googleapis.com", + "img.shields.io", + "https://console.cloud.google.com/cloudshell", + "https://support.google.com" + ], + "silent": true, + "concurrency": 5, + "retry": true, + "retryErrors": true, + "retryErrorsCount": 5, + "retryErrorsJitter": 3000 +} diff --git a/packages/google-analytics-admin/owlbot.py b/packages/google-analytics-admin/owlbot.py new file mode 100644 index 00000000000..daafe526af5 --- /dev/null +++ b/packages/google-analytics-admin/owlbot.py @@ -0,0 +1,17 @@ +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.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. +"""This script is used to synthesize generated parts of this library.""" +import synthtool.languages.node_mono_repo as node + +node.owlbot_main(relative_dir="packages/google-analytics-admin",templates_excludes=['.github/CODEOWNERS']) \ No newline at end of file diff --git a/packages/google-analytics-admin/package.json b/packages/google-analytics-admin/package.json new file mode 100644 index 00000000000..4146364e436 --- /dev/null +++ b/packages/google-analytics-admin/package.json @@ -0,0 +1,71 @@ +{ + "name": "@google-analytics/admin", + "version": "4.3.0", + "description": "Admin client for Node.js", + "repository": { + "type": "git", + "directory": "packages/google-analytics-admin", + "url": "https://github.com/googleapis/google-cloud-node.git" + }, + "license": "Apache-2.0", + "author": "Google LLC", + "main": "build/src/index.js", + "files": [ + "build/src", + "build/protos" + ], + "keywords": [ + "google apis client", + "google api client", + "google apis", + "google api", + "google", + "google cloud platform", + "google cloud", + "cloud", + "google admin", + "admin", + "analytics admin service" + ], + "scripts": { + "clean": "gts clean", + "compile": "tsc -p . && cp -r protos build/", + "compile-protos": "compileProtos src", + "docs": "jsdoc -c .jsdoc.js", + "predocs-test": "npm run docs", + "docs-test": "linkinator docs", + "fix": "gts fix", + "lint": "gts check", + "prelint": "cd samples; npm link ../; npm i", + "prepare": "npm run compile-protos && npm run compile", + "samples-test": "npm run compile && cd samples/ && npm link ../ && npm i && npm test", + "system-test": "npm run compile && c8 mocha build/system-test", + "test": "c8 mocha build/test" + }, + "dependencies": { + "google-auth-library": "^8.0.2", + "google-gax": "^3.5.2", + "server-destroy": "^1.0.1" + }, + "devDependencies": { + "@types/mocha": "^9.0.0", + "@types/node": "^18.0.0", + "@types/sinon": "^10.0.0", + "c8": "^7.2.0", + "gts": "^3.1.0", + "jsdoc": "^4.0.0", + "jsdoc-fresh": "^2.0.0", + "jsdoc-region-tag": "^2.0.0", + "linkinator": "^4.0.0", + "mocha": "^9.2.2", + "null-loader": "^4.0.0", + "pack-n-play": "^1.0.0-2", + "sinon": "^14.0.0", + "ts-loader": "^9.0.0", + "typescript": "^4.6.4" + }, + "engines": { + "node": ">=12.0.0" + }, + "homepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-analytics-admin" +} diff --git a/packages/google-analytics-admin/protos/google/analytics/admin/v1alpha/access_report.proto b/packages/google-analytics-admin/protos/google/analytics/admin/v1alpha/access_report.proto new file mode 100644 index 00000000000..ce6a8aa154f --- /dev/null +++ b/packages/google-analytics-admin/protos/google/analytics/admin/v1alpha/access_report.proto @@ -0,0 +1,328 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.analytics.admin.v1alpha; + +option go_package = "google.golang.org/genproto/googleapis/analytics/admin/v1alpha;admin"; +option java_multiple_files = true; +option java_outer_classname = "AccessReportProto"; +option java_package = "com.google.analytics.admin.v1alpha"; + +// Dimensions are attributes of your data. For example, the dimension +// `userEmail` indicates the email of the user that accessed reporting data. +// Dimension values in report responses are strings. +message AccessDimension { + // The API name of the dimension. See [Data Access + // Schema](https://developers.google.com/analytics/devguides/config/admin/v1/access-api-schema) + // for the list of dimensions supported in this API. + // + // Dimensions are referenced by name in `dimensionFilter` and `orderBys`. + string dimension_name = 1; +} + +// The quantitative measurements of a report. For example, the metric +// `accessCount` is the total number of data access records. +message AccessMetric { + // The API name of the metric. See [Data Access + // Schema](https://developers.google.com/analytics/devguides/config/admin/v1/access-api-schema) + // for the list of metrics supported in this API. + // + // Metrics are referenced by name in `metricFilter` & `orderBys`. + string metric_name = 1; +} + +// A contiguous range of days: startDate, startDate + 1, ..., endDate. +message AccessDateRange { + // The inclusive start date for the query in the format `YYYY-MM-DD`. Cannot + // be after `endDate`. The format `NdaysAgo`, `yesterday`, or `today` is also + // accepted, and in that case, the date is inferred based on the current time + // in the request's time zone. + string start_date = 1; + + // The inclusive end date for the query in the format `YYYY-MM-DD`. Cannot + // be before `startDate`. The format `NdaysAgo`, `yesterday`, or `today` is + // also accepted, and in that case, the date is inferred based on the current + // time in the request's time zone. + string end_date = 2; +} + +// Expresses dimension or metric filters. The fields in the same expression need +// to be either all dimensions or all metrics. +message AccessFilterExpression { + // Specify one type of filter expression for `FilterExpression`. + oneof one_expression { + // Each of the FilterExpressions in the and_group has an AND relationship. + AccessFilterExpressionList and_group = 1; + + // Each of the FilterExpressions in the or_group has an OR relationship. + AccessFilterExpressionList or_group = 2; + + // The FilterExpression is NOT of not_expression. + AccessFilterExpression not_expression = 3; + + // A primitive filter. In the same FilterExpression, all of the filter's + // field names need to be either all dimensions or all metrics. + AccessFilter access_filter = 4; + } +} + +// A list of filter expressions. +message AccessFilterExpressionList { + // A list of filter expressions. + repeated AccessFilterExpression expressions = 1; +} + +// An expression to filter dimension or metric values. +message AccessFilter { + // Specify one type of filter for `Filter`. + oneof one_filter { + // Strings related filter. + AccessStringFilter string_filter = 2; + + // A filter for in list values. + AccessInListFilter in_list_filter = 3; + + // A filter for numeric or date values. + AccessNumericFilter numeric_filter = 4; + + // A filter for two values. + AccessBetweenFilter between_filter = 5; + } + + // The dimension name or metric name. + string field_name = 1; +} + +// The filter for strings. +message AccessStringFilter { + // The match type of a string filter. + enum MatchType { + // Unspecified + MATCH_TYPE_UNSPECIFIED = 0; + + // Exact match of the string value. + EXACT = 1; + + // Begins with the string value. + BEGINS_WITH = 2; + + // Ends with the string value. + ENDS_WITH = 3; + + // Contains the string value. + CONTAINS = 4; + + // Full match for the regular expression with the string value. + FULL_REGEXP = 5; + + // Partial match for the regular expression with the string value. + PARTIAL_REGEXP = 6; + } + + // The match type for this filter. + MatchType match_type = 1; + + // The string value used for the matching. + string value = 2; + + // If true, the string value is case sensitive. + bool case_sensitive = 3; +} + +// The result needs to be in a list of string values. +message AccessInListFilter { + // The list of string values. Must be non-empty. + repeated string values = 1; + + // If true, the string value is case sensitive. + bool case_sensitive = 2; +} + +// Filters for numeric or date values. +message AccessNumericFilter { + // The operation applied to a numeric filter. + enum Operation { + // Unspecified. + OPERATION_UNSPECIFIED = 0; + + // Equal + EQUAL = 1; + + // Less than + LESS_THAN = 2; + + // Less than or equal + LESS_THAN_OR_EQUAL = 3; + + // Greater than + GREATER_THAN = 4; + + // Greater than or equal + GREATER_THAN_OR_EQUAL = 5; + } + + // The operation type for this filter. + Operation operation = 1; + + // A numeric value or a date value. + NumericValue value = 2; +} + +// To express that the result needs to be between two numbers (inclusive). +message AccessBetweenFilter { + // Begins with this number. + NumericValue from_value = 1; + + // Ends with this number. + NumericValue to_value = 2; +} + +// To represent a number. +message NumericValue { + // One of a numeric value + oneof one_value { + // Integer value + int64 int64_value = 1; + + // Double value + double double_value = 2; + } +} + +// Order bys define how rows will be sorted in the response. For example, +// ordering rows by descending access count is one ordering, and ordering rows +// by the country string is a different ordering. +message AccessOrderBy { + // Sorts by metric values. + message MetricOrderBy { + // A metric name in the request to order by. + string metric_name = 1; + } + + // Sorts by dimension values. + message DimensionOrderBy { + // Rule to order the string dimension values by. + enum OrderType { + // Unspecified. + ORDER_TYPE_UNSPECIFIED = 0; + + // Alphanumeric sort by Unicode code point. For example, "2" < "A" < "X" < + // "b" < "z". + ALPHANUMERIC = 1; + + // Case insensitive alphanumeric sort by lower case Unicode code point. + // For example, "2" < "A" < "b" < "X" < "z". + CASE_INSENSITIVE_ALPHANUMERIC = 2; + + // Dimension values are converted to numbers before sorting. For example + // in NUMERIC sort, "25" < "100", and in `ALPHANUMERIC` sort, "100" < + // "25". Non-numeric dimension values all have equal ordering value below + // all numeric values. + NUMERIC = 3; + } + + // A dimension name in the request to order by. + string dimension_name = 1; + + // Controls the rule for dimension value ordering. + OrderType order_type = 2; + } + + // Specify one type of order by for `OrderBy`. + oneof one_order_by { + // Sorts results by a metric's values. + MetricOrderBy metric = 1; + + // Sorts results by a dimension's values. + DimensionOrderBy dimension = 2; + } + + // If true, sorts by descending order. If false or unspecified, sorts in + // ascending order. + bool desc = 3; +} + +// Describes a dimension column in the report. Dimensions requested in a report +// produce column entries within rows and DimensionHeaders. However, dimensions +// used exclusively within filters or expressions do not produce columns in a +// report; correspondingly, those dimensions do not produce headers. +message AccessDimensionHeader { + // The dimension's name; for example 'userEmail'. + string dimension_name = 1; +} + +// Describes a metric column in the report. Visible metrics requested in a +// report produce column entries within rows and MetricHeaders. However, +// metrics used exclusively within filters or expressions do not produce columns +// in a report; correspondingly, those metrics do not produce headers. +message AccessMetricHeader { + // The metric's name; for example 'accessCount'. + string metric_name = 1; +} + +// Access report data for each row. +message AccessRow { + // List of dimension values. These values are in the same order as specified + // in the request. + repeated AccessDimensionValue dimension_values = 1; + + // List of metric values. These values are in the same order as specified + // in the request. + repeated AccessMetricValue metric_values = 2; +} + +// The value of a dimension. +message AccessDimensionValue { + // The dimension value. For example, this value may be 'France' for the + // 'country' dimension. + string value = 1; +} + +// The value of a metric. +message AccessMetricValue { + // The measurement value. For example, this value may be '13'. + string value = 1; +} + +// Current state of all quotas for this Analytics property. If any quota for a +// property is exhausted, all requests to that property will return Resource +// Exhausted errors. +message AccessQuota { + // Properties can use 250,000 tokens per day. Most requests consume fewer than + // 10 tokens. + AccessQuotaStatus tokens_per_day = 1; + + // Properties can use 50,000 tokens per hour. An API request consumes a single + // number of tokens, and that number is deducted from both the hourly and + // daily quotas. + AccessQuotaStatus tokens_per_hour = 2; + + // Properties can use up to 50 concurrent requests. + AccessQuotaStatus concurrent_requests = 3; + + // Properties and cloud project pairs can have up to 50 server errors per + // hour. + AccessQuotaStatus server_errors_per_project_per_hour = 4; +} + +// Current state for a particular quota group. +message AccessQuotaStatus { + // Quota consumed by this request. + int32 consumed = 1; + + // Quota remaining after this request. + int32 remaining = 2; +} diff --git a/packages/google-analytics-admin/protos/google/analytics/admin/v1alpha/analytics_admin.proto b/packages/google-analytics-admin/protos/google/analytics/admin/v1alpha/analytics_admin.proto new file mode 100644 index 00000000000..926f91bb335 --- /dev/null +++ b/packages/google-analytics-admin/protos/google/analytics/admin/v1alpha/analytics_admin.proto @@ -0,0 +1,2333 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.analytics.admin.v1alpha; + +import "google/analytics/admin/v1alpha/access_report.proto"; +import "google/analytics/admin/v1alpha/audience.proto"; +import "google/analytics/admin/v1alpha/resources.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"; +import "google/protobuf/timestamp.proto"; + +option go_package = "google.golang.org/genproto/googleapis/analytics/admin/v1alpha;admin"; +option java_multiple_files = true; +option java_outer_classname = "AnalyticsAdminProto"; +option java_package = "com.google.analytics.admin.v1alpha"; + +// Service Interface for the Analytics Admin API (GA4). +service AnalyticsAdminService { + option (google.api.default_host) = "analyticsadmin.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/analytics.edit," + "https://www.googleapis.com/auth/analytics.manage.users," + "https://www.googleapis.com/auth/analytics.manage.users.readonly," + "https://www.googleapis.com/auth/analytics.readonly"; + + // Lookup for a single Account. + rpc GetAccount(GetAccountRequest) returns (Account) { + option (google.api.http) = { + get: "/v1alpha/{name=accounts/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Returns all accounts accessible by the caller. + // + // Note that these accounts might not currently have GA4 properties. + // Soft-deleted (ie: "trashed") accounts are excluded by default. + // Returns an empty list if no relevant accounts are found. + rpc ListAccounts(ListAccountsRequest) returns (ListAccountsResponse) { + option (google.api.http) = { + get: "/v1alpha/accounts" + }; + } + + // Marks target Account as soft-deleted (ie: "trashed") and returns it. + // + // This API does not have a method to restore soft-deleted accounts. + // However, they can be restored using the Trash Can UI. + // + // If the accounts are not restored before the expiration time, the account + // and all child resources (eg: Properties, GoogleAdsLinks, Streams, + // UserLinks) will be permanently purged. + // https://support.google.com/analytics/answer/6154772 + // + // Returns an error if the target is not found. + rpc DeleteAccount(DeleteAccountRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1alpha/{name=accounts/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Updates an account. + rpc UpdateAccount(UpdateAccountRequest) returns (Account) { + option (google.api.http) = { + patch: "/v1alpha/{account.name=accounts/*}" + body: "account" + }; + option (google.api.method_signature) = "account,update_mask"; + } + + // Requests a ticket for creating an account. + rpc ProvisionAccountTicket(ProvisionAccountTicketRequest) returns (ProvisionAccountTicketResponse) { + option (google.api.http) = { + post: "/v1alpha/accounts:provisionAccountTicket" + body: "*" + }; + } + + // Returns summaries of all accounts accessible by the caller. + rpc ListAccountSummaries(ListAccountSummariesRequest) returns (ListAccountSummariesResponse) { + option (google.api.http) = { + get: "/v1alpha/accountSummaries" + }; + } + + // Lookup for a single "GA4" Property. + rpc GetProperty(GetPropertyRequest) returns (Property) { + option (google.api.http) = { + get: "/v1alpha/{name=properties/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Returns child Properties under the specified parent Account. + // + // Only "GA4" properties will be returned. + // Properties will be excluded if the caller does not have access. + // Soft-deleted (ie: "trashed") properties are excluded by default. + // Returns an empty list if no relevant properties are found. + rpc ListProperties(ListPropertiesRequest) returns (ListPropertiesResponse) { + option (google.api.http) = { + get: "/v1alpha/properties" + }; + } + + // Creates an "GA4" property with the specified location and attributes. + rpc CreateProperty(CreatePropertyRequest) returns (Property) { + option (google.api.http) = { + post: "/v1alpha/properties" + body: "property" + }; + option (google.api.method_signature) = "property"; + } + + // Marks target Property as soft-deleted (ie: "trashed") and returns it. + // + // This API does not have a method to restore soft-deleted properties. + // However, they can be restored using the Trash Can UI. + // + // If the properties are not restored before the expiration time, the Property + // and all child resources (eg: GoogleAdsLinks, Streams, UserLinks) + // will be permanently purged. + // https://support.google.com/analytics/answer/6154772 + // + // Returns an error if the target is not found, or is not an GA4 Property. + rpc DeleteProperty(DeletePropertyRequest) returns (Property) { + option (google.api.http) = { + delete: "/v1alpha/{name=properties/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Updates a property. + rpc UpdateProperty(UpdatePropertyRequest) returns (Property) { + option (google.api.http) = { + patch: "/v1alpha/{property.name=properties/*}" + body: "property" + }; + option (google.api.method_signature) = "property,update_mask"; + } + + // Gets information about a user's link to an account or property. + rpc GetUserLink(GetUserLinkRequest) returns (UserLink) { + option (google.api.http) = { + get: "/v1alpha/{name=accounts/*/userLinks/*}" + additional_bindings { + get: "/v1alpha/{name=properties/*/userLinks/*}" + } + }; + option (google.api.method_signature) = "name"; + } + + // Gets information about multiple users' links to an account or property. + rpc BatchGetUserLinks(BatchGetUserLinksRequest) returns (BatchGetUserLinksResponse) { + option (google.api.http) = { + get: "/v1alpha/{parent=accounts/*}/userLinks:batchGet" + additional_bindings { + get: "/v1alpha/{parent=properties/*}/userLinks:batchGet" + } + }; + } + + // Lists all user links on an account or property. + rpc ListUserLinks(ListUserLinksRequest) returns (ListUserLinksResponse) { + option (google.api.http) = { + get: "/v1alpha/{parent=accounts/*}/userLinks" + additional_bindings { + get: "/v1alpha/{parent=properties/*}/userLinks" + } + }; + option (google.api.method_signature) = "parent"; + } + + // Lists all user links on an account or property, including implicit ones + // that come from effective permissions granted by groups or organization + // admin roles. + // + // If a returned user link does not have direct permissions, they cannot + // be removed from the account or property directly with the DeleteUserLink + // command. They have to be removed from the group/etc that gives them + // permissions, which is currently only usable/discoverable in the GA or GMP + // UIs. + rpc AuditUserLinks(AuditUserLinksRequest) returns (AuditUserLinksResponse) { + option (google.api.http) = { + post: "/v1alpha/{parent=accounts/*}/userLinks:audit" + body: "*" + additional_bindings { + post: "/v1alpha/{parent=properties/*}/userLinks:audit" + body: "*" + } + }; + } + + // Creates a user link on an account or property. + // + // If the user with the specified email already has permissions on the + // account or property, then the user's existing permissions will be unioned + // with the permissions specified in the new UserLink. + rpc CreateUserLink(CreateUserLinkRequest) returns (UserLink) { + option (google.api.http) = { + post: "/v1alpha/{parent=accounts/*}/userLinks" + body: "user_link" + additional_bindings { + post: "/v1alpha/{parent=properties/*}/userLinks" + body: "user_link" + } + }; + option (google.api.method_signature) = "parent,user_link"; + } + + // Creates information about multiple users' links to an account or property. + // + // This method is transactional. If any UserLink cannot be created, none of + // the UserLinks will be created. + rpc BatchCreateUserLinks(BatchCreateUserLinksRequest) returns (BatchCreateUserLinksResponse) { + option (google.api.http) = { + post: "/v1alpha/{parent=accounts/*}/userLinks:batchCreate" + body: "*" + additional_bindings { + post: "/v1alpha/{parent=properties/*}/userLinks:batchCreate" + body: "*" + } + }; + } + + // Updates a user link on an account or property. + rpc UpdateUserLink(UpdateUserLinkRequest) returns (UserLink) { + option (google.api.http) = { + patch: "/v1alpha/{user_link.name=accounts/*/userLinks/*}" + body: "user_link" + additional_bindings { + patch: "/v1alpha/{user_link.name=properties/*/userLinks/*}" + body: "user_link" + } + }; + option (google.api.method_signature) = "user_link"; + } + + // Updates information about multiple users' links to an account or property. + rpc BatchUpdateUserLinks(BatchUpdateUserLinksRequest) returns (BatchUpdateUserLinksResponse) { + option (google.api.http) = { + post: "/v1alpha/{parent=accounts/*}/userLinks:batchUpdate" + body: "*" + additional_bindings { + post: "/v1alpha/{parent=properties/*}/userLinks:batchUpdate" + body: "*" + } + }; + } + + // Deletes a user link on an account or property. + rpc DeleteUserLink(DeleteUserLinkRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1alpha/{name=accounts/*/userLinks/*}" + additional_bindings { + delete: "/v1alpha/{name=properties/*/userLinks/*}" + } + }; + option (google.api.method_signature) = "name"; + } + + // Deletes information about multiple users' links to an account or property. + rpc BatchDeleteUserLinks(BatchDeleteUserLinksRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + post: "/v1alpha/{parent=accounts/*}/userLinks:batchDelete" + body: "*" + additional_bindings { + post: "/v1alpha/{parent=properties/*}/userLinks:batchDelete" + body: "*" + } + }; + } + + // Creates a FirebaseLink. + // + // Properties can have at most one FirebaseLink. + rpc CreateFirebaseLink(CreateFirebaseLinkRequest) returns (FirebaseLink) { + option (google.api.http) = { + post: "/v1alpha/{parent=properties/*}/firebaseLinks" + body: "firebase_link" + }; + option (google.api.method_signature) = "parent,firebase_link"; + } + + // Deletes a FirebaseLink on a property + rpc DeleteFirebaseLink(DeleteFirebaseLinkRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1alpha/{name=properties/*/firebaseLinks/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists FirebaseLinks on a property. + // Properties can have at most one FirebaseLink. + rpc ListFirebaseLinks(ListFirebaseLinksRequest) returns (ListFirebaseLinksResponse) { + option (google.api.http) = { + get: "/v1alpha/{parent=properties/*}/firebaseLinks" + }; + option (google.api.method_signature) = "parent"; + } + + // Returns the Site Tag for the specified web stream. + // Site Tags are immutable singletons. + rpc GetGlobalSiteTag(GetGlobalSiteTagRequest) returns (GlobalSiteTag) { + option (google.api.http) = { + get: "/v1alpha/{name=properties/*/dataStreams/*/globalSiteTag}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates a GoogleAdsLink. + rpc CreateGoogleAdsLink(CreateGoogleAdsLinkRequest) returns (GoogleAdsLink) { + option (google.api.http) = { + post: "/v1alpha/{parent=properties/*}/googleAdsLinks" + body: "google_ads_link" + }; + option (google.api.method_signature) = "parent,google_ads_link"; + } + + // Updates a GoogleAdsLink on a property + rpc UpdateGoogleAdsLink(UpdateGoogleAdsLinkRequest) returns (GoogleAdsLink) { + option (google.api.http) = { + patch: "/v1alpha/{google_ads_link.name=properties/*/googleAdsLinks/*}" + body: "google_ads_link" + }; + option (google.api.method_signature) = "google_ads_link,update_mask"; + } + + // Deletes a GoogleAdsLink on a property + rpc DeleteGoogleAdsLink(DeleteGoogleAdsLinkRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1alpha/{name=properties/*/googleAdsLinks/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists GoogleAdsLinks on a property. + rpc ListGoogleAdsLinks(ListGoogleAdsLinksRequest) returns (ListGoogleAdsLinksResponse) { + option (google.api.http) = { + get: "/v1alpha/{parent=properties/*}/googleAdsLinks" + }; + option (google.api.method_signature) = "parent"; + } + + // Get data sharing settings on an account. + // Data sharing settings are singletons. + rpc GetDataSharingSettings(GetDataSharingSettingsRequest) returns (DataSharingSettings) { + option (google.api.http) = { + get: "/v1alpha/{name=accounts/*/dataSharingSettings}" + }; + option (google.api.method_signature) = "name"; + } + + // Lookup for a single "GA4" MeasurementProtocolSecret. + rpc GetMeasurementProtocolSecret(GetMeasurementProtocolSecretRequest) returns (MeasurementProtocolSecret) { + option (google.api.http) = { + get: "/v1alpha/{name=properties/*/dataStreams/*/measurementProtocolSecrets/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Returns child MeasurementProtocolSecrets under the specified parent + // Property. + rpc ListMeasurementProtocolSecrets(ListMeasurementProtocolSecretsRequest) returns (ListMeasurementProtocolSecretsResponse) { + option (google.api.http) = { + get: "/v1alpha/{parent=properties/*/dataStreams/*}/measurementProtocolSecrets" + }; + option (google.api.method_signature) = "parent"; + } + + // Creates a measurement protocol secret. + rpc CreateMeasurementProtocolSecret(CreateMeasurementProtocolSecretRequest) returns (MeasurementProtocolSecret) { + option (google.api.http) = { + post: "/v1alpha/{parent=properties/*/dataStreams/*}/measurementProtocolSecrets" + body: "measurement_protocol_secret" + }; + option (google.api.method_signature) = "parent,measurement_protocol_secret"; + } + + // Deletes target MeasurementProtocolSecret. + rpc DeleteMeasurementProtocolSecret(DeleteMeasurementProtocolSecretRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1alpha/{name=properties/*/dataStreams/*/measurementProtocolSecrets/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Updates a measurement protocol secret. + rpc UpdateMeasurementProtocolSecret(UpdateMeasurementProtocolSecretRequest) returns (MeasurementProtocolSecret) { + option (google.api.http) = { + patch: "/v1alpha/{measurement_protocol_secret.name=properties/*/dataStreams/*/measurementProtocolSecrets/*}" + body: "measurement_protocol_secret" + }; + option (google.api.method_signature) = "measurement_protocol_secret,update_mask"; + } + + // Acknowledges the terms of user data collection for the specified property. + // + // This acknowledgement must be completed (either in the Google Analytics UI + // or via this API) before MeasurementProtocolSecret resources may be created. + rpc AcknowledgeUserDataCollection(AcknowledgeUserDataCollectionRequest) returns (AcknowledgeUserDataCollectionResponse) { + option (google.api.http) = { + post: "/v1alpha/{property=properties/*}:acknowledgeUserDataCollection" + body: "*" + }; + } + + // Searches through all changes to an account or its children given the + // specified set of filters. + rpc SearchChangeHistoryEvents(SearchChangeHistoryEventsRequest) returns (SearchChangeHistoryEventsResponse) { + option (google.api.http) = { + post: "/v1alpha/{account=accounts/*}:searchChangeHistoryEvents" + body: "*" + }; + } + + // Lookup for Google Signals settings for a property. + rpc GetGoogleSignalsSettings(GetGoogleSignalsSettingsRequest) returns (GoogleSignalsSettings) { + option (google.api.http) = { + get: "/v1alpha/{name=properties/*/googleSignalsSettings}" + }; + option (google.api.method_signature) = "name"; + } + + // Updates Google Signals settings for a property. + rpc UpdateGoogleSignalsSettings(UpdateGoogleSignalsSettingsRequest) returns (GoogleSignalsSettings) { + option (google.api.http) = { + patch: "/v1alpha/{google_signals_settings.name=properties/*/googleSignalsSettings}" + body: "google_signals_settings" + }; + option (google.api.method_signature) = "google_signals_settings,update_mask"; + } + + // Creates a conversion event with the specified attributes. + rpc CreateConversionEvent(CreateConversionEventRequest) returns (ConversionEvent) { + option (google.api.http) = { + post: "/v1alpha/{parent=properties/*}/conversionEvents" + body: "conversion_event" + }; + option (google.api.method_signature) = "parent,conversion_event"; + } + + // Retrieve a single conversion event. + rpc GetConversionEvent(GetConversionEventRequest) returns (ConversionEvent) { + option (google.api.http) = { + get: "/v1alpha/{name=properties/*/conversionEvents/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Deletes a conversion event in a property. + rpc DeleteConversionEvent(DeleteConversionEventRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1alpha/{name=properties/*/conversionEvents/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Returns a list of conversion events in the specified parent property. + // + // Returns an empty list if no conversion events are found. + rpc ListConversionEvents(ListConversionEventsRequest) returns (ListConversionEventsResponse) { + option (google.api.http) = { + get: "/v1alpha/{parent=properties/*}/conversionEvents" + }; + option (google.api.method_signature) = "parent"; + } + + // Look up a single DisplayVideo360AdvertiserLink + rpc GetDisplayVideo360AdvertiserLink(GetDisplayVideo360AdvertiserLinkRequest) returns (DisplayVideo360AdvertiserLink) { + option (google.api.http) = { + get: "/v1alpha/{name=properties/*/displayVideo360AdvertiserLinks/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists all DisplayVideo360AdvertiserLinks on a property. + rpc ListDisplayVideo360AdvertiserLinks(ListDisplayVideo360AdvertiserLinksRequest) returns (ListDisplayVideo360AdvertiserLinksResponse) { + option (google.api.http) = { + get: "/v1alpha/{parent=properties/*}/displayVideo360AdvertiserLinks" + }; + option (google.api.method_signature) = "parent"; + } + + // Creates a DisplayVideo360AdvertiserLink. + // This can only be utilized by users who have proper authorization both on + // the Google Analytics property and on the Display & Video 360 advertiser. + // Users who do not have access to the Display & Video 360 advertiser should + // instead seek to create a DisplayVideo360LinkProposal. + rpc CreateDisplayVideo360AdvertiserLink(CreateDisplayVideo360AdvertiserLinkRequest) returns (DisplayVideo360AdvertiserLink) { + option (google.api.http) = { + post: "/v1alpha/{parent=properties/*}/displayVideo360AdvertiserLinks" + body: "display_video_360_advertiser_link" + }; + option (google.api.method_signature) = "parent,display_video_360_advertiser_link"; + } + + // Deletes a DisplayVideo360AdvertiserLink on a property. + rpc DeleteDisplayVideo360AdvertiserLink(DeleteDisplayVideo360AdvertiserLinkRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1alpha/{name=properties/*/displayVideo360AdvertiserLinks/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Updates a DisplayVideo360AdvertiserLink on a property. + rpc UpdateDisplayVideo360AdvertiserLink(UpdateDisplayVideo360AdvertiserLinkRequest) returns (DisplayVideo360AdvertiserLink) { + option (google.api.http) = { + patch: "/v1alpha/{display_video_360_advertiser_link.name=properties/*/displayVideo360AdvertiserLinks/*}" + body: "display_video_360_advertiser_link" + }; + option (google.api.method_signature) = "display_video_360_advertiser_link,update_mask"; + } + + // Lookup for a single DisplayVideo360AdvertiserLinkProposal. + rpc GetDisplayVideo360AdvertiserLinkProposal(GetDisplayVideo360AdvertiserLinkProposalRequest) returns (DisplayVideo360AdvertiserLinkProposal) { + option (google.api.http) = { + get: "/v1alpha/{name=properties/*/displayVideo360AdvertiserLinkProposals/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists DisplayVideo360AdvertiserLinkProposals on a property. + rpc ListDisplayVideo360AdvertiserLinkProposals(ListDisplayVideo360AdvertiserLinkProposalsRequest) returns (ListDisplayVideo360AdvertiserLinkProposalsResponse) { + option (google.api.http) = { + get: "/v1alpha/{parent=properties/*}/displayVideo360AdvertiserLinkProposals" + }; + option (google.api.method_signature) = "parent"; + } + + // Creates a DisplayVideo360AdvertiserLinkProposal. + rpc CreateDisplayVideo360AdvertiserLinkProposal(CreateDisplayVideo360AdvertiserLinkProposalRequest) returns (DisplayVideo360AdvertiserLinkProposal) { + option (google.api.http) = { + post: "/v1alpha/{parent=properties/*}/displayVideo360AdvertiserLinkProposals" + body: "display_video_360_advertiser_link_proposal" + }; + option (google.api.method_signature) = "parent,display_video_360_advertiser_link_proposal"; + } + + // Deletes a DisplayVideo360AdvertiserLinkProposal on a property. + // This can only be used on cancelled proposals. + rpc DeleteDisplayVideo360AdvertiserLinkProposal(DeleteDisplayVideo360AdvertiserLinkProposalRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1alpha/{name=properties/*/displayVideo360AdvertiserLinkProposals/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Approves a DisplayVideo360AdvertiserLinkProposal. + // The DisplayVideo360AdvertiserLinkProposal will be deleted and a new + // DisplayVideo360AdvertiserLink will be created. + rpc ApproveDisplayVideo360AdvertiserLinkProposal(ApproveDisplayVideo360AdvertiserLinkProposalRequest) returns (ApproveDisplayVideo360AdvertiserLinkProposalResponse) { + option (google.api.http) = { + post: "/v1alpha/{name=properties/*/displayVideo360AdvertiserLinkProposals/*}:approve" + body: "*" + }; + } + + // Cancels a DisplayVideo360AdvertiserLinkProposal. + // Cancelling can mean either: + // - Declining a proposal initiated from Display & Video 360 + // - Withdrawing a proposal initiated from Google Analytics + // After being cancelled, a proposal will eventually be deleted automatically. + rpc CancelDisplayVideo360AdvertiserLinkProposal(CancelDisplayVideo360AdvertiserLinkProposalRequest) returns (DisplayVideo360AdvertiserLinkProposal) { + option (google.api.http) = { + post: "/v1alpha/{name=properties/*/displayVideo360AdvertiserLinkProposals/*}:cancel" + body: "*" + }; + } + + // Creates a CustomDimension. + rpc CreateCustomDimension(CreateCustomDimensionRequest) returns (CustomDimension) { + option (google.api.http) = { + post: "/v1alpha/{parent=properties/*}/customDimensions" + body: "custom_dimension" + }; + option (google.api.method_signature) = "parent,custom_dimension"; + } + + // Updates a CustomDimension on a property. + rpc UpdateCustomDimension(UpdateCustomDimensionRequest) returns (CustomDimension) { + option (google.api.http) = { + patch: "/v1alpha/{custom_dimension.name=properties/*/customDimensions/*}" + body: "custom_dimension" + }; + option (google.api.method_signature) = "custom_dimension,update_mask"; + } + + // Lists CustomDimensions on a property. + rpc ListCustomDimensions(ListCustomDimensionsRequest) returns (ListCustomDimensionsResponse) { + option (google.api.http) = { + get: "/v1alpha/{parent=properties/*}/customDimensions" + }; + option (google.api.method_signature) = "parent"; + } + + // Archives a CustomDimension on a property. + rpc ArchiveCustomDimension(ArchiveCustomDimensionRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + post: "/v1alpha/{name=properties/*/customDimensions/*}:archive" + body: "*" + }; + option (google.api.method_signature) = "name"; + } + + // Lookup for a single CustomDimension. + rpc GetCustomDimension(GetCustomDimensionRequest) returns (CustomDimension) { + option (google.api.http) = { + get: "/v1alpha/{name=properties/*/customDimensions/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates a CustomMetric. + rpc CreateCustomMetric(CreateCustomMetricRequest) returns (CustomMetric) { + option (google.api.http) = { + post: "/v1alpha/{parent=properties/*}/customMetrics" + body: "custom_metric" + }; + option (google.api.method_signature) = "parent,custom_metric"; + } + + // Updates a CustomMetric on a property. + rpc UpdateCustomMetric(UpdateCustomMetricRequest) returns (CustomMetric) { + option (google.api.http) = { + patch: "/v1alpha/{custom_metric.name=properties/*/customMetrics/*}" + body: "custom_metric" + }; + option (google.api.method_signature) = "custom_metric,update_mask"; + } + + // Lists CustomMetrics on a property. + rpc ListCustomMetrics(ListCustomMetricsRequest) returns (ListCustomMetricsResponse) { + option (google.api.http) = { + get: "/v1alpha/{parent=properties/*}/customMetrics" + }; + option (google.api.method_signature) = "parent"; + } + + // Archives a CustomMetric on a property. + rpc ArchiveCustomMetric(ArchiveCustomMetricRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + post: "/v1alpha/{name=properties/*/customMetrics/*}:archive" + body: "*" + }; + option (google.api.method_signature) = "name"; + } + + // Lookup for a single CustomMetric. + rpc GetCustomMetric(GetCustomMetricRequest) returns (CustomMetric) { + option (google.api.http) = { + get: "/v1alpha/{name=properties/*/customMetrics/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Returns the singleton data retention settings for this property. + rpc GetDataRetentionSettings(GetDataRetentionSettingsRequest) returns (DataRetentionSettings) { + option (google.api.http) = { + get: "/v1alpha/{name=properties/*/dataRetentionSettings}" + }; + option (google.api.method_signature) = "name"; + } + + // Updates the singleton data retention settings for this property. + rpc UpdateDataRetentionSettings(UpdateDataRetentionSettingsRequest) returns (DataRetentionSettings) { + option (google.api.http) = { + patch: "/v1alpha/{data_retention_settings.name=properties/*/dataRetentionSettings}" + body: "data_retention_settings" + }; + option (google.api.method_signature) = "data_retention_settings,update_mask"; + } + + // Creates a DataStream. + rpc CreateDataStream(CreateDataStreamRequest) returns (DataStream) { + option (google.api.http) = { + post: "/v1alpha/{parent=properties/*}/dataStreams" + body: "data_stream" + }; + option (google.api.method_signature) = "parent,data_stream"; + } + + // Deletes a DataStream on a property. + rpc DeleteDataStream(DeleteDataStreamRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1alpha/{name=properties/*/dataStreams/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Updates a DataStream on a property. + rpc UpdateDataStream(UpdateDataStreamRequest) returns (DataStream) { + option (google.api.http) = { + patch: "/v1alpha/{data_stream.name=properties/*/dataStreams/*}" + body: "data_stream" + }; + option (google.api.method_signature) = "data_stream,update_mask"; + } + + // Lists DataStreams on a property. + rpc ListDataStreams(ListDataStreamsRequest) returns (ListDataStreamsResponse) { + option (google.api.http) = { + get: "/v1alpha/{parent=properties/*}/dataStreams" + }; + option (google.api.method_signature) = "parent"; + } + + // Lookup for a single DataStream. + rpc GetDataStream(GetDataStreamRequest) returns (DataStream) { + option (google.api.http) = { + get: "/v1alpha/{name=properties/*/dataStreams/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lookup for a single Audience. + // Audiences created before 2020 may not be supported. + rpc GetAudience(GetAudienceRequest) returns (Audience) { + option (google.api.http) = { + get: "/v1alpha/{name=properties/*/audiences/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists Audiences on a property. + // Audiences created before 2020 may not be supported. + rpc ListAudiences(ListAudiencesRequest) returns (ListAudiencesResponse) { + option (google.api.http) = { + get: "/v1alpha/{parent=properties/*}/audiences" + }; + option (google.api.method_signature) = "parent"; + } + + // Creates an Audience. + rpc CreateAudience(CreateAudienceRequest) returns (Audience) { + option (google.api.http) = { + post: "/v1alpha/{parent=properties/*}/audiences" + body: "audience" + }; + option (google.api.method_signature) = "parent,audience"; + } + + // Updates an Audience on a property. + rpc UpdateAudience(UpdateAudienceRequest) returns (Audience) { + option (google.api.http) = { + patch: "/v1alpha/{audience.name=properties/*/audiences/*}" + body: "audience" + }; + option (google.api.method_signature) = "audience,update_mask"; + } + + // Archives an Audience on a property. + rpc ArchiveAudience(ArchiveAudienceRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + post: "/v1alpha/{name=properties/*/audiences/*}:archive" + body: "*" + }; + } + + // Lookup for a AttributionSettings singleton. + rpc GetAttributionSettings(GetAttributionSettingsRequest) returns (AttributionSettings) { + option (google.api.http) = { + get: "/v1alpha/{name=properties/*/attributionSettings}" + }; + option (google.api.method_signature) = "name"; + } + + // Updates attribution settings on a property. + rpc UpdateAttributionSettings(UpdateAttributionSettingsRequest) returns (AttributionSettings) { + option (google.api.http) = { + patch: "/v1alpha/{attribution_settings.name=properties/*/attributionSettings}" + body: "attribution_settings" + }; + option (google.api.method_signature) = "attribution_settings,update_mask"; + } + + // Returns a customized report of data access records. The report provides + // records of each time a user reads Google Analytics reporting data. Access + // records are retained for up to 2 years. + // + // Data Access Reports can be requested for a property. The property must be + // in Google Analytics 360. This method is only available to Administrators. + // + // These data access records include GA4 UI Reporting, GA4 UI Explorations, + // GA4 Data API, and other products like Firebase & Admob that can retrieve + // data from Google Analytics through a linkage. These records don't include + // property configuration changes like adding a stream or changing a + // property's time zone. For configuration change history, see + // [searchChangeHistoryEvents](https://developers.google.com/analytics/devguides/config/admin/v1/rest/v1alpha/accounts/searchChangeHistoryEvents). + rpc RunAccessReport(RunAccessReportRequest) returns (RunAccessReportResponse) { + option (google.api.http) = { + post: "/v1alpha/{entity=properties/*}:runAccessReport" + body: "*" + }; + } +} + +// The request for a Data Access Record Report. +message RunAccessReportRequest { + // The Data Access Report is requested for this property. + // For example if "123" is your GA4 property ID, then entity should be + // "properties/123". + string entity = 1; + + // The dimensions requested and displayed in the response. Requests are + // allowed up to 9 dimensions. + repeated AccessDimension dimensions = 2; + + // The metrics requested and displayed in the response. Requests are allowed + // up to 10 metrics. + repeated AccessMetric metrics = 3; + + // Date ranges of access records to read. If multiple date ranges are + // requested, each response row will contain a zero based date range index. If + // two date ranges overlap, the access records for the overlapping days is + // included in the response rows for both date ranges. Requests are allowed up + // to 2 date ranges. + repeated AccessDateRange date_ranges = 4; + + // Dimension filters allow you to restrict report response to specific + // dimension values which match the filter. For example, filtering on access + // records of a single user. To learn more, see [Fundamentals of Dimension + // Filters](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#dimension_filters) + // for examples. Metrics cannot be used in this filter. + AccessFilterExpression dimension_filter = 5; + + // Metric filters allow you to restrict report response to specific metric + // values which match the filter. Metric filters are applied after aggregating + // the report's rows, similar to SQL having-clause. Dimensions cannot be used + // in this filter. + AccessFilterExpression metric_filter = 6; + + // The row count of the start row. The first row is counted as row 0. If + // offset is unspecified, it is treated as 0. If offset is zero, then this + // method will return the first page of results with `limit` entries. + // + // To learn more about this pagination parameter, see + // [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). + int64 offset = 7; + + // The number of rows to return. If unspecified, 10,000 rows are returned. The + // API returns a maximum of 100,000 rows per request, no matter how many you + // ask for. `limit` must be positive. + // + // The API may return fewer rows than the requested `limit`, if there aren't + // as many remaining rows as the `limit`. For instance, there are fewer than + // 300 possible values for the dimension `country`, so when reporting on only + // `country`, you can't get more than 300 rows, even if you set `limit` to a + // higher value. + // + // To learn more about this pagination parameter, see + // [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). + int64 limit = 8; + + // This request's time zone if specified. If unspecified, the property's time + // zone is used. The request's time zone is used to interpret the start & end + // dates of the report. + // + // Formatted as strings from the IANA Time Zone database + // (https://www.iana.org/time-zones); for example "America/New_York" or + // "Asia/Tokyo". + string time_zone = 9; + + // Specifies how rows are ordered in the response. + repeated AccessOrderBy order_bys = 10; + + // Toggles whether to return the current state of this Analytics Property's + // quota. Quota is returned in [AccessQuota](#AccessQuota). + bool return_entity_quota = 11; +} + +// The customized Data Access Record Report response. +message RunAccessReportResponse { + // The header for a column in the report that corresponds to a specific + // dimension. The number of DimensionHeaders and ordering of DimensionHeaders + // matches the dimensions present in rows. + repeated AccessDimensionHeader dimension_headers = 1; + + // The header for a column in the report that corresponds to a specific + // metric. The number of MetricHeaders and ordering of MetricHeaders matches + // the metrics present in rows. + repeated AccessMetricHeader metric_headers = 2; + + // Rows of dimension value combinations and metric values in the report. + repeated AccessRow rows = 3; + + // The total number of rows in the query result. `rowCount` is independent of + // the number of rows returned in the response, the `limit` request + // parameter, and the `offset` request parameter. For example if a query + // returns 175 rows and includes `limit` of 50 in the API request, the + // response will contain `rowCount` of 175 but only 50 rows. + // + // To learn more about this pagination parameter, see + // [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). + int32 row_count = 4; + + // The quota state for this Analytics property including this request. + AccessQuota quota = 5; +} + +// Request message for GetAccount RPC. +message GetAccountRequest { + // Required. The name of the account to lookup. + // Format: accounts/{account} + // Example: "accounts/100" + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "analyticsadmin.googleapis.com/Account" + } + ]; +} + +// Request message for ListAccounts RPC. +message ListAccountsRequest { + // The maximum number of resources to return. The service may return + // fewer than this value, even if there are additional pages. + // If unspecified, at most 50 resources will be returned. + // The maximum value is 200; (higher values will be coerced to the maximum) + int32 page_size = 1; + + // A page token, received from a previous `ListAccounts` call. + // Provide this to retrieve the subsequent page. + // When paginating, all other parameters provided to `ListAccounts` must + // match the call that provided the page token. + string page_token = 2; + + // Whether to include soft-deleted (ie: "trashed") Accounts in the + // results. Accounts can be inspected to determine whether they are deleted or + // not. + bool show_deleted = 3; +} + +// Request message for ListAccounts RPC. +message ListAccountsResponse { + // Results that were accessible to the caller. + repeated Account accounts = 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 DeleteAccount RPC. +message DeleteAccountRequest { + // Required. The name of the Account to soft-delete. + // Format: accounts/{account} + // Example: "accounts/100" + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "analyticsadmin.googleapis.com/Account" + } + ]; +} + +// Request message for UpdateAccount RPC. +message UpdateAccountRequest { + // Required. The account to update. + // The account's `name` field is used to identify the account. + Account account = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The list of fields to be updated. Field names must be in snake case + // (e.g., "field_to_update"). Omitted fields will not be updated. To replace + // the entire entity, use one path with the string "*" to match all fields. + google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for ProvisionAccountTicket RPC. +message ProvisionAccountTicketRequest { + // The account to create. + Account account = 1; + + // Redirect URI where the user will be sent after accepting Terms of Service. + // Must be configured in Developers Console as a Redirect URI + string redirect_uri = 2; +} + +// Response message for ProvisionAccountTicket RPC. +message ProvisionAccountTicketResponse { + // The param to be passed in the ToS link. + string account_ticket_id = 1; +} + +// Request message for GetProperty RPC. +message GetPropertyRequest { + // Required. The name of the property to lookup. + // Format: properties/{property_id} + // Example: "properties/1000" + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "analyticsadmin.googleapis.com/Property" + } + ]; +} + +// Request message for ListProperties RPC. +message ListPropertiesRequest { + // Required. An expression for filtering the results of the request. + // Fields eligible for filtering are: + // `parent:`(The resource name of the parent account/property) or + // `ancestor:`(The resource name of the parent account) or + // `firebase_project:`(The id or number of the linked firebase project). + // Some examples of filters: + // + // ``` + // | Filter | Description | + // |-----------------------------|-------------------------------------------| + // | parent:accounts/123 | The account with account id: 123. | + // | parent:properties/123 | The property with property id: 123. | + // | ancestor:accounts/123 | The account with account id: 123. | + // | firebase_project:project-id | The firebase project with id: project-id. | + // | firebase_project:123 | The firebase project with number: 123. | + // ``` + string filter = 1 [(google.api.field_behavior) = REQUIRED]; + + // The maximum number of resources to return. The service may return + // fewer than this value, even if there are additional pages. + // If unspecified, at most 50 resources will be returned. + // The maximum value is 200; (higher values will be coerced to the maximum) + int32 page_size = 2; + + // A page token, received from a previous `ListProperties` call. + // Provide this to retrieve the subsequent page. + // When paginating, all other parameters provided to `ListProperties` must + // match the call that provided the page token. + string page_token = 3; + + // Whether to include soft-deleted (ie: "trashed") Properties in the + // results. Properties can be inspected to determine whether they are deleted + // or not. + bool show_deleted = 4; +} + +// Response message for ListProperties RPC. +message ListPropertiesResponse { + // Results that matched the filter criteria and were accessible to the caller. + repeated Property properties = 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 UpdateProperty RPC. +message UpdatePropertyRequest { + // Required. The property to update. + // The property's `name` field is used to identify the property to be + // updated. + Property property = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The list of fields to be updated. Field names must be in snake case + // (e.g., "field_to_update"). Omitted fields will not be updated. To replace + // the entire entity, use one path with the string "*" to match all fields. + google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for CreateProperty RPC. +message CreatePropertyRequest { + // Required. The property to create. + // Note: the supplied property must specify its parent. + Property property = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for DeleteProperty RPC. +message DeletePropertyRequest { + // Required. The name of the Property to soft-delete. + // Format: properties/{property_id} + // Example: "properties/1000" + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "analyticsadmin.googleapis.com/Property" + } + ]; +} + +// Request message for GetUserLink RPC. +message GetUserLinkRequest { + // Required. Example format: accounts/1234/userLinks/5678 + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "analyticsadmin.googleapis.com/UserLink" + } + ]; +} + +// Request message for BatchGetUserLinks RPC. +message BatchGetUserLinksRequest { + // Required. The account or property that all user links in the request are + // for. The parent of all provided values for the 'names' field must match + // this field. + // Example format: accounts/1234 + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "analyticsadmin.googleapis.com/UserLink" + } + ]; + + // Required. The names of the user links to retrieve. + // A maximum of 1000 user links can be retrieved in a batch. + // Format: accounts/{accountId}/userLinks/{userLinkId} + repeated string names = 2 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "analyticsadmin.googleapis.com/UserLink" + } + ]; +} + +// Response message for BatchGetUserLinks RPC. +message BatchGetUserLinksResponse { + // The requested user links. + repeated UserLink user_links = 1; +} + +// Request message for ListUserLinks RPC. +message ListUserLinksRequest { + // Required. Example format: accounts/1234 + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "analyticsadmin.googleapis.com/UserLink" + } + ]; + + // The maximum number of user links to return. + // The service may return fewer than this value. + // If unspecified, at most 200 user links will be returned. + // The maximum value is 500; values above 500 will be coerced to 500. + int32 page_size = 2; + + // A page token, received from a previous `ListUserLinks` call. + // Provide this to retrieve the subsequent page. + // When paginating, all other parameters provided to `ListUserLinks` must + // match the call that provided the page token. + string page_token = 3; +} + +// Response message for ListUserLinks RPC. +message ListUserLinksResponse { + // List of UserLinks. These will be ordered stably, but in an arbitrary order. + repeated UserLink user_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; +} + +// Request message for AuditUserLinks RPC. +message AuditUserLinksRequest { + // Required. Example format: accounts/1234 + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "analyticsadmin.googleapis.com/UserLink" + } + ]; + + // The maximum number of user links to return. + // The service may return fewer than this value. + // If unspecified, at most 1000 user links will be returned. + // The maximum value is 5000; values above 5000 will be coerced to 5000. + int32 page_size = 2; + + // A page token, received from a previous `AuditUserLinks` call. + // Provide this to retrieve the subsequent page. + // When paginating, all other parameters provided to `AuditUserLinks` must + // match the call that provided the page token. + string page_token = 3; +} + +// Response message for AuditUserLinks RPC. +message AuditUserLinksResponse { + // List of AuditUserLinks. These will be ordered stably, but in an arbitrary + // order. + repeated AuditUserLink user_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; +} + +// Request message for CreateUserLink RPC. +// +// Users can have multiple email addresses associated with their Google +// account, and one of these email addresses is the "primary" email address. +// Any of the email addresses associated with a Google account may be used +// for a new UserLink, but the returned UserLink will always contain the +// "primary" email address. As a result, the input and output email address +// for this request may differ. +message CreateUserLinkRequest { + // Required. Example format: accounts/1234 + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "analyticsadmin.googleapis.com/UserLink" + } + ]; + + // Optional. If set, then email the new user notifying them that they've been granted + // permissions to the resource. + bool notify_new_user = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Required. The user link to create. + UserLink user_link = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for BatchCreateUserLinks RPC. +message BatchCreateUserLinksRequest { + // Required. The account or property that all user links in the request are for. + // This field is required. The parent field in the CreateUserLinkRequest + // messages must either be empty or match this field. + // Example format: accounts/1234 + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "analyticsadmin.googleapis.com/UserLink" + } + ]; + + // Optional. If set, then email the new users notifying them that they've been granted + // permissions to the resource. Regardless of whether this is set or not, + // notify_new_user field inside each individual request is ignored. + bool notify_new_users = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Required. The requests specifying the user links to create. + // A maximum of 1000 user links can be created in a batch. + repeated CreateUserLinkRequest requests = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// Response message for BatchCreateUserLinks RPC. +message BatchCreateUserLinksResponse { + // The user links created. + repeated UserLink user_links = 1; +} + +// Request message for UpdateUserLink RPC. +message UpdateUserLinkRequest { + // Required. The user link to update. + UserLink user_link = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for BatchUpdateUserLinks RPC. +message BatchUpdateUserLinksRequest { + // Required. The account or property that all user links in the request are + // for. The parent field in the UpdateUserLinkRequest messages must either be + // empty or match this field. + // Example format: accounts/1234 + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "analyticsadmin.googleapis.com/UserLink" + } + ]; + + // Required. The requests specifying the user links to update. + // A maximum of 1000 user links can be updated in a batch. + repeated UpdateUserLinkRequest requests = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Response message for BatchUpdateUserLinks RPC. +message BatchUpdateUserLinksResponse { + // The user links updated. + repeated UserLink user_links = 1; +} + +// Request message for DeleteUserLink RPC. +message DeleteUserLinkRequest { + // Required. Example format: accounts/1234/userLinks/5678 + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "analyticsadmin.googleapis.com/UserLink" + } + ]; +} + +// Request message for BatchDeleteUserLinks RPC. +message BatchDeleteUserLinksRequest { + // Required. The account or property that all user links in the request are + // for. The parent of all values for user link names to delete must match this + // field. + // Example format: accounts/1234 + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "analyticsadmin.googleapis.com/UserLink" + } + ]; + + // Required. The requests specifying the user links to update. + // A maximum of 1000 user links can be updated in a batch. + repeated DeleteUserLinkRequest requests = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for CreateFirebaseLink RPC +message CreateFirebaseLinkRequest { + // Required. Format: properties/{property_id} + // Example: properties/1234 + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "analyticsadmin.googleapis.com/FirebaseLink" + } + ]; + + // Required. The Firebase link to create. + FirebaseLink firebase_link = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for DeleteFirebaseLink RPC +message DeleteFirebaseLinkRequest { + // Required. Format: properties/{property_id}/firebaseLinks/{firebase_link_id} + // Example: properties/1234/firebaseLinks/5678 + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "analyticsadmin.googleapis.com/FirebaseLink" + } + ]; +} + +// Request message for ListFirebaseLinks RPC +message ListFirebaseLinksRequest { + // Required. Format: properties/{property_id} + // Example: properties/1234 + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "analyticsadmin.googleapis.com/FirebaseLink" + } + ]; + + // The maximum number of resources to return. The service may return + // fewer than this value, even if there are additional pages. + // If unspecified, at most 50 resources will be returned. + // The maximum value is 200; (higher values will be coerced to the maximum) + int32 page_size = 2; + + // A page token, received from a previous `ListFirebaseLinks` call. + // Provide this to retrieve the subsequent page. + // When paginating, all other parameters provided to `ListProperties` must + // match the call that provided the page token. + string page_token = 3; +} + +// Response message for ListFirebaseLinks RPC +message ListFirebaseLinksResponse { + // List of FirebaseLinks. This will have at most one value. + repeated FirebaseLink firebase_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. + // Currently, Google Analytics supports only one FirebaseLink per property, + // so this will never be populated. + string next_page_token = 2; +} + +// Request message for GetGlobalSiteTag RPC. +message GetGlobalSiteTagRequest { + // Required. The name of the site tag to lookup. + // Note that site tags are singletons and do not have unique IDs. + // Format: properties/{property_id}/dataStreams/{stream_id}/globalSiteTag + // Example: "properties/123/dataStreams/456/globalSiteTag" + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "analyticsadmin.googleapis.com/GlobalSiteTag" + } + ]; +} + +// Request message for CreateGoogleAdsLink RPC +message CreateGoogleAdsLinkRequest { + // Required. Example format: properties/1234 + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "analyticsadmin.googleapis.com/GoogleAdsLink" + } + ]; + + // Required. The GoogleAdsLink to create. + GoogleAdsLink google_ads_link = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for UpdateGoogleAdsLink RPC +message UpdateGoogleAdsLinkRequest { + // The GoogleAdsLink to update + GoogleAdsLink google_ads_link = 1; + + // Required. The list of fields to be updated. Field names must be in snake case + // (e.g., "field_to_update"). Omitted fields will not be updated. To replace + // the entire entity, use one path with the string "*" to match all fields. + google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for DeleteGoogleAdsLink RPC. +message DeleteGoogleAdsLinkRequest { + // Required. Example format: properties/1234/googleAdsLinks/5678 + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "analyticsadmin.googleapis.com/GoogleAdsLink" + } + ]; +} + +// Request message for ListGoogleAdsLinks RPC. +message ListGoogleAdsLinksRequest { + // Required. Example format: properties/1234 + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "analyticsadmin.googleapis.com/GoogleAdsLink" + } + ]; + + // The maximum number of resources to return. + // If unspecified, at most 50 resources will be returned. + // The maximum value is 200 (higher values will be coerced to the maximum). + int32 page_size = 2; + + // A page token, received from a previous `ListGoogleAdsLinks` call. + // Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to `ListGoogleAdsLinks` must + // match the call that provided the page token. + string page_token = 3; +} + +// Response message for ListGoogleAdsLinks RPC. +message ListGoogleAdsLinksResponse { + // List of GoogleAdsLinks. + repeated GoogleAdsLink google_ads_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; +} + +// Request message for GetDataSharingSettings RPC. +message GetDataSharingSettingsRequest { + // Required. The name of the settings to lookup. + // Format: accounts/{account}/dataSharingSettings + // Example: "accounts/1000/dataSharingSettings" + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "analyticsadmin.googleapis.com/DataSharingSettings" + } + ]; +} + +// Request message for ListAccountSummaries RPC. +message ListAccountSummariesRequest { + // The maximum number of AccountSummary resources to return. The service may + // return fewer than this value, even if there are additional pages. + // If unspecified, at most 50 resources will be returned. + // The maximum value is 200; (higher values will be coerced to the maximum) + int32 page_size = 1; + + // A page token, received from a previous `ListAccountSummaries` call. + // Provide this to retrieve the subsequent page. + // When paginating, all other parameters provided to `ListAccountSummaries` + // must match the call that provided the page token. + string page_token = 2; +} + +// Response message for ListAccountSummaries RPC. +message ListAccountSummariesResponse { + // Account summaries of all accounts the caller has access to. + repeated AccountSummary account_summaries = 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 AcknowledgeUserDataCollection RPC. +message AcknowledgeUserDataCollectionRequest { + // Required. The property for which to acknowledge user data collection. + string property = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "analyticsadmin.googleapis.com/Property" + } + ]; + + // Required. An acknowledgement that the caller of this method understands the terms + // of user data collection. + // + // This field must contain the exact value: + // "I acknowledge that I have the necessary privacy disclosures and rights + // from my end users for the collection and processing of their data, + // including the association of such data with the visitation information + // Google Analytics collects from my site and/or app property." + string acknowledgement = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Response message for AcknowledgeUserDataCollection RPC. +message AcknowledgeUserDataCollectionResponse { + +} + +// Request message for SearchChangeHistoryEvents RPC. +message SearchChangeHistoryEventsRequest { + // Required. The account resource for which to return change history resources. + string account = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "analyticsadmin.googleapis.com/Account" + } + ]; + + // Optional. Resource name for a child property. If set, only return changes + // made to this property or its child resources. + string property = 2 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "analyticsadmin.googleapis.com/Property" + } + ]; + + // Optional. If set, only return changes if they are for a resource that matches at + // least one of these types. + repeated ChangeHistoryResourceType resource_type = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If set, only return changes that match one or more of these types of + // actions. + repeated ActionType action = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If set, only return changes if they are made by a user in this list. + repeated string actor_email = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If set, only return changes made after this time (inclusive). + google.protobuf.Timestamp earliest_change_time = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If set, only return changes made before this time (inclusive). + google.protobuf.Timestamp latest_change_time = 7 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The maximum number of ChangeHistoryEvent items to return. + // The service may return fewer than this value, even if there are additional + // pages. If unspecified, at most 50 items will be returned. + // The maximum value is 200 (higher values will be coerced to the maximum). + int32 page_size = 8 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A page token, received from a previous `SearchChangeHistoryEvents` call. + // Provide this to retrieve the subsequent page. When paginating, all other + // parameters provided to `SearchChangeHistoryEvents` must match the call that + // provided the page token. + string page_token = 9 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for SearchAccounts RPC. +message SearchChangeHistoryEventsResponse { + // Results that were accessible to the caller. + repeated ChangeHistoryEvent change_history_events = 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 GetMeasurementProtocolSecret RPC. +message GetMeasurementProtocolSecretRequest { + // Required. The name of the measurement protocol secret to lookup. + // Format: + // properties/{property}/dataStreams/{dataStream}/measurementProtocolSecrets/{measurementProtocolSecret} + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "analyticsadmin.googleapis.com/MeasurementProtocolSecret" + } + ]; +} + +// Request message for CreateMeasurementProtocolSecret RPC +message CreateMeasurementProtocolSecretRequest { + // Required. The parent resource where this secret will be created. + // Format: properties/{property}/dataStreams/{dataStream} + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "analyticsadmin.googleapis.com/MeasurementProtocolSecret" + } + ]; + + // Required. The measurement protocol secret to create. + MeasurementProtocolSecret measurement_protocol_secret = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for DeleteMeasurementProtocolSecret RPC +message DeleteMeasurementProtocolSecretRequest { + // Required. The name of the MeasurementProtocolSecret to delete. + // Format: + // properties/{property}/dataStreams/{dataStream}/measurementProtocolSecrets/{measurementProtocolSecret} + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "analyticsadmin.googleapis.com/MeasurementProtocolSecret" + } + ]; +} + +// Request message for UpdateMeasurementProtocolSecret RPC +message UpdateMeasurementProtocolSecretRequest { + // Required. The measurement protocol secret to update. + MeasurementProtocolSecret measurement_protocol_secret = 1 [(google.api.field_behavior) = REQUIRED]; + + // The list of fields to be updated. Omitted fields will not be updated. + google.protobuf.FieldMask update_mask = 2; +} + +// Request message for ListMeasurementProtocolSecret RPC +message ListMeasurementProtocolSecretsRequest { + // Required. The resource name of the parent stream. + // Format: + // properties/{property}/dataStreams/{dataStream}/measurementProtocolSecrets + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "analyticsadmin.googleapis.com/MeasurementProtocolSecret" + } + ]; + + // The maximum number of resources to return. + // If unspecified, at most 10 resources will be returned. + // The maximum value is 10. Higher values will be coerced to the maximum. + int32 page_size = 2; + + // A page token, received from a previous `ListMeasurementProtocolSecrets` + // call. Provide this to retrieve the subsequent page. When paginating, all + // other parameters provided to `ListMeasurementProtocolSecrets` must match + // the call that provided the page token. + string page_token = 3; +} + +// Response message for ListMeasurementProtocolSecret RPC +message ListMeasurementProtocolSecretsResponse { + // A list of secrets for the parent stream specified in the request. + repeated MeasurementProtocolSecret measurement_protocol_secrets = 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 GetGoogleSignalsSettings RPC +message GetGoogleSignalsSettingsRequest { + // Required. The name of the google signals settings to retrieve. + // Format: properties/{property}/googleSignalsSettings + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "analyticsadmin.googleapis.com/GoogleSignalsSettings" + } + ]; +} + +// Request message for UpdateGoogleSignalsSettings RPC +message UpdateGoogleSignalsSettingsRequest { + // Required. The settings to update. + // The `name` field is used to identify the settings to be updated. + GoogleSignalsSettings google_signals_settings = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The list of fields to be updated. Field names must be in snake case + // (e.g., "field_to_update"). Omitted fields will not be updated. To replace + // the entire entity, use one path with the string "*" to match all fields. + google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for CreateConversionEvent RPC +message CreateConversionEventRequest { + // Required. The conversion event to create. + ConversionEvent conversion_event = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The resource name of the parent property where this conversion event will + // be created. Format: properties/123 + string parent = 2 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "analyticsadmin.googleapis.com/ConversionEvent" + } + ]; +} + +// Request message for GetConversionEvent RPC +message GetConversionEventRequest { + // Required. The resource name of the conversion event to retrieve. + // Format: properties/{property}/conversionEvents/{conversion_event} + // Example: "properties/123/conversionEvents/456" + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "analyticsadmin.googleapis.com/ConversionEvent" + } + ]; +} + +// Request message for DeleteConversionEvent RPC +message DeleteConversionEventRequest { + // Required. The resource name of the conversion event to delete. + // Format: properties/{property}/conversionEvents/{conversion_event} + // Example: "properties/123/conversionEvents/456" + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "analyticsadmin.googleapis.com/ConversionEvent" + } + ]; +} + +// Request message for ListConversionEvents RPC +message ListConversionEventsRequest { + // Required. The resource name of the parent property. + // Example: 'properties/123' + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "analyticsadmin.googleapis.com/ConversionEvent" + } + ]; + + // The maximum number of resources to return. + // If unspecified, at most 50 resources will be returned. + // The maximum value is 200; (higher values will be coerced to the maximum) + int32 page_size = 2; + + // A page token, received from a previous `ListConversionEvents` call. + // Provide this to retrieve the subsequent page. + // When paginating, all other parameters provided to `ListConversionEvents` + // must match the call that provided the page token. + string page_token = 3; +} + +// Response message for ListConversionEvents RPC. +message ListConversionEventsResponse { + // The requested conversion events + repeated ConversionEvent conversion_events = 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 GetDisplayVideo360AdvertiserLink RPC. +message GetDisplayVideo360AdvertiserLinkRequest { + // Required. The name of the DisplayVideo360AdvertiserLink to get. + // Example format: properties/1234/displayVideo360AdvertiserLink/5678 + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "analyticsadmin.googleapis.com/DisplayVideo360AdvertiserLink" + } + ]; +} + +// Request message for ListDisplayVideo360AdvertiserLinks RPC. +message ListDisplayVideo360AdvertiserLinksRequest { + // Required. Example format: properties/1234 + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "analyticsadmin.googleapis.com/DisplayVideo360AdvertiserLink" + } + ]; + + // The maximum number of resources to return. + // If unspecified, at most 50 resources will be returned. + // The maximum value is 200 (higher values will be coerced to the maximum). + int32 page_size = 2; + + // A page token, received from a previous `ListDisplayVideo360AdvertiserLinks` + // call. Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to + // `ListDisplayVideo360AdvertiserLinks` must match the call that provided the + // page token. + string page_token = 3; +} + +// Response message for ListDisplayVideo360AdvertiserLinks RPC. +message ListDisplayVideo360AdvertiserLinksResponse { + // List of DisplayVideo360AdvertiserLinks. + repeated DisplayVideo360AdvertiserLink display_video_360_advertiser_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; +} + +// Request message for CreateDisplayVideo360AdvertiserLink RPC. +message CreateDisplayVideo360AdvertiserLinkRequest { + // Required. Example format: properties/1234 + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "analyticsadmin.googleapis.com/DisplayVideo360AdvertiserLink" + } + ]; + + // Required. The DisplayVideo360AdvertiserLink to create. + DisplayVideo360AdvertiserLink display_video_360_advertiser_link = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for DeleteDisplayVideo360AdvertiserLink RPC. +message DeleteDisplayVideo360AdvertiserLinkRequest { + // Required. The name of the DisplayVideo360AdvertiserLink to delete. + // Example format: properties/1234/displayVideo360AdvertiserLinks/5678 + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "analyticsadmin.googleapis.com/DisplayVideo360AdvertiserLink" + } + ]; +} + +// Request message for UpdateDisplayVideo360AdvertiserLink RPC. +message UpdateDisplayVideo360AdvertiserLinkRequest { + // The DisplayVideo360AdvertiserLink to update + DisplayVideo360AdvertiserLink display_video_360_advertiser_link = 1; + + // Required. The list of fields to be updated. Omitted fields will not be updated. + // To replace the entire entity, use one path with the string "*" to match + // all fields. + google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for GetDisplayVideo360AdvertiserLinkProposal RPC. +message GetDisplayVideo360AdvertiserLinkProposalRequest { + // Required. The name of the DisplayVideo360AdvertiserLinkProposal to get. + // Example format: properties/1234/displayVideo360AdvertiserLinkProposals/5678 + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "analyticsadmin.googleapis.com/DisplayVideo360AdvertiserLinkProposal" + } + ]; +} + +// Request message for ListDisplayVideo360AdvertiserLinkProposals RPC. +message ListDisplayVideo360AdvertiserLinkProposalsRequest { + // Required. Example format: properties/1234 + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "analyticsadmin.googleapis.com/DisplayVideo360AdvertiserLinkProposal" + } + ]; + + // The maximum number of resources to return. + // If unspecified, at most 50 resources will be returned. + // The maximum value is 200 (higher values will be coerced to the maximum). + int32 page_size = 2; + + // A page token, received from a previous + // `ListDisplayVideo360AdvertiserLinkProposals` call. Provide this to retrieve + // the subsequent page. + // + // When paginating, all other parameters provided to + // `ListDisplayVideo360AdvertiserLinkProposals` must match the call that + // provided the page token. + string page_token = 3; +} + +// Response message for ListDisplayVideo360AdvertiserLinkProposals RPC. +message ListDisplayVideo360AdvertiserLinkProposalsResponse { + // List of DisplayVideo360AdvertiserLinkProposals. + repeated DisplayVideo360AdvertiserLinkProposal display_video_360_advertiser_link_proposals = 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 CreateDisplayVideo360AdvertiserLinkProposal RPC. +message CreateDisplayVideo360AdvertiserLinkProposalRequest { + // Required. Example format: properties/1234 + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "analyticsadmin.googleapis.com/DisplayVideo360AdvertiserLinkProposal" + } + ]; + + // Required. The DisplayVideo360AdvertiserLinkProposal to create. + DisplayVideo360AdvertiserLinkProposal display_video_360_advertiser_link_proposal = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for DeleteDisplayVideo360AdvertiserLinkProposal RPC. +message DeleteDisplayVideo360AdvertiserLinkProposalRequest { + // Required. The name of the DisplayVideo360AdvertiserLinkProposal to delete. + // Example format: properties/1234/displayVideo360AdvertiserLinkProposals/5678 + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "analyticsadmin.googleapis.com/DisplayVideo360AdvertiserLinkProposal" + } + ]; +} + +// Request message for ApproveDisplayVideo360AdvertiserLinkProposal RPC. +message ApproveDisplayVideo360AdvertiserLinkProposalRequest { + // Required. The name of the DisplayVideo360AdvertiserLinkProposal to approve. + // Example format: properties/1234/displayVideo360AdvertiserLinkProposals/5678 + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "analyticsadmin.googleapis.com/DisplayVideo360AdvertiserLinkProposal" + } + ]; +} + +// Response message for ApproveDisplayVideo360AdvertiserLinkProposal RPC. +message ApproveDisplayVideo360AdvertiserLinkProposalResponse { + // The DisplayVideo360AdvertiserLink created as a result of approving the + // proposal. + DisplayVideo360AdvertiserLink display_video_360_advertiser_link = 1; +} + +// Request message for CancelDisplayVideo360AdvertiserLinkProposal RPC. +message CancelDisplayVideo360AdvertiserLinkProposalRequest { + // Required. The name of the DisplayVideo360AdvertiserLinkProposal to cancel. + // Example format: properties/1234/displayVideo360AdvertiserLinkProposals/5678 + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "analyticsadmin.googleapis.com/DisplayVideo360AdvertiserLinkProposal" + } + ]; +} + +// Request message for CreateCustomDimension RPC. +message CreateCustomDimensionRequest { + // Required. Example format: properties/1234 + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "analyticsadmin.googleapis.com/CustomDimension" + } + ]; + + // Required. The CustomDimension to create. + CustomDimension custom_dimension = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for UpdateCustomDimension RPC. +message UpdateCustomDimensionRequest { + // The CustomDimension to update + CustomDimension custom_dimension = 1; + + // Required. The list of fields to be updated. Omitted fields will not be updated. + // To replace the entire entity, use one path with the string "*" to match + // all fields. + google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for ListCustomDimensions RPC. +message ListCustomDimensionsRequest { + // Required. Example format: properties/1234 + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "analyticsadmin.googleapis.com/CustomDimension" + } + ]; + + // The maximum number of resources to return. + // If unspecified, at most 50 resources will be returned. + // The maximum value is 200 (higher values will be coerced to the maximum). + int32 page_size = 2; + + // A page token, received from a previous `ListCustomDimensions` call. + // Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to `ListCustomDimensions` + // must match the call that provided the page token. + string page_token = 3; +} + +// Response message for ListCustomDimensions RPC. +message ListCustomDimensionsResponse { + // List of CustomDimensions. + repeated CustomDimension custom_dimensions = 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 ArchiveCustomDimension RPC. +message ArchiveCustomDimensionRequest { + // Required. The name of the CustomDimension to archive. + // Example format: properties/1234/customDimensions/5678 + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "analyticsadmin.googleapis.com/CustomDimension" + } + ]; +} + +// Request message for GetCustomDimension RPC. +message GetCustomDimensionRequest { + // Required. The name of the CustomDimension to get. + // Example format: properties/1234/customDimensions/5678 + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "analyticsadmin.googleapis.com/CustomDimension" + } + ]; +} + +// Request message for CreateCustomMetric RPC. +message CreateCustomMetricRequest { + // Required. Example format: properties/1234 + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "analyticsadmin.googleapis.com/CustomMetric" + } + ]; + + // Required. The CustomMetric to create. + CustomMetric custom_metric = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for UpdateCustomMetric RPC. +message UpdateCustomMetricRequest { + // The CustomMetric to update + CustomMetric custom_metric = 1; + + // Required. The list of fields to be updated. Omitted fields will not be updated. + // To replace the entire entity, use one path with the string "*" to match + // all fields. + google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for ListCustomMetrics RPC. +message ListCustomMetricsRequest { + // Required. Example format: properties/1234 + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "analyticsadmin.googleapis.com/CustomMetric" + } + ]; + + // The maximum number of resources to return. + // If unspecified, at most 50 resources will be returned. + // The maximum value is 200 (higher values will be coerced to the maximum). + int32 page_size = 2; + + // A page token, received from a previous `ListCustomMetrics` call. + // Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to `ListCustomMetrics` must + // match the call that provided the page token. + string page_token = 3; +} + +// Response message for ListCustomMetrics RPC. +message ListCustomMetricsResponse { + // List of CustomMetrics. + repeated CustomMetric custom_metrics = 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 ArchiveCustomMetric RPC. +message ArchiveCustomMetricRequest { + // Required. The name of the CustomMetric to archive. + // Example format: properties/1234/customMetrics/5678 + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "analyticsadmin.googleapis.com/CustomMetric" + } + ]; +} + +// Request message for GetCustomMetric RPC. +message GetCustomMetricRequest { + // Required. The name of the CustomMetric to get. + // Example format: properties/1234/customMetrics/5678 + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "analyticsadmin.googleapis.com/CustomMetric" + } + ]; +} + +// Request message for GetDataRetentionSettings RPC. +message GetDataRetentionSettingsRequest { + // Required. The name of the settings to lookup. + // Format: + // properties/{property}/dataRetentionSettings + // Example: "properties/1000/dataRetentionSettings" + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "analyticsadmin.googleapis.com/DataRetentionSettings" + } + ]; +} + +// Request message for UpdateDataRetentionSettings RPC. +message UpdateDataRetentionSettingsRequest { + // Required. The settings to update. + // The `name` field is used to identify the settings to be updated. + DataRetentionSettings data_retention_settings = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The list of fields to be updated. Field names must be in snake case + // (e.g., "field_to_update"). Omitted fields will not be updated. To replace + // the entire entity, use one path with the string "*" to match all fields. + google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for CreateDataStream RPC. +message CreateDataStreamRequest { + // Required. Example format: properties/1234 + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "analyticsadmin.googleapis.com/DataStream" + } + ]; + + // Required. The DataStream to create. + DataStream data_stream = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for DeleteDataStream RPC. +message DeleteDataStreamRequest { + // Required. The name of the DataStream to delete. + // Example format: properties/1234/dataStreams/5678 + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "analyticsadmin.googleapis.com/DataStream" + } + ]; +} + +// Request message for UpdateDataStream RPC. +message UpdateDataStreamRequest { + // The DataStream to update + DataStream data_stream = 1; + + // Required. The list of fields to be updated. Omitted fields will not be updated. + // To replace the entire entity, use one path with the string "*" to match + // all fields. + google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for ListDataStreams RPC. +message ListDataStreamsRequest { + // Required. Example format: properties/1234 + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "analyticsadmin.googleapis.com/DataStream" + } + ]; + + // The maximum number of resources to return. + // If unspecified, at most 50 resources will be returned. + // The maximum value is 200 (higher values will be coerced to the maximum). + int32 page_size = 2; + + // A page token, received from a previous `ListDataStreams` call. + // Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to `ListDataStreams` must + // match the call that provided the page token. + string page_token = 3; +} + +// Response message for ListDataStreams RPC. +message ListDataStreamsResponse { + // List of DataStreams. + repeated DataStream data_streams = 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 GetDataStream RPC. +message GetDataStreamRequest { + // Required. The name of the DataStream to get. + // Example format: properties/1234/dataStreams/5678 + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "analyticsadmin.googleapis.com/DataStream" + } + ]; +} + +// Request message for GetAudience RPC. +message GetAudienceRequest { + // Required. The name of the Audience to get. + // Example format: properties/1234/audiences/5678 + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "analyticsadmin.googleapis.com/Audience" + } + ]; +} + +// Request message for ListAudiences RPC. +message ListAudiencesRequest { + // Required. Example format: properties/1234 + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "analyticsadmin.googleapis.com/Audience" + } + ]; + + // The maximum number of resources to return. + // If unspecified, at most 50 resources will be returned. + // The maximum value is 200 (higher values will be coerced to the maximum). + int32 page_size = 2; + + // A page token, received from a previous `ListAudiences` call. Provide this + // to retrieve the subsequent page. + // + // When paginating, all other parameters provided to `ListAudiences` must + // match the call that provided the page token. + string page_token = 3; +} + +// Response message for ListAudiences RPC. +message ListAudiencesResponse { + // List of Audiences. + repeated Audience audiences = 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 CreateAudience RPC. +message CreateAudienceRequest { + // Required. Example format: properties/1234 + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "analyticsadmin.googleapis.com/Audience" + } + ]; + + // Required. The audience to create. + Audience audience = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for UpdateAudience RPC. +message UpdateAudienceRequest { + // Required. The audience to update. + // The audience's `name` field is used to identify the audience to be updated. + Audience audience = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The list of fields to be updated. Field names must be in snake case + // (e.g., "field_to_update"). Omitted fields will not be updated. To replace + // the entire entity, use one path with the string "*" to match all fields. + google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for ArchiveAudience RPC. +message ArchiveAudienceRequest { + // Required. Example format: properties/1234/audiences/5678 + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "analyticsadmin.googleapis.com/Audience" + } + ]; +} + +// Request message for GetAttributionSettings RPC. +message GetAttributionSettingsRequest { + // Required. The name of the attribution settings to retrieve. + // Format: properties/{property}/attributionSettings + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "analyticsadmin.googleapis.com/AttributionSettings" + } + ]; +} + +// Request message for UpdateAttributionSettings RPC +message UpdateAttributionSettingsRequest { + // Required. The attribution settings to update. + // The `name` field is used to identify the settings to be updated. + AttributionSettings attribution_settings = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The list of fields to be updated. Field names must be in snake case + // (e.g., "field_to_update"). Omitted fields will not be updated. To replace + // the entire entity, use one path with the string "*" to match all fields. + google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED]; +} diff --git a/packages/google-analytics-admin/protos/google/analytics/admin/v1alpha/audience.proto b/packages/google-analytics-admin/protos/google/analytics/admin/v1alpha/audience.proto new file mode 100644 index 00000000000..e12943e1c9d --- /dev/null +++ b/packages/google-analytics-admin/protos/google/analytics/admin/v1alpha/audience.proto @@ -0,0 +1,419 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.analytics.admin.v1alpha; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/duration.proto"; + +option go_package = "google.golang.org/genproto/googleapis/analytics/admin/v1alpha;admin"; +option java_multiple_files = true; +option java_outer_classname = "AudienceProto"; +option java_package = "com.google.analytics.admin.v1alpha"; + +// Specifies how to evaluate users for joining an Audience. +enum AudienceFilterScope { + // Scope is not specified. + AUDIENCE_FILTER_SCOPE_UNSPECIFIED = 0; + + // User joins the Audience if the filter condition is met within one + // event. + AUDIENCE_FILTER_SCOPE_WITHIN_SAME_EVENT = 1; + + // User joins the Audience if the filter condition is met within one + // session. + AUDIENCE_FILTER_SCOPE_WITHIN_SAME_SESSION = 2; + + // User joins the Audience if the filter condition is met by any event + // across any session. + AUDIENCE_FILTER_SCOPE_ACROSS_ALL_SESSIONS = 3; +} + +// A specific filter for a single dimension or metric. +message AudienceDimensionOrMetricFilter { + // A filter for a string-type dimension that matches a particular pattern. + message StringFilter { + // The match type for the string filter. + enum MatchType { + // Unspecified + MATCH_TYPE_UNSPECIFIED = 0; + + // Exact match of the string value. + EXACT = 1; + + // Begins with the string value. + BEGINS_WITH = 2; + + // Ends with the string value. + ENDS_WITH = 3; + + // Contains the string value. + CONTAINS = 4; + + // Full regular expression matches with the string value. + FULL_REGEXP = 5; + + // Partial regular expression matches with the string value. + PARTIAL_REGEXP = 6; + } + + // Required. The match type for the string filter. + MatchType match_type = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The string value to be matched against. + string value = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. If true, the match is case-sensitive. If false, the match is + // case-insensitive. + bool case_sensitive = 3 [(google.api.field_behavior) = OPTIONAL]; + } + + // A filter for a string dimension that matches a particular list of options. + message InListFilter { + // Required. The list of possible string values to match against. Must be non-empty. + repeated string values = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. If true, the match is case-sensitive. If false, the match is + // case-insensitive. + bool case_sensitive = 2 [(google.api.field_behavior) = OPTIONAL]; + } + + // To represent a number. + message NumericValue { + // One of a numeric value. + oneof one_value { + // Integer value. + int64 int64_value = 1; + + // Double value. + double double_value = 2; + } + } + + // A filter for numeric or date values on a dimension or metric. + message NumericFilter { + // The operation applied to a numeric filter. + enum Operation { + // Unspecified. + OPERATION_UNSPECIFIED = 0; + + // Equal. + EQUAL = 1; + + // Less than. + LESS_THAN = 2; + + // Less than or equal. + LESS_THAN_OR_EQUAL = 3; + + // Greater than. + GREATER_THAN = 4; + + // Greater than or equal. + GREATER_THAN_OR_EQUAL = 5; + } + + // Required. The operation applied to a numeric filter. + Operation operation = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The numeric or date value to match against. + NumericValue value = 2 [(google.api.field_behavior) = REQUIRED]; + } + + // A filter for numeric or date values between certain values on a dimension + // or metric. + message BetweenFilter { + // Required. Begins with this number, inclusive. + NumericValue from_value = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Ends with this number, inclusive. + NumericValue to_value = 2 [(google.api.field_behavior) = REQUIRED]; + } + + // One of the above filters. + oneof one_filter { + // A filter for a string-type dimension that matches a particular pattern. + StringFilter string_filter = 2; + + // A filter for a string dimension that matches a particular list of + // options. + InListFilter in_list_filter = 3; + + // A filter for numeric or date values on a dimension or metric. + NumericFilter numeric_filter = 4; + + // A filter for numeric or date values between certain values on a dimension + // or metric. + BetweenFilter between_filter = 5; + } + + // Required. Immutable. The dimension name or metric name to filter. + string field_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.field_behavior) = IMMUTABLE + ]; + + // Optional. Indicates whether this filter needs dynamic evaluation or not. If set to + // true, users join the Audience if they ever met the condition (static + // evaluation). If unset or set to false, user evaluation for an Audience is + // dynamic; users are added to an Audience when they meet the conditions and + // then removed when they no longer meet them. + // + // This can only be set when Audience scope is ACROSS_ALL_SESSIONS. + bool at_any_point_in_time = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If set, specifies the time window for which to evaluate data in number of + // days. If not set, then audience data is evaluated against lifetime data + // (i.e., infinite time window). + // + // For example, if set to 1 day, only the current day's data is evaluated. The + // reference point is the current day when at_any_point_in_time is unset or + // false. + // + // It can only be set when Audience scope is ACROSS_ALL_SESSIONS and cannot be + // greater than 60 days. + int32 in_any_n_day_period = 7 [(google.api.field_behavior) = OPTIONAL]; +} + +// A filter that matches events of a single event name. If an event parameter +// is specified, only the subset of events that match both the single event name +// and the parameter filter expressions match this event filter. +message AudienceEventFilter { + // Required. Immutable. The name of the event to match against. + string event_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.field_behavior) = IMMUTABLE + ]; + + // Optional. If specified, this filter matches events that match both the single + // event name and the parameter filter expressions. AudienceEventFilter + // inside the parameter filter expression cannot be set (i.e., nested + // event filters are not supported). This should be a single and_group of + // dimension_or_metric_filter or not_expression; ANDs of ORs are not + // supported. Also, if it includes a filter for "eventCount", only that one + // will be considered; all the other filters will be ignored. + AudienceFilterExpression event_parameter_filter_expression = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// A logical expression of Audience dimension, metric, or event filters. +message AudienceFilterExpression { + // The expression applied to a filter. + oneof expr { + // A list of expressions to be AND’ed together. It can only contain + // AudienceFilterExpressions with or_group. This must be set for the top + // level AudienceFilterExpression. + AudienceFilterExpressionList and_group = 1; + + // A list of expressions to OR’ed together. It cannot contain + // AudienceFilterExpressions with and_group or or_group. + AudienceFilterExpressionList or_group = 2; + + // A filter expression to be NOT'ed (i.e., inverted, complemented). It + // can only include a dimension_or_metric_filter. This cannot be set on the + // top level AudienceFilterExpression. + AudienceFilterExpression not_expression = 3; + + // A filter on a single dimension or metric. This cannot be set on the top + // level AudienceFilterExpression. + AudienceDimensionOrMetricFilter dimension_or_metric_filter = 4; + + // Creates a filter that matches a specific event. This cannot be set on the + // top level AudienceFilterExpression. + AudienceEventFilter event_filter = 5; + } +} + +// A list of Audience filter expressions. +message AudienceFilterExpressionList { + // A list of Audience filter expressions. + repeated AudienceFilterExpression filter_expressions = 1; +} + +// Defines a simple filter that a user must satisfy to be a member of the +// Audience. +message AudienceSimpleFilter { + // Required. Immutable. Specifies the scope for this filter. + AudienceFilterScope scope = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.field_behavior) = IMMUTABLE + ]; + + // Required. Immutable. A logical expression of Audience dimension, metric, or event filters. + AudienceFilterExpression filter_expression = 2 [ + (google.api.field_behavior) = REQUIRED, + (google.api.field_behavior) = IMMUTABLE + ]; +} + +// Defines filters that must occur in a specific order for the user to be a +// member of the Audience. +message AudienceSequenceFilter { + // A condition that must occur in the specified step order for this user + // to match the sequence. + message AudienceSequenceStep { + // Required. Immutable. Specifies the scope for this step. + AudienceFilterScope scope = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.field_behavior) = IMMUTABLE + ]; + + // Optional. If true, the event satisfying this step must be the very next event + // after the event satisfying the last step. If unset or false, this + // step indirectly follows the prior step; for example, there may be + // events between the prior step and this step. It is ignored for the + // first step. + bool immediately_follows = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. When set, this step must be satisfied within the constraint_duration of + // the previous step (i.e., t[i] - t[i-1] <= constraint_duration). If not + // set, there is no duration requirement (the duration is effectively + // unlimited). It is ignored for the first step. + google.protobuf.Duration constraint_duration = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Required. Immutable. A logical expression of Audience dimension, metric, or event filters in + // each step. + AudienceFilterExpression filter_expression = 4 [ + (google.api.field_behavior) = REQUIRED, + (google.api.field_behavior) = IMMUTABLE + ]; + } + + // Required. Immutable. Specifies the scope for this filter. + AudienceFilterScope scope = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.field_behavior) = IMMUTABLE + ]; + + // Optional. Defines the time period in which the whole sequence must occur. + google.protobuf.Duration sequence_maximum_duration = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Required. An ordered sequence of steps. A user must complete each step in order to + // join the sequence filter. + repeated AudienceSequenceStep sequence_steps = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// A clause for defining either a simple or sequence filter. A filter can be +// inclusive (i.e., users satisfying the filter clause are included in the +// Audience) or exclusive (i.e., users satisfying the filter clause are +// excluded from the Audience). +message AudienceFilterClause { + // Specifies whether this is an include or exclude filter clause. + enum AudienceClauseType { + // Unspecified clause type. + AUDIENCE_CLAUSE_TYPE_UNSPECIFIED = 0; + + // Users will be included in the Audience if the filter clause is met. + INCLUDE = 1; + + // Users will be excluded from the Audience if the filter clause is met. + EXCLUDE = 2; + } + + oneof filter { + // A simple filter that a user must satisfy to be a member of the Audience. + AudienceSimpleFilter simple_filter = 2; + + // Filters that must occur in a specific order for the user to be a member + // of the Audience. + AudienceSequenceFilter sequence_filter = 3; + } + + // Required. Specifies whether this is an include or exclude filter clause. + AudienceClauseType clause_type = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// Specifies an event to log when a user joins the Audience. +message AudienceEventTrigger { + // Determines when to log the event. + enum LogCondition { + // Log condition is not specified. + LOG_CONDITION_UNSPECIFIED = 0; + + // The event should be logged only when a user is joined. + AUDIENCE_JOINED = 1; + + // The event should be logged whenever the Audience condition is met, even + // if the user is already a member of the Audience. + AUDIENCE_MEMBERSHIP_RENEWED = 2; + } + + // Required. The event name that will be logged. + string event_name = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. When to log the event. + LogCondition log_condition = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// A resource message representing a GA4 Audience. +message Audience { + option (google.api.resource) = { + type: "analyticsadmin.googleapis.com/Audience" + pattern: "properties/{property}/audiences/{audience}" + }; + + // Specifies how long an exclusion lasts for users that meet the exclusion + // filter. + enum AudienceExclusionDurationMode { + // Not specified. + AUDIENCE_EXCLUSION_DURATION_MODE_UNSPECIFIED = 0; + + // Exclude users from the Audience during periods when they meet the + // filter clause. + EXCLUDE_TEMPORARILY = 1; + + // Exclude users from the Audience if they've ever met the filter clause. + EXCLUDE_PERMANENTLY = 2; + } + + // Output only. The resource name for this Audience resource. + // Format: properties/{propertyId}/audiences/{audienceId} + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. The display name of the Audience. + string display_name = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The description of the Audience. + string description = 3 [(google.api.field_behavior) = REQUIRED]; + + // Required. Immutable. The duration a user should stay in an Audience. It cannot be set to more + // than 540 days. + int32 membership_duration_days = 4 [ + (google.api.field_behavior) = REQUIRED, + (google.api.field_behavior) = IMMUTABLE + ]; + + // Output only. It is automatically set by GA to false if this is an NPA Audience and is + // excluded from ads personalization. + bool ads_personalization_enabled = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Specifies an event to log when a user joins the Audience. If not set, no + // event is logged when a user joins the Audience. + AudienceEventTrigger event_trigger = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Immutable. Specifies how long an exclusion lasts for users that meet the exclusion + // filter. It is applied to all EXCLUDE filter clauses and is ignored when + // there is no EXCLUDE filter clause in the Audience. + AudienceExclusionDurationMode exclusion_duration_mode = 7 [(google.api.field_behavior) = IMMUTABLE]; + + // Required. Immutable. null Filter clauses that define the Audience. All clauses will be AND’ed + // together. + repeated AudienceFilterClause filter_clauses = 8 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.field_behavior) = REQUIRED, + (google.api.field_behavior) = UNORDERED_LIST + ]; +} diff --git a/packages/google-analytics-admin/protos/google/analytics/admin/v1alpha/resources.proto b/packages/google-analytics-admin/protos/google/analytics/admin/v1alpha/resources.proto new file mode 100644 index 00000000000..337c7fe65fb --- /dev/null +++ b/packages/google-analytics-admin/protos/google/analytics/admin/v1alpha/resources.proto @@ -0,0 +1,1300 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.analytics.admin.v1alpha; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/timestamp.proto"; +import "google/protobuf/wrappers.proto"; + +option go_package = "google.golang.org/genproto/googleapis/analytics/admin/v1alpha;admin"; +option java_multiple_files = true; +option java_outer_classname = "ResourcesProto"; +option java_package = "com.google.analytics.admin.v1alpha"; + +// The category selected for this property, used for industry benchmarking. +enum IndustryCategory { + // Industry category unspecified + INDUSTRY_CATEGORY_UNSPECIFIED = 0; + + // Automotive + AUTOMOTIVE = 1; + + // Business and industrial markets + BUSINESS_AND_INDUSTRIAL_MARKETS = 2; + + // Finance + FINANCE = 3; + + // Healthcare + HEALTHCARE = 4; + + // Technology + TECHNOLOGY = 5; + + // Travel + TRAVEL = 6; + + // Other + OTHER = 7; + + // Arts and entertainment + ARTS_AND_ENTERTAINMENT = 8; + + // Beauty and fitness + BEAUTY_AND_FITNESS = 9; + + // Books and literature + BOOKS_AND_LITERATURE = 10; + + // Food and drink + FOOD_AND_DRINK = 11; + + // Games + GAMES = 12; + + // Hobbies and leisure + HOBBIES_AND_LEISURE = 13; + + // Home and garden + HOME_AND_GARDEN = 14; + + // Internet and telecom + INTERNET_AND_TELECOM = 15; + + // Law and government + LAW_AND_GOVERNMENT = 16; + + // News + NEWS = 17; + + // Online communities + ONLINE_COMMUNITIES = 18; + + // People and society + PEOPLE_AND_SOCIETY = 19; + + // Pets and animals + PETS_AND_ANIMALS = 20; + + // Real estate + REAL_ESTATE = 21; + + // Reference + REFERENCE = 22; + + // Science + SCIENCE = 23; + + // Sports + SPORTS = 24; + + // Jobs and education + JOBS_AND_EDUCATION = 25; + + // Shopping + SHOPPING = 26; +} + +// Various levels of service for Google Analytics. +enum ServiceLevel { + // Service level not specified or invalid. + SERVICE_LEVEL_UNSPECIFIED = 0; + + // The standard version of Google Analytics. + GOOGLE_ANALYTICS_STANDARD = 1; + + // The paid, premium version of Google Analytics. + GOOGLE_ANALYTICS_360 = 2; +} + +// Different kinds of actors that can make changes to Google Analytics +// resources. +enum ActorType { + // Unknown or unspecified actor type. + ACTOR_TYPE_UNSPECIFIED = 0; + + // Changes made by the user specified in actor_email. + USER = 1; + + // Changes made by the Google Analytics system. + SYSTEM = 2; + + // Changes made by Google Analytics support team staff. + SUPPORT = 3; +} + +// Types of actions that may change a resource. +enum ActionType { + // Action type unknown or not specified. + ACTION_TYPE_UNSPECIFIED = 0; + + // Resource was created in this change. + CREATED = 1; + + // Resource was updated in this change. + UPDATED = 2; + + // Resource was deleted in this change. + DELETED = 3; +} + +// Types of resources whose changes may be returned from change history. +enum ChangeHistoryResourceType { + // Resource type unknown or not specified. + CHANGE_HISTORY_RESOURCE_TYPE_UNSPECIFIED = 0; + + // Account resource + ACCOUNT = 1; + + // Property resource + PROPERTY = 2; + + // FirebaseLink resource + FIREBASE_LINK = 6; + + // GoogleAdsLink resource + GOOGLE_ADS_LINK = 7; + + // GoogleSignalsSettings resource + GOOGLE_SIGNALS_SETTINGS = 8; + + // ConversionEvent resource + CONVERSION_EVENT = 9; + + // MeasurementProtocolSecret resource + MEASUREMENT_PROTOCOL_SECRET = 10; + + // CustomDimension resource + CUSTOM_DIMENSION = 11; + + // CustomMetric resource + CUSTOM_METRIC = 12; + + // DataRetentionSettings resource + DATA_RETENTION_SETTINGS = 13; + + // DisplayVideo360AdvertiserLink resource + DISPLAY_VIDEO_360_ADVERTISER_LINK = 14; + + // DisplayVideo360AdvertiserLinkProposal resource + DISPLAY_VIDEO_360_ADVERTISER_LINK_PROPOSAL = 15; + + // SearchAds360Link resource + SEARCH_ADS_360_LINK = 16; + + // DataStream resource + DATA_STREAM = 18; + + // AttributionSettings resource + ATTRIBUTION_SETTINGS = 20; +} + +// Status of the Google Signals settings (i.e., whether this feature has been +// enabled for the property). +enum GoogleSignalsState { + // Google Signals status defaults to GOOGLE_SIGNALS_STATE_UNSPECIFIED to + // represent that the user has not made an explicit choice. + GOOGLE_SIGNALS_STATE_UNSPECIFIED = 0; + + // Google Signals is enabled. + GOOGLE_SIGNALS_ENABLED = 1; + + // Google Signals is disabled. + GOOGLE_SIGNALS_DISABLED = 2; +} + +// Consent field of the Google Signals settings (i.e., whether the user has +// consented to the Google Signals terms of service.) +enum GoogleSignalsConsent { + // Google Signals consent value defaults to + // GOOGLE_SIGNALS_CONSENT_UNSPECIFIED. This will be treated as + // GOOGLE_SIGNALS_CONSENT_NOT_CONSENTED. + GOOGLE_SIGNALS_CONSENT_UNSPECIFIED = 0; + + // Terms of service have been accepted + GOOGLE_SIGNALS_CONSENT_CONSENTED = 2; + + // Terms of service have not been accepted + GOOGLE_SIGNALS_CONSENT_NOT_CONSENTED = 1; +} + +// An indication of which product the user initiated a link proposal from. +enum LinkProposalInitiatingProduct { + // Unspecified product. + LINK_PROPOSAL_INITIATING_PRODUCT_UNSPECIFIED = 0; + + // This proposal was created by a user from Google Analytics. + GOOGLE_ANALYTICS = 1; + + // This proposal was created by a user from a linked product (not Google + // Analytics). + LINKED_PRODUCT = 2; +} + +// The state of a link proposal resource. +enum LinkProposalState { + // Unspecified state + LINK_PROPOSAL_STATE_UNSPECIFIED = 0; + + // This proposal is awaiting review from a Google Analytics user. This + // proposal will automatically expire after some time. + AWAITING_REVIEW_FROM_GOOGLE_ANALYTICS = 1; + + // This proposal is awaiting review from a user of a linked product. This + // proposal will automatically expire after some time. + AWAITING_REVIEW_FROM_LINKED_PRODUCT = 2; + + // This proposal has been withdrawn by an admin on the initiating product. + // This proposal will be automatically deleted after some time. + WITHDRAWN = 3; + + // This proposal has been declined by an admin on the receiving product. This + // proposal will be automatically deleted after some time. + DECLINED = 4; + + // This proposal expired due to lack of response from an admin on the + // receiving product. This proposal will be automatically deleted after some + // time. + EXPIRED = 5; + + // This proposal has become obsolete because a link was directly created to + // the same external product resource that this proposal specifies. This + // proposal will be automatically deleted after some time. + OBSOLETE = 6; +} + +// Types of Property resources. +enum PropertyType { + // Unknown or unspecified property type + PROPERTY_TYPE_UNSPECIFIED = 0; + + // Ordinary GA4 property + PROPERTY_TYPE_ORDINARY = 1; + + // GA4 subproperty + PROPERTY_TYPE_SUBPROPERTY = 2; + + // GA4 rollup property + PROPERTY_TYPE_ROLLUP = 3; +} + +// A resource message representing a Google Analytics account. +message Account { + option (google.api.resource) = { + type: "analyticsadmin.googleapis.com/Account" + pattern: "accounts/{account}" + }; + + // Output only. Resource name of this account. + // Format: accounts/{account} + // Example: "accounts/100" + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Time when this account was originally created. + google.protobuf.Timestamp create_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Time when account payload fields were last updated. + google.protobuf.Timestamp update_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. Human-readable display name for this account. + string display_name = 4 [(google.api.field_behavior) = REQUIRED]; + + // Country of business. Must be a Unicode CLDR region code. + string region_code = 5; + + // Output only. Indicates whether this Account is soft-deleted or not. Deleted + // accounts are excluded from List results unless specifically requested. + bool deleted = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// A resource message representing a Google Analytics GA4 property. +message Property { + option (google.api.resource) = { + type: "analyticsadmin.googleapis.com/Property" + pattern: "properties/{property}" + }; + + // Output only. Resource name of this property. + // Format: properties/{property_id} + // Example: "properties/1000" + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Immutable. The property type for this Property resource. When creating a property, if + // the type is "PROPERTY_TYPE_UNSPECIFIED", then "ORDINARY_PROPERTY" will be + // implied. "SUBPROPERTY" and "ROLLUP_PROPERTY" types cannot yet be created + // via Google Analytics Admin API. + PropertyType property_type = 14 [(google.api.field_behavior) = IMMUTABLE]; + + // Output only. Time when the entity was originally created. + google.protobuf.Timestamp create_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Time when entity payload fields were last updated. + google.protobuf.Timestamp update_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Immutable. Resource name of this property's logical parent. + // + // Note: The Property-Moving UI can be used to change the parent. + // Format: accounts/{account}, properties/{property} + // Example: "accounts/100", "properties/101" + string parent = 2 [(google.api.field_behavior) = IMMUTABLE]; + + // Required. Human-readable display name for this property. + // + // The max allowed display name length is 100 UTF-16 code units. + string display_name = 5 [(google.api.field_behavior) = REQUIRED]; + + // Industry associated with this property + // Example: AUTOMOTIVE, FOOD_AND_DRINK + IndustryCategory industry_category = 6; + + // Required. Reporting Time Zone, used as the day boundary for reports, regardless of + // where the data originates. If the time zone honors DST, Analytics will + // automatically adjust for the changes. + // + // NOTE: Changing the time zone only affects data going forward, and is not + // applied retroactively. + // + // Format: https://www.iana.org/time-zones + // Example: "America/Los_Angeles" + string time_zone = 7 [(google.api.field_behavior) = REQUIRED]; + + // The currency type used in reports involving monetary values. + // + // + // Format: https://en.wikipedia.org/wiki/ISO_4217 + // Examples: "USD", "EUR", "JPY" + string currency_code = 8; + + // Output only. The Google Analytics service level that applies to this property. + ServiceLevel service_level = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. If set, the time at which this property was trashed. If not set, then this + // property is not currently in the trash can. + google.protobuf.Timestamp delete_time = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. If set, the time at which this trashed property will be permanently + // deleted. If not set, then this property is not currently in the trash can + // and is not slated to be deleted. + google.protobuf.Timestamp expire_time = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Immutable. The resource name of the parent account + // Format: accounts/{account_id} + // Example: "accounts/123" + string account = 13 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "analyticsadmin.googleapis.com/Account" + } + ]; +} + +// A resource message representing a data stream. +message DataStream { + option (google.api.resource) = { + type: "analyticsadmin.googleapis.com/DataStream" + pattern: "properties/{property}/dataStreams/{data_stream}" + }; + + // Data specific to web streams. + message WebStreamData { + // Output only. Analytics "Measurement ID", without the "G-" prefix. + // Example: "G-1A2BCD345E" would just be "1A2BCD345E" + string measurement_id = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. ID of the corresponding web app in Firebase, if any. + // This ID can change if the web app is deleted and recreated. + string firebase_app_id = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Immutable. Domain name of the web app being measured, or empty. + // Example: "http://www.google.com", "https://www.google.com" + string default_uri = 3 [(google.api.field_behavior) = IMMUTABLE]; + } + + // Data specific to Android app streams. + message AndroidAppStreamData { + // Output only. ID of the corresponding Android app in Firebase, if any. + // This ID can change if the Android app is deleted and recreated. + string firebase_app_id = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Immutable. The package name for the app being measured. + // Example: "com.example.myandroidapp" + string package_name = 2 [(google.api.field_behavior) = IMMUTABLE]; + } + + // Data specific to iOS app streams. + message IosAppStreamData { + // Output only. ID of the corresponding iOS app in Firebase, if any. + // This ID can change if the iOS app is deleted and recreated. + string firebase_app_id = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. Immutable. The Apple App Store Bundle ID for the app + // Example: "com.example.myiosapp" + string bundle_id = 2 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.field_behavior) = REQUIRED + ]; + } + + // The type of the data stream. + enum DataStreamType { + // Type unknown or not specified. + DATA_STREAM_TYPE_UNSPECIFIED = 0; + + // Web data stream. + WEB_DATA_STREAM = 1; + + // Android app data stream. + ANDROID_APP_DATA_STREAM = 2; + + // iOS app data stream. + IOS_APP_DATA_STREAM = 3; + } + + // Data for specific data stream types. The message that will be + // set corresponds to the type of this stream. + oneof stream_data { + // Data specific to web streams. Must be populated if type is + // WEB_DATA_STREAM. + WebStreamData web_stream_data = 6; + + // Data specific to Android app streams. Must be populated if type is + // ANDROID_APP_DATA_STREAM. + AndroidAppStreamData android_app_stream_data = 7; + + // Data specific to iOS app streams. Must be populated if type is + // IOS_APP_DATA_STREAM. + IosAppStreamData ios_app_stream_data = 8; + } + + // Output only. Resource name of this Data Stream. + // Format: properties/{property_id}/dataStreams/{stream_id} + // Example: "properties/1000/dataStreams/2000" + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. Immutable. The type of this DataStream resource. + DataStreamType type = 2 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.field_behavior) = REQUIRED + ]; + + // Human-readable display name for the Data Stream. + // + // Required for web data streams. + // + // The max allowed display name length is 255 UTF-16 code units. + string display_name = 3; + + // Output only. Time when this stream was originally created. + google.protobuf.Timestamp create_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Time when stream payload fields were last updated. + google.protobuf.Timestamp update_time = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// A resource message representing a user's permissions on an Account or +// Property resource. +message UserLink { + option (google.api.resource) = { + type: "analyticsadmin.googleapis.com/UserLink" + pattern: "accounts/{account}/userLinks/{user_link}" + pattern: "properties/{property}/userLinks/{user_link}" + }; + + // Output only. Example format: properties/1234/userLinks/5678 + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Immutable. Email address of the user to link + string email_address = 2 [(google.api.field_behavior) = IMMUTABLE]; + + // Roles directly assigned to this user for this account or property. + // + // Valid values: + // predefinedRoles/viewer + // predefinedRoles/analyst + // predefinedRoles/editor + // predefinedRoles/admin + // predefinedRoles/no-cost-data + // predefinedRoles/no-revenue-data + // + // Excludes roles that are inherited from a higher-level entity, group, + // or organization admin role. + // + // A UserLink that is updated to have an empty list of direct_roles will be + // deleted. + repeated string direct_roles = 3; +} + +// Read-only resource used to summarize a principal's effective roles. +message AuditUserLink { + // Example format: properties/1234/userLinks/5678 + string name = 1; + + // Email address of the linked user + string email_address = 2; + + // Roles directly assigned to this user for this entity. + // + // Format: predefinedRoles/viewer + // + // Excludes roles that are inherited from an account (if this is for a + // property), group, or organization admin role. + repeated string direct_roles = 3; + + // Union of all permissions a user has at this account or property (includes + // direct permissions, group-inherited permissions, etc.). + // + // Format: predefinedRoles/viewer + repeated string effective_roles = 4; +} + +// A link between a GA4 property and a Firebase project. +message FirebaseLink { + option (google.api.resource) = { + type: "analyticsadmin.googleapis.com/FirebaseLink" + pattern: "properties/{property}/firebaseLinks/{firebase_link}" + }; + + // Output only. Example format: properties/1234/firebaseLinks/5678 + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Immutable. Firebase project resource name. When creating a FirebaseLink, you may + // provide this resource name using either a project number or project ID. + // Once this resource has been created, returned FirebaseLinks will always + // have a project_name that contains a project number. + // + // Format: 'projects/{project number}' + // Example: 'projects/1234' + string project = 2 [(google.api.field_behavior) = IMMUTABLE]; + + // Output only. Time when this FirebaseLink was originally created. + google.protobuf.Timestamp create_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Read-only resource with the tag for sending data from a website to a +// DataStream. Only present for web DataStream resources. +message GlobalSiteTag { + option (google.api.resource) = { + type: "analyticsadmin.googleapis.com/GlobalSiteTag" + pattern: "properties/{property}/dataStreams/{data_stream}/globalSiteTag" + }; + + // Output only. Resource name for this GlobalSiteTag resource. + // Format: properties/{property_id}/dataStreams/{stream_id}/globalSiteTag + // Example: "properties/123/dataStreams/456/globalSiteTag" + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Immutable. JavaScript code snippet to be pasted as the first item into the head tag of + // every webpage to measure. + string snippet = 2 [(google.api.field_behavior) = IMMUTABLE]; +} + +// A link between a GA4 property and a Google Ads account. +message GoogleAdsLink { + option (google.api.resource) = { + type: "analyticsadmin.googleapis.com/GoogleAdsLink" + pattern: "properties/{property}/googleAdsLinks/{google_ads_link}" + }; + + // Output only. Format: properties/{propertyId}/googleAdsLinks/{googleAdsLinkId} + // + // Note: googleAdsLinkId is not the Google Ads customer ID. + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Immutable. Google Ads customer ID. + string customer_id = 3 [(google.api.field_behavior) = IMMUTABLE]; + + // Output only. If true, this link is for a Google Ads manager account. + bool can_manage_clients = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Enable personalized advertising features with this integration. + // Automatically publish my Google Analytics audience lists and Google + // Analytics remarketing events/parameters to the linked Google Ads account. + // If this field is not set on create/update, it will be defaulted to true. + google.protobuf.BoolValue ads_personalization_enabled = 5; + + // Output only. Time when this link was originally created. + google.protobuf.Timestamp create_time = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Time when this link was last updated. + google.protobuf.Timestamp update_time = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Email address of the user that created the link. + // An empty string will be returned if the email address can't be retrieved. + string creator_email_address = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// A resource message representing data sharing settings of a Google Analytics +// account. +message DataSharingSettings { + option (google.api.resource) = { + type: "analyticsadmin.googleapis.com/DataSharingSettings" + pattern: "accounts/{account}/dataSharingSettings" + }; + + // Output only. Resource name. + // Format: accounts/{account}/dataSharingSettings + // Example: "accounts/1000/dataSharingSettings" + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Allows Google support to access the data in order to help troubleshoot + // issues. + bool sharing_with_google_support_enabled = 2; + + // Allows Google sales teams that are assigned to the customer to access the + // data in order to suggest configuration changes to improve results. + // Sales team restrictions still apply when enabled. + bool sharing_with_google_assigned_sales_enabled = 3; + + // Allows any of Google sales to access the data in order to suggest + // configuration changes to improve results. + bool sharing_with_google_any_sales_enabled = 4; + + // Allows Google to use the data to improve other Google products or services. + bool sharing_with_google_products_enabled = 5; + + // Allows Google to share the data anonymously in aggregate form with others. + bool sharing_with_others_enabled = 6; +} + +// A virtual resource representing an overview of an account and +// all its child GA4 properties. +message AccountSummary { + option (google.api.resource) = { + type: "analyticsadmin.googleapis.com/AccountSummary" + pattern: "accountSummaries/{account_summary}" + }; + + // Resource name for this account summary. + // Format: accountSummaries/{account_id} + // Example: "accountSummaries/1000" + string name = 1; + + // Resource name of account referred to by this account summary + // Format: accounts/{account_id} + // Example: "accounts/1000" + string account = 2 [(google.api.resource_reference) = { + type: "analyticsadmin.googleapis.com/Account" + }]; + + // Display name for the account referred to in this account summary. + string display_name = 3; + + // List of summaries for child accounts of this account. + repeated PropertySummary property_summaries = 4; +} + +// A virtual resource representing metadata for a GA4 property. +message PropertySummary { + // Resource name of property referred to by this property summary + // Format: properties/{property_id} + // Example: "properties/1000" + string property = 1 [(google.api.resource_reference) = { + type: "analyticsadmin.googleapis.com/Property" + }]; + + // Display name for the property referred to in this property summary. + string display_name = 2; + + // The property's property type. + PropertyType property_type = 3; + + // Resource name of this property's logical parent. + // + // Note: The Property-Moving UI can be used to change the parent. + // Format: accounts/{account}, properties/{property} + // Example: "accounts/100", "properties/200" + string parent = 4; +} + +// A secret value used for sending hits to Measurement Protocol. +message MeasurementProtocolSecret { + option (google.api.resource) = { + type: "analyticsadmin.googleapis.com/MeasurementProtocolSecret" + pattern: "properties/{property}/dataStreams/{data_stream}/measurementProtocolSecrets/{measurement_protocol_secret}" + }; + + // Output only. Resource name of this secret. This secret may be a child of any type of + // stream. + // Format: + // properties/{property}/dataStreams/{dataStream}/measurementProtocolSecrets/{measurementProtocolSecret} + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. Human-readable display name for this secret. + string display_name = 2 [(google.api.field_behavior) = REQUIRED]; + + // Output only. The measurement protocol secret value. Pass this value to the api_secret + // field of the Measurement Protocol API when sending hits to this + // secret's parent property. + string secret_value = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// A set of changes within a Google Analytics account or its child properties +// that resulted from the same cause. Common causes would be updates made in the +// Google Analytics UI, changes from customer support, or automatic Google +// Analytics system changes. +message ChangeHistoryEvent { + // ID of this change history event. This ID is unique across Google Analytics. + string id = 1; + + // Time when change was made. + google.protobuf.Timestamp change_time = 2; + + // The type of actor that made this change. + ActorType actor_type = 3; + + // Email address of the Google account that made the change. This will be a + // valid email address if the actor field is set to USER, and empty otherwise. + // Google accounts that have been deleted will cause an error. + string user_actor_email = 4; + + // If true, then the list of changes returned was filtered, and does not + // represent all changes that occurred in this event. + bool changes_filtered = 5; + + // A list of changes made in this change history event that fit the filters + // specified in SearchChangeHistoryEventsRequest. + repeated ChangeHistoryChange changes = 6; +} + +// A description of a change to a single Google Analytics resource. +message ChangeHistoryChange { + // A snapshot of a resource as before or after the result of a change in + // change history. + message ChangeHistoryResource { + oneof resource { + // A snapshot of an Account resource in change history. + Account account = 1; + + // A snapshot of a Property resource in change history. + Property property = 2; + + // A snapshot of a FirebaseLink resource in change history. + FirebaseLink firebase_link = 6; + + // A snapshot of a GoogleAdsLink resource in change history. + GoogleAdsLink google_ads_link = 7; + + // A snapshot of a GoogleSignalsSettings resource in change history. + GoogleSignalsSettings google_signals_settings = 8; + + // A snapshot of a DisplayVideo360AdvertiserLink resource in change + // history. + DisplayVideo360AdvertiserLink display_video_360_advertiser_link = 9; + + // A snapshot of a DisplayVideo360AdvertiserLinkProposal resource in + // change history. + DisplayVideo360AdvertiserLinkProposal display_video_360_advertiser_link_proposal = 10; + + // A snapshot of a ConversionEvent resource in change history. + ConversionEvent conversion_event = 11; + + // A snapshot of a MeasurementProtocolSecret resource in change history. + MeasurementProtocolSecret measurement_protocol_secret = 12; + + // A snapshot of a CustomDimension resource in change history. + CustomDimension custom_dimension = 13; + + // A snapshot of a CustomMetric resource in change history. + CustomMetric custom_metric = 14; + + // A snapshot of a data retention settings resource in change history. + DataRetentionSettings data_retention_settings = 15; + + // A snapshot of a DataStream resource in change history. + DataStream data_stream = 18; + + // A snapshot of AttributionSettings resource in change history. + AttributionSettings attribution_settings = 20; + } + } + + // Resource name of the resource whose changes are described by this entry. + string resource = 1; + + // The type of action that changed this resource. + ActionType action = 2; + + // Resource contents from before the change was made. If this resource was + // created in this change, this field will be missing. + ChangeHistoryResource resource_before_change = 3; + + // Resource contents from after the change was made. If this resource was + // deleted in this change, this field will be missing. + ChangeHistoryResource resource_after_change = 4; +} + +// A link between a GA4 property and a Display & Video 360 advertiser. +message DisplayVideo360AdvertiserLink { + option (google.api.resource) = { + type: "analyticsadmin.googleapis.com/DisplayVideo360AdvertiserLink" + pattern: "properties/{property}/displayVideo360AdvertiserLinks/{display_video_360_advertiser_link}" + }; + + // Output only. The resource name for this DisplayVideo360AdvertiserLink resource. + // Format: properties/{propertyId}/displayVideo360AdvertiserLinks/{linkId} + // + // Note: linkId is not the Display & Video 360 Advertiser ID + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Immutable. The Display & Video 360 Advertiser's advertiser ID. + string advertiser_id = 2 [(google.api.field_behavior) = IMMUTABLE]; + + // Output only. The display name of the Display & Video 360 Advertiser. + string advertiser_display_name = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Enables personalized advertising features with this integration. + // If this field is not set on create/update, it will be defaulted to true. + google.protobuf.BoolValue ads_personalization_enabled = 4; + + // Immutable. Enables the import of campaign data from Display & Video 360 into the GA4 + // property. After link creation, this can only be updated from the Display & + // Video 360 product. + // If this field is not set on create, it will be defaulted to true. + google.protobuf.BoolValue campaign_data_sharing_enabled = 5 [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. Enables the import of cost data from Display & Video 360 into the GA4 + // property. This can only be enabled if campaign_data_sharing_enabled is + // enabled. After link creation, this can only be updated from the Display & + // Video 360 product. + // If this field is not set on create, it will be defaulted to true. + google.protobuf.BoolValue cost_data_sharing_enabled = 6 [(google.api.field_behavior) = IMMUTABLE]; +} + +// A proposal for a link between a GA4 property and a Display & Video 360 +// advertiser. +// +// A proposal is converted to a DisplayVideo360AdvertiserLink once approved. +// Google Analytics admins approve inbound proposals while Display & Video 360 +// admins approve outbound proposals. +message DisplayVideo360AdvertiserLinkProposal { + option (google.api.resource) = { + type: "analyticsadmin.googleapis.com/DisplayVideo360AdvertiserLinkProposal" + pattern: "properties/{property}/displayVideo360AdvertiserLinkProposals/{display_video_360_advertiser_link_proposal}" + }; + + // Output only. The resource name for this DisplayVideo360AdvertiserLinkProposal resource. + // Format: + // properties/{propertyId}/displayVideo360AdvertiserLinkProposals/{proposalId} + // + // Note: proposalId is not the Display & Video 360 Advertiser ID + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Immutable. The Display & Video 360 Advertiser's advertiser ID. + string advertiser_id = 2 [(google.api.field_behavior) = IMMUTABLE]; + + // Output only. The status information for this link proposal. + LinkProposalStatusDetails link_proposal_status_details = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The display name of the Display & Video Advertiser. + // Only populated for proposals that originated from Display & Video 360. + string advertiser_display_name = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Input only. On a proposal being sent to Display & Video 360, this field must be set to + // the email address of an admin on the target advertiser. This is used to + // verify that the Google Analytics admin is aware of at least one admin on + // the Display & Video 360 Advertiser. This does not restrict approval of the + // proposal to a single user. Any admin on the Display & Video 360 Advertiser + // may approve the proposal. + string validation_email = 5 [(google.api.field_behavior) = INPUT_ONLY]; + + // Immutable. Enables personalized advertising features with this integration. + // If this field is not set on create, it will be defaulted to true. + google.protobuf.BoolValue ads_personalization_enabled = 6 [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. Enables the import of campaign data from Display & Video 360. + // If this field is not set on create, it will be defaulted to true. + google.protobuf.BoolValue campaign_data_sharing_enabled = 7 [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. Enables the import of cost data from Display & Video 360. + // This can only be enabled if campaign_data_sharing_enabled is enabled. + // If this field is not set on create, it will be defaulted to true. + google.protobuf.BoolValue cost_data_sharing_enabled = 8 [(google.api.field_behavior) = IMMUTABLE]; +} + +// Status information for a link proposal. +message LinkProposalStatusDetails { + // Output only. The source of this proposal. + LinkProposalInitiatingProduct link_proposal_initiating_product = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The email address of the user that proposed this linkage. + string requestor_email = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The state of this proposal. + LinkProposalState link_proposal_state = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// A conversion event in a Google Analytics property. +message ConversionEvent { + option (google.api.resource) = { + type: "analyticsadmin.googleapis.com/ConversionEvent" + pattern: "properties/{property}/conversionEvents/{conversion_event}" + }; + + // Output only. Resource name of this conversion event. + // Format: properties/{property}/conversionEvents/{conversion_event} + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Immutable. The event name for this conversion event. + // Examples: 'click', 'purchase' + string event_name = 2 [(google.api.field_behavior) = IMMUTABLE]; + + // Output only. Time when this conversion event was created in the property. + google.protobuf.Timestamp create_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. If set, this event can currently be deleted via DeleteConversionEvent. + bool deletable = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. If set to true, this conversion event refers to a custom event. If set to + // false, this conversion event refers to a default event in GA. Default + // events typically have special meaning in GA. Default events are usually + // created for you by the GA system, but in some cases can be created by + // property admins. Custom events count towards the maximum number of + // custom conversion events that may be created per property. + bool custom = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Settings values for Google Signals. This is a singleton resource. +message GoogleSignalsSettings { + option (google.api.resource) = { + type: "analyticsadmin.googleapis.com/GoogleSignalsSettings" + pattern: "properties/{property}/googleSignalsSettings" + }; + + // Output only. Resource name of this setting. + // Format: properties/{property_id}/googleSignalsSettings + // Example: "properties/1000/googleSignalsSettings" + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Status of this setting. + GoogleSignalsState state = 3; + + // Output only. Terms of Service acceptance. + GoogleSignalsConsent consent = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// A definition for a CustomDimension. +message CustomDimension { + option (google.api.resource) = { + type: "analyticsadmin.googleapis.com/CustomDimension" + pattern: "properties/{property}/customDimensions/{custom_dimension}" + }; + + // Valid values for the scope of this dimension. + enum DimensionScope { + // Scope unknown or not specified. + DIMENSION_SCOPE_UNSPECIFIED = 0; + + // Dimension scoped to an event. + EVENT = 1; + + // Dimension scoped to a user. + USER = 2; + } + + // Output only. Resource name for this CustomDimension resource. + // Format: properties/{property}/customDimensions/{customDimension} + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. Immutable. Tagging parameter name for this custom dimension. + // + // If this is a user-scoped dimension, then this is the user property name. + // If this is an event-scoped dimension, then this is the event parameter + // name. + // + // May only contain alphanumeric and underscore characters, starting with a + // letter. Max length of 24 characters for user-scoped dimensions, 40 + // characters for event-scoped dimensions. + string parameter_name = 2 [ + (google.api.field_behavior) = REQUIRED, + (google.api.field_behavior) = IMMUTABLE + ]; + + // Required. Display name for this custom dimension as shown in the Analytics UI. + // Max length of 82 characters, alphanumeric plus space and underscore + // starting with a letter. Legacy system-generated display names may contain + // square brackets, but updates to this field will never permit square + // brackets. + string display_name = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Description for this custom dimension. Max length of 150 characters. + string description = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Required. Immutable. The scope of this dimension. + DimensionScope scope = 5 [ + (google.api.field_behavior) = REQUIRED, + (google.api.field_behavior) = IMMUTABLE + ]; + + // Optional. If set to true, sets this dimension as NPA and excludes it from ads + // personalization. + // + // This is currently only supported by user-scoped custom dimensions. + bool disallow_ads_personalization = 6 [(google.api.field_behavior) = OPTIONAL]; +} + +// A definition for a custom metric. +message CustomMetric { + option (google.api.resource) = { + type: "analyticsadmin.googleapis.com/CustomMetric" + pattern: "properties/{property}/customMetrics/{custom_metric}" + }; + + // Possible types of representing the custom metric's value. + // + // Currency representation may change in the future, requiring a breaking API + // change. + enum MeasurementUnit { + // MeasurementUnit unspecified or missing. + MEASUREMENT_UNIT_UNSPECIFIED = 0; + + // This metric uses default units. + STANDARD = 1; + + // This metric measures a currency. + CURRENCY = 2; + + // This metric measures feet. + FEET = 3; + + // This metric measures meters. + METERS = 4; + + // This metric measures kilometers. + KILOMETERS = 5; + + // This metric measures miles. + MILES = 6; + + // This metric measures milliseconds. + MILLISECONDS = 7; + + // This metric measures seconds. + SECONDS = 8; + + // This metric measures minutes. + MINUTES = 9; + + // This metric measures hours. + HOURS = 10; + } + + // The scope of this metric. + enum MetricScope { + // Scope unknown or not specified. + METRIC_SCOPE_UNSPECIFIED = 0; + + // Metric scoped to an event. + EVENT = 1; + } + + // Labels that mark the data in this custom metric as data that should be + // restricted to specific users. + enum RestrictedMetricType { + // Type unknown or unspecified. + RESTRICTED_METRIC_TYPE_UNSPECIFIED = 0; + + // Metric reports cost data. + COST_DATA = 1; + + // Metric reports revenue data. + REVENUE_DATA = 2; + } + + // Output only. Resource name for this CustomMetric resource. + // Format: properties/{property}/customMetrics/{customMetric} + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. Immutable. Tagging name for this custom metric. + // + // If this is an event-scoped metric, then this is the event parameter + // name. + // + // May only contain alphanumeric and underscore charactes, starting with a + // letter. Max length of 40 characters for event-scoped metrics. + string parameter_name = 2 [ + (google.api.field_behavior) = REQUIRED, + (google.api.field_behavior) = IMMUTABLE + ]; + + // Required. Display name for this custom metric as shown in the Analytics UI. + // Max length of 82 characters, alphanumeric plus space and underscore + // starting with a letter. Legacy system-generated display names may contain + // square brackets, but updates to this field will never permit square + // brackets. + string display_name = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Description for this custom dimension. + // Max length of 150 characters. + string description = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Required. The type for the custom metric's value. + MeasurementUnit measurement_unit = 5 [(google.api.field_behavior) = REQUIRED]; + + // Required. Immutable. The scope of this custom metric. + MetricScope scope = 6 [ + (google.api.field_behavior) = REQUIRED, + (google.api.field_behavior) = IMMUTABLE + ]; + + // Optional. Types of restricted data that this metric may contain. Required for metrics + // with CURRENCY measurement unit. Must be empty for metrics with a + // non-CURRENCY measurement unit. + repeated RestrictedMetricType restricted_metric_type = 8 [(google.api.field_behavior) = OPTIONAL]; +} + +// Settings values for data retention. This is a singleton resource. +message DataRetentionSettings { + option (google.api.resource) = { + type: "analyticsadmin.googleapis.com/DataRetentionSettings" + pattern: "properties/{property}/dataRetentionSettings" + }; + + // Valid values for the data retention duration. + enum RetentionDuration { + // Data retention time duration is not specified. + RETENTION_DURATION_UNSPECIFIED = 0; + + // The data retention time duration is 2 months. + TWO_MONTHS = 1; + + // The data retention time duration is 14 months. + FOURTEEN_MONTHS = 3; + + // The data retention time duration is 26 months. + // Available to 360 properties only. + TWENTY_SIX_MONTHS = 4; + + // The data retention time duration is 38 months. + // Available to 360 properties only. + THIRTY_EIGHT_MONTHS = 5; + + // The data retention time duration is 50 months. + // Available to 360 properties only. + FIFTY_MONTHS = 6; + } + + // Output only. Resource name for this DataRetentionSetting resource. + // Format: properties/{property}/dataRetentionSettings + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The length of time that event-level data is retained. + RetentionDuration event_data_retention = 2; + + // If true, reset the retention period for the user identifier with every + // event from that user. + bool reset_user_data_on_new_activity = 3; +} + +// The attribution settings used for a given property. This is a singleton +// resource. +message AttributionSettings { + option (google.api.resource) = { + type: "analyticsadmin.googleapis.com/AttributionSettings" + pattern: "properties/{property}/attributionSettings" + }; + + // How far back in time events should be considered for inclusion in a + // converting path which leads to the first install of an app or the first + // visit to a site. + enum AcquisitionConversionEventLookbackWindow { + // Lookback window size unspecified. + ACQUISITION_CONVERSION_EVENT_LOOKBACK_WINDOW_UNSPECIFIED = 0; + + // 7-day lookback window. + ACQUISITION_CONVERSION_EVENT_LOOKBACK_WINDOW_7_DAYS = 1; + + // 30-day lookback window. + ACQUISITION_CONVERSION_EVENT_LOOKBACK_WINDOW_30_DAYS = 2; + } + + // How far back in time events should be considered for inclusion in a + // converting path for all conversions other than first app install/first site + // visit. + enum OtherConversionEventLookbackWindow { + // Lookback window size unspecified. + OTHER_CONVERSION_EVENT_LOOKBACK_WINDOW_UNSPECIFIED = 0; + + // 30-day lookback window. + OTHER_CONVERSION_EVENT_LOOKBACK_WINDOW_30_DAYS = 1; + + // 60-day lookback window. + OTHER_CONVERSION_EVENT_LOOKBACK_WINDOW_60_DAYS = 2; + + // 90-day lookback window. + OTHER_CONVERSION_EVENT_LOOKBACK_WINDOW_90_DAYS = 3; + } + + // The reporting attribution model used to calculate conversion credit in this + // property's reports. + enum ReportingAttributionModel { + // Reporting attribution model unspecified. + REPORTING_ATTRIBUTION_MODEL_UNSPECIFIED = 0; + + // Data-driven attribution distributes credit for the conversion based on + // data for each conversion event. Each Data-driven model is specific to + // each advertiser and each conversion event. + CROSS_CHANNEL_DATA_DRIVEN = 1; + + // Ignores direct traffic and attributes 100% of the conversion value to the + // last channel that the customer clicked through (or engaged view through + // for YouTube) before converting. + CROSS_CHANNEL_LAST_CLICK = 2; + + // Gives all credit for the conversion to the first channel that a customer + // clicked (or engaged view through for YouTube) before converting. + CROSS_CHANNEL_FIRST_CLICK = 3; + + // Distributes the credit for the conversion equally across all the channels + // a customer clicked (or engaged view through for YouTube) before + // converting. + CROSS_CHANNEL_LINEAR = 4; + + // Attributes 40% credit to the first and last interaction, and the + // remaining 20% credit is distributed evenly to the middle interactions. + CROSS_CHANNEL_POSITION_BASED = 5; + + // Gives more credit to the touchpoints that happened closer in time to + // the conversion. + CROSS_CHANNEL_TIME_DECAY = 6; + + // Attributes 100% of the conversion value to the last Google Ads channel + // that the customer clicked through before converting. + ADS_PREFERRED_LAST_CLICK = 7; + } + + // Output only. Resource name of this attribution settings resource. + // Format: properties/{property_id}/attributionSettings + // Example: "properties/1000/attributionSettings" + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. The lookback window configuration for acquisition conversion events. + // The default window size is 30 days. + AcquisitionConversionEventLookbackWindow acquisition_conversion_event_lookback_window = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The lookback window for all other, non-acquisition conversion events. + // The default window size is 90 days. + OtherConversionEventLookbackWindow other_conversion_event_lookback_window = 3 [(google.api.field_behavior) = REQUIRED]; + + // Required. The reporting attribution model used to calculate conversion credit in this + // property's reports. + // + // Changing the attribution model will apply to both historical and future + // data. These changes will be reflected in reports with conversion and + // revenue data. User and session data will be unaffected. + ReportingAttributionModel reporting_attribution_model = 4 [(google.api.field_behavior) = REQUIRED]; +} diff --git a/packages/google-analytics-admin/protos/google/analytics/admin/v1beta/analytics_admin.proto b/packages/google-analytics-admin/protos/google/analytics/admin/v1beta/analytics_admin.proto new file mode 100644 index 00000000000..7e80f73628f --- /dev/null +++ b/packages/google-analytics-admin/protos/google/analytics/admin/v1beta/analytics_admin.proto @@ -0,0 +1,1333 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.analytics.admin.v1beta; + +import "google/analytics/admin/v1beta/resources.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"; +import "google/protobuf/timestamp.proto"; + +option go_package = "google.golang.org/genproto/googleapis/analytics/admin/v1beta;admin"; +option java_multiple_files = true; +option java_outer_classname = "AnalyticsAdminProto"; +option java_package = "com.google.analytics.admin.v1beta"; + +// Service Interface for the Analytics Admin API (GA4). +service AnalyticsAdminService { + option (google.api.default_host) = "analyticsadmin.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/analytics.edit," + "https://www.googleapis.com/auth/analytics.readonly"; + + // Lookup for a single Account. + rpc GetAccount(GetAccountRequest) returns (Account) { + option (google.api.http) = { + get: "/v1beta/{name=accounts/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Returns all accounts accessible by the caller. + // + // Note that these accounts might not currently have GA4 properties. + // Soft-deleted (ie: "trashed") accounts are excluded by default. + // Returns an empty list if no relevant accounts are found. + rpc ListAccounts(ListAccountsRequest) returns (ListAccountsResponse) { + option (google.api.http) = { + get: "/v1beta/accounts" + }; + } + + // Marks target Account as soft-deleted (ie: "trashed") and returns it. + // + // This API does not have a method to restore soft-deleted accounts. + // However, they can be restored using the Trash Can UI. + // + // If the accounts are not restored before the expiration time, the account + // and all child resources (eg: Properties, GoogleAdsLinks, Streams, + // UserLinks) will be permanently purged. + // https://support.google.com/analytics/answer/6154772 + // + // Returns an error if the target is not found. + rpc DeleteAccount(DeleteAccountRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1beta/{name=accounts/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Updates an account. + rpc UpdateAccount(UpdateAccountRequest) returns (Account) { + option (google.api.http) = { + patch: "/v1beta/{account.name=accounts/*}" + body: "account" + }; + option (google.api.method_signature) = "account,update_mask"; + } + + // Requests a ticket for creating an account. + rpc ProvisionAccountTicket(ProvisionAccountTicketRequest) returns (ProvisionAccountTicketResponse) { + option (google.api.http) = { + post: "/v1beta/accounts:provisionAccountTicket" + body: "*" + }; + } + + // Returns summaries of all accounts accessible by the caller. + rpc ListAccountSummaries(ListAccountSummariesRequest) returns (ListAccountSummariesResponse) { + option (google.api.http) = { + get: "/v1beta/accountSummaries" + }; + } + + // Lookup for a single "GA4" Property. + rpc GetProperty(GetPropertyRequest) returns (Property) { + option (google.api.http) = { + get: "/v1beta/{name=properties/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Returns child Properties under the specified parent Account. + // + // Only "GA4" properties will be returned. + // Properties will be excluded if the caller does not have access. + // Soft-deleted (ie: "trashed") properties are excluded by default. + // Returns an empty list if no relevant properties are found. + rpc ListProperties(ListPropertiesRequest) returns (ListPropertiesResponse) { + option (google.api.http) = { + get: "/v1beta/properties" + }; + } + + // Creates an "GA4" property with the specified location and attributes. + rpc CreateProperty(CreatePropertyRequest) returns (Property) { + option (google.api.http) = { + post: "/v1beta/properties" + body: "property" + }; + option (google.api.method_signature) = "property"; + } + + // Marks target Property as soft-deleted (ie: "trashed") and returns it. + // + // This API does not have a method to restore soft-deleted properties. + // However, they can be restored using the Trash Can UI. + // + // If the properties are not restored before the expiration time, the Property + // and all child resources (eg: GoogleAdsLinks, Streams, UserLinks) + // will be permanently purged. + // https://support.google.com/analytics/answer/6154772 + // + // Returns an error if the target is not found, or is not an GA4 Property. + rpc DeleteProperty(DeletePropertyRequest) returns (Property) { + option (google.api.http) = { + delete: "/v1beta/{name=properties/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Updates a property. + rpc UpdateProperty(UpdatePropertyRequest) returns (Property) { + option (google.api.http) = { + patch: "/v1beta/{property.name=properties/*}" + body: "property" + }; + option (google.api.method_signature) = "property,update_mask"; + } + + // Creates a FirebaseLink. + // + // Properties can have at most one FirebaseLink. + rpc CreateFirebaseLink(CreateFirebaseLinkRequest) returns (FirebaseLink) { + option (google.api.http) = { + post: "/v1beta/{parent=properties/*}/firebaseLinks" + body: "firebase_link" + }; + option (google.api.method_signature) = "parent,firebase_link"; + } + + // Deletes a FirebaseLink on a property + rpc DeleteFirebaseLink(DeleteFirebaseLinkRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1beta/{name=properties/*/firebaseLinks/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists FirebaseLinks on a property. + // Properties can have at most one FirebaseLink. + rpc ListFirebaseLinks(ListFirebaseLinksRequest) returns (ListFirebaseLinksResponse) { + option (google.api.http) = { + get: "/v1beta/{parent=properties/*}/firebaseLinks" + }; + option (google.api.method_signature) = "parent"; + } + + // Creates a GoogleAdsLink. + rpc CreateGoogleAdsLink(CreateGoogleAdsLinkRequest) returns (GoogleAdsLink) { + option (google.api.http) = { + post: "/v1beta/{parent=properties/*}/googleAdsLinks" + body: "google_ads_link" + }; + option (google.api.method_signature) = "parent,google_ads_link"; + } + + // Updates a GoogleAdsLink on a property + rpc UpdateGoogleAdsLink(UpdateGoogleAdsLinkRequest) returns (GoogleAdsLink) { + option (google.api.http) = { + patch: "/v1beta/{google_ads_link.name=properties/*/googleAdsLinks/*}" + body: "google_ads_link" + }; + option (google.api.method_signature) = "google_ads_link,update_mask"; + } + + // Deletes a GoogleAdsLink on a property + rpc DeleteGoogleAdsLink(DeleteGoogleAdsLinkRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1beta/{name=properties/*/googleAdsLinks/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists GoogleAdsLinks on a property. + rpc ListGoogleAdsLinks(ListGoogleAdsLinksRequest) returns (ListGoogleAdsLinksResponse) { + option (google.api.http) = { + get: "/v1beta/{parent=properties/*}/googleAdsLinks" + }; + option (google.api.method_signature) = "parent"; + } + + // Get data sharing settings on an account. + // Data sharing settings are singletons. + rpc GetDataSharingSettings(GetDataSharingSettingsRequest) returns (DataSharingSettings) { + option (google.api.http) = { + get: "/v1beta/{name=accounts/*/dataSharingSettings}" + }; + option (google.api.method_signature) = "name"; + } + + // Lookup for a single "GA4" MeasurementProtocolSecret. + rpc GetMeasurementProtocolSecret(GetMeasurementProtocolSecretRequest) returns (MeasurementProtocolSecret) { + option (google.api.http) = { + get: "/v1beta/{name=properties/*/dataStreams/*/measurementProtocolSecrets/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Returns child MeasurementProtocolSecrets under the specified parent + // Property. + rpc ListMeasurementProtocolSecrets(ListMeasurementProtocolSecretsRequest) returns (ListMeasurementProtocolSecretsResponse) { + option (google.api.http) = { + get: "/v1beta/{parent=properties/*/dataStreams/*}/measurementProtocolSecrets" + }; + option (google.api.method_signature) = "parent"; + } + + // Creates a measurement protocol secret. + rpc CreateMeasurementProtocolSecret(CreateMeasurementProtocolSecretRequest) returns (MeasurementProtocolSecret) { + option (google.api.http) = { + post: "/v1beta/{parent=properties/*/dataStreams/*}/measurementProtocolSecrets" + body: "measurement_protocol_secret" + }; + option (google.api.method_signature) = "parent,measurement_protocol_secret"; + } + + // Deletes target MeasurementProtocolSecret. + rpc DeleteMeasurementProtocolSecret(DeleteMeasurementProtocolSecretRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1beta/{name=properties/*/dataStreams/*/measurementProtocolSecrets/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Updates a measurement protocol secret. + rpc UpdateMeasurementProtocolSecret(UpdateMeasurementProtocolSecretRequest) returns (MeasurementProtocolSecret) { + option (google.api.http) = { + patch: "/v1beta/{measurement_protocol_secret.name=properties/*/dataStreams/*/measurementProtocolSecrets/*}" + body: "measurement_protocol_secret" + }; + option (google.api.method_signature) = "measurement_protocol_secret,update_mask"; + } + + // Acknowledges the terms of user data collection for the specified property. + // + // This acknowledgement must be completed (either in the Google Analytics UI + // or via this API) before MeasurementProtocolSecret resources may be created. + rpc AcknowledgeUserDataCollection(AcknowledgeUserDataCollectionRequest) returns (AcknowledgeUserDataCollectionResponse) { + option (google.api.http) = { + post: "/v1beta/{property=properties/*}:acknowledgeUserDataCollection" + body: "*" + }; + } + + // Searches through all changes to an account or its children given the + // specified set of filters. + rpc SearchChangeHistoryEvents(SearchChangeHistoryEventsRequest) returns (SearchChangeHistoryEventsResponse) { + option (google.api.http) = { + post: "/v1beta/{account=accounts/*}:searchChangeHistoryEvents" + body: "*" + }; + } + + // Creates a conversion event with the specified attributes. + rpc CreateConversionEvent(CreateConversionEventRequest) returns (ConversionEvent) { + option (google.api.http) = { + post: "/v1beta/{parent=properties/*}/conversionEvents" + body: "conversion_event" + }; + option (google.api.method_signature) = "parent,conversion_event"; + } + + // Retrieve a single conversion event. + rpc GetConversionEvent(GetConversionEventRequest) returns (ConversionEvent) { + option (google.api.http) = { + get: "/v1beta/{name=properties/*/conversionEvents/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Deletes a conversion event in a property. + rpc DeleteConversionEvent(DeleteConversionEventRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1beta/{name=properties/*/conversionEvents/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Returns a list of conversion events in the specified parent property. + // + // Returns an empty list if no conversion events are found. + rpc ListConversionEvents(ListConversionEventsRequest) returns (ListConversionEventsResponse) { + option (google.api.http) = { + get: "/v1beta/{parent=properties/*}/conversionEvents" + }; + option (google.api.method_signature) = "parent"; + } + + // Creates a CustomDimension. + rpc CreateCustomDimension(CreateCustomDimensionRequest) returns (CustomDimension) { + option (google.api.http) = { + post: "/v1beta/{parent=properties/*}/customDimensions" + body: "custom_dimension" + }; + option (google.api.method_signature) = "parent,custom_dimension"; + } + + // Updates a CustomDimension on a property. + rpc UpdateCustomDimension(UpdateCustomDimensionRequest) returns (CustomDimension) { + option (google.api.http) = { + patch: "/v1beta/{custom_dimension.name=properties/*/customDimensions/*}" + body: "custom_dimension" + }; + option (google.api.method_signature) = "custom_dimension,update_mask"; + } + + // Lists CustomDimensions on a property. + rpc ListCustomDimensions(ListCustomDimensionsRequest) returns (ListCustomDimensionsResponse) { + option (google.api.http) = { + get: "/v1beta/{parent=properties/*}/customDimensions" + }; + option (google.api.method_signature) = "parent"; + } + + // Archives a CustomDimension on a property. + rpc ArchiveCustomDimension(ArchiveCustomDimensionRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + post: "/v1beta/{name=properties/*/customDimensions/*}:archive" + body: "*" + }; + option (google.api.method_signature) = "name"; + } + + // Lookup for a single CustomDimension. + rpc GetCustomDimension(GetCustomDimensionRequest) returns (CustomDimension) { + option (google.api.http) = { + get: "/v1beta/{name=properties/*/customDimensions/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates a CustomMetric. + rpc CreateCustomMetric(CreateCustomMetricRequest) returns (CustomMetric) { + option (google.api.http) = { + post: "/v1beta/{parent=properties/*}/customMetrics" + body: "custom_metric" + }; + option (google.api.method_signature) = "parent,custom_metric"; + } + + // Updates a CustomMetric on a property. + rpc UpdateCustomMetric(UpdateCustomMetricRequest) returns (CustomMetric) { + option (google.api.http) = { + patch: "/v1beta/{custom_metric.name=properties/*/customMetrics/*}" + body: "custom_metric" + }; + option (google.api.method_signature) = "custom_metric,update_mask"; + } + + // Lists CustomMetrics on a property. + rpc ListCustomMetrics(ListCustomMetricsRequest) returns (ListCustomMetricsResponse) { + option (google.api.http) = { + get: "/v1beta/{parent=properties/*}/customMetrics" + }; + option (google.api.method_signature) = "parent"; + } + + // Archives a CustomMetric on a property. + rpc ArchiveCustomMetric(ArchiveCustomMetricRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + post: "/v1beta/{name=properties/*/customMetrics/*}:archive" + body: "*" + }; + option (google.api.method_signature) = "name"; + } + + // Lookup for a single CustomMetric. + rpc GetCustomMetric(GetCustomMetricRequest) returns (CustomMetric) { + option (google.api.http) = { + get: "/v1beta/{name=properties/*/customMetrics/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Returns the singleton data retention settings for this property. + rpc GetDataRetentionSettings(GetDataRetentionSettingsRequest) returns (DataRetentionSettings) { + option (google.api.http) = { + get: "/v1beta/{name=properties/*/dataRetentionSettings}" + }; + option (google.api.method_signature) = "name"; + } + + // Updates the singleton data retention settings for this property. + rpc UpdateDataRetentionSettings(UpdateDataRetentionSettingsRequest) returns (DataRetentionSettings) { + option (google.api.http) = { + patch: "/v1beta/{data_retention_settings.name=properties/*/dataRetentionSettings}" + body: "data_retention_settings" + }; + option (google.api.method_signature) = "data_retention_settings,update_mask"; + } + + // Creates a DataStream. + rpc CreateDataStream(CreateDataStreamRequest) returns (DataStream) { + option (google.api.http) = { + post: "/v1beta/{parent=properties/*}/dataStreams" + body: "data_stream" + }; + option (google.api.method_signature) = "parent,data_stream"; + } + + // Deletes a DataStream on a property. + rpc DeleteDataStream(DeleteDataStreamRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1beta/{name=properties/*/dataStreams/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Updates a DataStream on a property. + rpc UpdateDataStream(UpdateDataStreamRequest) returns (DataStream) { + option (google.api.http) = { + patch: "/v1beta/{data_stream.name=properties/*/dataStreams/*}" + body: "data_stream" + }; + option (google.api.method_signature) = "data_stream,update_mask"; + } + + // Lists DataStreams on a property. + rpc ListDataStreams(ListDataStreamsRequest) returns (ListDataStreamsResponse) { + option (google.api.http) = { + get: "/v1beta/{parent=properties/*}/dataStreams" + }; + option (google.api.method_signature) = "parent"; + } + + // Lookup for a single DataStream. + rpc GetDataStream(GetDataStreamRequest) returns (DataStream) { + option (google.api.http) = { + get: "/v1beta/{name=properties/*/dataStreams/*}" + }; + option (google.api.method_signature) = "name"; + } +} + +// Request message for GetAccount RPC. +message GetAccountRequest { + // Required. The name of the account to lookup. + // Format: accounts/{account} + // Example: "accounts/100" + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "analyticsadmin.googleapis.com/Account" + } + ]; +} + +// Request message for ListAccounts RPC. +message ListAccountsRequest { + // The maximum number of resources to return. The service may return + // fewer than this value, even if there are additional pages. + // If unspecified, at most 50 resources will be returned. + // The maximum value is 200; (higher values will be coerced to the maximum) + int32 page_size = 1; + + // A page token, received from a previous `ListAccounts` call. + // Provide this to retrieve the subsequent page. + // When paginating, all other parameters provided to `ListAccounts` must + // match the call that provided the page token. + string page_token = 2; + + // Whether to include soft-deleted (ie: "trashed") Accounts in the + // results. Accounts can be inspected to determine whether they are deleted or + // not. + bool show_deleted = 3; +} + +// Request message for ListAccounts RPC. +message ListAccountsResponse { + // Results that were accessible to the caller. + repeated Account accounts = 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 DeleteAccount RPC. +message DeleteAccountRequest { + // Required. The name of the Account to soft-delete. + // Format: accounts/{account} + // Example: "accounts/100" + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "analyticsadmin.googleapis.com/Account" + } + ]; +} + +// Request message for UpdateAccount RPC. +message UpdateAccountRequest { + // Required. The account to update. + // The account's `name` field is used to identify the account. + Account account = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The list of fields to be updated. Field names must be in snake case + // (e.g., "field_to_update"). Omitted fields will not be updated. To replace + // the entire entity, use one path with the string "*" to match all fields. + google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for ProvisionAccountTicket RPC. +message ProvisionAccountTicketRequest { + // The account to create. + Account account = 1; + + // Redirect URI where the user will be sent after accepting Terms of Service. + // Must be configured in Developers Console as a Redirect URI + string redirect_uri = 2; +} + +// Response message for ProvisionAccountTicket RPC. +message ProvisionAccountTicketResponse { + // The param to be passed in the ToS link. + string account_ticket_id = 1; +} + +// Request message for GetProperty RPC. +message GetPropertyRequest { + // Required. The name of the property to lookup. + // Format: properties/{property_id} + // Example: "properties/1000" + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "analyticsadmin.googleapis.com/Property" + } + ]; +} + +// Request message for ListProperties RPC. +message ListPropertiesRequest { + // Required. An expression for filtering the results of the request. + // Fields eligible for filtering are: + // `parent:`(The resource name of the parent account/property) or + // `ancestor:`(The resource name of the parent account) or + // `firebase_project:`(The id or number of the linked firebase project). + // Some examples of filters: + // + // ``` + // | Filter | Description | + // |-----------------------------|-------------------------------------------| + // | parent:accounts/123 | The account with account id: 123. | + // | parent:properties/123 | The property with property id: 123. | + // | ancestor:accounts/123 | The account with account id: 123. | + // | firebase_project:project-id | The firebase project with id: project-id. | + // | firebase_project:123 | The firebase project with number: 123. | + // ``` + string filter = 1 [(google.api.field_behavior) = REQUIRED]; + + // The maximum number of resources to return. The service may return + // fewer than this value, even if there are additional pages. + // If unspecified, at most 50 resources will be returned. + // The maximum value is 200; (higher values will be coerced to the maximum) + int32 page_size = 2; + + // A page token, received from a previous `ListProperties` call. + // Provide this to retrieve the subsequent page. + // When paginating, all other parameters provided to `ListProperties` must + // match the call that provided the page token. + string page_token = 3; + + // Whether to include soft-deleted (ie: "trashed") Properties in the + // results. Properties can be inspected to determine whether they are deleted + // or not. + bool show_deleted = 4; +} + +// Response message for ListProperties RPC. +message ListPropertiesResponse { + // Results that matched the filter criteria and were accessible to the caller. + repeated Property properties = 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 UpdateProperty RPC. +message UpdatePropertyRequest { + // Required. The property to update. + // The property's `name` field is used to identify the property to be + // updated. + Property property = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The list of fields to be updated. Field names must be in snake case + // (e.g., "field_to_update"). Omitted fields will not be updated. To replace + // the entire entity, use one path with the string "*" to match all fields. + google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for CreateProperty RPC. +message CreatePropertyRequest { + // Required. The property to create. + // Note: the supplied property must specify its parent. + Property property = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for DeleteProperty RPC. +message DeletePropertyRequest { + // Required. The name of the Property to soft-delete. + // Format: properties/{property_id} + // Example: "properties/1000" + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "analyticsadmin.googleapis.com/Property" + } + ]; +} + +// Request message for CreateFirebaseLink RPC +message CreateFirebaseLinkRequest { + // Required. Format: properties/{property_id} + // Example: properties/1234 + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "analyticsadmin.googleapis.com/FirebaseLink" + } + ]; + + // Required. The Firebase link to create. + FirebaseLink firebase_link = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for DeleteFirebaseLink RPC +message DeleteFirebaseLinkRequest { + // Required. Format: properties/{property_id}/firebaseLinks/{firebase_link_id} + // Example: properties/1234/firebaseLinks/5678 + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "analyticsadmin.googleapis.com/FirebaseLink" + } + ]; +} + +// Request message for ListFirebaseLinks RPC +message ListFirebaseLinksRequest { + // Required. Format: properties/{property_id} + // Example: properties/1234 + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "analyticsadmin.googleapis.com/FirebaseLink" + } + ]; + + // The maximum number of resources to return. The service may return + // fewer than this value, even if there are additional pages. + // If unspecified, at most 50 resources will be returned. + // The maximum value is 200; (higher values will be coerced to the maximum) + int32 page_size = 2; + + // A page token, received from a previous `ListFirebaseLinks` call. + // Provide this to retrieve the subsequent page. + // When paginating, all other parameters provided to `ListProperties` must + // match the call that provided the page token. + string page_token = 3; +} + +// Response message for ListFirebaseLinks RPC +message ListFirebaseLinksResponse { + // List of FirebaseLinks. This will have at most one value. + repeated FirebaseLink firebase_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. + // Currently, Google Analytics supports only one FirebaseLink per property, + // so this will never be populated. + string next_page_token = 2; +} + +// Request message for CreateGoogleAdsLink RPC +message CreateGoogleAdsLinkRequest { + // Required. Example format: properties/1234 + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "analyticsadmin.googleapis.com/GoogleAdsLink" + } + ]; + + // Required. The GoogleAdsLink to create. + GoogleAdsLink google_ads_link = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for UpdateGoogleAdsLink RPC +message UpdateGoogleAdsLinkRequest { + // The GoogleAdsLink to update + GoogleAdsLink google_ads_link = 1; + + // Required. The list of fields to be updated. Field names must be in snake case + // (e.g., "field_to_update"). Omitted fields will not be updated. To replace + // the entire entity, use one path with the string "*" to match all fields. + google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for DeleteGoogleAdsLink RPC. +message DeleteGoogleAdsLinkRequest { + // Required. Example format: properties/1234/googleAdsLinks/5678 + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "analyticsadmin.googleapis.com/GoogleAdsLink" + } + ]; +} + +// Request message for ListGoogleAdsLinks RPC. +message ListGoogleAdsLinksRequest { + // Required. Example format: properties/1234 + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "analyticsadmin.googleapis.com/GoogleAdsLink" + } + ]; + + // The maximum number of resources to return. + // If unspecified, at most 50 resources will be returned. + // The maximum value is 200 (higher values will be coerced to the maximum). + int32 page_size = 2; + + // A page token, received from a previous `ListGoogleAdsLinks` call. + // Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to `ListGoogleAdsLinks` must + // match the call that provided the page token. + string page_token = 3; +} + +// Response message for ListGoogleAdsLinks RPC. +message ListGoogleAdsLinksResponse { + // List of GoogleAdsLinks. + repeated GoogleAdsLink google_ads_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; +} + +// Request message for GetDataSharingSettings RPC. +message GetDataSharingSettingsRequest { + // Required. The name of the settings to lookup. + // Format: accounts/{account}/dataSharingSettings + // Example: "accounts/1000/dataSharingSettings" + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "analyticsadmin.googleapis.com/DataSharingSettings" + } + ]; +} + +// Request message for ListAccountSummaries RPC. +message ListAccountSummariesRequest { + // The maximum number of AccountSummary resources to return. The service may + // return fewer than this value, even if there are additional pages. + // If unspecified, at most 50 resources will be returned. + // The maximum value is 200; (higher values will be coerced to the maximum) + int32 page_size = 1; + + // A page token, received from a previous `ListAccountSummaries` call. + // Provide this to retrieve the subsequent page. + // When paginating, all other parameters provided to `ListAccountSummaries` + // must match the call that provided the page token. + string page_token = 2; +} + +// Response message for ListAccountSummaries RPC. +message ListAccountSummariesResponse { + // Account summaries of all accounts the caller has access to. + repeated AccountSummary account_summaries = 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 AcknowledgeUserDataCollection RPC. +message AcknowledgeUserDataCollectionRequest { + // Required. The property for which to acknowledge user data collection. + string property = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "analyticsadmin.googleapis.com/Property" + } + ]; + + // Required. An acknowledgement that the caller of this method understands the terms + // of user data collection. + // + // This field must contain the exact value: + // "I acknowledge that I have the necessary privacy disclosures and rights + // from my end users for the collection and processing of their data, + // including the association of such data with the visitation information + // Google Analytics collects from my site and/or app property." + string acknowledgement = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Response message for AcknowledgeUserDataCollection RPC. +message AcknowledgeUserDataCollectionResponse { + +} + +// Request message for SearchChangeHistoryEvents RPC. +message SearchChangeHistoryEventsRequest { + // Required. The account resource for which to return change history resources. + string account = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "analyticsadmin.googleapis.com/Account" + } + ]; + + // Optional. Resource name for a child property. If set, only return changes + // made to this property or its child resources. + string property = 2 [ + (google.api.field_behavior) = OPTIONAL, + (google.api.resource_reference) = { + type: "analyticsadmin.googleapis.com/Property" + } + ]; + + // Optional. If set, only return changes if they are for a resource that matches at + // least one of these types. + repeated ChangeHistoryResourceType resource_type = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If set, only return changes that match one or more of these types of + // actions. + repeated ActionType action = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If set, only return changes if they are made by a user in this list. + repeated string actor_email = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If set, only return changes made after this time (inclusive). + google.protobuf.Timestamp earliest_change_time = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If set, only return changes made before this time (inclusive). + google.protobuf.Timestamp latest_change_time = 7 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The maximum number of ChangeHistoryEvent items to return. + // The service may return fewer than this value, even if there are additional + // pages. If unspecified, at most 50 items will be returned. + // The maximum value is 200 (higher values will be coerced to the maximum). + int32 page_size = 8 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A page token, received from a previous `SearchChangeHistoryEvents` call. + // Provide this to retrieve the subsequent page. When paginating, all other + // parameters provided to `SearchChangeHistoryEvents` must match the call that + // provided the page token. + string page_token = 9 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for SearchAccounts RPC. +message SearchChangeHistoryEventsResponse { + // Results that were accessible to the caller. + repeated ChangeHistoryEvent change_history_events = 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 GetMeasurementProtocolSecret RPC. +message GetMeasurementProtocolSecretRequest { + // Required. The name of the measurement protocol secret to lookup. + // Format: + // properties/{property}/dataStreams/{dataStream}/measurementProtocolSecrets/{measurementProtocolSecret} + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "analyticsadmin.googleapis.com/MeasurementProtocolSecret" + } + ]; +} + +// Request message for CreateMeasurementProtocolSecret RPC +message CreateMeasurementProtocolSecretRequest { + // Required. The parent resource where this secret will be created. + // Format: properties/{property}/dataStreams/{dataStream} + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "analyticsadmin.googleapis.com/MeasurementProtocolSecret" + } + ]; + + // Required. The measurement protocol secret to create. + MeasurementProtocolSecret measurement_protocol_secret = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for DeleteMeasurementProtocolSecret RPC +message DeleteMeasurementProtocolSecretRequest { + // Required. The name of the MeasurementProtocolSecret to delete. + // Format: + // properties/{property}/dataStreams/{dataStream}/measurementProtocolSecrets/{measurementProtocolSecret} + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "analyticsadmin.googleapis.com/MeasurementProtocolSecret" + } + ]; +} + +// Request message for UpdateMeasurementProtocolSecret RPC +message UpdateMeasurementProtocolSecretRequest { + // Required. The measurement protocol secret to update. + MeasurementProtocolSecret measurement_protocol_secret = 1 [(google.api.field_behavior) = REQUIRED]; + + // The list of fields to be updated. Omitted fields will not be updated. + google.protobuf.FieldMask update_mask = 2; +} + +// Request message for ListMeasurementProtocolSecret RPC +message ListMeasurementProtocolSecretsRequest { + // Required. The resource name of the parent stream. + // Format: + // properties/{property}/dataStreams/{dataStream}/measurementProtocolSecrets + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "analyticsadmin.googleapis.com/MeasurementProtocolSecret" + } + ]; + + // The maximum number of resources to return. + // If unspecified, at most 10 resources will be returned. + // The maximum value is 10. Higher values will be coerced to the maximum. + int32 page_size = 2; + + // A page token, received from a previous `ListMeasurementProtocolSecrets` + // call. Provide this to retrieve the subsequent page. When paginating, all + // other parameters provided to `ListMeasurementProtocolSecrets` must match + // the call that provided the page token. + string page_token = 3; +} + +// Response message for ListMeasurementProtocolSecret RPC +message ListMeasurementProtocolSecretsResponse { + // A list of secrets for the parent stream specified in the request. + repeated MeasurementProtocolSecret measurement_protocol_secrets = 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 CreateConversionEvent RPC +message CreateConversionEventRequest { + // Required. The conversion event to create. + ConversionEvent conversion_event = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The resource name of the parent property where this conversion event will + // be created. Format: properties/123 + string parent = 2 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "analyticsadmin.googleapis.com/ConversionEvent" + } + ]; +} + +// Request message for GetConversionEvent RPC +message GetConversionEventRequest { + // Required. The resource name of the conversion event to retrieve. + // Format: properties/{property}/conversionEvents/{conversion_event} + // Example: "properties/123/conversionEvents/456" + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "analyticsadmin.googleapis.com/ConversionEvent" + } + ]; +} + +// Request message for DeleteConversionEvent RPC +message DeleteConversionEventRequest { + // Required. The resource name of the conversion event to delete. + // Format: properties/{property}/conversionEvents/{conversion_event} + // Example: "properties/123/conversionEvents/456" + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "analyticsadmin.googleapis.com/ConversionEvent" + } + ]; +} + +// Request message for ListConversionEvents RPC +message ListConversionEventsRequest { + // Required. The resource name of the parent property. + // Example: 'properties/123' + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "analyticsadmin.googleapis.com/ConversionEvent" + } + ]; + + // The maximum number of resources to return. + // If unspecified, at most 50 resources will be returned. + // The maximum value is 200; (higher values will be coerced to the maximum) + int32 page_size = 2; + + // A page token, received from a previous `ListConversionEvents` call. + // Provide this to retrieve the subsequent page. + // When paginating, all other parameters provided to `ListConversionEvents` + // must match the call that provided the page token. + string page_token = 3; +} + +// Response message for ListConversionEvents RPC. +message ListConversionEventsResponse { + // The requested conversion events + repeated ConversionEvent conversion_events = 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 CreateCustomDimension RPC. +message CreateCustomDimensionRequest { + // Required. Example format: properties/1234 + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "analyticsadmin.googleapis.com/CustomDimension" + } + ]; + + // Required. The CustomDimension to create. + CustomDimension custom_dimension = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for UpdateCustomDimension RPC. +message UpdateCustomDimensionRequest { + // The CustomDimension to update + CustomDimension custom_dimension = 1; + + // Required. The list of fields to be updated. Omitted fields will not be updated. + // To replace the entire entity, use one path with the string "*" to match + // all fields. + google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for ListCustomDimensions RPC. +message ListCustomDimensionsRequest { + // Required. Example format: properties/1234 + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "analyticsadmin.googleapis.com/CustomDimension" + } + ]; + + // The maximum number of resources to return. + // If unspecified, at most 50 resources will be returned. + // The maximum value is 200 (higher values will be coerced to the maximum). + int32 page_size = 2; + + // A page token, received from a previous `ListCustomDimensions` call. + // Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to `ListCustomDimensions` + // must match the call that provided the page token. + string page_token = 3; +} + +// Response message for ListCustomDimensions RPC. +message ListCustomDimensionsResponse { + // List of CustomDimensions. + repeated CustomDimension custom_dimensions = 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 ArchiveCustomDimension RPC. +message ArchiveCustomDimensionRequest { + // Required. The name of the CustomDimension to archive. + // Example format: properties/1234/customDimensions/5678 + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "analyticsadmin.googleapis.com/CustomDimension" + } + ]; +} + +// Request message for GetCustomDimension RPC. +message GetCustomDimensionRequest { + // Required. The name of the CustomDimension to get. + // Example format: properties/1234/customDimensions/5678 + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "analyticsadmin.googleapis.com/CustomDimension" + } + ]; +} + +// Request message for CreateCustomMetric RPC. +message CreateCustomMetricRequest { + // Required. Example format: properties/1234 + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "analyticsadmin.googleapis.com/CustomMetric" + } + ]; + + // Required. The CustomMetric to create. + CustomMetric custom_metric = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for UpdateCustomMetric RPC. +message UpdateCustomMetricRequest { + // The CustomMetric to update + CustomMetric custom_metric = 1; + + // Required. The list of fields to be updated. Omitted fields will not be updated. + // To replace the entire entity, use one path with the string "*" to match + // all fields. + google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for ListCustomMetrics RPC. +message ListCustomMetricsRequest { + // Required. Example format: properties/1234 + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "analyticsadmin.googleapis.com/CustomMetric" + } + ]; + + // The maximum number of resources to return. + // If unspecified, at most 50 resources will be returned. + // The maximum value is 200 (higher values will be coerced to the maximum). + int32 page_size = 2; + + // A page token, received from a previous `ListCustomMetrics` call. + // Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to `ListCustomMetrics` must + // match the call that provided the page token. + string page_token = 3; +} + +// Response message for ListCustomMetrics RPC. +message ListCustomMetricsResponse { + // List of CustomMetrics. + repeated CustomMetric custom_metrics = 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 ArchiveCustomMetric RPC. +message ArchiveCustomMetricRequest { + // Required. The name of the CustomMetric to archive. + // Example format: properties/1234/customMetrics/5678 + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "analyticsadmin.googleapis.com/CustomMetric" + } + ]; +} + +// Request message for GetCustomMetric RPC. +message GetCustomMetricRequest { + // Required. The name of the CustomMetric to get. + // Example format: properties/1234/customMetrics/5678 + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "analyticsadmin.googleapis.com/CustomMetric" + } + ]; +} + +// Request message for GetDataRetentionSettings RPC. +message GetDataRetentionSettingsRequest { + // Required. The name of the settings to lookup. + // Format: + // properties/{property}/dataRetentionSettings + // Example: "properties/1000/dataRetentionSettings" + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "analyticsadmin.googleapis.com/DataRetentionSettings" + } + ]; +} + +// Request message for UpdateDataRetentionSettings RPC. +message UpdateDataRetentionSettingsRequest { + // Required. The settings to update. + // The `name` field is used to identify the settings to be updated. + DataRetentionSettings data_retention_settings = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The list of fields to be updated. Field names must be in snake case + // (e.g., "field_to_update"). Omitted fields will not be updated. To replace + // the entire entity, use one path with the string "*" to match all fields. + google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for CreateDataStream RPC. +message CreateDataStreamRequest { + // Required. Example format: properties/1234 + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "analyticsadmin.googleapis.com/DataStream" + } + ]; + + // Required. The DataStream to create. + DataStream data_stream = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for DeleteDataStream RPC. +message DeleteDataStreamRequest { + // Required. The name of the DataStream to delete. + // Example format: properties/1234/dataStreams/5678 + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "analyticsadmin.googleapis.com/DataStream" + } + ]; +} + +// Request message for UpdateDataStream RPC. +message UpdateDataStreamRequest { + // The DataStream to update + DataStream data_stream = 1; + + // Required. The list of fields to be updated. Omitted fields will not be updated. + // To replace the entire entity, use one path with the string "*" to match + // all fields. + google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for ListDataStreams RPC. +message ListDataStreamsRequest { + // Required. Example format: properties/1234 + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "analyticsadmin.googleapis.com/DataStream" + } + ]; + + // The maximum number of resources to return. + // If unspecified, at most 50 resources will be returned. + // The maximum value is 200 (higher values will be coerced to the maximum). + int32 page_size = 2; + + // A page token, received from a previous `ListDataStreams` call. + // Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to `ListDataStreams` must + // match the call that provided the page token. + string page_token = 3; +} + +// Response message for ListDataStreams RPC. +message ListDataStreamsResponse { + // List of DataStreams. + repeated DataStream data_streams = 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 GetDataStream RPC. +message GetDataStreamRequest { + // Required. The name of the DataStream to get. + // Example format: properties/1234/dataStreams/5678 + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "analyticsadmin.googleapis.com/DataStream" + } + ]; +} diff --git a/packages/google-analytics-admin/protos/google/analytics/admin/v1beta/resources.proto b/packages/google-analytics-admin/protos/google/analytics/admin/v1beta/resources.proto new file mode 100644 index 00000000000..2a7010305a2 --- /dev/null +++ b/packages/google-analytics-admin/protos/google/analytics/admin/v1beta/resources.proto @@ -0,0 +1,905 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.analytics.admin.v1beta; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/timestamp.proto"; +import "google/protobuf/wrappers.proto"; + +option go_package = "google.golang.org/genproto/googleapis/analytics/admin/v1beta;admin"; +option java_multiple_files = true; +option java_outer_classname = "ResourcesProto"; +option java_package = "com.google.analytics.admin.v1beta"; + +// The category selected for this property, used for industry benchmarking. +enum IndustryCategory { + // Industry category unspecified + INDUSTRY_CATEGORY_UNSPECIFIED = 0; + + // Automotive + AUTOMOTIVE = 1; + + // Business and industrial markets + BUSINESS_AND_INDUSTRIAL_MARKETS = 2; + + // Finance + FINANCE = 3; + + // Healthcare + HEALTHCARE = 4; + + // Technology + TECHNOLOGY = 5; + + // Travel + TRAVEL = 6; + + // Other + OTHER = 7; + + // Arts and entertainment + ARTS_AND_ENTERTAINMENT = 8; + + // Beauty and fitness + BEAUTY_AND_FITNESS = 9; + + // Books and literature + BOOKS_AND_LITERATURE = 10; + + // Food and drink + FOOD_AND_DRINK = 11; + + // Games + GAMES = 12; + + // Hobbies and leisure + HOBBIES_AND_LEISURE = 13; + + // Home and garden + HOME_AND_GARDEN = 14; + + // Internet and telecom + INTERNET_AND_TELECOM = 15; + + // Law and government + LAW_AND_GOVERNMENT = 16; + + // News + NEWS = 17; + + // Online communities + ONLINE_COMMUNITIES = 18; + + // People and society + PEOPLE_AND_SOCIETY = 19; + + // Pets and animals + PETS_AND_ANIMALS = 20; + + // Real estate + REAL_ESTATE = 21; + + // Reference + REFERENCE = 22; + + // Science + SCIENCE = 23; + + // Sports + SPORTS = 24; + + // Jobs and education + JOBS_AND_EDUCATION = 25; + + // Shopping + SHOPPING = 26; +} + +// Various levels of service for Google Analytics. +enum ServiceLevel { + // Service level not specified or invalid. + SERVICE_LEVEL_UNSPECIFIED = 0; + + // The standard version of Google Analytics. + GOOGLE_ANALYTICS_STANDARD = 1; + + // The paid, premium version of Google Analytics. + GOOGLE_ANALYTICS_360 = 2; +} + +// Different kinds of actors that can make changes to Google Analytics +// resources. +enum ActorType { + // Unknown or unspecified actor type. + ACTOR_TYPE_UNSPECIFIED = 0; + + // Changes made by the user specified in actor_email. + USER = 1; + + // Changes made by the Google Analytics system. + SYSTEM = 2; + + // Changes made by Google Analytics support team staff. + SUPPORT = 3; +} + +// Types of actions that may change a resource. +enum ActionType { + // Action type unknown or not specified. + ACTION_TYPE_UNSPECIFIED = 0; + + // Resource was created in this change. + CREATED = 1; + + // Resource was updated in this change. + UPDATED = 2; + + // Resource was deleted in this change. + DELETED = 3; +} + +// Types of resources whose changes may be returned from change history. +enum ChangeHistoryResourceType { + // Resource type unknown or not specified. + CHANGE_HISTORY_RESOURCE_TYPE_UNSPECIFIED = 0; + + // Account resource + ACCOUNT = 1; + + // Property resource + PROPERTY = 2; + + // FirebaseLink resource + FIREBASE_LINK = 6; + + // GoogleAdsLink resource + GOOGLE_ADS_LINK = 7; + + // GoogleSignalsSettings resource + GOOGLE_SIGNALS_SETTINGS = 8; + + // ConversionEvent resource + CONVERSION_EVENT = 9; + + // MeasurementProtocolSecret resource + MEASUREMENT_PROTOCOL_SECRET = 10; + + // DataRetentionSettings resource + DATA_RETENTION_SETTINGS = 13; + + // DisplayVideo360AdvertiserLink resource + DISPLAY_VIDEO_360_ADVERTISER_LINK = 14; + + // DisplayVideo360AdvertiserLinkProposal resource + DISPLAY_VIDEO_360_ADVERTISER_LINK_PROPOSAL = 15; + + // DataStream resource + DATA_STREAM = 18; + + // AttributionSettings resource + ATTRIBUTION_SETTINGS = 20; +} + +// Types of Property resources. +enum PropertyType { + // Unknown or unspecified property type + PROPERTY_TYPE_UNSPECIFIED = 0; + + // Ordinary GA4 property + PROPERTY_TYPE_ORDINARY = 1; + + // GA4 subproperty + PROPERTY_TYPE_SUBPROPERTY = 2; + + // GA4 rollup property + PROPERTY_TYPE_ROLLUP = 3; +} + +// A resource message representing a Google Analytics account. +message Account { + option (google.api.resource) = { + type: "analyticsadmin.googleapis.com/Account" + pattern: "accounts/{account}" + }; + + // Output only. Resource name of this account. + // Format: accounts/{account} + // Example: "accounts/100" + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Time when this account was originally created. + google.protobuf.Timestamp create_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Time when account payload fields were last updated. + google.protobuf.Timestamp update_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. Human-readable display name for this account. + string display_name = 4 [(google.api.field_behavior) = REQUIRED]; + + // Country of business. Must be a Unicode CLDR region code. + string region_code = 5; + + // Output only. Indicates whether this Account is soft-deleted or not. Deleted + // accounts are excluded from List results unless specifically requested. + bool deleted = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// A resource message representing a Google Analytics GA4 property. +message Property { + option (google.api.resource) = { + type: "analyticsadmin.googleapis.com/Property" + pattern: "properties/{property}" + }; + + // Output only. Resource name of this property. + // Format: properties/{property_id} + // Example: "properties/1000" + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Immutable. The property type for this Property resource. When creating a property, if + // the type is "PROPERTY_TYPE_UNSPECIFIED", then "ORDINARY_PROPERTY" will be + // implied. "SUBPROPERTY" and "ROLLUP_PROPERTY" types cannot yet be created + // via Google Analytics Admin API. + PropertyType property_type = 14 [(google.api.field_behavior) = IMMUTABLE]; + + // Output only. Time when the entity was originally created. + google.protobuf.Timestamp create_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Time when entity payload fields were last updated. + google.protobuf.Timestamp update_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Immutable. Resource name of this property's logical parent. + // + // Note: The Property-Moving UI can be used to change the parent. + // Format: accounts/{account}, properties/{property} + // Example: "accounts/100", "properties/101" + string parent = 2 [(google.api.field_behavior) = IMMUTABLE]; + + // Required. Human-readable display name for this property. + // + // The max allowed display name length is 100 UTF-16 code units. + string display_name = 5 [(google.api.field_behavior) = REQUIRED]; + + // Industry associated with this property + // Example: AUTOMOTIVE, FOOD_AND_DRINK + IndustryCategory industry_category = 6; + + // Required. Reporting Time Zone, used as the day boundary for reports, regardless of + // where the data originates. If the time zone honors DST, Analytics will + // automatically adjust for the changes. + // + // NOTE: Changing the time zone only affects data going forward, and is not + // applied retroactively. + // + // Format: https://www.iana.org/time-zones + // Example: "America/Los_Angeles" + string time_zone = 7 [(google.api.field_behavior) = REQUIRED]; + + // The currency type used in reports involving monetary values. + // + // + // Format: https://en.wikipedia.org/wiki/ISO_4217 + // Examples: "USD", "EUR", "JPY" + string currency_code = 8; + + // Output only. The Google Analytics service level that applies to this property. + ServiceLevel service_level = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. If set, the time at which this property was trashed. If not set, then this + // property is not currently in the trash can. + google.protobuf.Timestamp delete_time = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. If set, the time at which this trashed property will be permanently + // deleted. If not set, then this property is not currently in the trash can + // and is not slated to be deleted. + google.protobuf.Timestamp expire_time = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Immutable. The resource name of the parent account + // Format: accounts/{account_id} + // Example: "accounts/123" + string account = 13 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "analyticsadmin.googleapis.com/Account" + } + ]; +} + +// A resource message representing a data stream. +message DataStream { + option (google.api.resource) = { + type: "analyticsadmin.googleapis.com/DataStream" + pattern: "properties/{property}/dataStreams/{data_stream}" + }; + + // Data specific to web streams. + message WebStreamData { + // Output only. Analytics "Measurement ID", without the "G-" prefix. + // Example: "G-1A2BCD345E" would just be "1A2BCD345E" + string measurement_id = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. ID of the corresponding web app in Firebase, if any. + // This ID can change if the web app is deleted and recreated. + string firebase_app_id = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Immutable. Domain name of the web app being measured, or empty. + // Example: "http://www.google.com", "https://www.google.com" + string default_uri = 3 [(google.api.field_behavior) = IMMUTABLE]; + } + + // Data specific to Android app streams. + message AndroidAppStreamData { + // Output only. ID of the corresponding Android app in Firebase, if any. + // This ID can change if the Android app is deleted and recreated. + string firebase_app_id = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Immutable. The package name for the app being measured. + // Example: "com.example.myandroidapp" + string package_name = 2 [(google.api.field_behavior) = IMMUTABLE]; + } + + // Data specific to iOS app streams. + message IosAppStreamData { + // Output only. ID of the corresponding iOS app in Firebase, if any. + // This ID can change if the iOS app is deleted and recreated. + string firebase_app_id = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. Immutable. The Apple App Store Bundle ID for the app + // Example: "com.example.myiosapp" + string bundle_id = 2 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.field_behavior) = REQUIRED + ]; + } + + // The type of the data stream. + enum DataStreamType { + // Type unknown or not specified. + DATA_STREAM_TYPE_UNSPECIFIED = 0; + + // Web data stream. + WEB_DATA_STREAM = 1; + + // Android app data stream. + ANDROID_APP_DATA_STREAM = 2; + + // iOS app data stream. + IOS_APP_DATA_STREAM = 3; + } + + // Data for specific data stream types. The message that will be + // set corresponds to the type of this stream. + oneof stream_data { + // Data specific to web streams. Must be populated if type is + // WEB_DATA_STREAM. + WebStreamData web_stream_data = 6; + + // Data specific to Android app streams. Must be populated if type is + // ANDROID_APP_DATA_STREAM. + AndroidAppStreamData android_app_stream_data = 7; + + // Data specific to iOS app streams. Must be populated if type is + // IOS_APP_DATA_STREAM. + IosAppStreamData ios_app_stream_data = 8; + } + + // Output only. Resource name of this Data Stream. + // Format: properties/{property_id}/dataStreams/{stream_id} + // Example: "properties/1000/dataStreams/2000" + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. Immutable. The type of this DataStream resource. + DataStreamType type = 2 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.field_behavior) = REQUIRED + ]; + + // Human-readable display name for the Data Stream. + // + // Required for web data streams. + // + // The max allowed display name length is 255 UTF-16 code units. + string display_name = 3; + + // Output only. Time when this stream was originally created. + google.protobuf.Timestamp create_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Time when stream payload fields were last updated. + google.protobuf.Timestamp update_time = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// A link between a GA4 property and a Firebase project. +message FirebaseLink { + option (google.api.resource) = { + type: "analyticsadmin.googleapis.com/FirebaseLink" + pattern: "properties/{property}/firebaseLinks/{firebase_link}" + }; + + // Output only. Example format: properties/1234/firebaseLinks/5678 + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Immutable. Firebase project resource name. When creating a FirebaseLink, you may + // provide this resource name using either a project number or project ID. + // Once this resource has been created, returned FirebaseLinks will always + // have a project_name that contains a project number. + // + // Format: 'projects/{project number}' + // Example: 'projects/1234' + string project = 2 [(google.api.field_behavior) = IMMUTABLE]; + + // Output only. Time when this FirebaseLink was originally created. + google.protobuf.Timestamp create_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// A link between a GA4 property and a Google Ads account. +message GoogleAdsLink { + option (google.api.resource) = { + type: "analyticsadmin.googleapis.com/GoogleAdsLink" + pattern: "properties/{property}/googleAdsLinks/{google_ads_link}" + }; + + // Output only. Format: properties/{propertyId}/googleAdsLinks/{googleAdsLinkId} + // + // Note: googleAdsLinkId is not the Google Ads customer ID. + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Immutable. Google Ads customer ID. + string customer_id = 3 [(google.api.field_behavior) = IMMUTABLE]; + + // Output only. If true, this link is for a Google Ads manager account. + bool can_manage_clients = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Enable personalized advertising features with this integration. + // Automatically publish my Google Analytics audience lists and Google + // Analytics remarketing events/parameters to the linked Google Ads account. + // If this field is not set on create/update, it will be defaulted to true. + google.protobuf.BoolValue ads_personalization_enabled = 5; + + // Output only. Time when this link was originally created. + google.protobuf.Timestamp create_time = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Time when this link was last updated. + google.protobuf.Timestamp update_time = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Email address of the user that created the link. + // An empty string will be returned if the email address can't be retrieved. + string creator_email_address = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// A resource message representing data sharing settings of a Google Analytics +// account. +message DataSharingSettings { + option (google.api.resource) = { + type: "analyticsadmin.googleapis.com/DataSharingSettings" + pattern: "accounts/{account}/dataSharingSettings" + }; + + // Output only. Resource name. + // Format: accounts/{account}/dataSharingSettings + // Example: "accounts/1000/dataSharingSettings" + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Allows Google support to access the data in order to help troubleshoot + // issues. + bool sharing_with_google_support_enabled = 2; + + // Allows Google sales teams that are assigned to the customer to access the + // data in order to suggest configuration changes to improve results. + // Sales team restrictions still apply when enabled. + bool sharing_with_google_assigned_sales_enabled = 3; + + // Allows any of Google sales to access the data in order to suggest + // configuration changes to improve results. + bool sharing_with_google_any_sales_enabled = 4; + + // Allows Google to use the data to improve other Google products or services. + bool sharing_with_google_products_enabled = 5; + + // Allows Google to share the data anonymously in aggregate form with others. + bool sharing_with_others_enabled = 6; +} + +// A virtual resource representing an overview of an account and +// all its child GA4 properties. +message AccountSummary { + option (google.api.resource) = { + type: "analyticsadmin.googleapis.com/AccountSummary" + pattern: "accountSummaries/{account_summary}" + }; + + // Resource name for this account summary. + // Format: accountSummaries/{account_id} + // Example: "accountSummaries/1000" + string name = 1; + + // Resource name of account referred to by this account summary + // Format: accounts/{account_id} + // Example: "accounts/1000" + string account = 2 [(google.api.resource_reference) = { + type: "analyticsadmin.googleapis.com/Account" + }]; + + // Display name for the account referred to in this account summary. + string display_name = 3; + + // List of summaries for child accounts of this account. + repeated PropertySummary property_summaries = 4; +} + +// A virtual resource representing metadata for a GA4 property. +message PropertySummary { + // Resource name of property referred to by this property summary + // Format: properties/{property_id} + // Example: "properties/1000" + string property = 1 [(google.api.resource_reference) = { + type: "analyticsadmin.googleapis.com/Property" + }]; + + // Display name for the property referred to in this property summary. + string display_name = 2; + + // The property's property type. + PropertyType property_type = 3; + + // Resource name of this property's logical parent. + // + // Note: The Property-Moving UI can be used to change the parent. + // Format: accounts/{account}, properties/{property} + // Example: "accounts/100", "properties/200" + string parent = 4; +} + +// A secret value used for sending hits to Measurement Protocol. +message MeasurementProtocolSecret { + option (google.api.resource) = { + type: "analyticsadmin.googleapis.com/MeasurementProtocolSecret" + pattern: "properties/{property}/dataStreams/{data_stream}/measurementProtocolSecrets/{measurement_protocol_secret}" + }; + + // Output only. Resource name of this secret. This secret may be a child of any type of + // stream. + // Format: + // properties/{property}/dataStreams/{dataStream}/measurementProtocolSecrets/{measurementProtocolSecret} + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. Human-readable display name for this secret. + string display_name = 2 [(google.api.field_behavior) = REQUIRED]; + + // Output only. The measurement protocol secret value. Pass this value to the api_secret + // field of the Measurement Protocol API when sending hits to this + // secret's parent property. + string secret_value = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// A set of changes within a Google Analytics account or its child properties +// that resulted from the same cause. Common causes would be updates made in the +// Google Analytics UI, changes from customer support, or automatic Google +// Analytics system changes. +message ChangeHistoryEvent { + // ID of this change history event. This ID is unique across Google Analytics. + string id = 1; + + // Time when change was made. + google.protobuf.Timestamp change_time = 2; + + // The type of actor that made this change. + ActorType actor_type = 3; + + // Email address of the Google account that made the change. This will be a + // valid email address if the actor field is set to USER, and empty otherwise. + // Google accounts that have been deleted will cause an error. + string user_actor_email = 4; + + // If true, then the list of changes returned was filtered, and does not + // represent all changes that occurred in this event. + bool changes_filtered = 5; + + // A list of changes made in this change history event that fit the filters + // specified in SearchChangeHistoryEventsRequest. + repeated ChangeHistoryChange changes = 6; +} + +// A description of a change to a single Google Analytics resource. +message ChangeHistoryChange { + // A snapshot of a resource as before or after the result of a change in + // change history. + message ChangeHistoryResource { + oneof resource { + // A snapshot of an Account resource in change history. + Account account = 1; + + // A snapshot of a Property resource in change history. + Property property = 2; + + // A snapshot of a FirebaseLink resource in change history. + FirebaseLink firebase_link = 6; + + // A snapshot of a GoogleAdsLink resource in change history. + GoogleAdsLink google_ads_link = 7; + + // A snapshot of a ConversionEvent resource in change history. + ConversionEvent conversion_event = 11; + + // A snapshot of a MeasurementProtocolSecret resource in change history. + MeasurementProtocolSecret measurement_protocol_secret = 12; + + // A snapshot of a data retention settings resource in change history. + DataRetentionSettings data_retention_settings = 15; + + // A snapshot of a DataStream resource in change history. + DataStream data_stream = 18; + } + } + + // Resource name of the resource whose changes are described by this entry. + string resource = 1; + + // The type of action that changed this resource. + ActionType action = 2; + + // Resource contents from before the change was made. If this resource was + // created in this change, this field will be missing. + ChangeHistoryResource resource_before_change = 3; + + // Resource contents from after the change was made. If this resource was + // deleted in this change, this field will be missing. + ChangeHistoryResource resource_after_change = 4; +} + +// A conversion event in a Google Analytics property. +message ConversionEvent { + option (google.api.resource) = { + type: "analyticsadmin.googleapis.com/ConversionEvent" + pattern: "properties/{property}/conversionEvents/{conversion_event}" + }; + + // Output only. Resource name of this conversion event. + // Format: properties/{property}/conversionEvents/{conversion_event} + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Immutable. The event name for this conversion event. + // Examples: 'click', 'purchase' + string event_name = 2 [(google.api.field_behavior) = IMMUTABLE]; + + // Output only. Time when this conversion event was created in the property. + google.protobuf.Timestamp create_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. If set, this event can currently be deleted via DeleteConversionEvent. + bool deletable = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. If set to true, this conversion event refers to a custom event. If set to + // false, this conversion event refers to a default event in GA. Default + // events typically have special meaning in GA. Default events are usually + // created for you by the GA system, but in some cases can be created by + // property admins. Custom events count towards the maximum number of + // custom conversion events that may be created per property. + bool custom = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// A definition for a CustomDimension. +message CustomDimension { + option (google.api.resource) = { + type: "analyticsadmin.googleapis.com/CustomDimension" + pattern: "properties/{property}/customDimensions/{custom_dimension}" + }; + + // Valid values for the scope of this dimension. + enum DimensionScope { + // Scope unknown or not specified. + DIMENSION_SCOPE_UNSPECIFIED = 0; + + // Dimension scoped to an event. + EVENT = 1; + + // Dimension scoped to a user. + USER = 2; + } + + // Output only. Resource name for this CustomDimension resource. + // Format: properties/{property}/customDimensions/{customDimension} + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. Immutable. Tagging parameter name for this custom dimension. + // + // If this is a user-scoped dimension, then this is the user property name. + // If this is an event-scoped dimension, then this is the event parameter + // name. + // + // May only contain alphanumeric and underscore characters, starting with a + // letter. Max length of 24 characters for user-scoped dimensions, 40 + // characters for event-scoped dimensions. + string parameter_name = 2 [ + (google.api.field_behavior) = REQUIRED, + (google.api.field_behavior) = IMMUTABLE + ]; + + // Required. Display name for this custom dimension as shown in the Analytics UI. + // Max length of 82 characters, alphanumeric plus space and underscore + // starting with a letter. Legacy system-generated display names may contain + // square brackets, but updates to this field will never permit square + // brackets. + string display_name = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Description for this custom dimension. Max length of 150 characters. + string description = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Required. Immutable. The scope of this dimension. + DimensionScope scope = 5 [ + (google.api.field_behavior) = REQUIRED, + (google.api.field_behavior) = IMMUTABLE + ]; + + // Optional. If set to true, sets this dimension as NPA and excludes it from ads + // personalization. + // + // This is currently only supported by user-scoped custom dimensions. + bool disallow_ads_personalization = 6 [(google.api.field_behavior) = OPTIONAL]; +} + +// A definition for a custom metric. +message CustomMetric { + option (google.api.resource) = { + type: "analyticsadmin.googleapis.com/CustomMetric" + pattern: "properties/{property}/customMetrics/{custom_metric}" + }; + + // Possible types of representing the custom metric's value. + // + // Currency representation may change in the future, requiring a breaking API + // change. + enum MeasurementUnit { + // MeasurementUnit unspecified or missing. + MEASUREMENT_UNIT_UNSPECIFIED = 0; + + // This metric uses default units. + STANDARD = 1; + + // This metric measures a currency. + CURRENCY = 2; + + // This metric measures feet. + FEET = 3; + + // This metric measures meters. + METERS = 4; + + // This metric measures kilometers. + KILOMETERS = 5; + + // This metric measures miles. + MILES = 6; + + // This metric measures milliseconds. + MILLISECONDS = 7; + + // This metric measures seconds. + SECONDS = 8; + + // This metric measures minutes. + MINUTES = 9; + + // This metric measures hours. + HOURS = 10; + } + + // The scope of this metric. + enum MetricScope { + // Scope unknown or not specified. + METRIC_SCOPE_UNSPECIFIED = 0; + + // Metric scoped to an event. + EVENT = 1; + } + + // Labels that mark the data in this custom metric as data that should be + // restricted to specific users. + enum RestrictedMetricType { + // Type unknown or unspecified. + RESTRICTED_METRIC_TYPE_UNSPECIFIED = 0; + + // Metric reports cost data. + COST_DATA = 1; + + // Metric reports revenue data. + REVENUE_DATA = 2; + } + + // Output only. Resource name for this CustomMetric resource. + // Format: properties/{property}/customMetrics/{customMetric} + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. Immutable. Tagging name for this custom metric. + // + // If this is an event-scoped metric, then this is the event parameter + // name. + // + // May only contain alphanumeric and underscore charactes, starting with a + // letter. Max length of 40 characters for event-scoped metrics. + string parameter_name = 2 [ + (google.api.field_behavior) = REQUIRED, + (google.api.field_behavior) = IMMUTABLE + ]; + + // Required. Display name for this custom metric as shown in the Analytics UI. + // Max length of 82 characters, alphanumeric plus space and underscore + // starting with a letter. Legacy system-generated display names may contain + // square brackets, but updates to this field will never permit square + // brackets. + string display_name = 3 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Description for this custom dimension. + // Max length of 150 characters. + string description = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Required. The type for the custom metric's value. + MeasurementUnit measurement_unit = 5 [(google.api.field_behavior) = REQUIRED]; + + // Required. Immutable. The scope of this custom metric. + MetricScope scope = 6 [ + (google.api.field_behavior) = REQUIRED, + (google.api.field_behavior) = IMMUTABLE + ]; + + // Optional. Types of restricted data that this metric may contain. Required for metrics + // with CURRENCY measurement unit. Must be empty for metrics with a + // non-CURRENCY measurement unit. + repeated RestrictedMetricType restricted_metric_type = 8 [(google.api.field_behavior) = OPTIONAL]; +} + +// Settings values for data retention. This is a singleton resource. +message DataRetentionSettings { + option (google.api.resource) = { + type: "analyticsadmin.googleapis.com/DataRetentionSettings" + pattern: "properties/{property}/dataRetentionSettings" + }; + + // Valid values for the data retention duration. + enum RetentionDuration { + // Data retention time duration is not specified. + RETENTION_DURATION_UNSPECIFIED = 0; + + // The data retention time duration is 2 months. + TWO_MONTHS = 1; + + // The data retention time duration is 14 months. + FOURTEEN_MONTHS = 3; + + // The data retention time duration is 26 months. + // Available to 360 properties only. + TWENTY_SIX_MONTHS = 4; + + // The data retention time duration is 38 months. + // Available to 360 properties only. + THIRTY_EIGHT_MONTHS = 5; + + // The data retention time duration is 50 months. + // Available to 360 properties only. + FIFTY_MONTHS = 6; + } + + // Output only. Resource name for this DataRetentionSetting resource. + // Format: properties/{property}/dataRetentionSettings + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The length of time that event-level data is retained. + RetentionDuration event_data_retention = 2; + + // If true, reset the retention period for the user identifier with every + // event from that user. + bool reset_user_data_on_new_activity = 3; +} diff --git a/packages/google-analytics-admin/protos/protos.d.ts b/packages/google-analytics-admin/protos/protos.d.ts new file mode 100644 index 00000000000..9f86d3eba41 --- /dev/null +++ b/packages/google-analytics-admin/protos/protos.d.ts @@ -0,0 +1,34552 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +import type {protobuf as $protobuf} from "google-gax"; +import Long = require("long"); +/** Namespace google. */ +export namespace google { + + /** Namespace analytics. */ + namespace analytics { + + /** Namespace admin. */ + namespace admin { + + /** Namespace v1alpha. */ + namespace v1alpha { + + /** Properties of an AccessDimension. */ + interface IAccessDimension { + + /** AccessDimension dimensionName */ + dimensionName?: (string|null); + } + + /** Represents an AccessDimension. */ + class AccessDimension implements IAccessDimension { + + /** + * Constructs a new AccessDimension. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IAccessDimension); + + /** AccessDimension dimensionName. */ + public dimensionName: string; + + /** + * Creates a new AccessDimension instance using the specified properties. + * @param [properties] Properties to set + * @returns AccessDimension instance + */ + public static create(properties?: google.analytics.admin.v1alpha.IAccessDimension): google.analytics.admin.v1alpha.AccessDimension; + + /** + * Encodes the specified AccessDimension message. Does not implicitly {@link google.analytics.admin.v1alpha.AccessDimension.verify|verify} messages. + * @param message AccessDimension message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.IAccessDimension, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AccessDimension message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AccessDimension.verify|verify} messages. + * @param message AccessDimension message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.IAccessDimension, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AccessDimension message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AccessDimension + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.AccessDimension; + + /** + * Decodes an AccessDimension message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AccessDimension + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.AccessDimension; + + /** + * Verifies an AccessDimension message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AccessDimension message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AccessDimension + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.AccessDimension; + + /** + * Creates a plain object from an AccessDimension message. Also converts values to other types if specified. + * @param message AccessDimension + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.AccessDimension, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AccessDimension to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AccessDimension + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AccessMetric. */ + interface IAccessMetric { + + /** AccessMetric metricName */ + metricName?: (string|null); + } + + /** Represents an AccessMetric. */ + class AccessMetric implements IAccessMetric { + + /** + * Constructs a new AccessMetric. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IAccessMetric); + + /** AccessMetric metricName. */ + public metricName: string; + + /** + * Creates a new AccessMetric instance using the specified properties. + * @param [properties] Properties to set + * @returns AccessMetric instance + */ + public static create(properties?: google.analytics.admin.v1alpha.IAccessMetric): google.analytics.admin.v1alpha.AccessMetric; + + /** + * Encodes the specified AccessMetric message. Does not implicitly {@link google.analytics.admin.v1alpha.AccessMetric.verify|verify} messages. + * @param message AccessMetric message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.IAccessMetric, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AccessMetric message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AccessMetric.verify|verify} messages. + * @param message AccessMetric message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.IAccessMetric, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AccessMetric message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AccessMetric + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.AccessMetric; + + /** + * Decodes an AccessMetric message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AccessMetric + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.AccessMetric; + + /** + * Verifies an AccessMetric message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AccessMetric message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AccessMetric + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.AccessMetric; + + /** + * Creates a plain object from an AccessMetric message. Also converts values to other types if specified. + * @param message AccessMetric + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.AccessMetric, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AccessMetric to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AccessMetric + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AccessDateRange. */ + interface IAccessDateRange { + + /** AccessDateRange startDate */ + startDate?: (string|null); + + /** AccessDateRange endDate */ + endDate?: (string|null); + } + + /** Represents an AccessDateRange. */ + class AccessDateRange implements IAccessDateRange { + + /** + * Constructs a new AccessDateRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IAccessDateRange); + + /** AccessDateRange startDate. */ + public startDate: string; + + /** AccessDateRange endDate. */ + public endDate: string; + + /** + * Creates a new AccessDateRange instance using the specified properties. + * @param [properties] Properties to set + * @returns AccessDateRange instance + */ + public static create(properties?: google.analytics.admin.v1alpha.IAccessDateRange): google.analytics.admin.v1alpha.AccessDateRange; + + /** + * Encodes the specified AccessDateRange message. Does not implicitly {@link google.analytics.admin.v1alpha.AccessDateRange.verify|verify} messages. + * @param message AccessDateRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.IAccessDateRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AccessDateRange message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AccessDateRange.verify|verify} messages. + * @param message AccessDateRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.IAccessDateRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AccessDateRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AccessDateRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.AccessDateRange; + + /** + * Decodes an AccessDateRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AccessDateRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.AccessDateRange; + + /** + * Verifies an AccessDateRange message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AccessDateRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AccessDateRange + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.AccessDateRange; + + /** + * Creates a plain object from an AccessDateRange message. Also converts values to other types if specified. + * @param message AccessDateRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.AccessDateRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AccessDateRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AccessDateRange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AccessFilterExpression. */ + interface IAccessFilterExpression { + + /** AccessFilterExpression andGroup */ + andGroup?: (google.analytics.admin.v1alpha.IAccessFilterExpressionList|null); + + /** AccessFilterExpression orGroup */ + orGroup?: (google.analytics.admin.v1alpha.IAccessFilterExpressionList|null); + + /** AccessFilterExpression notExpression */ + notExpression?: (google.analytics.admin.v1alpha.IAccessFilterExpression|null); + + /** AccessFilterExpression accessFilter */ + accessFilter?: (google.analytics.admin.v1alpha.IAccessFilter|null); + } + + /** Represents an AccessFilterExpression. */ + class AccessFilterExpression implements IAccessFilterExpression { + + /** + * Constructs a new AccessFilterExpression. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IAccessFilterExpression); + + /** AccessFilterExpression andGroup. */ + public andGroup?: (google.analytics.admin.v1alpha.IAccessFilterExpressionList|null); + + /** AccessFilterExpression orGroup. */ + public orGroup?: (google.analytics.admin.v1alpha.IAccessFilterExpressionList|null); + + /** AccessFilterExpression notExpression. */ + public notExpression?: (google.analytics.admin.v1alpha.IAccessFilterExpression|null); + + /** AccessFilterExpression accessFilter. */ + public accessFilter?: (google.analytics.admin.v1alpha.IAccessFilter|null); + + /** AccessFilterExpression oneExpression. */ + public oneExpression?: ("andGroup"|"orGroup"|"notExpression"|"accessFilter"); + + /** + * Creates a new AccessFilterExpression instance using the specified properties. + * @param [properties] Properties to set + * @returns AccessFilterExpression instance + */ + public static create(properties?: google.analytics.admin.v1alpha.IAccessFilterExpression): google.analytics.admin.v1alpha.AccessFilterExpression; + + /** + * Encodes the specified AccessFilterExpression message. Does not implicitly {@link google.analytics.admin.v1alpha.AccessFilterExpression.verify|verify} messages. + * @param message AccessFilterExpression message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.IAccessFilterExpression, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AccessFilterExpression message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AccessFilterExpression.verify|verify} messages. + * @param message AccessFilterExpression message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.IAccessFilterExpression, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AccessFilterExpression message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AccessFilterExpression + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.AccessFilterExpression; + + /** + * Decodes an AccessFilterExpression message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AccessFilterExpression + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.AccessFilterExpression; + + /** + * Verifies an AccessFilterExpression message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AccessFilterExpression message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AccessFilterExpression + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.AccessFilterExpression; + + /** + * Creates a plain object from an AccessFilterExpression message. Also converts values to other types if specified. + * @param message AccessFilterExpression + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.AccessFilterExpression, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AccessFilterExpression to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AccessFilterExpression + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AccessFilterExpressionList. */ + interface IAccessFilterExpressionList { + + /** AccessFilterExpressionList expressions */ + expressions?: (google.analytics.admin.v1alpha.IAccessFilterExpression[]|null); + } + + /** Represents an AccessFilterExpressionList. */ + class AccessFilterExpressionList implements IAccessFilterExpressionList { + + /** + * Constructs a new AccessFilterExpressionList. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IAccessFilterExpressionList); + + /** AccessFilterExpressionList expressions. */ + public expressions: google.analytics.admin.v1alpha.IAccessFilterExpression[]; + + /** + * Creates a new AccessFilterExpressionList instance using the specified properties. + * @param [properties] Properties to set + * @returns AccessFilterExpressionList instance + */ + public static create(properties?: google.analytics.admin.v1alpha.IAccessFilterExpressionList): google.analytics.admin.v1alpha.AccessFilterExpressionList; + + /** + * Encodes the specified AccessFilterExpressionList message. Does not implicitly {@link google.analytics.admin.v1alpha.AccessFilterExpressionList.verify|verify} messages. + * @param message AccessFilterExpressionList message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.IAccessFilterExpressionList, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AccessFilterExpressionList message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AccessFilterExpressionList.verify|verify} messages. + * @param message AccessFilterExpressionList message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.IAccessFilterExpressionList, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AccessFilterExpressionList message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AccessFilterExpressionList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.AccessFilterExpressionList; + + /** + * Decodes an AccessFilterExpressionList message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AccessFilterExpressionList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.AccessFilterExpressionList; + + /** + * Verifies an AccessFilterExpressionList message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AccessFilterExpressionList message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AccessFilterExpressionList + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.AccessFilterExpressionList; + + /** + * Creates a plain object from an AccessFilterExpressionList message. Also converts values to other types if specified. + * @param message AccessFilterExpressionList + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.AccessFilterExpressionList, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AccessFilterExpressionList to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AccessFilterExpressionList + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AccessFilter. */ + interface IAccessFilter { + + /** AccessFilter stringFilter */ + stringFilter?: (google.analytics.admin.v1alpha.IAccessStringFilter|null); + + /** AccessFilter inListFilter */ + inListFilter?: (google.analytics.admin.v1alpha.IAccessInListFilter|null); + + /** AccessFilter numericFilter */ + numericFilter?: (google.analytics.admin.v1alpha.IAccessNumericFilter|null); + + /** AccessFilter betweenFilter */ + betweenFilter?: (google.analytics.admin.v1alpha.IAccessBetweenFilter|null); + + /** AccessFilter fieldName */ + fieldName?: (string|null); + } + + /** Represents an AccessFilter. */ + class AccessFilter implements IAccessFilter { + + /** + * Constructs a new AccessFilter. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IAccessFilter); + + /** AccessFilter stringFilter. */ + public stringFilter?: (google.analytics.admin.v1alpha.IAccessStringFilter|null); + + /** AccessFilter inListFilter. */ + public inListFilter?: (google.analytics.admin.v1alpha.IAccessInListFilter|null); + + /** AccessFilter numericFilter. */ + public numericFilter?: (google.analytics.admin.v1alpha.IAccessNumericFilter|null); + + /** AccessFilter betweenFilter. */ + public betweenFilter?: (google.analytics.admin.v1alpha.IAccessBetweenFilter|null); + + /** AccessFilter fieldName. */ + public fieldName: string; + + /** AccessFilter oneFilter. */ + public oneFilter?: ("stringFilter"|"inListFilter"|"numericFilter"|"betweenFilter"); + + /** + * Creates a new AccessFilter instance using the specified properties. + * @param [properties] Properties to set + * @returns AccessFilter instance + */ + public static create(properties?: google.analytics.admin.v1alpha.IAccessFilter): google.analytics.admin.v1alpha.AccessFilter; + + /** + * Encodes the specified AccessFilter message. Does not implicitly {@link google.analytics.admin.v1alpha.AccessFilter.verify|verify} messages. + * @param message AccessFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.IAccessFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AccessFilter message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AccessFilter.verify|verify} messages. + * @param message AccessFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.IAccessFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AccessFilter message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AccessFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.AccessFilter; + + /** + * Decodes an AccessFilter message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AccessFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.AccessFilter; + + /** + * Verifies an AccessFilter message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AccessFilter message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AccessFilter + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.AccessFilter; + + /** + * Creates a plain object from an AccessFilter message. Also converts values to other types if specified. + * @param message AccessFilter + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.AccessFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AccessFilter to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AccessFilter + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AccessStringFilter. */ + interface IAccessStringFilter { + + /** AccessStringFilter matchType */ + matchType?: (google.analytics.admin.v1alpha.AccessStringFilter.MatchType|keyof typeof google.analytics.admin.v1alpha.AccessStringFilter.MatchType|null); + + /** AccessStringFilter value */ + value?: (string|null); + + /** AccessStringFilter caseSensitive */ + caseSensitive?: (boolean|null); + } + + /** Represents an AccessStringFilter. */ + class AccessStringFilter implements IAccessStringFilter { + + /** + * Constructs a new AccessStringFilter. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IAccessStringFilter); + + /** AccessStringFilter matchType. */ + public matchType: (google.analytics.admin.v1alpha.AccessStringFilter.MatchType|keyof typeof google.analytics.admin.v1alpha.AccessStringFilter.MatchType); + + /** AccessStringFilter value. */ + public value: string; + + /** AccessStringFilter caseSensitive. */ + public caseSensitive: boolean; + + /** + * Creates a new AccessStringFilter instance using the specified properties. + * @param [properties] Properties to set + * @returns AccessStringFilter instance + */ + public static create(properties?: google.analytics.admin.v1alpha.IAccessStringFilter): google.analytics.admin.v1alpha.AccessStringFilter; + + /** + * Encodes the specified AccessStringFilter message. Does not implicitly {@link google.analytics.admin.v1alpha.AccessStringFilter.verify|verify} messages. + * @param message AccessStringFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.IAccessStringFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AccessStringFilter message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AccessStringFilter.verify|verify} messages. + * @param message AccessStringFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.IAccessStringFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AccessStringFilter message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AccessStringFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.AccessStringFilter; + + /** + * Decodes an AccessStringFilter message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AccessStringFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.AccessStringFilter; + + /** + * Verifies an AccessStringFilter message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AccessStringFilter message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AccessStringFilter + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.AccessStringFilter; + + /** + * Creates a plain object from an AccessStringFilter message. Also converts values to other types if specified. + * @param message AccessStringFilter + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.AccessStringFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AccessStringFilter to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AccessStringFilter + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace AccessStringFilter { + + /** MatchType enum. */ + enum MatchType { + MATCH_TYPE_UNSPECIFIED = 0, + EXACT = 1, + BEGINS_WITH = 2, + ENDS_WITH = 3, + CONTAINS = 4, + FULL_REGEXP = 5, + PARTIAL_REGEXP = 6 + } + } + + /** Properties of an AccessInListFilter. */ + interface IAccessInListFilter { + + /** AccessInListFilter values */ + values?: (string[]|null); + + /** AccessInListFilter caseSensitive */ + caseSensitive?: (boolean|null); + } + + /** Represents an AccessInListFilter. */ + class AccessInListFilter implements IAccessInListFilter { + + /** + * Constructs a new AccessInListFilter. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IAccessInListFilter); + + /** AccessInListFilter values. */ + public values: string[]; + + /** AccessInListFilter caseSensitive. */ + public caseSensitive: boolean; + + /** + * Creates a new AccessInListFilter instance using the specified properties. + * @param [properties] Properties to set + * @returns AccessInListFilter instance + */ + public static create(properties?: google.analytics.admin.v1alpha.IAccessInListFilter): google.analytics.admin.v1alpha.AccessInListFilter; + + /** + * Encodes the specified AccessInListFilter message. Does not implicitly {@link google.analytics.admin.v1alpha.AccessInListFilter.verify|verify} messages. + * @param message AccessInListFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.IAccessInListFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AccessInListFilter message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AccessInListFilter.verify|verify} messages. + * @param message AccessInListFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.IAccessInListFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AccessInListFilter message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AccessInListFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.AccessInListFilter; + + /** + * Decodes an AccessInListFilter message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AccessInListFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.AccessInListFilter; + + /** + * Verifies an AccessInListFilter message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AccessInListFilter message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AccessInListFilter + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.AccessInListFilter; + + /** + * Creates a plain object from an AccessInListFilter message. Also converts values to other types if specified. + * @param message AccessInListFilter + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.AccessInListFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AccessInListFilter to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AccessInListFilter + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AccessNumericFilter. */ + interface IAccessNumericFilter { + + /** AccessNumericFilter operation */ + operation?: (google.analytics.admin.v1alpha.AccessNumericFilter.Operation|keyof typeof google.analytics.admin.v1alpha.AccessNumericFilter.Operation|null); + + /** AccessNumericFilter value */ + value?: (google.analytics.admin.v1alpha.INumericValue|null); + } + + /** Represents an AccessNumericFilter. */ + class AccessNumericFilter implements IAccessNumericFilter { + + /** + * Constructs a new AccessNumericFilter. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IAccessNumericFilter); + + /** AccessNumericFilter operation. */ + public operation: (google.analytics.admin.v1alpha.AccessNumericFilter.Operation|keyof typeof google.analytics.admin.v1alpha.AccessNumericFilter.Operation); + + /** AccessNumericFilter value. */ + public value?: (google.analytics.admin.v1alpha.INumericValue|null); + + /** + * Creates a new AccessNumericFilter instance using the specified properties. + * @param [properties] Properties to set + * @returns AccessNumericFilter instance + */ + public static create(properties?: google.analytics.admin.v1alpha.IAccessNumericFilter): google.analytics.admin.v1alpha.AccessNumericFilter; + + /** + * Encodes the specified AccessNumericFilter message. Does not implicitly {@link google.analytics.admin.v1alpha.AccessNumericFilter.verify|verify} messages. + * @param message AccessNumericFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.IAccessNumericFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AccessNumericFilter message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AccessNumericFilter.verify|verify} messages. + * @param message AccessNumericFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.IAccessNumericFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AccessNumericFilter message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AccessNumericFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.AccessNumericFilter; + + /** + * Decodes an AccessNumericFilter message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AccessNumericFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.AccessNumericFilter; + + /** + * Verifies an AccessNumericFilter message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AccessNumericFilter message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AccessNumericFilter + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.AccessNumericFilter; + + /** + * Creates a plain object from an AccessNumericFilter message. Also converts values to other types if specified. + * @param message AccessNumericFilter + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.AccessNumericFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AccessNumericFilter to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AccessNumericFilter + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace AccessNumericFilter { + + /** Operation enum. */ + enum Operation { + OPERATION_UNSPECIFIED = 0, + EQUAL = 1, + LESS_THAN = 2, + LESS_THAN_OR_EQUAL = 3, + GREATER_THAN = 4, + GREATER_THAN_OR_EQUAL = 5 + } + } + + /** Properties of an AccessBetweenFilter. */ + interface IAccessBetweenFilter { + + /** AccessBetweenFilter fromValue */ + fromValue?: (google.analytics.admin.v1alpha.INumericValue|null); + + /** AccessBetweenFilter toValue */ + toValue?: (google.analytics.admin.v1alpha.INumericValue|null); + } + + /** Represents an AccessBetweenFilter. */ + class AccessBetweenFilter implements IAccessBetweenFilter { + + /** + * Constructs a new AccessBetweenFilter. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IAccessBetweenFilter); + + /** AccessBetweenFilter fromValue. */ + public fromValue?: (google.analytics.admin.v1alpha.INumericValue|null); + + /** AccessBetweenFilter toValue. */ + public toValue?: (google.analytics.admin.v1alpha.INumericValue|null); + + /** + * Creates a new AccessBetweenFilter instance using the specified properties. + * @param [properties] Properties to set + * @returns AccessBetweenFilter instance + */ + public static create(properties?: google.analytics.admin.v1alpha.IAccessBetweenFilter): google.analytics.admin.v1alpha.AccessBetweenFilter; + + /** + * Encodes the specified AccessBetweenFilter message. Does not implicitly {@link google.analytics.admin.v1alpha.AccessBetweenFilter.verify|verify} messages. + * @param message AccessBetweenFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.IAccessBetweenFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AccessBetweenFilter message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AccessBetweenFilter.verify|verify} messages. + * @param message AccessBetweenFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.IAccessBetweenFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AccessBetweenFilter message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AccessBetweenFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.AccessBetweenFilter; + + /** + * Decodes an AccessBetweenFilter message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AccessBetweenFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.AccessBetweenFilter; + + /** + * Verifies an AccessBetweenFilter message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AccessBetweenFilter message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AccessBetweenFilter + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.AccessBetweenFilter; + + /** + * Creates a plain object from an AccessBetweenFilter message. Also converts values to other types if specified. + * @param message AccessBetweenFilter + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.AccessBetweenFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AccessBetweenFilter to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AccessBetweenFilter + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a NumericValue. */ + interface INumericValue { + + /** NumericValue int64Value */ + int64Value?: (number|Long|string|null); + + /** NumericValue doubleValue */ + doubleValue?: (number|null); + } + + /** Represents a NumericValue. */ + class NumericValue implements INumericValue { + + /** + * Constructs a new NumericValue. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.INumericValue); + + /** NumericValue int64Value. */ + public int64Value?: (number|Long|string|null); + + /** NumericValue doubleValue. */ + public doubleValue?: (number|null); + + /** NumericValue oneValue. */ + public oneValue?: ("int64Value"|"doubleValue"); + + /** + * Creates a new NumericValue instance using the specified properties. + * @param [properties] Properties to set + * @returns NumericValue instance + */ + public static create(properties?: google.analytics.admin.v1alpha.INumericValue): google.analytics.admin.v1alpha.NumericValue; + + /** + * Encodes the specified NumericValue message. Does not implicitly {@link google.analytics.admin.v1alpha.NumericValue.verify|verify} messages. + * @param message NumericValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.INumericValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NumericValue message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.NumericValue.verify|verify} messages. + * @param message NumericValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.INumericValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NumericValue message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NumericValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.NumericValue; + + /** + * Decodes a NumericValue message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NumericValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.NumericValue; + + /** + * Verifies a NumericValue message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a NumericValue message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NumericValue + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.NumericValue; + + /** + * Creates a plain object from a NumericValue message. Also converts values to other types if specified. + * @param message NumericValue + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.NumericValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NumericValue to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NumericValue + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AccessOrderBy. */ + interface IAccessOrderBy { + + /** AccessOrderBy metric */ + metric?: (google.analytics.admin.v1alpha.AccessOrderBy.IMetricOrderBy|null); + + /** AccessOrderBy dimension */ + dimension?: (google.analytics.admin.v1alpha.AccessOrderBy.IDimensionOrderBy|null); + + /** AccessOrderBy desc */ + desc?: (boolean|null); + } + + /** Represents an AccessOrderBy. */ + class AccessOrderBy implements IAccessOrderBy { + + /** + * Constructs a new AccessOrderBy. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IAccessOrderBy); + + /** AccessOrderBy metric. */ + public metric?: (google.analytics.admin.v1alpha.AccessOrderBy.IMetricOrderBy|null); + + /** AccessOrderBy dimension. */ + public dimension?: (google.analytics.admin.v1alpha.AccessOrderBy.IDimensionOrderBy|null); + + /** AccessOrderBy desc. */ + public desc: boolean; + + /** AccessOrderBy oneOrderBy. */ + public oneOrderBy?: ("metric"|"dimension"); + + /** + * Creates a new AccessOrderBy instance using the specified properties. + * @param [properties] Properties to set + * @returns AccessOrderBy instance + */ + public static create(properties?: google.analytics.admin.v1alpha.IAccessOrderBy): google.analytics.admin.v1alpha.AccessOrderBy; + + /** + * Encodes the specified AccessOrderBy message. Does not implicitly {@link google.analytics.admin.v1alpha.AccessOrderBy.verify|verify} messages. + * @param message AccessOrderBy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.IAccessOrderBy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AccessOrderBy message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AccessOrderBy.verify|verify} messages. + * @param message AccessOrderBy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.IAccessOrderBy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AccessOrderBy message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AccessOrderBy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.AccessOrderBy; + + /** + * Decodes an AccessOrderBy message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AccessOrderBy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.AccessOrderBy; + + /** + * Verifies an AccessOrderBy message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AccessOrderBy message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AccessOrderBy + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.AccessOrderBy; + + /** + * Creates a plain object from an AccessOrderBy message. Also converts values to other types if specified. + * @param message AccessOrderBy + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.AccessOrderBy, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AccessOrderBy to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AccessOrderBy + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace AccessOrderBy { + + /** Properties of a MetricOrderBy. */ + interface IMetricOrderBy { + + /** MetricOrderBy metricName */ + metricName?: (string|null); + } + + /** Represents a MetricOrderBy. */ + class MetricOrderBy implements IMetricOrderBy { + + /** + * Constructs a new MetricOrderBy. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.AccessOrderBy.IMetricOrderBy); + + /** MetricOrderBy metricName. */ + public metricName: string; + + /** + * Creates a new MetricOrderBy instance using the specified properties. + * @param [properties] Properties to set + * @returns MetricOrderBy instance + */ + public static create(properties?: google.analytics.admin.v1alpha.AccessOrderBy.IMetricOrderBy): google.analytics.admin.v1alpha.AccessOrderBy.MetricOrderBy; + + /** + * Encodes the specified MetricOrderBy message. Does not implicitly {@link google.analytics.admin.v1alpha.AccessOrderBy.MetricOrderBy.verify|verify} messages. + * @param message MetricOrderBy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.AccessOrderBy.IMetricOrderBy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MetricOrderBy message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AccessOrderBy.MetricOrderBy.verify|verify} messages. + * @param message MetricOrderBy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.AccessOrderBy.IMetricOrderBy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MetricOrderBy message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MetricOrderBy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.AccessOrderBy.MetricOrderBy; + + /** + * Decodes a MetricOrderBy message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MetricOrderBy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.AccessOrderBy.MetricOrderBy; + + /** + * Verifies a MetricOrderBy message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MetricOrderBy message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MetricOrderBy + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.AccessOrderBy.MetricOrderBy; + + /** + * Creates a plain object from a MetricOrderBy message. Also converts values to other types if specified. + * @param message MetricOrderBy + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.AccessOrderBy.MetricOrderBy, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MetricOrderBy to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MetricOrderBy + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DimensionOrderBy. */ + interface IDimensionOrderBy { + + /** DimensionOrderBy dimensionName */ + dimensionName?: (string|null); + + /** DimensionOrderBy orderType */ + orderType?: (google.analytics.admin.v1alpha.AccessOrderBy.DimensionOrderBy.OrderType|keyof typeof google.analytics.admin.v1alpha.AccessOrderBy.DimensionOrderBy.OrderType|null); + } + + /** Represents a DimensionOrderBy. */ + class DimensionOrderBy implements IDimensionOrderBy { + + /** + * Constructs a new DimensionOrderBy. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.AccessOrderBy.IDimensionOrderBy); + + /** DimensionOrderBy dimensionName. */ + public dimensionName: string; + + /** DimensionOrderBy orderType. */ + public orderType: (google.analytics.admin.v1alpha.AccessOrderBy.DimensionOrderBy.OrderType|keyof typeof google.analytics.admin.v1alpha.AccessOrderBy.DimensionOrderBy.OrderType); + + /** + * Creates a new DimensionOrderBy instance using the specified properties. + * @param [properties] Properties to set + * @returns DimensionOrderBy instance + */ + public static create(properties?: google.analytics.admin.v1alpha.AccessOrderBy.IDimensionOrderBy): google.analytics.admin.v1alpha.AccessOrderBy.DimensionOrderBy; + + /** + * Encodes the specified DimensionOrderBy message. Does not implicitly {@link google.analytics.admin.v1alpha.AccessOrderBy.DimensionOrderBy.verify|verify} messages. + * @param message DimensionOrderBy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.AccessOrderBy.IDimensionOrderBy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DimensionOrderBy message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AccessOrderBy.DimensionOrderBy.verify|verify} messages. + * @param message DimensionOrderBy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.AccessOrderBy.IDimensionOrderBy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DimensionOrderBy message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DimensionOrderBy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.AccessOrderBy.DimensionOrderBy; + + /** + * Decodes a DimensionOrderBy message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DimensionOrderBy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.AccessOrderBy.DimensionOrderBy; + + /** + * Verifies a DimensionOrderBy message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DimensionOrderBy message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DimensionOrderBy + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.AccessOrderBy.DimensionOrderBy; + + /** + * Creates a plain object from a DimensionOrderBy message. Also converts values to other types if specified. + * @param message DimensionOrderBy + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.AccessOrderBy.DimensionOrderBy, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DimensionOrderBy to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DimensionOrderBy + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace DimensionOrderBy { + + /** OrderType enum. */ + enum OrderType { + ORDER_TYPE_UNSPECIFIED = 0, + ALPHANUMERIC = 1, + CASE_INSENSITIVE_ALPHANUMERIC = 2, + NUMERIC = 3 + } + } + } + + /** Properties of an AccessDimensionHeader. */ + interface IAccessDimensionHeader { + + /** AccessDimensionHeader dimensionName */ + dimensionName?: (string|null); + } + + /** Represents an AccessDimensionHeader. */ + class AccessDimensionHeader implements IAccessDimensionHeader { + + /** + * Constructs a new AccessDimensionHeader. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IAccessDimensionHeader); + + /** AccessDimensionHeader dimensionName. */ + public dimensionName: string; + + /** + * Creates a new AccessDimensionHeader instance using the specified properties. + * @param [properties] Properties to set + * @returns AccessDimensionHeader instance + */ + public static create(properties?: google.analytics.admin.v1alpha.IAccessDimensionHeader): google.analytics.admin.v1alpha.AccessDimensionHeader; + + /** + * Encodes the specified AccessDimensionHeader message. Does not implicitly {@link google.analytics.admin.v1alpha.AccessDimensionHeader.verify|verify} messages. + * @param message AccessDimensionHeader message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.IAccessDimensionHeader, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AccessDimensionHeader message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AccessDimensionHeader.verify|verify} messages. + * @param message AccessDimensionHeader message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.IAccessDimensionHeader, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AccessDimensionHeader message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AccessDimensionHeader + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.AccessDimensionHeader; + + /** + * Decodes an AccessDimensionHeader message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AccessDimensionHeader + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.AccessDimensionHeader; + + /** + * Verifies an AccessDimensionHeader message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AccessDimensionHeader message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AccessDimensionHeader + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.AccessDimensionHeader; + + /** + * Creates a plain object from an AccessDimensionHeader message. Also converts values to other types if specified. + * @param message AccessDimensionHeader + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.AccessDimensionHeader, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AccessDimensionHeader to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AccessDimensionHeader + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AccessMetricHeader. */ + interface IAccessMetricHeader { + + /** AccessMetricHeader metricName */ + metricName?: (string|null); + } + + /** Represents an AccessMetricHeader. */ + class AccessMetricHeader implements IAccessMetricHeader { + + /** + * Constructs a new AccessMetricHeader. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IAccessMetricHeader); + + /** AccessMetricHeader metricName. */ + public metricName: string; + + /** + * Creates a new AccessMetricHeader instance using the specified properties. + * @param [properties] Properties to set + * @returns AccessMetricHeader instance + */ + public static create(properties?: google.analytics.admin.v1alpha.IAccessMetricHeader): google.analytics.admin.v1alpha.AccessMetricHeader; + + /** + * Encodes the specified AccessMetricHeader message. Does not implicitly {@link google.analytics.admin.v1alpha.AccessMetricHeader.verify|verify} messages. + * @param message AccessMetricHeader message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.IAccessMetricHeader, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AccessMetricHeader message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AccessMetricHeader.verify|verify} messages. + * @param message AccessMetricHeader message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.IAccessMetricHeader, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AccessMetricHeader message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AccessMetricHeader + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.AccessMetricHeader; + + /** + * Decodes an AccessMetricHeader message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AccessMetricHeader + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.AccessMetricHeader; + + /** + * Verifies an AccessMetricHeader message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AccessMetricHeader message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AccessMetricHeader + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.AccessMetricHeader; + + /** + * Creates a plain object from an AccessMetricHeader message. Also converts values to other types if specified. + * @param message AccessMetricHeader + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.AccessMetricHeader, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AccessMetricHeader to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AccessMetricHeader + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AccessRow. */ + interface IAccessRow { + + /** AccessRow dimensionValues */ + dimensionValues?: (google.analytics.admin.v1alpha.IAccessDimensionValue[]|null); + + /** AccessRow metricValues */ + metricValues?: (google.analytics.admin.v1alpha.IAccessMetricValue[]|null); + } + + /** Represents an AccessRow. */ + class AccessRow implements IAccessRow { + + /** + * Constructs a new AccessRow. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IAccessRow); + + /** AccessRow dimensionValues. */ + public dimensionValues: google.analytics.admin.v1alpha.IAccessDimensionValue[]; + + /** AccessRow metricValues. */ + public metricValues: google.analytics.admin.v1alpha.IAccessMetricValue[]; + + /** + * Creates a new AccessRow instance using the specified properties. + * @param [properties] Properties to set + * @returns AccessRow instance + */ + public static create(properties?: google.analytics.admin.v1alpha.IAccessRow): google.analytics.admin.v1alpha.AccessRow; + + /** + * Encodes the specified AccessRow message. Does not implicitly {@link google.analytics.admin.v1alpha.AccessRow.verify|verify} messages. + * @param message AccessRow message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.IAccessRow, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AccessRow message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AccessRow.verify|verify} messages. + * @param message AccessRow message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.IAccessRow, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AccessRow message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AccessRow + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.AccessRow; + + /** + * Decodes an AccessRow message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AccessRow + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.AccessRow; + + /** + * Verifies an AccessRow message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AccessRow message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AccessRow + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.AccessRow; + + /** + * Creates a plain object from an AccessRow message. Also converts values to other types if specified. + * @param message AccessRow + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.AccessRow, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AccessRow to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AccessRow + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AccessDimensionValue. */ + interface IAccessDimensionValue { + + /** AccessDimensionValue value */ + value?: (string|null); + } + + /** Represents an AccessDimensionValue. */ + class AccessDimensionValue implements IAccessDimensionValue { + + /** + * Constructs a new AccessDimensionValue. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IAccessDimensionValue); + + /** AccessDimensionValue value. */ + public value: string; + + /** + * Creates a new AccessDimensionValue instance using the specified properties. + * @param [properties] Properties to set + * @returns AccessDimensionValue instance + */ + public static create(properties?: google.analytics.admin.v1alpha.IAccessDimensionValue): google.analytics.admin.v1alpha.AccessDimensionValue; + + /** + * Encodes the specified AccessDimensionValue message. Does not implicitly {@link google.analytics.admin.v1alpha.AccessDimensionValue.verify|verify} messages. + * @param message AccessDimensionValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.IAccessDimensionValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AccessDimensionValue message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AccessDimensionValue.verify|verify} messages. + * @param message AccessDimensionValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.IAccessDimensionValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AccessDimensionValue message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AccessDimensionValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.AccessDimensionValue; + + /** + * Decodes an AccessDimensionValue message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AccessDimensionValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.AccessDimensionValue; + + /** + * Verifies an AccessDimensionValue message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AccessDimensionValue message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AccessDimensionValue + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.AccessDimensionValue; + + /** + * Creates a plain object from an AccessDimensionValue message. Also converts values to other types if specified. + * @param message AccessDimensionValue + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.AccessDimensionValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AccessDimensionValue to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AccessDimensionValue + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AccessMetricValue. */ + interface IAccessMetricValue { + + /** AccessMetricValue value */ + value?: (string|null); + } + + /** Represents an AccessMetricValue. */ + class AccessMetricValue implements IAccessMetricValue { + + /** + * Constructs a new AccessMetricValue. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IAccessMetricValue); + + /** AccessMetricValue value. */ + public value: string; + + /** + * Creates a new AccessMetricValue instance using the specified properties. + * @param [properties] Properties to set + * @returns AccessMetricValue instance + */ + public static create(properties?: google.analytics.admin.v1alpha.IAccessMetricValue): google.analytics.admin.v1alpha.AccessMetricValue; + + /** + * Encodes the specified AccessMetricValue message. Does not implicitly {@link google.analytics.admin.v1alpha.AccessMetricValue.verify|verify} messages. + * @param message AccessMetricValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.IAccessMetricValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AccessMetricValue message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AccessMetricValue.verify|verify} messages. + * @param message AccessMetricValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.IAccessMetricValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AccessMetricValue message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AccessMetricValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.AccessMetricValue; + + /** + * Decodes an AccessMetricValue message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AccessMetricValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.AccessMetricValue; + + /** + * Verifies an AccessMetricValue message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AccessMetricValue message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AccessMetricValue + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.AccessMetricValue; + + /** + * Creates a plain object from an AccessMetricValue message. Also converts values to other types if specified. + * @param message AccessMetricValue + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.AccessMetricValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AccessMetricValue to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AccessMetricValue + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AccessQuota. */ + interface IAccessQuota { + + /** AccessQuota tokensPerDay */ + tokensPerDay?: (google.analytics.admin.v1alpha.IAccessQuotaStatus|null); + + /** AccessQuota tokensPerHour */ + tokensPerHour?: (google.analytics.admin.v1alpha.IAccessQuotaStatus|null); + + /** AccessQuota concurrentRequests */ + concurrentRequests?: (google.analytics.admin.v1alpha.IAccessQuotaStatus|null); + + /** AccessQuota serverErrorsPerProjectPerHour */ + serverErrorsPerProjectPerHour?: (google.analytics.admin.v1alpha.IAccessQuotaStatus|null); + } + + /** Represents an AccessQuota. */ + class AccessQuota implements IAccessQuota { + + /** + * Constructs a new AccessQuota. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IAccessQuota); + + /** AccessQuota tokensPerDay. */ + public tokensPerDay?: (google.analytics.admin.v1alpha.IAccessQuotaStatus|null); + + /** AccessQuota tokensPerHour. */ + public tokensPerHour?: (google.analytics.admin.v1alpha.IAccessQuotaStatus|null); + + /** AccessQuota concurrentRequests. */ + public concurrentRequests?: (google.analytics.admin.v1alpha.IAccessQuotaStatus|null); + + /** AccessQuota serverErrorsPerProjectPerHour. */ + public serverErrorsPerProjectPerHour?: (google.analytics.admin.v1alpha.IAccessQuotaStatus|null); + + /** + * Creates a new AccessQuota instance using the specified properties. + * @param [properties] Properties to set + * @returns AccessQuota instance + */ + public static create(properties?: google.analytics.admin.v1alpha.IAccessQuota): google.analytics.admin.v1alpha.AccessQuota; + + /** + * Encodes the specified AccessQuota message. Does not implicitly {@link google.analytics.admin.v1alpha.AccessQuota.verify|verify} messages. + * @param message AccessQuota message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.IAccessQuota, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AccessQuota message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AccessQuota.verify|verify} messages. + * @param message AccessQuota message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.IAccessQuota, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AccessQuota message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AccessQuota + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.AccessQuota; + + /** + * Decodes an AccessQuota message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AccessQuota + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.AccessQuota; + + /** + * Verifies an AccessQuota message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AccessQuota message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AccessQuota + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.AccessQuota; + + /** + * Creates a plain object from an AccessQuota message. Also converts values to other types if specified. + * @param message AccessQuota + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.AccessQuota, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AccessQuota to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AccessQuota + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AccessQuotaStatus. */ + interface IAccessQuotaStatus { + + /** AccessQuotaStatus consumed */ + consumed?: (number|null); + + /** AccessQuotaStatus remaining */ + remaining?: (number|null); + } + + /** Represents an AccessQuotaStatus. */ + class AccessQuotaStatus implements IAccessQuotaStatus { + + /** + * Constructs a new AccessQuotaStatus. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IAccessQuotaStatus); + + /** AccessQuotaStatus consumed. */ + public consumed: number; + + /** AccessQuotaStatus remaining. */ + public remaining: number; + + /** + * Creates a new AccessQuotaStatus instance using the specified properties. + * @param [properties] Properties to set + * @returns AccessQuotaStatus instance + */ + public static create(properties?: google.analytics.admin.v1alpha.IAccessQuotaStatus): google.analytics.admin.v1alpha.AccessQuotaStatus; + + /** + * Encodes the specified AccessQuotaStatus message. Does not implicitly {@link google.analytics.admin.v1alpha.AccessQuotaStatus.verify|verify} messages. + * @param message AccessQuotaStatus message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.IAccessQuotaStatus, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AccessQuotaStatus message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AccessQuotaStatus.verify|verify} messages. + * @param message AccessQuotaStatus message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.IAccessQuotaStatus, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AccessQuotaStatus message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AccessQuotaStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.AccessQuotaStatus; + + /** + * Decodes an AccessQuotaStatus message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AccessQuotaStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.AccessQuotaStatus; + + /** + * Verifies an AccessQuotaStatus message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AccessQuotaStatus message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AccessQuotaStatus + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.AccessQuotaStatus; + + /** + * Creates a plain object from an AccessQuotaStatus message. Also converts values to other types if specified. + * @param message AccessQuotaStatus + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.AccessQuotaStatus, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AccessQuotaStatus to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AccessQuotaStatus + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Represents an AnalyticsAdminService */ + class AnalyticsAdminService extends $protobuf.rpc.Service { + + /** + * Constructs a new AnalyticsAdminService 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 AnalyticsAdminService 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): AnalyticsAdminService; + + /** + * Calls GetAccount. + * @param request GetAccountRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Account + */ + public getAccount(request: google.analytics.admin.v1alpha.IGetAccountRequest, callback: google.analytics.admin.v1alpha.AnalyticsAdminService.GetAccountCallback): void; + + /** + * Calls GetAccount. + * @param request GetAccountRequest message or plain object + * @returns Promise + */ + public getAccount(request: google.analytics.admin.v1alpha.IGetAccountRequest): Promise; + + /** + * Calls ListAccounts. + * @param request ListAccountsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListAccountsResponse + */ + public listAccounts(request: google.analytics.admin.v1alpha.IListAccountsRequest, callback: google.analytics.admin.v1alpha.AnalyticsAdminService.ListAccountsCallback): void; + + /** + * Calls ListAccounts. + * @param request ListAccountsRequest message or plain object + * @returns Promise + */ + public listAccounts(request: google.analytics.admin.v1alpha.IListAccountsRequest): Promise; + + /** + * Calls DeleteAccount. + * @param request DeleteAccountRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteAccount(request: google.analytics.admin.v1alpha.IDeleteAccountRequest, callback: google.analytics.admin.v1alpha.AnalyticsAdminService.DeleteAccountCallback): void; + + /** + * Calls DeleteAccount. + * @param request DeleteAccountRequest message or plain object + * @returns Promise + */ + public deleteAccount(request: google.analytics.admin.v1alpha.IDeleteAccountRequest): Promise; + + /** + * Calls UpdateAccount. + * @param request UpdateAccountRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Account + */ + public updateAccount(request: google.analytics.admin.v1alpha.IUpdateAccountRequest, callback: google.analytics.admin.v1alpha.AnalyticsAdminService.UpdateAccountCallback): void; + + /** + * Calls UpdateAccount. + * @param request UpdateAccountRequest message or plain object + * @returns Promise + */ + public updateAccount(request: google.analytics.admin.v1alpha.IUpdateAccountRequest): Promise; + + /** + * Calls ProvisionAccountTicket. + * @param request ProvisionAccountTicketRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ProvisionAccountTicketResponse + */ + public provisionAccountTicket(request: google.analytics.admin.v1alpha.IProvisionAccountTicketRequest, callback: google.analytics.admin.v1alpha.AnalyticsAdminService.ProvisionAccountTicketCallback): void; + + /** + * Calls ProvisionAccountTicket. + * @param request ProvisionAccountTicketRequest message or plain object + * @returns Promise + */ + public provisionAccountTicket(request: google.analytics.admin.v1alpha.IProvisionAccountTicketRequest): Promise; + + /** + * Calls ListAccountSummaries. + * @param request ListAccountSummariesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListAccountSummariesResponse + */ + public listAccountSummaries(request: google.analytics.admin.v1alpha.IListAccountSummariesRequest, callback: google.analytics.admin.v1alpha.AnalyticsAdminService.ListAccountSummariesCallback): void; + + /** + * Calls ListAccountSummaries. + * @param request ListAccountSummariesRequest message or plain object + * @returns Promise + */ + public listAccountSummaries(request: google.analytics.admin.v1alpha.IListAccountSummariesRequest): Promise; + + /** + * Calls GetProperty. + * @param request GetPropertyRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Property + */ + public getProperty(request: google.analytics.admin.v1alpha.IGetPropertyRequest, callback: google.analytics.admin.v1alpha.AnalyticsAdminService.GetPropertyCallback): void; + + /** + * Calls GetProperty. + * @param request GetPropertyRequest message or plain object + * @returns Promise + */ + public getProperty(request: google.analytics.admin.v1alpha.IGetPropertyRequest): Promise; + + /** + * Calls ListProperties. + * @param request ListPropertiesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListPropertiesResponse + */ + public listProperties(request: google.analytics.admin.v1alpha.IListPropertiesRequest, callback: google.analytics.admin.v1alpha.AnalyticsAdminService.ListPropertiesCallback): void; + + /** + * Calls ListProperties. + * @param request ListPropertiesRequest message or plain object + * @returns Promise + */ + public listProperties(request: google.analytics.admin.v1alpha.IListPropertiesRequest): Promise; + + /** + * Calls CreateProperty. + * @param request CreatePropertyRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Property + */ + public createProperty(request: google.analytics.admin.v1alpha.ICreatePropertyRequest, callback: google.analytics.admin.v1alpha.AnalyticsAdminService.CreatePropertyCallback): void; + + /** + * Calls CreateProperty. + * @param request CreatePropertyRequest message or plain object + * @returns Promise + */ + public createProperty(request: google.analytics.admin.v1alpha.ICreatePropertyRequest): Promise; + + /** + * Calls DeleteProperty. + * @param request DeletePropertyRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Property + */ + public deleteProperty(request: google.analytics.admin.v1alpha.IDeletePropertyRequest, callback: google.analytics.admin.v1alpha.AnalyticsAdminService.DeletePropertyCallback): void; + + /** + * Calls DeleteProperty. + * @param request DeletePropertyRequest message or plain object + * @returns Promise + */ + public deleteProperty(request: google.analytics.admin.v1alpha.IDeletePropertyRequest): Promise; + + /** + * Calls UpdateProperty. + * @param request UpdatePropertyRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Property + */ + public updateProperty(request: google.analytics.admin.v1alpha.IUpdatePropertyRequest, callback: google.analytics.admin.v1alpha.AnalyticsAdminService.UpdatePropertyCallback): void; + + /** + * Calls UpdateProperty. + * @param request UpdatePropertyRequest message or plain object + * @returns Promise + */ + public updateProperty(request: google.analytics.admin.v1alpha.IUpdatePropertyRequest): Promise; + + /** + * Calls GetUserLink. + * @param request GetUserLinkRequest message or plain object + * @param callback Node-style callback called with the error, if any, and UserLink + */ + public getUserLink(request: google.analytics.admin.v1alpha.IGetUserLinkRequest, callback: google.analytics.admin.v1alpha.AnalyticsAdminService.GetUserLinkCallback): void; + + /** + * Calls GetUserLink. + * @param request GetUserLinkRequest message or plain object + * @returns Promise + */ + public getUserLink(request: google.analytics.admin.v1alpha.IGetUserLinkRequest): Promise; + + /** + * Calls BatchGetUserLinks. + * @param request BatchGetUserLinksRequest message or plain object + * @param callback Node-style callback called with the error, if any, and BatchGetUserLinksResponse + */ + public batchGetUserLinks(request: google.analytics.admin.v1alpha.IBatchGetUserLinksRequest, callback: google.analytics.admin.v1alpha.AnalyticsAdminService.BatchGetUserLinksCallback): void; + + /** + * Calls BatchGetUserLinks. + * @param request BatchGetUserLinksRequest message or plain object + * @returns Promise + */ + public batchGetUserLinks(request: google.analytics.admin.v1alpha.IBatchGetUserLinksRequest): Promise; + + /** + * Calls ListUserLinks. + * @param request ListUserLinksRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListUserLinksResponse + */ + public listUserLinks(request: google.analytics.admin.v1alpha.IListUserLinksRequest, callback: google.analytics.admin.v1alpha.AnalyticsAdminService.ListUserLinksCallback): void; + + /** + * Calls ListUserLinks. + * @param request ListUserLinksRequest message or plain object + * @returns Promise + */ + public listUserLinks(request: google.analytics.admin.v1alpha.IListUserLinksRequest): Promise; + + /** + * Calls AuditUserLinks. + * @param request AuditUserLinksRequest message or plain object + * @param callback Node-style callback called with the error, if any, and AuditUserLinksResponse + */ + public auditUserLinks(request: google.analytics.admin.v1alpha.IAuditUserLinksRequest, callback: google.analytics.admin.v1alpha.AnalyticsAdminService.AuditUserLinksCallback): void; + + /** + * Calls AuditUserLinks. + * @param request AuditUserLinksRequest message or plain object + * @returns Promise + */ + public auditUserLinks(request: google.analytics.admin.v1alpha.IAuditUserLinksRequest): Promise; + + /** + * Calls CreateUserLink. + * @param request CreateUserLinkRequest message or plain object + * @param callback Node-style callback called with the error, if any, and UserLink + */ + public createUserLink(request: google.analytics.admin.v1alpha.ICreateUserLinkRequest, callback: google.analytics.admin.v1alpha.AnalyticsAdminService.CreateUserLinkCallback): void; + + /** + * Calls CreateUserLink. + * @param request CreateUserLinkRequest message or plain object + * @returns Promise + */ + public createUserLink(request: google.analytics.admin.v1alpha.ICreateUserLinkRequest): Promise; + + /** + * Calls BatchCreateUserLinks. + * @param request BatchCreateUserLinksRequest message or plain object + * @param callback Node-style callback called with the error, if any, and BatchCreateUserLinksResponse + */ + public batchCreateUserLinks(request: google.analytics.admin.v1alpha.IBatchCreateUserLinksRequest, callback: google.analytics.admin.v1alpha.AnalyticsAdminService.BatchCreateUserLinksCallback): void; + + /** + * Calls BatchCreateUserLinks. + * @param request BatchCreateUserLinksRequest message or plain object + * @returns Promise + */ + public batchCreateUserLinks(request: google.analytics.admin.v1alpha.IBatchCreateUserLinksRequest): Promise; + + /** + * Calls UpdateUserLink. + * @param request UpdateUserLinkRequest message or plain object + * @param callback Node-style callback called with the error, if any, and UserLink + */ + public updateUserLink(request: google.analytics.admin.v1alpha.IUpdateUserLinkRequest, callback: google.analytics.admin.v1alpha.AnalyticsAdminService.UpdateUserLinkCallback): void; + + /** + * Calls UpdateUserLink. + * @param request UpdateUserLinkRequest message or plain object + * @returns Promise + */ + public updateUserLink(request: google.analytics.admin.v1alpha.IUpdateUserLinkRequest): Promise; + + /** + * Calls BatchUpdateUserLinks. + * @param request BatchUpdateUserLinksRequest message or plain object + * @param callback Node-style callback called with the error, if any, and BatchUpdateUserLinksResponse + */ + public batchUpdateUserLinks(request: google.analytics.admin.v1alpha.IBatchUpdateUserLinksRequest, callback: google.analytics.admin.v1alpha.AnalyticsAdminService.BatchUpdateUserLinksCallback): void; + + /** + * Calls BatchUpdateUserLinks. + * @param request BatchUpdateUserLinksRequest message or plain object + * @returns Promise + */ + public batchUpdateUserLinks(request: google.analytics.admin.v1alpha.IBatchUpdateUserLinksRequest): Promise; + + /** + * Calls DeleteUserLink. + * @param request DeleteUserLinkRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteUserLink(request: google.analytics.admin.v1alpha.IDeleteUserLinkRequest, callback: google.analytics.admin.v1alpha.AnalyticsAdminService.DeleteUserLinkCallback): void; + + /** + * Calls DeleteUserLink. + * @param request DeleteUserLinkRequest message or plain object + * @returns Promise + */ + public deleteUserLink(request: google.analytics.admin.v1alpha.IDeleteUserLinkRequest): Promise; + + /** + * Calls BatchDeleteUserLinks. + * @param request BatchDeleteUserLinksRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public batchDeleteUserLinks(request: google.analytics.admin.v1alpha.IBatchDeleteUserLinksRequest, callback: google.analytics.admin.v1alpha.AnalyticsAdminService.BatchDeleteUserLinksCallback): void; + + /** + * Calls BatchDeleteUserLinks. + * @param request BatchDeleteUserLinksRequest message or plain object + * @returns Promise + */ + public batchDeleteUserLinks(request: google.analytics.admin.v1alpha.IBatchDeleteUserLinksRequest): Promise; + + /** + * Calls CreateFirebaseLink. + * @param request CreateFirebaseLinkRequest message or plain object + * @param callback Node-style callback called with the error, if any, and FirebaseLink + */ + public createFirebaseLink(request: google.analytics.admin.v1alpha.ICreateFirebaseLinkRequest, callback: google.analytics.admin.v1alpha.AnalyticsAdminService.CreateFirebaseLinkCallback): void; + + /** + * Calls CreateFirebaseLink. + * @param request CreateFirebaseLinkRequest message or plain object + * @returns Promise + */ + public createFirebaseLink(request: google.analytics.admin.v1alpha.ICreateFirebaseLinkRequest): Promise; + + /** + * Calls DeleteFirebaseLink. + * @param request DeleteFirebaseLinkRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteFirebaseLink(request: google.analytics.admin.v1alpha.IDeleteFirebaseLinkRequest, callback: google.analytics.admin.v1alpha.AnalyticsAdminService.DeleteFirebaseLinkCallback): void; + + /** + * Calls DeleteFirebaseLink. + * @param request DeleteFirebaseLinkRequest message or plain object + * @returns Promise + */ + public deleteFirebaseLink(request: google.analytics.admin.v1alpha.IDeleteFirebaseLinkRequest): Promise; + + /** + * Calls ListFirebaseLinks. + * @param request ListFirebaseLinksRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListFirebaseLinksResponse + */ + public listFirebaseLinks(request: google.analytics.admin.v1alpha.IListFirebaseLinksRequest, callback: google.analytics.admin.v1alpha.AnalyticsAdminService.ListFirebaseLinksCallback): void; + + /** + * Calls ListFirebaseLinks. + * @param request ListFirebaseLinksRequest message or plain object + * @returns Promise + */ + public listFirebaseLinks(request: google.analytics.admin.v1alpha.IListFirebaseLinksRequest): Promise; + + /** + * Calls GetGlobalSiteTag. + * @param request GetGlobalSiteTagRequest message or plain object + * @param callback Node-style callback called with the error, if any, and GlobalSiteTag + */ + public getGlobalSiteTag(request: google.analytics.admin.v1alpha.IGetGlobalSiteTagRequest, callback: google.analytics.admin.v1alpha.AnalyticsAdminService.GetGlobalSiteTagCallback): void; + + /** + * Calls GetGlobalSiteTag. + * @param request GetGlobalSiteTagRequest message or plain object + * @returns Promise + */ + public getGlobalSiteTag(request: google.analytics.admin.v1alpha.IGetGlobalSiteTagRequest): Promise; + + /** + * Calls CreateGoogleAdsLink. + * @param request CreateGoogleAdsLinkRequest message or plain object + * @param callback Node-style callback called with the error, if any, and GoogleAdsLink + */ + public createGoogleAdsLink(request: google.analytics.admin.v1alpha.ICreateGoogleAdsLinkRequest, callback: google.analytics.admin.v1alpha.AnalyticsAdminService.CreateGoogleAdsLinkCallback): void; + + /** + * Calls CreateGoogleAdsLink. + * @param request CreateGoogleAdsLinkRequest message or plain object + * @returns Promise + */ + public createGoogleAdsLink(request: google.analytics.admin.v1alpha.ICreateGoogleAdsLinkRequest): Promise; + + /** + * Calls UpdateGoogleAdsLink. + * @param request UpdateGoogleAdsLinkRequest message or plain object + * @param callback Node-style callback called with the error, if any, and GoogleAdsLink + */ + public updateGoogleAdsLink(request: google.analytics.admin.v1alpha.IUpdateGoogleAdsLinkRequest, callback: google.analytics.admin.v1alpha.AnalyticsAdminService.UpdateGoogleAdsLinkCallback): void; + + /** + * Calls UpdateGoogleAdsLink. + * @param request UpdateGoogleAdsLinkRequest message or plain object + * @returns Promise + */ + public updateGoogleAdsLink(request: google.analytics.admin.v1alpha.IUpdateGoogleAdsLinkRequest): Promise; + + /** + * Calls DeleteGoogleAdsLink. + * @param request DeleteGoogleAdsLinkRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteGoogleAdsLink(request: google.analytics.admin.v1alpha.IDeleteGoogleAdsLinkRequest, callback: google.analytics.admin.v1alpha.AnalyticsAdminService.DeleteGoogleAdsLinkCallback): void; + + /** + * Calls DeleteGoogleAdsLink. + * @param request DeleteGoogleAdsLinkRequest message or plain object + * @returns Promise + */ + public deleteGoogleAdsLink(request: google.analytics.admin.v1alpha.IDeleteGoogleAdsLinkRequest): Promise; + + /** + * Calls ListGoogleAdsLinks. + * @param request ListGoogleAdsLinksRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListGoogleAdsLinksResponse + */ + public listGoogleAdsLinks(request: google.analytics.admin.v1alpha.IListGoogleAdsLinksRequest, callback: google.analytics.admin.v1alpha.AnalyticsAdminService.ListGoogleAdsLinksCallback): void; + + /** + * Calls ListGoogleAdsLinks. + * @param request ListGoogleAdsLinksRequest message or plain object + * @returns Promise + */ + public listGoogleAdsLinks(request: google.analytics.admin.v1alpha.IListGoogleAdsLinksRequest): Promise; + + /** + * Calls GetDataSharingSettings. + * @param request GetDataSharingSettingsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and DataSharingSettings + */ + public getDataSharingSettings(request: google.analytics.admin.v1alpha.IGetDataSharingSettingsRequest, callback: google.analytics.admin.v1alpha.AnalyticsAdminService.GetDataSharingSettingsCallback): void; + + /** + * Calls GetDataSharingSettings. + * @param request GetDataSharingSettingsRequest message or plain object + * @returns Promise + */ + public getDataSharingSettings(request: google.analytics.admin.v1alpha.IGetDataSharingSettingsRequest): Promise; + + /** + * Calls GetMeasurementProtocolSecret. + * @param request GetMeasurementProtocolSecretRequest message or plain object + * @param callback Node-style callback called with the error, if any, and MeasurementProtocolSecret + */ + public getMeasurementProtocolSecret(request: google.analytics.admin.v1alpha.IGetMeasurementProtocolSecretRequest, callback: google.analytics.admin.v1alpha.AnalyticsAdminService.GetMeasurementProtocolSecretCallback): void; + + /** + * Calls GetMeasurementProtocolSecret. + * @param request GetMeasurementProtocolSecretRequest message or plain object + * @returns Promise + */ + public getMeasurementProtocolSecret(request: google.analytics.admin.v1alpha.IGetMeasurementProtocolSecretRequest): Promise; + + /** + * Calls ListMeasurementProtocolSecrets. + * @param request ListMeasurementProtocolSecretsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListMeasurementProtocolSecretsResponse + */ + public listMeasurementProtocolSecrets(request: google.analytics.admin.v1alpha.IListMeasurementProtocolSecretsRequest, callback: google.analytics.admin.v1alpha.AnalyticsAdminService.ListMeasurementProtocolSecretsCallback): void; + + /** + * Calls ListMeasurementProtocolSecrets. + * @param request ListMeasurementProtocolSecretsRequest message or plain object + * @returns Promise + */ + public listMeasurementProtocolSecrets(request: google.analytics.admin.v1alpha.IListMeasurementProtocolSecretsRequest): Promise; + + /** + * Calls CreateMeasurementProtocolSecret. + * @param request CreateMeasurementProtocolSecretRequest message or plain object + * @param callback Node-style callback called with the error, if any, and MeasurementProtocolSecret + */ + public createMeasurementProtocolSecret(request: google.analytics.admin.v1alpha.ICreateMeasurementProtocolSecretRequest, callback: google.analytics.admin.v1alpha.AnalyticsAdminService.CreateMeasurementProtocolSecretCallback): void; + + /** + * Calls CreateMeasurementProtocolSecret. + * @param request CreateMeasurementProtocolSecretRequest message or plain object + * @returns Promise + */ + public createMeasurementProtocolSecret(request: google.analytics.admin.v1alpha.ICreateMeasurementProtocolSecretRequest): Promise; + + /** + * Calls DeleteMeasurementProtocolSecret. + * @param request DeleteMeasurementProtocolSecretRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteMeasurementProtocolSecret(request: google.analytics.admin.v1alpha.IDeleteMeasurementProtocolSecretRequest, callback: google.analytics.admin.v1alpha.AnalyticsAdminService.DeleteMeasurementProtocolSecretCallback): void; + + /** + * Calls DeleteMeasurementProtocolSecret. + * @param request DeleteMeasurementProtocolSecretRequest message or plain object + * @returns Promise + */ + public deleteMeasurementProtocolSecret(request: google.analytics.admin.v1alpha.IDeleteMeasurementProtocolSecretRequest): Promise; + + /** + * Calls UpdateMeasurementProtocolSecret. + * @param request UpdateMeasurementProtocolSecretRequest message or plain object + * @param callback Node-style callback called with the error, if any, and MeasurementProtocolSecret + */ + public updateMeasurementProtocolSecret(request: google.analytics.admin.v1alpha.IUpdateMeasurementProtocolSecretRequest, callback: google.analytics.admin.v1alpha.AnalyticsAdminService.UpdateMeasurementProtocolSecretCallback): void; + + /** + * Calls UpdateMeasurementProtocolSecret. + * @param request UpdateMeasurementProtocolSecretRequest message or plain object + * @returns Promise + */ + public updateMeasurementProtocolSecret(request: google.analytics.admin.v1alpha.IUpdateMeasurementProtocolSecretRequest): Promise; + + /** + * Calls AcknowledgeUserDataCollection. + * @param request AcknowledgeUserDataCollectionRequest message or plain object + * @param callback Node-style callback called with the error, if any, and AcknowledgeUserDataCollectionResponse + */ + public acknowledgeUserDataCollection(request: google.analytics.admin.v1alpha.IAcknowledgeUserDataCollectionRequest, callback: google.analytics.admin.v1alpha.AnalyticsAdminService.AcknowledgeUserDataCollectionCallback): void; + + /** + * Calls AcknowledgeUserDataCollection. + * @param request AcknowledgeUserDataCollectionRequest message or plain object + * @returns Promise + */ + public acknowledgeUserDataCollection(request: google.analytics.admin.v1alpha.IAcknowledgeUserDataCollectionRequest): Promise; + + /** + * Calls SearchChangeHistoryEvents. + * @param request SearchChangeHistoryEventsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and SearchChangeHistoryEventsResponse + */ + public searchChangeHistoryEvents(request: google.analytics.admin.v1alpha.ISearchChangeHistoryEventsRequest, callback: google.analytics.admin.v1alpha.AnalyticsAdminService.SearchChangeHistoryEventsCallback): void; + + /** + * Calls SearchChangeHistoryEvents. + * @param request SearchChangeHistoryEventsRequest message or plain object + * @returns Promise + */ + public searchChangeHistoryEvents(request: google.analytics.admin.v1alpha.ISearchChangeHistoryEventsRequest): Promise; + + /** + * Calls GetGoogleSignalsSettings. + * @param request GetGoogleSignalsSettingsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and GoogleSignalsSettings + */ + public getGoogleSignalsSettings(request: google.analytics.admin.v1alpha.IGetGoogleSignalsSettingsRequest, callback: google.analytics.admin.v1alpha.AnalyticsAdminService.GetGoogleSignalsSettingsCallback): void; + + /** + * Calls GetGoogleSignalsSettings. + * @param request GetGoogleSignalsSettingsRequest message or plain object + * @returns Promise + */ + public getGoogleSignalsSettings(request: google.analytics.admin.v1alpha.IGetGoogleSignalsSettingsRequest): Promise; + + /** + * Calls UpdateGoogleSignalsSettings. + * @param request UpdateGoogleSignalsSettingsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and GoogleSignalsSettings + */ + public updateGoogleSignalsSettings(request: google.analytics.admin.v1alpha.IUpdateGoogleSignalsSettingsRequest, callback: google.analytics.admin.v1alpha.AnalyticsAdminService.UpdateGoogleSignalsSettingsCallback): void; + + /** + * Calls UpdateGoogleSignalsSettings. + * @param request UpdateGoogleSignalsSettingsRequest message or plain object + * @returns Promise + */ + public updateGoogleSignalsSettings(request: google.analytics.admin.v1alpha.IUpdateGoogleSignalsSettingsRequest): Promise; + + /** + * Calls CreateConversionEvent. + * @param request CreateConversionEventRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ConversionEvent + */ + public createConversionEvent(request: google.analytics.admin.v1alpha.ICreateConversionEventRequest, callback: google.analytics.admin.v1alpha.AnalyticsAdminService.CreateConversionEventCallback): void; + + /** + * Calls CreateConversionEvent. + * @param request CreateConversionEventRequest message or plain object + * @returns Promise + */ + public createConversionEvent(request: google.analytics.admin.v1alpha.ICreateConversionEventRequest): Promise; + + /** + * Calls GetConversionEvent. + * @param request GetConversionEventRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ConversionEvent + */ + public getConversionEvent(request: google.analytics.admin.v1alpha.IGetConversionEventRequest, callback: google.analytics.admin.v1alpha.AnalyticsAdminService.GetConversionEventCallback): void; + + /** + * Calls GetConversionEvent. + * @param request GetConversionEventRequest message or plain object + * @returns Promise + */ + public getConversionEvent(request: google.analytics.admin.v1alpha.IGetConversionEventRequest): Promise; + + /** + * Calls DeleteConversionEvent. + * @param request DeleteConversionEventRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteConversionEvent(request: google.analytics.admin.v1alpha.IDeleteConversionEventRequest, callback: google.analytics.admin.v1alpha.AnalyticsAdminService.DeleteConversionEventCallback): void; + + /** + * Calls DeleteConversionEvent. + * @param request DeleteConversionEventRequest message or plain object + * @returns Promise + */ + public deleteConversionEvent(request: google.analytics.admin.v1alpha.IDeleteConversionEventRequest): Promise; + + /** + * Calls ListConversionEvents. + * @param request ListConversionEventsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListConversionEventsResponse + */ + public listConversionEvents(request: google.analytics.admin.v1alpha.IListConversionEventsRequest, callback: google.analytics.admin.v1alpha.AnalyticsAdminService.ListConversionEventsCallback): void; + + /** + * Calls ListConversionEvents. + * @param request ListConversionEventsRequest message or plain object + * @returns Promise + */ + public listConversionEvents(request: google.analytics.admin.v1alpha.IListConversionEventsRequest): Promise; + + /** + * Calls GetDisplayVideo360AdvertiserLink. + * @param request GetDisplayVideo360AdvertiserLinkRequest message or plain object + * @param callback Node-style callback called with the error, if any, and DisplayVideo360AdvertiserLink + */ + public getDisplayVideo360AdvertiserLink(request: google.analytics.admin.v1alpha.IGetDisplayVideo360AdvertiserLinkRequest, callback: google.analytics.admin.v1alpha.AnalyticsAdminService.GetDisplayVideo360AdvertiserLinkCallback): void; + + /** + * Calls GetDisplayVideo360AdvertiserLink. + * @param request GetDisplayVideo360AdvertiserLinkRequest message or plain object + * @returns Promise + */ + public getDisplayVideo360AdvertiserLink(request: google.analytics.admin.v1alpha.IGetDisplayVideo360AdvertiserLinkRequest): Promise; + + /** + * Calls ListDisplayVideo360AdvertiserLinks. + * @param request ListDisplayVideo360AdvertiserLinksRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListDisplayVideo360AdvertiserLinksResponse + */ + public listDisplayVideo360AdvertiserLinks(request: google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinksRequest, callback: google.analytics.admin.v1alpha.AnalyticsAdminService.ListDisplayVideo360AdvertiserLinksCallback): void; + + /** + * Calls ListDisplayVideo360AdvertiserLinks. + * @param request ListDisplayVideo360AdvertiserLinksRequest message or plain object + * @returns Promise + */ + public listDisplayVideo360AdvertiserLinks(request: google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinksRequest): Promise; + + /** + * Calls CreateDisplayVideo360AdvertiserLink. + * @param request CreateDisplayVideo360AdvertiserLinkRequest message or plain object + * @param callback Node-style callback called with the error, if any, and DisplayVideo360AdvertiserLink + */ + public createDisplayVideo360AdvertiserLink(request: google.analytics.admin.v1alpha.ICreateDisplayVideo360AdvertiserLinkRequest, callback: google.analytics.admin.v1alpha.AnalyticsAdminService.CreateDisplayVideo360AdvertiserLinkCallback): void; + + /** + * Calls CreateDisplayVideo360AdvertiserLink. + * @param request CreateDisplayVideo360AdvertiserLinkRequest message or plain object + * @returns Promise + */ + public createDisplayVideo360AdvertiserLink(request: google.analytics.admin.v1alpha.ICreateDisplayVideo360AdvertiserLinkRequest): Promise; + + /** + * Calls DeleteDisplayVideo360AdvertiserLink. + * @param request DeleteDisplayVideo360AdvertiserLinkRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteDisplayVideo360AdvertiserLink(request: google.analytics.admin.v1alpha.IDeleteDisplayVideo360AdvertiserLinkRequest, callback: google.analytics.admin.v1alpha.AnalyticsAdminService.DeleteDisplayVideo360AdvertiserLinkCallback): void; + + /** + * Calls DeleteDisplayVideo360AdvertiserLink. + * @param request DeleteDisplayVideo360AdvertiserLinkRequest message or plain object + * @returns Promise + */ + public deleteDisplayVideo360AdvertiserLink(request: google.analytics.admin.v1alpha.IDeleteDisplayVideo360AdvertiserLinkRequest): Promise; + + /** + * Calls UpdateDisplayVideo360AdvertiserLink. + * @param request UpdateDisplayVideo360AdvertiserLinkRequest message or plain object + * @param callback Node-style callback called with the error, if any, and DisplayVideo360AdvertiserLink + */ + public updateDisplayVideo360AdvertiserLink(request: google.analytics.admin.v1alpha.IUpdateDisplayVideo360AdvertiserLinkRequest, callback: google.analytics.admin.v1alpha.AnalyticsAdminService.UpdateDisplayVideo360AdvertiserLinkCallback): void; + + /** + * Calls UpdateDisplayVideo360AdvertiserLink. + * @param request UpdateDisplayVideo360AdvertiserLinkRequest message or plain object + * @returns Promise + */ + public updateDisplayVideo360AdvertiserLink(request: google.analytics.admin.v1alpha.IUpdateDisplayVideo360AdvertiserLinkRequest): Promise; + + /** + * Calls GetDisplayVideo360AdvertiserLinkProposal. + * @param request GetDisplayVideo360AdvertiserLinkProposalRequest message or plain object + * @param callback Node-style callback called with the error, if any, and DisplayVideo360AdvertiserLinkProposal + */ + public getDisplayVideo360AdvertiserLinkProposal(request: google.analytics.admin.v1alpha.IGetDisplayVideo360AdvertiserLinkProposalRequest, callback: google.analytics.admin.v1alpha.AnalyticsAdminService.GetDisplayVideo360AdvertiserLinkProposalCallback): void; + + /** + * Calls GetDisplayVideo360AdvertiserLinkProposal. + * @param request GetDisplayVideo360AdvertiserLinkProposalRequest message or plain object + * @returns Promise + */ + public getDisplayVideo360AdvertiserLinkProposal(request: google.analytics.admin.v1alpha.IGetDisplayVideo360AdvertiserLinkProposalRequest): Promise; + + /** + * Calls ListDisplayVideo360AdvertiserLinkProposals. + * @param request ListDisplayVideo360AdvertiserLinkProposalsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListDisplayVideo360AdvertiserLinkProposalsResponse + */ + public listDisplayVideo360AdvertiserLinkProposals(request: google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinkProposalsRequest, callback: google.analytics.admin.v1alpha.AnalyticsAdminService.ListDisplayVideo360AdvertiserLinkProposalsCallback): void; + + /** + * Calls ListDisplayVideo360AdvertiserLinkProposals. + * @param request ListDisplayVideo360AdvertiserLinkProposalsRequest message or plain object + * @returns Promise + */ + public listDisplayVideo360AdvertiserLinkProposals(request: google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinkProposalsRequest): Promise; + + /** + * Calls CreateDisplayVideo360AdvertiserLinkProposal. + * @param request CreateDisplayVideo360AdvertiserLinkProposalRequest message or plain object + * @param callback Node-style callback called with the error, if any, and DisplayVideo360AdvertiserLinkProposal + */ + public createDisplayVideo360AdvertiserLinkProposal(request: google.analytics.admin.v1alpha.ICreateDisplayVideo360AdvertiserLinkProposalRequest, callback: google.analytics.admin.v1alpha.AnalyticsAdminService.CreateDisplayVideo360AdvertiserLinkProposalCallback): void; + + /** + * Calls CreateDisplayVideo360AdvertiserLinkProposal. + * @param request CreateDisplayVideo360AdvertiserLinkProposalRequest message or plain object + * @returns Promise + */ + public createDisplayVideo360AdvertiserLinkProposal(request: google.analytics.admin.v1alpha.ICreateDisplayVideo360AdvertiserLinkProposalRequest): Promise; + + /** + * Calls DeleteDisplayVideo360AdvertiserLinkProposal. + * @param request DeleteDisplayVideo360AdvertiserLinkProposalRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteDisplayVideo360AdvertiserLinkProposal(request: google.analytics.admin.v1alpha.IDeleteDisplayVideo360AdvertiserLinkProposalRequest, callback: google.analytics.admin.v1alpha.AnalyticsAdminService.DeleteDisplayVideo360AdvertiserLinkProposalCallback): void; + + /** + * Calls DeleteDisplayVideo360AdvertiserLinkProposal. + * @param request DeleteDisplayVideo360AdvertiserLinkProposalRequest message or plain object + * @returns Promise + */ + public deleteDisplayVideo360AdvertiserLinkProposal(request: google.analytics.admin.v1alpha.IDeleteDisplayVideo360AdvertiserLinkProposalRequest): Promise; + + /** + * Calls ApproveDisplayVideo360AdvertiserLinkProposal. + * @param request ApproveDisplayVideo360AdvertiserLinkProposalRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ApproveDisplayVideo360AdvertiserLinkProposalResponse + */ + public approveDisplayVideo360AdvertiserLinkProposal(request: google.analytics.admin.v1alpha.IApproveDisplayVideo360AdvertiserLinkProposalRequest, callback: google.analytics.admin.v1alpha.AnalyticsAdminService.ApproveDisplayVideo360AdvertiserLinkProposalCallback): void; + + /** + * Calls ApproveDisplayVideo360AdvertiserLinkProposal. + * @param request ApproveDisplayVideo360AdvertiserLinkProposalRequest message or plain object + * @returns Promise + */ + public approveDisplayVideo360AdvertiserLinkProposal(request: google.analytics.admin.v1alpha.IApproveDisplayVideo360AdvertiserLinkProposalRequest): Promise; + + /** + * Calls CancelDisplayVideo360AdvertiserLinkProposal. + * @param request CancelDisplayVideo360AdvertiserLinkProposalRequest message or plain object + * @param callback Node-style callback called with the error, if any, and DisplayVideo360AdvertiserLinkProposal + */ + public cancelDisplayVideo360AdvertiserLinkProposal(request: google.analytics.admin.v1alpha.ICancelDisplayVideo360AdvertiserLinkProposalRequest, callback: google.analytics.admin.v1alpha.AnalyticsAdminService.CancelDisplayVideo360AdvertiserLinkProposalCallback): void; + + /** + * Calls CancelDisplayVideo360AdvertiserLinkProposal. + * @param request CancelDisplayVideo360AdvertiserLinkProposalRequest message or plain object + * @returns Promise + */ + public cancelDisplayVideo360AdvertiserLinkProposal(request: google.analytics.admin.v1alpha.ICancelDisplayVideo360AdvertiserLinkProposalRequest): Promise; + + /** + * Calls CreateCustomDimension. + * @param request CreateCustomDimensionRequest message or plain object + * @param callback Node-style callback called with the error, if any, and CustomDimension + */ + public createCustomDimension(request: google.analytics.admin.v1alpha.ICreateCustomDimensionRequest, callback: google.analytics.admin.v1alpha.AnalyticsAdminService.CreateCustomDimensionCallback): void; + + /** + * Calls CreateCustomDimension. + * @param request CreateCustomDimensionRequest message or plain object + * @returns Promise + */ + public createCustomDimension(request: google.analytics.admin.v1alpha.ICreateCustomDimensionRequest): Promise; + + /** + * Calls UpdateCustomDimension. + * @param request UpdateCustomDimensionRequest message or plain object + * @param callback Node-style callback called with the error, if any, and CustomDimension + */ + public updateCustomDimension(request: google.analytics.admin.v1alpha.IUpdateCustomDimensionRequest, callback: google.analytics.admin.v1alpha.AnalyticsAdminService.UpdateCustomDimensionCallback): void; + + /** + * Calls UpdateCustomDimension. + * @param request UpdateCustomDimensionRequest message or plain object + * @returns Promise + */ + public updateCustomDimension(request: google.analytics.admin.v1alpha.IUpdateCustomDimensionRequest): Promise; + + /** + * Calls ListCustomDimensions. + * @param request ListCustomDimensionsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListCustomDimensionsResponse + */ + public listCustomDimensions(request: google.analytics.admin.v1alpha.IListCustomDimensionsRequest, callback: google.analytics.admin.v1alpha.AnalyticsAdminService.ListCustomDimensionsCallback): void; + + /** + * Calls ListCustomDimensions. + * @param request ListCustomDimensionsRequest message or plain object + * @returns Promise + */ + public listCustomDimensions(request: google.analytics.admin.v1alpha.IListCustomDimensionsRequest): Promise; + + /** + * Calls ArchiveCustomDimension. + * @param request ArchiveCustomDimensionRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public archiveCustomDimension(request: google.analytics.admin.v1alpha.IArchiveCustomDimensionRequest, callback: google.analytics.admin.v1alpha.AnalyticsAdminService.ArchiveCustomDimensionCallback): void; + + /** + * Calls ArchiveCustomDimension. + * @param request ArchiveCustomDimensionRequest message or plain object + * @returns Promise + */ + public archiveCustomDimension(request: google.analytics.admin.v1alpha.IArchiveCustomDimensionRequest): Promise; + + /** + * Calls GetCustomDimension. + * @param request GetCustomDimensionRequest message or plain object + * @param callback Node-style callback called with the error, if any, and CustomDimension + */ + public getCustomDimension(request: google.analytics.admin.v1alpha.IGetCustomDimensionRequest, callback: google.analytics.admin.v1alpha.AnalyticsAdminService.GetCustomDimensionCallback): void; + + /** + * Calls GetCustomDimension. + * @param request GetCustomDimensionRequest message or plain object + * @returns Promise + */ + public getCustomDimension(request: google.analytics.admin.v1alpha.IGetCustomDimensionRequest): Promise; + + /** + * Calls CreateCustomMetric. + * @param request CreateCustomMetricRequest message or plain object + * @param callback Node-style callback called with the error, if any, and CustomMetric + */ + public createCustomMetric(request: google.analytics.admin.v1alpha.ICreateCustomMetricRequest, callback: google.analytics.admin.v1alpha.AnalyticsAdminService.CreateCustomMetricCallback): void; + + /** + * Calls CreateCustomMetric. + * @param request CreateCustomMetricRequest message or plain object + * @returns Promise + */ + public createCustomMetric(request: google.analytics.admin.v1alpha.ICreateCustomMetricRequest): Promise; + + /** + * Calls UpdateCustomMetric. + * @param request UpdateCustomMetricRequest message or plain object + * @param callback Node-style callback called with the error, if any, and CustomMetric + */ + public updateCustomMetric(request: google.analytics.admin.v1alpha.IUpdateCustomMetricRequest, callback: google.analytics.admin.v1alpha.AnalyticsAdminService.UpdateCustomMetricCallback): void; + + /** + * Calls UpdateCustomMetric. + * @param request UpdateCustomMetricRequest message or plain object + * @returns Promise + */ + public updateCustomMetric(request: google.analytics.admin.v1alpha.IUpdateCustomMetricRequest): Promise; + + /** + * Calls ListCustomMetrics. + * @param request ListCustomMetricsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListCustomMetricsResponse + */ + public listCustomMetrics(request: google.analytics.admin.v1alpha.IListCustomMetricsRequest, callback: google.analytics.admin.v1alpha.AnalyticsAdminService.ListCustomMetricsCallback): void; + + /** + * Calls ListCustomMetrics. + * @param request ListCustomMetricsRequest message or plain object + * @returns Promise + */ + public listCustomMetrics(request: google.analytics.admin.v1alpha.IListCustomMetricsRequest): Promise; + + /** + * Calls ArchiveCustomMetric. + * @param request ArchiveCustomMetricRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public archiveCustomMetric(request: google.analytics.admin.v1alpha.IArchiveCustomMetricRequest, callback: google.analytics.admin.v1alpha.AnalyticsAdminService.ArchiveCustomMetricCallback): void; + + /** + * Calls ArchiveCustomMetric. + * @param request ArchiveCustomMetricRequest message or plain object + * @returns Promise + */ + public archiveCustomMetric(request: google.analytics.admin.v1alpha.IArchiveCustomMetricRequest): Promise; + + /** + * Calls GetCustomMetric. + * @param request GetCustomMetricRequest message or plain object + * @param callback Node-style callback called with the error, if any, and CustomMetric + */ + public getCustomMetric(request: google.analytics.admin.v1alpha.IGetCustomMetricRequest, callback: google.analytics.admin.v1alpha.AnalyticsAdminService.GetCustomMetricCallback): void; + + /** + * Calls GetCustomMetric. + * @param request GetCustomMetricRequest message or plain object + * @returns Promise + */ + public getCustomMetric(request: google.analytics.admin.v1alpha.IGetCustomMetricRequest): Promise; + + /** + * Calls GetDataRetentionSettings. + * @param request GetDataRetentionSettingsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and DataRetentionSettings + */ + public getDataRetentionSettings(request: google.analytics.admin.v1alpha.IGetDataRetentionSettingsRequest, callback: google.analytics.admin.v1alpha.AnalyticsAdminService.GetDataRetentionSettingsCallback): void; + + /** + * Calls GetDataRetentionSettings. + * @param request GetDataRetentionSettingsRequest message or plain object + * @returns Promise + */ + public getDataRetentionSettings(request: google.analytics.admin.v1alpha.IGetDataRetentionSettingsRequest): Promise; + + /** + * Calls UpdateDataRetentionSettings. + * @param request UpdateDataRetentionSettingsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and DataRetentionSettings + */ + public updateDataRetentionSettings(request: google.analytics.admin.v1alpha.IUpdateDataRetentionSettingsRequest, callback: google.analytics.admin.v1alpha.AnalyticsAdminService.UpdateDataRetentionSettingsCallback): void; + + /** + * Calls UpdateDataRetentionSettings. + * @param request UpdateDataRetentionSettingsRequest message or plain object + * @returns Promise + */ + public updateDataRetentionSettings(request: google.analytics.admin.v1alpha.IUpdateDataRetentionSettingsRequest): Promise; + + /** + * Calls CreateDataStream. + * @param request CreateDataStreamRequest message or plain object + * @param callback Node-style callback called with the error, if any, and DataStream + */ + public createDataStream(request: google.analytics.admin.v1alpha.ICreateDataStreamRequest, callback: google.analytics.admin.v1alpha.AnalyticsAdminService.CreateDataStreamCallback): void; + + /** + * Calls CreateDataStream. + * @param request CreateDataStreamRequest message or plain object + * @returns Promise + */ + public createDataStream(request: google.analytics.admin.v1alpha.ICreateDataStreamRequest): Promise; + + /** + * Calls DeleteDataStream. + * @param request DeleteDataStreamRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteDataStream(request: google.analytics.admin.v1alpha.IDeleteDataStreamRequest, callback: google.analytics.admin.v1alpha.AnalyticsAdminService.DeleteDataStreamCallback): void; + + /** + * Calls DeleteDataStream. + * @param request DeleteDataStreamRequest message or plain object + * @returns Promise + */ + public deleteDataStream(request: google.analytics.admin.v1alpha.IDeleteDataStreamRequest): Promise; + + /** + * Calls UpdateDataStream. + * @param request UpdateDataStreamRequest message or plain object + * @param callback Node-style callback called with the error, if any, and DataStream + */ + public updateDataStream(request: google.analytics.admin.v1alpha.IUpdateDataStreamRequest, callback: google.analytics.admin.v1alpha.AnalyticsAdminService.UpdateDataStreamCallback): void; + + /** + * Calls UpdateDataStream. + * @param request UpdateDataStreamRequest message or plain object + * @returns Promise + */ + public updateDataStream(request: google.analytics.admin.v1alpha.IUpdateDataStreamRequest): Promise; + + /** + * Calls ListDataStreams. + * @param request ListDataStreamsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListDataStreamsResponse + */ + public listDataStreams(request: google.analytics.admin.v1alpha.IListDataStreamsRequest, callback: google.analytics.admin.v1alpha.AnalyticsAdminService.ListDataStreamsCallback): void; + + /** + * Calls ListDataStreams. + * @param request ListDataStreamsRequest message or plain object + * @returns Promise + */ + public listDataStreams(request: google.analytics.admin.v1alpha.IListDataStreamsRequest): Promise; + + /** + * Calls GetDataStream. + * @param request GetDataStreamRequest message or plain object + * @param callback Node-style callback called with the error, if any, and DataStream + */ + public getDataStream(request: google.analytics.admin.v1alpha.IGetDataStreamRequest, callback: google.analytics.admin.v1alpha.AnalyticsAdminService.GetDataStreamCallback): void; + + /** + * Calls GetDataStream. + * @param request GetDataStreamRequest message or plain object + * @returns Promise + */ + public getDataStream(request: google.analytics.admin.v1alpha.IGetDataStreamRequest): Promise; + + /** + * Calls GetAudience. + * @param request GetAudienceRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Audience + */ + public getAudience(request: google.analytics.admin.v1alpha.IGetAudienceRequest, callback: google.analytics.admin.v1alpha.AnalyticsAdminService.GetAudienceCallback): void; + + /** + * Calls GetAudience. + * @param request GetAudienceRequest message or plain object + * @returns Promise + */ + public getAudience(request: google.analytics.admin.v1alpha.IGetAudienceRequest): Promise; + + /** + * Calls ListAudiences. + * @param request ListAudiencesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListAudiencesResponse + */ + public listAudiences(request: google.analytics.admin.v1alpha.IListAudiencesRequest, callback: google.analytics.admin.v1alpha.AnalyticsAdminService.ListAudiencesCallback): void; + + /** + * Calls ListAudiences. + * @param request ListAudiencesRequest message or plain object + * @returns Promise + */ + public listAudiences(request: google.analytics.admin.v1alpha.IListAudiencesRequest): Promise; + + /** + * Calls CreateAudience. + * @param request CreateAudienceRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Audience + */ + public createAudience(request: google.analytics.admin.v1alpha.ICreateAudienceRequest, callback: google.analytics.admin.v1alpha.AnalyticsAdminService.CreateAudienceCallback): void; + + /** + * Calls CreateAudience. + * @param request CreateAudienceRequest message or plain object + * @returns Promise + */ + public createAudience(request: google.analytics.admin.v1alpha.ICreateAudienceRequest): Promise; + + /** + * Calls UpdateAudience. + * @param request UpdateAudienceRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Audience + */ + public updateAudience(request: google.analytics.admin.v1alpha.IUpdateAudienceRequest, callback: google.analytics.admin.v1alpha.AnalyticsAdminService.UpdateAudienceCallback): void; + + /** + * Calls UpdateAudience. + * @param request UpdateAudienceRequest message or plain object + * @returns Promise + */ + public updateAudience(request: google.analytics.admin.v1alpha.IUpdateAudienceRequest): Promise; + + /** + * Calls ArchiveAudience. + * @param request ArchiveAudienceRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public archiveAudience(request: google.analytics.admin.v1alpha.IArchiveAudienceRequest, callback: google.analytics.admin.v1alpha.AnalyticsAdminService.ArchiveAudienceCallback): void; + + /** + * Calls ArchiveAudience. + * @param request ArchiveAudienceRequest message or plain object + * @returns Promise + */ + public archiveAudience(request: google.analytics.admin.v1alpha.IArchiveAudienceRequest): Promise; + + /** + * Calls GetAttributionSettings. + * @param request GetAttributionSettingsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and AttributionSettings + */ + public getAttributionSettings(request: google.analytics.admin.v1alpha.IGetAttributionSettingsRequest, callback: google.analytics.admin.v1alpha.AnalyticsAdminService.GetAttributionSettingsCallback): void; + + /** + * Calls GetAttributionSettings. + * @param request GetAttributionSettingsRequest message or plain object + * @returns Promise + */ + public getAttributionSettings(request: google.analytics.admin.v1alpha.IGetAttributionSettingsRequest): Promise; + + /** + * Calls UpdateAttributionSettings. + * @param request UpdateAttributionSettingsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and AttributionSettings + */ + public updateAttributionSettings(request: google.analytics.admin.v1alpha.IUpdateAttributionSettingsRequest, callback: google.analytics.admin.v1alpha.AnalyticsAdminService.UpdateAttributionSettingsCallback): void; + + /** + * Calls UpdateAttributionSettings. + * @param request UpdateAttributionSettingsRequest message or plain object + * @returns Promise + */ + public updateAttributionSettings(request: google.analytics.admin.v1alpha.IUpdateAttributionSettingsRequest): Promise; + + /** + * Calls RunAccessReport. + * @param request RunAccessReportRequest message or plain object + * @param callback Node-style callback called with the error, if any, and RunAccessReportResponse + */ + public runAccessReport(request: google.analytics.admin.v1alpha.IRunAccessReportRequest, callback: google.analytics.admin.v1alpha.AnalyticsAdminService.RunAccessReportCallback): void; + + /** + * Calls RunAccessReport. + * @param request RunAccessReportRequest message or plain object + * @returns Promise + */ + public runAccessReport(request: google.analytics.admin.v1alpha.IRunAccessReportRequest): Promise; + } + + namespace AnalyticsAdminService { + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|getAccount}. + * @param error Error, if any + * @param [response] Account + */ + type GetAccountCallback = (error: (Error|null), response?: google.analytics.admin.v1alpha.Account) => void; + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|listAccounts}. + * @param error Error, if any + * @param [response] ListAccountsResponse + */ + type ListAccountsCallback = (error: (Error|null), response?: google.analytics.admin.v1alpha.ListAccountsResponse) => void; + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|deleteAccount}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteAccountCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|updateAccount}. + * @param error Error, if any + * @param [response] Account + */ + type UpdateAccountCallback = (error: (Error|null), response?: google.analytics.admin.v1alpha.Account) => void; + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|provisionAccountTicket}. + * @param error Error, if any + * @param [response] ProvisionAccountTicketResponse + */ + type ProvisionAccountTicketCallback = (error: (Error|null), response?: google.analytics.admin.v1alpha.ProvisionAccountTicketResponse) => void; + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|listAccountSummaries}. + * @param error Error, if any + * @param [response] ListAccountSummariesResponse + */ + type ListAccountSummariesCallback = (error: (Error|null), response?: google.analytics.admin.v1alpha.ListAccountSummariesResponse) => void; + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|getProperty}. + * @param error Error, if any + * @param [response] Property + */ + type GetPropertyCallback = (error: (Error|null), response?: google.analytics.admin.v1alpha.Property) => void; + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|listProperties}. + * @param error Error, if any + * @param [response] ListPropertiesResponse + */ + type ListPropertiesCallback = (error: (Error|null), response?: google.analytics.admin.v1alpha.ListPropertiesResponse) => void; + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|createProperty}. + * @param error Error, if any + * @param [response] Property + */ + type CreatePropertyCallback = (error: (Error|null), response?: google.analytics.admin.v1alpha.Property) => void; + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|deleteProperty}. + * @param error Error, if any + * @param [response] Property + */ + type DeletePropertyCallback = (error: (Error|null), response?: google.analytics.admin.v1alpha.Property) => void; + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|updateProperty}. + * @param error Error, if any + * @param [response] Property + */ + type UpdatePropertyCallback = (error: (Error|null), response?: google.analytics.admin.v1alpha.Property) => void; + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|getUserLink}. + * @param error Error, if any + * @param [response] UserLink + */ + type GetUserLinkCallback = (error: (Error|null), response?: google.analytics.admin.v1alpha.UserLink) => void; + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|batchGetUserLinks}. + * @param error Error, if any + * @param [response] BatchGetUserLinksResponse + */ + type BatchGetUserLinksCallback = (error: (Error|null), response?: google.analytics.admin.v1alpha.BatchGetUserLinksResponse) => void; + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|listUserLinks}. + * @param error Error, if any + * @param [response] ListUserLinksResponse + */ + type ListUserLinksCallback = (error: (Error|null), response?: google.analytics.admin.v1alpha.ListUserLinksResponse) => void; + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|auditUserLinks}. + * @param error Error, if any + * @param [response] AuditUserLinksResponse + */ + type AuditUserLinksCallback = (error: (Error|null), response?: google.analytics.admin.v1alpha.AuditUserLinksResponse) => void; + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|createUserLink}. + * @param error Error, if any + * @param [response] UserLink + */ + type CreateUserLinkCallback = (error: (Error|null), response?: google.analytics.admin.v1alpha.UserLink) => void; + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|batchCreateUserLinks}. + * @param error Error, if any + * @param [response] BatchCreateUserLinksResponse + */ + type BatchCreateUserLinksCallback = (error: (Error|null), response?: google.analytics.admin.v1alpha.BatchCreateUserLinksResponse) => void; + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|updateUserLink}. + * @param error Error, if any + * @param [response] UserLink + */ + type UpdateUserLinkCallback = (error: (Error|null), response?: google.analytics.admin.v1alpha.UserLink) => void; + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|batchUpdateUserLinks}. + * @param error Error, if any + * @param [response] BatchUpdateUserLinksResponse + */ + type BatchUpdateUserLinksCallback = (error: (Error|null), response?: google.analytics.admin.v1alpha.BatchUpdateUserLinksResponse) => void; + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|deleteUserLink}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteUserLinkCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|batchDeleteUserLinks}. + * @param error Error, if any + * @param [response] Empty + */ + type BatchDeleteUserLinksCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|createFirebaseLink}. + * @param error Error, if any + * @param [response] FirebaseLink + */ + type CreateFirebaseLinkCallback = (error: (Error|null), response?: google.analytics.admin.v1alpha.FirebaseLink) => void; + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|deleteFirebaseLink}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteFirebaseLinkCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|listFirebaseLinks}. + * @param error Error, if any + * @param [response] ListFirebaseLinksResponse + */ + type ListFirebaseLinksCallback = (error: (Error|null), response?: google.analytics.admin.v1alpha.ListFirebaseLinksResponse) => void; + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|getGlobalSiteTag}. + * @param error Error, if any + * @param [response] GlobalSiteTag + */ + type GetGlobalSiteTagCallback = (error: (Error|null), response?: google.analytics.admin.v1alpha.GlobalSiteTag) => void; + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|createGoogleAdsLink}. + * @param error Error, if any + * @param [response] GoogleAdsLink + */ + type CreateGoogleAdsLinkCallback = (error: (Error|null), response?: google.analytics.admin.v1alpha.GoogleAdsLink) => void; + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|updateGoogleAdsLink}. + * @param error Error, if any + * @param [response] GoogleAdsLink + */ + type UpdateGoogleAdsLinkCallback = (error: (Error|null), response?: google.analytics.admin.v1alpha.GoogleAdsLink) => void; + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|deleteGoogleAdsLink}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteGoogleAdsLinkCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|listGoogleAdsLinks}. + * @param error Error, if any + * @param [response] ListGoogleAdsLinksResponse + */ + type ListGoogleAdsLinksCallback = (error: (Error|null), response?: google.analytics.admin.v1alpha.ListGoogleAdsLinksResponse) => void; + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|getDataSharingSettings}. + * @param error Error, if any + * @param [response] DataSharingSettings + */ + type GetDataSharingSettingsCallback = (error: (Error|null), response?: google.analytics.admin.v1alpha.DataSharingSettings) => void; + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|getMeasurementProtocolSecret}. + * @param error Error, if any + * @param [response] MeasurementProtocolSecret + */ + type GetMeasurementProtocolSecretCallback = (error: (Error|null), response?: google.analytics.admin.v1alpha.MeasurementProtocolSecret) => void; + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|listMeasurementProtocolSecrets}. + * @param error Error, if any + * @param [response] ListMeasurementProtocolSecretsResponse + */ + type ListMeasurementProtocolSecretsCallback = (error: (Error|null), response?: google.analytics.admin.v1alpha.ListMeasurementProtocolSecretsResponse) => void; + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|createMeasurementProtocolSecret}. + * @param error Error, if any + * @param [response] MeasurementProtocolSecret + */ + type CreateMeasurementProtocolSecretCallback = (error: (Error|null), response?: google.analytics.admin.v1alpha.MeasurementProtocolSecret) => void; + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|deleteMeasurementProtocolSecret}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteMeasurementProtocolSecretCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|updateMeasurementProtocolSecret}. + * @param error Error, if any + * @param [response] MeasurementProtocolSecret + */ + type UpdateMeasurementProtocolSecretCallback = (error: (Error|null), response?: google.analytics.admin.v1alpha.MeasurementProtocolSecret) => void; + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|acknowledgeUserDataCollection}. + * @param error Error, if any + * @param [response] AcknowledgeUserDataCollectionResponse + */ + type AcknowledgeUserDataCollectionCallback = (error: (Error|null), response?: google.analytics.admin.v1alpha.AcknowledgeUserDataCollectionResponse) => void; + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|searchChangeHistoryEvents}. + * @param error Error, if any + * @param [response] SearchChangeHistoryEventsResponse + */ + type SearchChangeHistoryEventsCallback = (error: (Error|null), response?: google.analytics.admin.v1alpha.SearchChangeHistoryEventsResponse) => void; + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|getGoogleSignalsSettings}. + * @param error Error, if any + * @param [response] GoogleSignalsSettings + */ + type GetGoogleSignalsSettingsCallback = (error: (Error|null), response?: google.analytics.admin.v1alpha.GoogleSignalsSettings) => void; + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|updateGoogleSignalsSettings}. + * @param error Error, if any + * @param [response] GoogleSignalsSettings + */ + type UpdateGoogleSignalsSettingsCallback = (error: (Error|null), response?: google.analytics.admin.v1alpha.GoogleSignalsSettings) => void; + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|createConversionEvent}. + * @param error Error, if any + * @param [response] ConversionEvent + */ + type CreateConversionEventCallback = (error: (Error|null), response?: google.analytics.admin.v1alpha.ConversionEvent) => void; + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|getConversionEvent}. + * @param error Error, if any + * @param [response] ConversionEvent + */ + type GetConversionEventCallback = (error: (Error|null), response?: google.analytics.admin.v1alpha.ConversionEvent) => void; + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|deleteConversionEvent}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteConversionEventCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|listConversionEvents}. + * @param error Error, if any + * @param [response] ListConversionEventsResponse + */ + type ListConversionEventsCallback = (error: (Error|null), response?: google.analytics.admin.v1alpha.ListConversionEventsResponse) => void; + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|getDisplayVideo360AdvertiserLink}. + * @param error Error, if any + * @param [response] DisplayVideo360AdvertiserLink + */ + type GetDisplayVideo360AdvertiserLinkCallback = (error: (Error|null), response?: google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink) => void; + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|listDisplayVideo360AdvertiserLinks}. + * @param error Error, if any + * @param [response] ListDisplayVideo360AdvertiserLinksResponse + */ + type ListDisplayVideo360AdvertiserLinksCallback = (error: (Error|null), response?: google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinksResponse) => void; + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|createDisplayVideo360AdvertiserLink}. + * @param error Error, if any + * @param [response] DisplayVideo360AdvertiserLink + */ + type CreateDisplayVideo360AdvertiserLinkCallback = (error: (Error|null), response?: google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink) => void; + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|deleteDisplayVideo360AdvertiserLink}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteDisplayVideo360AdvertiserLinkCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|updateDisplayVideo360AdvertiserLink}. + * @param error Error, if any + * @param [response] DisplayVideo360AdvertiserLink + */ + type UpdateDisplayVideo360AdvertiserLinkCallback = (error: (Error|null), response?: google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink) => void; + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|getDisplayVideo360AdvertiserLinkProposal}. + * @param error Error, if any + * @param [response] DisplayVideo360AdvertiserLinkProposal + */ + type GetDisplayVideo360AdvertiserLinkProposalCallback = (error: (Error|null), response?: google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal) => void; + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|listDisplayVideo360AdvertiserLinkProposals}. + * @param error Error, if any + * @param [response] ListDisplayVideo360AdvertiserLinkProposalsResponse + */ + type ListDisplayVideo360AdvertiserLinkProposalsCallback = (error: (Error|null), response?: google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinkProposalsResponse) => void; + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|createDisplayVideo360AdvertiserLinkProposal}. + * @param error Error, if any + * @param [response] DisplayVideo360AdvertiserLinkProposal + */ + type CreateDisplayVideo360AdvertiserLinkProposalCallback = (error: (Error|null), response?: google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal) => void; + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|deleteDisplayVideo360AdvertiserLinkProposal}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteDisplayVideo360AdvertiserLinkProposalCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|approveDisplayVideo360AdvertiserLinkProposal}. + * @param error Error, if any + * @param [response] ApproveDisplayVideo360AdvertiserLinkProposalResponse + */ + type ApproveDisplayVideo360AdvertiserLinkProposalCallback = (error: (Error|null), response?: google.analytics.admin.v1alpha.ApproveDisplayVideo360AdvertiserLinkProposalResponse) => void; + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|cancelDisplayVideo360AdvertiserLinkProposal}. + * @param error Error, if any + * @param [response] DisplayVideo360AdvertiserLinkProposal + */ + type CancelDisplayVideo360AdvertiserLinkProposalCallback = (error: (Error|null), response?: google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal) => void; + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|createCustomDimension}. + * @param error Error, if any + * @param [response] CustomDimension + */ + type CreateCustomDimensionCallback = (error: (Error|null), response?: google.analytics.admin.v1alpha.CustomDimension) => void; + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|updateCustomDimension}. + * @param error Error, if any + * @param [response] CustomDimension + */ + type UpdateCustomDimensionCallback = (error: (Error|null), response?: google.analytics.admin.v1alpha.CustomDimension) => void; + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|listCustomDimensions}. + * @param error Error, if any + * @param [response] ListCustomDimensionsResponse + */ + type ListCustomDimensionsCallback = (error: (Error|null), response?: google.analytics.admin.v1alpha.ListCustomDimensionsResponse) => void; + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|archiveCustomDimension}. + * @param error Error, if any + * @param [response] Empty + */ + type ArchiveCustomDimensionCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|getCustomDimension}. + * @param error Error, if any + * @param [response] CustomDimension + */ + type GetCustomDimensionCallback = (error: (Error|null), response?: google.analytics.admin.v1alpha.CustomDimension) => void; + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|createCustomMetric}. + * @param error Error, if any + * @param [response] CustomMetric + */ + type CreateCustomMetricCallback = (error: (Error|null), response?: google.analytics.admin.v1alpha.CustomMetric) => void; + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|updateCustomMetric}. + * @param error Error, if any + * @param [response] CustomMetric + */ + type UpdateCustomMetricCallback = (error: (Error|null), response?: google.analytics.admin.v1alpha.CustomMetric) => void; + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|listCustomMetrics}. + * @param error Error, if any + * @param [response] ListCustomMetricsResponse + */ + type ListCustomMetricsCallback = (error: (Error|null), response?: google.analytics.admin.v1alpha.ListCustomMetricsResponse) => void; + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|archiveCustomMetric}. + * @param error Error, if any + * @param [response] Empty + */ + type ArchiveCustomMetricCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|getCustomMetric}. + * @param error Error, if any + * @param [response] CustomMetric + */ + type GetCustomMetricCallback = (error: (Error|null), response?: google.analytics.admin.v1alpha.CustomMetric) => void; + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|getDataRetentionSettings}. + * @param error Error, if any + * @param [response] DataRetentionSettings + */ + type GetDataRetentionSettingsCallback = (error: (Error|null), response?: google.analytics.admin.v1alpha.DataRetentionSettings) => void; + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|updateDataRetentionSettings}. + * @param error Error, if any + * @param [response] DataRetentionSettings + */ + type UpdateDataRetentionSettingsCallback = (error: (Error|null), response?: google.analytics.admin.v1alpha.DataRetentionSettings) => void; + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|createDataStream}. + * @param error Error, if any + * @param [response] DataStream + */ + type CreateDataStreamCallback = (error: (Error|null), response?: google.analytics.admin.v1alpha.DataStream) => void; + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|deleteDataStream}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteDataStreamCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|updateDataStream}. + * @param error Error, if any + * @param [response] DataStream + */ + type UpdateDataStreamCallback = (error: (Error|null), response?: google.analytics.admin.v1alpha.DataStream) => void; + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|listDataStreams}. + * @param error Error, if any + * @param [response] ListDataStreamsResponse + */ + type ListDataStreamsCallback = (error: (Error|null), response?: google.analytics.admin.v1alpha.ListDataStreamsResponse) => void; + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|getDataStream}. + * @param error Error, if any + * @param [response] DataStream + */ + type GetDataStreamCallback = (error: (Error|null), response?: google.analytics.admin.v1alpha.DataStream) => void; + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|getAudience}. + * @param error Error, if any + * @param [response] Audience + */ + type GetAudienceCallback = (error: (Error|null), response?: google.analytics.admin.v1alpha.Audience) => void; + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|listAudiences}. + * @param error Error, if any + * @param [response] ListAudiencesResponse + */ + type ListAudiencesCallback = (error: (Error|null), response?: google.analytics.admin.v1alpha.ListAudiencesResponse) => void; + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|createAudience}. + * @param error Error, if any + * @param [response] Audience + */ + type CreateAudienceCallback = (error: (Error|null), response?: google.analytics.admin.v1alpha.Audience) => void; + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|updateAudience}. + * @param error Error, if any + * @param [response] Audience + */ + type UpdateAudienceCallback = (error: (Error|null), response?: google.analytics.admin.v1alpha.Audience) => void; + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|archiveAudience}. + * @param error Error, if any + * @param [response] Empty + */ + type ArchiveAudienceCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|getAttributionSettings}. + * @param error Error, if any + * @param [response] AttributionSettings + */ + type GetAttributionSettingsCallback = (error: (Error|null), response?: google.analytics.admin.v1alpha.AttributionSettings) => void; + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|updateAttributionSettings}. + * @param error Error, if any + * @param [response] AttributionSettings + */ + type UpdateAttributionSettingsCallback = (error: (Error|null), response?: google.analytics.admin.v1alpha.AttributionSettings) => void; + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|runAccessReport}. + * @param error Error, if any + * @param [response] RunAccessReportResponse + */ + type RunAccessReportCallback = (error: (Error|null), response?: google.analytics.admin.v1alpha.RunAccessReportResponse) => void; + } + + /** Properties of a RunAccessReportRequest. */ + interface IRunAccessReportRequest { + + /** RunAccessReportRequest entity */ + entity?: (string|null); + + /** RunAccessReportRequest dimensions */ + dimensions?: (google.analytics.admin.v1alpha.IAccessDimension[]|null); + + /** RunAccessReportRequest metrics */ + metrics?: (google.analytics.admin.v1alpha.IAccessMetric[]|null); + + /** RunAccessReportRequest dateRanges */ + dateRanges?: (google.analytics.admin.v1alpha.IAccessDateRange[]|null); + + /** RunAccessReportRequest dimensionFilter */ + dimensionFilter?: (google.analytics.admin.v1alpha.IAccessFilterExpression|null); + + /** RunAccessReportRequest metricFilter */ + metricFilter?: (google.analytics.admin.v1alpha.IAccessFilterExpression|null); + + /** RunAccessReportRequest offset */ + offset?: (number|Long|string|null); + + /** RunAccessReportRequest limit */ + limit?: (number|Long|string|null); + + /** RunAccessReportRequest timeZone */ + timeZone?: (string|null); + + /** RunAccessReportRequest orderBys */ + orderBys?: (google.analytics.admin.v1alpha.IAccessOrderBy[]|null); + + /** RunAccessReportRequest returnEntityQuota */ + returnEntityQuota?: (boolean|null); + } + + /** Represents a RunAccessReportRequest. */ + class RunAccessReportRequest implements IRunAccessReportRequest { + + /** + * Constructs a new RunAccessReportRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IRunAccessReportRequest); + + /** RunAccessReportRequest entity. */ + public entity: string; + + /** RunAccessReportRequest dimensions. */ + public dimensions: google.analytics.admin.v1alpha.IAccessDimension[]; + + /** RunAccessReportRequest metrics. */ + public metrics: google.analytics.admin.v1alpha.IAccessMetric[]; + + /** RunAccessReportRequest dateRanges. */ + public dateRanges: google.analytics.admin.v1alpha.IAccessDateRange[]; + + /** RunAccessReportRequest dimensionFilter. */ + public dimensionFilter?: (google.analytics.admin.v1alpha.IAccessFilterExpression|null); + + /** RunAccessReportRequest metricFilter. */ + public metricFilter?: (google.analytics.admin.v1alpha.IAccessFilterExpression|null); + + /** RunAccessReportRequest offset. */ + public offset: (number|Long|string); + + /** RunAccessReportRequest limit. */ + public limit: (number|Long|string); + + /** RunAccessReportRequest timeZone. */ + public timeZone: string; + + /** RunAccessReportRequest orderBys. */ + public orderBys: google.analytics.admin.v1alpha.IAccessOrderBy[]; + + /** RunAccessReportRequest returnEntityQuota. */ + public returnEntityQuota: boolean; + + /** + * Creates a new RunAccessReportRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns RunAccessReportRequest instance + */ + public static create(properties?: google.analytics.admin.v1alpha.IRunAccessReportRequest): google.analytics.admin.v1alpha.RunAccessReportRequest; + + /** + * Encodes the specified RunAccessReportRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.RunAccessReportRequest.verify|verify} messages. + * @param message RunAccessReportRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.IRunAccessReportRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RunAccessReportRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.RunAccessReportRequest.verify|verify} messages. + * @param message RunAccessReportRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.IRunAccessReportRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RunAccessReportRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RunAccessReportRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.RunAccessReportRequest; + + /** + * Decodes a RunAccessReportRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RunAccessReportRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.RunAccessReportRequest; + + /** + * Verifies a RunAccessReportRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RunAccessReportRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RunAccessReportRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.RunAccessReportRequest; + + /** + * Creates a plain object from a RunAccessReportRequest message. Also converts values to other types if specified. + * @param message RunAccessReportRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.RunAccessReportRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RunAccessReportRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RunAccessReportRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RunAccessReportResponse. */ + interface IRunAccessReportResponse { + + /** RunAccessReportResponse dimensionHeaders */ + dimensionHeaders?: (google.analytics.admin.v1alpha.IAccessDimensionHeader[]|null); + + /** RunAccessReportResponse metricHeaders */ + metricHeaders?: (google.analytics.admin.v1alpha.IAccessMetricHeader[]|null); + + /** RunAccessReportResponse rows */ + rows?: (google.analytics.admin.v1alpha.IAccessRow[]|null); + + /** RunAccessReportResponse rowCount */ + rowCount?: (number|null); + + /** RunAccessReportResponse quota */ + quota?: (google.analytics.admin.v1alpha.IAccessQuota|null); + } + + /** Represents a RunAccessReportResponse. */ + class RunAccessReportResponse implements IRunAccessReportResponse { + + /** + * Constructs a new RunAccessReportResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IRunAccessReportResponse); + + /** RunAccessReportResponse dimensionHeaders. */ + public dimensionHeaders: google.analytics.admin.v1alpha.IAccessDimensionHeader[]; + + /** RunAccessReportResponse metricHeaders. */ + public metricHeaders: google.analytics.admin.v1alpha.IAccessMetricHeader[]; + + /** RunAccessReportResponse rows. */ + public rows: google.analytics.admin.v1alpha.IAccessRow[]; + + /** RunAccessReportResponse rowCount. */ + public rowCount: number; + + /** RunAccessReportResponse quota. */ + public quota?: (google.analytics.admin.v1alpha.IAccessQuota|null); + + /** + * Creates a new RunAccessReportResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns RunAccessReportResponse instance + */ + public static create(properties?: google.analytics.admin.v1alpha.IRunAccessReportResponse): google.analytics.admin.v1alpha.RunAccessReportResponse; + + /** + * Encodes the specified RunAccessReportResponse message. Does not implicitly {@link google.analytics.admin.v1alpha.RunAccessReportResponse.verify|verify} messages. + * @param message RunAccessReportResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.IRunAccessReportResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RunAccessReportResponse message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.RunAccessReportResponse.verify|verify} messages. + * @param message RunAccessReportResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.IRunAccessReportResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RunAccessReportResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RunAccessReportResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.RunAccessReportResponse; + + /** + * Decodes a RunAccessReportResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RunAccessReportResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.RunAccessReportResponse; + + /** + * Verifies a RunAccessReportResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RunAccessReportResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RunAccessReportResponse + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.RunAccessReportResponse; + + /** + * Creates a plain object from a RunAccessReportResponse message. Also converts values to other types if specified. + * @param message RunAccessReportResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.RunAccessReportResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RunAccessReportResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RunAccessReportResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetAccountRequest. */ + interface IGetAccountRequest { + + /** GetAccountRequest name */ + name?: (string|null); + } + + /** Represents a GetAccountRequest. */ + class GetAccountRequest implements IGetAccountRequest { + + /** + * Constructs a new GetAccountRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IGetAccountRequest); + + /** GetAccountRequest name. */ + public name: string; + + /** + * Creates a new GetAccountRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetAccountRequest instance + */ + public static create(properties?: google.analytics.admin.v1alpha.IGetAccountRequest): google.analytics.admin.v1alpha.GetAccountRequest; + + /** + * Encodes the specified GetAccountRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.GetAccountRequest.verify|verify} messages. + * @param message GetAccountRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.IGetAccountRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetAccountRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.GetAccountRequest.verify|verify} messages. + * @param message GetAccountRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.IGetAccountRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetAccountRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetAccountRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.GetAccountRequest; + + /** + * Decodes a GetAccountRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetAccountRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.GetAccountRequest; + + /** + * Verifies a GetAccountRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetAccountRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetAccountRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.GetAccountRequest; + + /** + * Creates a plain object from a GetAccountRequest message. Also converts values to other types if specified. + * @param message GetAccountRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.GetAccountRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetAccountRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetAccountRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListAccountsRequest. */ + interface IListAccountsRequest { + + /** ListAccountsRequest pageSize */ + pageSize?: (number|null); + + /** ListAccountsRequest pageToken */ + pageToken?: (string|null); + + /** ListAccountsRequest showDeleted */ + showDeleted?: (boolean|null); + } + + /** Represents a ListAccountsRequest. */ + class ListAccountsRequest implements IListAccountsRequest { + + /** + * Constructs a new ListAccountsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IListAccountsRequest); + + /** ListAccountsRequest pageSize. */ + public pageSize: number; + + /** ListAccountsRequest pageToken. */ + public pageToken: string; + + /** ListAccountsRequest showDeleted. */ + public showDeleted: boolean; + + /** + * Creates a new ListAccountsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListAccountsRequest instance + */ + public static create(properties?: google.analytics.admin.v1alpha.IListAccountsRequest): google.analytics.admin.v1alpha.ListAccountsRequest; + + /** + * Encodes the specified ListAccountsRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.ListAccountsRequest.verify|verify} messages. + * @param message ListAccountsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.IListAccountsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListAccountsRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.ListAccountsRequest.verify|verify} messages. + * @param message ListAccountsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.IListAccountsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListAccountsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListAccountsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.ListAccountsRequest; + + /** + * Decodes a ListAccountsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListAccountsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.ListAccountsRequest; + + /** + * Verifies a ListAccountsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListAccountsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListAccountsRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.ListAccountsRequest; + + /** + * Creates a plain object from a ListAccountsRequest message. Also converts values to other types if specified. + * @param message ListAccountsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.ListAccountsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListAccountsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListAccountsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListAccountsResponse. */ + interface IListAccountsResponse { + + /** ListAccountsResponse accounts */ + accounts?: (google.analytics.admin.v1alpha.IAccount[]|null); + + /** ListAccountsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListAccountsResponse. */ + class ListAccountsResponse implements IListAccountsResponse { + + /** + * Constructs a new ListAccountsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IListAccountsResponse); + + /** ListAccountsResponse accounts. */ + public accounts: google.analytics.admin.v1alpha.IAccount[]; + + /** ListAccountsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListAccountsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListAccountsResponse instance + */ + public static create(properties?: google.analytics.admin.v1alpha.IListAccountsResponse): google.analytics.admin.v1alpha.ListAccountsResponse; + + /** + * Encodes the specified ListAccountsResponse message. Does not implicitly {@link google.analytics.admin.v1alpha.ListAccountsResponse.verify|verify} messages. + * @param message ListAccountsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.IListAccountsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListAccountsResponse message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.ListAccountsResponse.verify|verify} messages. + * @param message ListAccountsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.IListAccountsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListAccountsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListAccountsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.ListAccountsResponse; + + /** + * Decodes a ListAccountsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListAccountsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.ListAccountsResponse; + + /** + * Verifies a ListAccountsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListAccountsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListAccountsResponse + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.ListAccountsResponse; + + /** + * Creates a plain object from a ListAccountsResponse message. Also converts values to other types if specified. + * @param message ListAccountsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.ListAccountsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListAccountsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListAccountsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteAccountRequest. */ + interface IDeleteAccountRequest { + + /** DeleteAccountRequest name */ + name?: (string|null); + } + + /** Represents a DeleteAccountRequest. */ + class DeleteAccountRequest implements IDeleteAccountRequest { + + /** + * Constructs a new DeleteAccountRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IDeleteAccountRequest); + + /** DeleteAccountRequest name. */ + public name: string; + + /** + * Creates a new DeleteAccountRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteAccountRequest instance + */ + public static create(properties?: google.analytics.admin.v1alpha.IDeleteAccountRequest): google.analytics.admin.v1alpha.DeleteAccountRequest; + + /** + * Encodes the specified DeleteAccountRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.DeleteAccountRequest.verify|verify} messages. + * @param message DeleteAccountRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.IDeleteAccountRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteAccountRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.DeleteAccountRequest.verify|verify} messages. + * @param message DeleteAccountRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.IDeleteAccountRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteAccountRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteAccountRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.DeleteAccountRequest; + + /** + * Decodes a DeleteAccountRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteAccountRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.DeleteAccountRequest; + + /** + * Verifies a DeleteAccountRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteAccountRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteAccountRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.DeleteAccountRequest; + + /** + * Creates a plain object from a DeleteAccountRequest message. Also converts values to other types if specified. + * @param message DeleteAccountRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.DeleteAccountRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteAccountRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteAccountRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateAccountRequest. */ + interface IUpdateAccountRequest { + + /** UpdateAccountRequest account */ + account?: (google.analytics.admin.v1alpha.IAccount|null); + + /** UpdateAccountRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + } + + /** Represents an UpdateAccountRequest. */ + class UpdateAccountRequest implements IUpdateAccountRequest { + + /** + * Constructs a new UpdateAccountRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IUpdateAccountRequest); + + /** UpdateAccountRequest account. */ + public account?: (google.analytics.admin.v1alpha.IAccount|null); + + /** UpdateAccountRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** + * Creates a new UpdateAccountRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateAccountRequest instance + */ + public static create(properties?: google.analytics.admin.v1alpha.IUpdateAccountRequest): google.analytics.admin.v1alpha.UpdateAccountRequest; + + /** + * Encodes the specified UpdateAccountRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.UpdateAccountRequest.verify|verify} messages. + * @param message UpdateAccountRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.IUpdateAccountRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateAccountRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.UpdateAccountRequest.verify|verify} messages. + * @param message UpdateAccountRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.IUpdateAccountRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateAccountRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateAccountRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.UpdateAccountRequest; + + /** + * Decodes an UpdateAccountRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateAccountRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.UpdateAccountRequest; + + /** + * Verifies an UpdateAccountRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UpdateAccountRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateAccountRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.UpdateAccountRequest; + + /** + * Creates a plain object from an UpdateAccountRequest message. Also converts values to other types if specified. + * @param message UpdateAccountRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.UpdateAccountRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateAccountRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateAccountRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ProvisionAccountTicketRequest. */ + interface IProvisionAccountTicketRequest { + + /** ProvisionAccountTicketRequest account */ + account?: (google.analytics.admin.v1alpha.IAccount|null); + + /** ProvisionAccountTicketRequest redirectUri */ + redirectUri?: (string|null); + } + + /** Represents a ProvisionAccountTicketRequest. */ + class ProvisionAccountTicketRequest implements IProvisionAccountTicketRequest { + + /** + * Constructs a new ProvisionAccountTicketRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IProvisionAccountTicketRequest); + + /** ProvisionAccountTicketRequest account. */ + public account?: (google.analytics.admin.v1alpha.IAccount|null); + + /** ProvisionAccountTicketRequest redirectUri. */ + public redirectUri: string; + + /** + * Creates a new ProvisionAccountTicketRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ProvisionAccountTicketRequest instance + */ + public static create(properties?: google.analytics.admin.v1alpha.IProvisionAccountTicketRequest): google.analytics.admin.v1alpha.ProvisionAccountTicketRequest; + + /** + * Encodes the specified ProvisionAccountTicketRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.ProvisionAccountTicketRequest.verify|verify} messages. + * @param message ProvisionAccountTicketRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.IProvisionAccountTicketRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ProvisionAccountTicketRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.ProvisionAccountTicketRequest.verify|verify} messages. + * @param message ProvisionAccountTicketRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.IProvisionAccountTicketRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ProvisionAccountTicketRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ProvisionAccountTicketRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.ProvisionAccountTicketRequest; + + /** + * Decodes a ProvisionAccountTicketRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ProvisionAccountTicketRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.ProvisionAccountTicketRequest; + + /** + * Verifies a ProvisionAccountTicketRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ProvisionAccountTicketRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ProvisionAccountTicketRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.ProvisionAccountTicketRequest; + + /** + * Creates a plain object from a ProvisionAccountTicketRequest message. Also converts values to other types if specified. + * @param message ProvisionAccountTicketRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.ProvisionAccountTicketRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ProvisionAccountTicketRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ProvisionAccountTicketRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ProvisionAccountTicketResponse. */ + interface IProvisionAccountTicketResponse { + + /** ProvisionAccountTicketResponse accountTicketId */ + accountTicketId?: (string|null); + } + + /** Represents a ProvisionAccountTicketResponse. */ + class ProvisionAccountTicketResponse implements IProvisionAccountTicketResponse { + + /** + * Constructs a new ProvisionAccountTicketResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IProvisionAccountTicketResponse); + + /** ProvisionAccountTicketResponse accountTicketId. */ + public accountTicketId: string; + + /** + * Creates a new ProvisionAccountTicketResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ProvisionAccountTicketResponse instance + */ + public static create(properties?: google.analytics.admin.v1alpha.IProvisionAccountTicketResponse): google.analytics.admin.v1alpha.ProvisionAccountTicketResponse; + + /** + * Encodes the specified ProvisionAccountTicketResponse message. Does not implicitly {@link google.analytics.admin.v1alpha.ProvisionAccountTicketResponse.verify|verify} messages. + * @param message ProvisionAccountTicketResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.IProvisionAccountTicketResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ProvisionAccountTicketResponse message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.ProvisionAccountTicketResponse.verify|verify} messages. + * @param message ProvisionAccountTicketResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.IProvisionAccountTicketResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ProvisionAccountTicketResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ProvisionAccountTicketResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.ProvisionAccountTicketResponse; + + /** + * Decodes a ProvisionAccountTicketResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ProvisionAccountTicketResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.ProvisionAccountTicketResponse; + + /** + * Verifies a ProvisionAccountTicketResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ProvisionAccountTicketResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ProvisionAccountTicketResponse + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.ProvisionAccountTicketResponse; + + /** + * Creates a plain object from a ProvisionAccountTicketResponse message. Also converts values to other types if specified. + * @param message ProvisionAccountTicketResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.ProvisionAccountTicketResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ProvisionAccountTicketResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ProvisionAccountTicketResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetPropertyRequest. */ + interface IGetPropertyRequest { + + /** GetPropertyRequest name */ + name?: (string|null); + } + + /** Represents a GetPropertyRequest. */ + class GetPropertyRequest implements IGetPropertyRequest { + + /** + * Constructs a new GetPropertyRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IGetPropertyRequest); + + /** GetPropertyRequest name. */ + public name: string; + + /** + * Creates a new GetPropertyRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetPropertyRequest instance + */ + public static create(properties?: google.analytics.admin.v1alpha.IGetPropertyRequest): google.analytics.admin.v1alpha.GetPropertyRequest; + + /** + * Encodes the specified GetPropertyRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.GetPropertyRequest.verify|verify} messages. + * @param message GetPropertyRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.IGetPropertyRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetPropertyRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.GetPropertyRequest.verify|verify} messages. + * @param message GetPropertyRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.IGetPropertyRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetPropertyRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetPropertyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.GetPropertyRequest; + + /** + * Decodes a GetPropertyRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetPropertyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.GetPropertyRequest; + + /** + * Verifies a GetPropertyRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetPropertyRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetPropertyRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.GetPropertyRequest; + + /** + * Creates a plain object from a GetPropertyRequest message. Also converts values to other types if specified. + * @param message GetPropertyRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.GetPropertyRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetPropertyRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetPropertyRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListPropertiesRequest. */ + interface IListPropertiesRequest { + + /** ListPropertiesRequest filter */ + filter?: (string|null); + + /** ListPropertiesRequest pageSize */ + pageSize?: (number|null); + + /** ListPropertiesRequest pageToken */ + pageToken?: (string|null); + + /** ListPropertiesRequest showDeleted */ + showDeleted?: (boolean|null); + } + + /** Represents a ListPropertiesRequest. */ + class ListPropertiesRequest implements IListPropertiesRequest { + + /** + * Constructs a new ListPropertiesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IListPropertiesRequest); + + /** ListPropertiesRequest filter. */ + public filter: string; + + /** ListPropertiesRequest pageSize. */ + public pageSize: number; + + /** ListPropertiesRequest pageToken. */ + public pageToken: string; + + /** ListPropertiesRequest showDeleted. */ + public showDeleted: boolean; + + /** + * Creates a new ListPropertiesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListPropertiesRequest instance + */ + public static create(properties?: google.analytics.admin.v1alpha.IListPropertiesRequest): google.analytics.admin.v1alpha.ListPropertiesRequest; + + /** + * Encodes the specified ListPropertiesRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.ListPropertiesRequest.verify|verify} messages. + * @param message ListPropertiesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.IListPropertiesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListPropertiesRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.ListPropertiesRequest.verify|verify} messages. + * @param message ListPropertiesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.IListPropertiesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListPropertiesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListPropertiesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.ListPropertiesRequest; + + /** + * Decodes a ListPropertiesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListPropertiesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.ListPropertiesRequest; + + /** + * Verifies a ListPropertiesRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListPropertiesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListPropertiesRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.ListPropertiesRequest; + + /** + * Creates a plain object from a ListPropertiesRequest message. Also converts values to other types if specified. + * @param message ListPropertiesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.ListPropertiesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListPropertiesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListPropertiesRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListPropertiesResponse. */ + interface IListPropertiesResponse { + + /** ListPropertiesResponse properties */ + properties?: (google.analytics.admin.v1alpha.IProperty[]|null); + + /** ListPropertiesResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListPropertiesResponse. */ + class ListPropertiesResponse implements IListPropertiesResponse { + + /** + * Constructs a new ListPropertiesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IListPropertiesResponse); + + /** ListPropertiesResponse properties. */ + public properties: google.analytics.admin.v1alpha.IProperty[]; + + /** ListPropertiesResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListPropertiesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListPropertiesResponse instance + */ + public static create(properties?: google.analytics.admin.v1alpha.IListPropertiesResponse): google.analytics.admin.v1alpha.ListPropertiesResponse; + + /** + * Encodes the specified ListPropertiesResponse message. Does not implicitly {@link google.analytics.admin.v1alpha.ListPropertiesResponse.verify|verify} messages. + * @param message ListPropertiesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.IListPropertiesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListPropertiesResponse message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.ListPropertiesResponse.verify|verify} messages. + * @param message ListPropertiesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.IListPropertiesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListPropertiesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListPropertiesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.ListPropertiesResponse; + + /** + * Decodes a ListPropertiesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListPropertiesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.ListPropertiesResponse; + + /** + * Verifies a ListPropertiesResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListPropertiesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListPropertiesResponse + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.ListPropertiesResponse; + + /** + * Creates a plain object from a ListPropertiesResponse message. Also converts values to other types if specified. + * @param message ListPropertiesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.ListPropertiesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListPropertiesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListPropertiesResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdatePropertyRequest. */ + interface IUpdatePropertyRequest { + + /** UpdatePropertyRequest property */ + property?: (google.analytics.admin.v1alpha.IProperty|null); + + /** UpdatePropertyRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + } + + /** Represents an UpdatePropertyRequest. */ + class UpdatePropertyRequest implements IUpdatePropertyRequest { + + /** + * Constructs a new UpdatePropertyRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IUpdatePropertyRequest); + + /** UpdatePropertyRequest property. */ + public property?: (google.analytics.admin.v1alpha.IProperty|null); + + /** UpdatePropertyRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** + * Creates a new UpdatePropertyRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdatePropertyRequest instance + */ + public static create(properties?: google.analytics.admin.v1alpha.IUpdatePropertyRequest): google.analytics.admin.v1alpha.UpdatePropertyRequest; + + /** + * Encodes the specified UpdatePropertyRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.UpdatePropertyRequest.verify|verify} messages. + * @param message UpdatePropertyRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.IUpdatePropertyRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdatePropertyRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.UpdatePropertyRequest.verify|verify} messages. + * @param message UpdatePropertyRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.IUpdatePropertyRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdatePropertyRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdatePropertyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.UpdatePropertyRequest; + + /** + * Decodes an UpdatePropertyRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdatePropertyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.UpdatePropertyRequest; + + /** + * Verifies an UpdatePropertyRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UpdatePropertyRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdatePropertyRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.UpdatePropertyRequest; + + /** + * Creates a plain object from an UpdatePropertyRequest message. Also converts values to other types if specified. + * @param message UpdatePropertyRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.UpdatePropertyRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdatePropertyRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdatePropertyRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreatePropertyRequest. */ + interface ICreatePropertyRequest { + + /** CreatePropertyRequest property */ + property?: (google.analytics.admin.v1alpha.IProperty|null); + } + + /** Represents a CreatePropertyRequest. */ + class CreatePropertyRequest implements ICreatePropertyRequest { + + /** + * Constructs a new CreatePropertyRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.ICreatePropertyRequest); + + /** CreatePropertyRequest property. */ + public property?: (google.analytics.admin.v1alpha.IProperty|null); + + /** + * Creates a new CreatePropertyRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreatePropertyRequest instance + */ + public static create(properties?: google.analytics.admin.v1alpha.ICreatePropertyRequest): google.analytics.admin.v1alpha.CreatePropertyRequest; + + /** + * Encodes the specified CreatePropertyRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.CreatePropertyRequest.verify|verify} messages. + * @param message CreatePropertyRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.ICreatePropertyRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreatePropertyRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.CreatePropertyRequest.verify|verify} messages. + * @param message CreatePropertyRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.ICreatePropertyRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreatePropertyRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreatePropertyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.CreatePropertyRequest; + + /** + * Decodes a CreatePropertyRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreatePropertyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.CreatePropertyRequest; + + /** + * Verifies a CreatePropertyRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreatePropertyRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreatePropertyRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.CreatePropertyRequest; + + /** + * Creates a plain object from a CreatePropertyRequest message. Also converts values to other types if specified. + * @param message CreatePropertyRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.CreatePropertyRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreatePropertyRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreatePropertyRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeletePropertyRequest. */ + interface IDeletePropertyRequest { + + /** DeletePropertyRequest name */ + name?: (string|null); + } + + /** Represents a DeletePropertyRequest. */ + class DeletePropertyRequest implements IDeletePropertyRequest { + + /** + * Constructs a new DeletePropertyRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IDeletePropertyRequest); + + /** DeletePropertyRequest name. */ + public name: string; + + /** + * Creates a new DeletePropertyRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeletePropertyRequest instance + */ + public static create(properties?: google.analytics.admin.v1alpha.IDeletePropertyRequest): google.analytics.admin.v1alpha.DeletePropertyRequest; + + /** + * Encodes the specified DeletePropertyRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.DeletePropertyRequest.verify|verify} messages. + * @param message DeletePropertyRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.IDeletePropertyRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeletePropertyRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.DeletePropertyRequest.verify|verify} messages. + * @param message DeletePropertyRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.IDeletePropertyRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeletePropertyRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeletePropertyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.DeletePropertyRequest; + + /** + * Decodes a DeletePropertyRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeletePropertyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.DeletePropertyRequest; + + /** + * Verifies a DeletePropertyRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeletePropertyRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeletePropertyRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.DeletePropertyRequest; + + /** + * Creates a plain object from a DeletePropertyRequest message. Also converts values to other types if specified. + * @param message DeletePropertyRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.DeletePropertyRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeletePropertyRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeletePropertyRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetUserLinkRequest. */ + interface IGetUserLinkRequest { + + /** GetUserLinkRequest name */ + name?: (string|null); + } + + /** Represents a GetUserLinkRequest. */ + class GetUserLinkRequest implements IGetUserLinkRequest { + + /** + * Constructs a new GetUserLinkRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IGetUserLinkRequest); + + /** GetUserLinkRequest name. */ + public name: string; + + /** + * Creates a new GetUserLinkRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetUserLinkRequest instance + */ + public static create(properties?: google.analytics.admin.v1alpha.IGetUserLinkRequest): google.analytics.admin.v1alpha.GetUserLinkRequest; + + /** + * Encodes the specified GetUserLinkRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.GetUserLinkRequest.verify|verify} messages. + * @param message GetUserLinkRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.IGetUserLinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetUserLinkRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.GetUserLinkRequest.verify|verify} messages. + * @param message GetUserLinkRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.IGetUserLinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetUserLinkRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetUserLinkRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.GetUserLinkRequest; + + /** + * Decodes a GetUserLinkRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetUserLinkRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.GetUserLinkRequest; + + /** + * Verifies a GetUserLinkRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetUserLinkRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetUserLinkRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.GetUserLinkRequest; + + /** + * Creates a plain object from a GetUserLinkRequest message. Also converts values to other types if specified. + * @param message GetUserLinkRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.GetUserLinkRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetUserLinkRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetUserLinkRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a BatchGetUserLinksRequest. */ + interface IBatchGetUserLinksRequest { + + /** BatchGetUserLinksRequest parent */ + parent?: (string|null); + + /** BatchGetUserLinksRequest names */ + names?: (string[]|null); + } + + /** Represents a BatchGetUserLinksRequest. */ + class BatchGetUserLinksRequest implements IBatchGetUserLinksRequest { + + /** + * Constructs a new BatchGetUserLinksRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IBatchGetUserLinksRequest); + + /** BatchGetUserLinksRequest parent. */ + public parent: string; + + /** BatchGetUserLinksRequest names. */ + public names: string[]; + + /** + * Creates a new BatchGetUserLinksRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns BatchGetUserLinksRequest instance + */ + public static create(properties?: google.analytics.admin.v1alpha.IBatchGetUserLinksRequest): google.analytics.admin.v1alpha.BatchGetUserLinksRequest; + + /** + * Encodes the specified BatchGetUserLinksRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.BatchGetUserLinksRequest.verify|verify} messages. + * @param message BatchGetUserLinksRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.IBatchGetUserLinksRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BatchGetUserLinksRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.BatchGetUserLinksRequest.verify|verify} messages. + * @param message BatchGetUserLinksRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.IBatchGetUserLinksRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BatchGetUserLinksRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BatchGetUserLinksRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.BatchGetUserLinksRequest; + + /** + * Decodes a BatchGetUserLinksRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BatchGetUserLinksRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.BatchGetUserLinksRequest; + + /** + * Verifies a BatchGetUserLinksRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BatchGetUserLinksRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BatchGetUserLinksRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.BatchGetUserLinksRequest; + + /** + * Creates a plain object from a BatchGetUserLinksRequest message. Also converts values to other types if specified. + * @param message BatchGetUserLinksRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.BatchGetUserLinksRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BatchGetUserLinksRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BatchGetUserLinksRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a BatchGetUserLinksResponse. */ + interface IBatchGetUserLinksResponse { + + /** BatchGetUserLinksResponse userLinks */ + userLinks?: (google.analytics.admin.v1alpha.IUserLink[]|null); + } + + /** Represents a BatchGetUserLinksResponse. */ + class BatchGetUserLinksResponse implements IBatchGetUserLinksResponse { + + /** + * Constructs a new BatchGetUserLinksResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IBatchGetUserLinksResponse); + + /** BatchGetUserLinksResponse userLinks. */ + public userLinks: google.analytics.admin.v1alpha.IUserLink[]; + + /** + * Creates a new BatchGetUserLinksResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns BatchGetUserLinksResponse instance + */ + public static create(properties?: google.analytics.admin.v1alpha.IBatchGetUserLinksResponse): google.analytics.admin.v1alpha.BatchGetUserLinksResponse; + + /** + * Encodes the specified BatchGetUserLinksResponse message. Does not implicitly {@link google.analytics.admin.v1alpha.BatchGetUserLinksResponse.verify|verify} messages. + * @param message BatchGetUserLinksResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.IBatchGetUserLinksResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BatchGetUserLinksResponse message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.BatchGetUserLinksResponse.verify|verify} messages. + * @param message BatchGetUserLinksResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.IBatchGetUserLinksResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BatchGetUserLinksResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BatchGetUserLinksResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.BatchGetUserLinksResponse; + + /** + * Decodes a BatchGetUserLinksResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BatchGetUserLinksResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.BatchGetUserLinksResponse; + + /** + * Verifies a BatchGetUserLinksResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BatchGetUserLinksResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BatchGetUserLinksResponse + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.BatchGetUserLinksResponse; + + /** + * Creates a plain object from a BatchGetUserLinksResponse message. Also converts values to other types if specified. + * @param message BatchGetUserLinksResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.BatchGetUserLinksResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BatchGetUserLinksResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BatchGetUserLinksResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListUserLinksRequest. */ + interface IListUserLinksRequest { + + /** ListUserLinksRequest parent */ + parent?: (string|null); + + /** ListUserLinksRequest pageSize */ + pageSize?: (number|null); + + /** ListUserLinksRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListUserLinksRequest. */ + class ListUserLinksRequest implements IListUserLinksRequest { + + /** + * Constructs a new ListUserLinksRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IListUserLinksRequest); + + /** ListUserLinksRequest parent. */ + public parent: string; + + /** ListUserLinksRequest pageSize. */ + public pageSize: number; + + /** ListUserLinksRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListUserLinksRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListUserLinksRequest instance + */ + public static create(properties?: google.analytics.admin.v1alpha.IListUserLinksRequest): google.analytics.admin.v1alpha.ListUserLinksRequest; + + /** + * Encodes the specified ListUserLinksRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.ListUserLinksRequest.verify|verify} messages. + * @param message ListUserLinksRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.IListUserLinksRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListUserLinksRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.ListUserLinksRequest.verify|verify} messages. + * @param message ListUserLinksRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.IListUserLinksRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListUserLinksRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListUserLinksRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.ListUserLinksRequest; + + /** + * Decodes a ListUserLinksRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListUserLinksRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.ListUserLinksRequest; + + /** + * Verifies a ListUserLinksRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListUserLinksRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListUserLinksRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.ListUserLinksRequest; + + /** + * Creates a plain object from a ListUserLinksRequest message. Also converts values to other types if specified. + * @param message ListUserLinksRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.ListUserLinksRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListUserLinksRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListUserLinksRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListUserLinksResponse. */ + interface IListUserLinksResponse { + + /** ListUserLinksResponse userLinks */ + userLinks?: (google.analytics.admin.v1alpha.IUserLink[]|null); + + /** ListUserLinksResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListUserLinksResponse. */ + class ListUserLinksResponse implements IListUserLinksResponse { + + /** + * Constructs a new ListUserLinksResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IListUserLinksResponse); + + /** ListUserLinksResponse userLinks. */ + public userLinks: google.analytics.admin.v1alpha.IUserLink[]; + + /** ListUserLinksResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListUserLinksResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListUserLinksResponse instance + */ + public static create(properties?: google.analytics.admin.v1alpha.IListUserLinksResponse): google.analytics.admin.v1alpha.ListUserLinksResponse; + + /** + * Encodes the specified ListUserLinksResponse message. Does not implicitly {@link google.analytics.admin.v1alpha.ListUserLinksResponse.verify|verify} messages. + * @param message ListUserLinksResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.IListUserLinksResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListUserLinksResponse message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.ListUserLinksResponse.verify|verify} messages. + * @param message ListUserLinksResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.IListUserLinksResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListUserLinksResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListUserLinksResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.ListUserLinksResponse; + + /** + * Decodes a ListUserLinksResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListUserLinksResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.ListUserLinksResponse; + + /** + * Verifies a ListUserLinksResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListUserLinksResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListUserLinksResponse + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.ListUserLinksResponse; + + /** + * Creates a plain object from a ListUserLinksResponse message. Also converts values to other types if specified. + * @param message ListUserLinksResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.ListUserLinksResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListUserLinksResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListUserLinksResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AuditUserLinksRequest. */ + interface IAuditUserLinksRequest { + + /** AuditUserLinksRequest parent */ + parent?: (string|null); + + /** AuditUserLinksRequest pageSize */ + pageSize?: (number|null); + + /** AuditUserLinksRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents an AuditUserLinksRequest. */ + class AuditUserLinksRequest implements IAuditUserLinksRequest { + + /** + * Constructs a new AuditUserLinksRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IAuditUserLinksRequest); + + /** AuditUserLinksRequest parent. */ + public parent: string; + + /** AuditUserLinksRequest pageSize. */ + public pageSize: number; + + /** AuditUserLinksRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new AuditUserLinksRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns AuditUserLinksRequest instance + */ + public static create(properties?: google.analytics.admin.v1alpha.IAuditUserLinksRequest): google.analytics.admin.v1alpha.AuditUserLinksRequest; + + /** + * Encodes the specified AuditUserLinksRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.AuditUserLinksRequest.verify|verify} messages. + * @param message AuditUserLinksRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.IAuditUserLinksRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AuditUserLinksRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AuditUserLinksRequest.verify|verify} messages. + * @param message AuditUserLinksRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.IAuditUserLinksRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AuditUserLinksRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AuditUserLinksRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.AuditUserLinksRequest; + + /** + * Decodes an AuditUserLinksRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AuditUserLinksRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.AuditUserLinksRequest; + + /** + * Verifies an AuditUserLinksRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AuditUserLinksRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AuditUserLinksRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.AuditUserLinksRequest; + + /** + * Creates a plain object from an AuditUserLinksRequest message. Also converts values to other types if specified. + * @param message AuditUserLinksRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.AuditUserLinksRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AuditUserLinksRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AuditUserLinksRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AuditUserLinksResponse. */ + interface IAuditUserLinksResponse { + + /** AuditUserLinksResponse userLinks */ + userLinks?: (google.analytics.admin.v1alpha.IAuditUserLink[]|null); + + /** AuditUserLinksResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents an AuditUserLinksResponse. */ + class AuditUserLinksResponse implements IAuditUserLinksResponse { + + /** + * Constructs a new AuditUserLinksResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IAuditUserLinksResponse); + + /** AuditUserLinksResponse userLinks. */ + public userLinks: google.analytics.admin.v1alpha.IAuditUserLink[]; + + /** AuditUserLinksResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new AuditUserLinksResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns AuditUserLinksResponse instance + */ + public static create(properties?: google.analytics.admin.v1alpha.IAuditUserLinksResponse): google.analytics.admin.v1alpha.AuditUserLinksResponse; + + /** + * Encodes the specified AuditUserLinksResponse message. Does not implicitly {@link google.analytics.admin.v1alpha.AuditUserLinksResponse.verify|verify} messages. + * @param message AuditUserLinksResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.IAuditUserLinksResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AuditUserLinksResponse message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AuditUserLinksResponse.verify|verify} messages. + * @param message AuditUserLinksResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.IAuditUserLinksResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AuditUserLinksResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AuditUserLinksResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.AuditUserLinksResponse; + + /** + * Decodes an AuditUserLinksResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AuditUserLinksResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.AuditUserLinksResponse; + + /** + * Verifies an AuditUserLinksResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AuditUserLinksResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AuditUserLinksResponse + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.AuditUserLinksResponse; + + /** + * Creates a plain object from an AuditUserLinksResponse message. Also converts values to other types if specified. + * @param message AuditUserLinksResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.AuditUserLinksResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AuditUserLinksResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AuditUserLinksResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreateUserLinkRequest. */ + interface ICreateUserLinkRequest { + + /** CreateUserLinkRequest parent */ + parent?: (string|null); + + /** CreateUserLinkRequest notifyNewUser */ + notifyNewUser?: (boolean|null); + + /** CreateUserLinkRequest userLink */ + userLink?: (google.analytics.admin.v1alpha.IUserLink|null); + } + + /** Represents a CreateUserLinkRequest. */ + class CreateUserLinkRequest implements ICreateUserLinkRequest { + + /** + * Constructs a new CreateUserLinkRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.ICreateUserLinkRequest); + + /** CreateUserLinkRequest parent. */ + public parent: string; + + /** CreateUserLinkRequest notifyNewUser. */ + public notifyNewUser: boolean; + + /** CreateUserLinkRequest userLink. */ + public userLink?: (google.analytics.admin.v1alpha.IUserLink|null); + + /** + * Creates a new CreateUserLinkRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateUserLinkRequest instance + */ + public static create(properties?: google.analytics.admin.v1alpha.ICreateUserLinkRequest): google.analytics.admin.v1alpha.CreateUserLinkRequest; + + /** + * Encodes the specified CreateUserLinkRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.CreateUserLinkRequest.verify|verify} messages. + * @param message CreateUserLinkRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.ICreateUserLinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateUserLinkRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.CreateUserLinkRequest.verify|verify} messages. + * @param message CreateUserLinkRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.ICreateUserLinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateUserLinkRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateUserLinkRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.CreateUserLinkRequest; + + /** + * Decodes a CreateUserLinkRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateUserLinkRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.CreateUserLinkRequest; + + /** + * Verifies a CreateUserLinkRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateUserLinkRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateUserLinkRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.CreateUserLinkRequest; + + /** + * Creates a plain object from a CreateUserLinkRequest message. Also converts values to other types if specified. + * @param message CreateUserLinkRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.CreateUserLinkRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateUserLinkRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateUserLinkRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a BatchCreateUserLinksRequest. */ + interface IBatchCreateUserLinksRequest { + + /** BatchCreateUserLinksRequest parent */ + parent?: (string|null); + + /** BatchCreateUserLinksRequest notifyNewUsers */ + notifyNewUsers?: (boolean|null); + + /** BatchCreateUserLinksRequest requests */ + requests?: (google.analytics.admin.v1alpha.ICreateUserLinkRequest[]|null); + } + + /** Represents a BatchCreateUserLinksRequest. */ + class BatchCreateUserLinksRequest implements IBatchCreateUserLinksRequest { + + /** + * Constructs a new BatchCreateUserLinksRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IBatchCreateUserLinksRequest); + + /** BatchCreateUserLinksRequest parent. */ + public parent: string; + + /** BatchCreateUserLinksRequest notifyNewUsers. */ + public notifyNewUsers: boolean; + + /** BatchCreateUserLinksRequest requests. */ + public requests: google.analytics.admin.v1alpha.ICreateUserLinkRequest[]; + + /** + * Creates a new BatchCreateUserLinksRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns BatchCreateUserLinksRequest instance + */ + public static create(properties?: google.analytics.admin.v1alpha.IBatchCreateUserLinksRequest): google.analytics.admin.v1alpha.BatchCreateUserLinksRequest; + + /** + * Encodes the specified BatchCreateUserLinksRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.BatchCreateUserLinksRequest.verify|verify} messages. + * @param message BatchCreateUserLinksRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.IBatchCreateUserLinksRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BatchCreateUserLinksRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.BatchCreateUserLinksRequest.verify|verify} messages. + * @param message BatchCreateUserLinksRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.IBatchCreateUserLinksRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BatchCreateUserLinksRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BatchCreateUserLinksRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.BatchCreateUserLinksRequest; + + /** + * Decodes a BatchCreateUserLinksRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BatchCreateUserLinksRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.BatchCreateUserLinksRequest; + + /** + * Verifies a BatchCreateUserLinksRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BatchCreateUserLinksRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BatchCreateUserLinksRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.BatchCreateUserLinksRequest; + + /** + * Creates a plain object from a BatchCreateUserLinksRequest message. Also converts values to other types if specified. + * @param message BatchCreateUserLinksRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.BatchCreateUserLinksRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BatchCreateUserLinksRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BatchCreateUserLinksRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a BatchCreateUserLinksResponse. */ + interface IBatchCreateUserLinksResponse { + + /** BatchCreateUserLinksResponse userLinks */ + userLinks?: (google.analytics.admin.v1alpha.IUserLink[]|null); + } + + /** Represents a BatchCreateUserLinksResponse. */ + class BatchCreateUserLinksResponse implements IBatchCreateUserLinksResponse { + + /** + * Constructs a new BatchCreateUserLinksResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IBatchCreateUserLinksResponse); + + /** BatchCreateUserLinksResponse userLinks. */ + public userLinks: google.analytics.admin.v1alpha.IUserLink[]; + + /** + * Creates a new BatchCreateUserLinksResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns BatchCreateUserLinksResponse instance + */ + public static create(properties?: google.analytics.admin.v1alpha.IBatchCreateUserLinksResponse): google.analytics.admin.v1alpha.BatchCreateUserLinksResponse; + + /** + * Encodes the specified BatchCreateUserLinksResponse message. Does not implicitly {@link google.analytics.admin.v1alpha.BatchCreateUserLinksResponse.verify|verify} messages. + * @param message BatchCreateUserLinksResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.IBatchCreateUserLinksResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BatchCreateUserLinksResponse message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.BatchCreateUserLinksResponse.verify|verify} messages. + * @param message BatchCreateUserLinksResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.IBatchCreateUserLinksResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BatchCreateUserLinksResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BatchCreateUserLinksResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.BatchCreateUserLinksResponse; + + /** + * Decodes a BatchCreateUserLinksResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BatchCreateUserLinksResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.BatchCreateUserLinksResponse; + + /** + * Verifies a BatchCreateUserLinksResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BatchCreateUserLinksResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BatchCreateUserLinksResponse + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.BatchCreateUserLinksResponse; + + /** + * Creates a plain object from a BatchCreateUserLinksResponse message. Also converts values to other types if specified. + * @param message BatchCreateUserLinksResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.BatchCreateUserLinksResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BatchCreateUserLinksResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BatchCreateUserLinksResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateUserLinkRequest. */ + interface IUpdateUserLinkRequest { + + /** UpdateUserLinkRequest userLink */ + userLink?: (google.analytics.admin.v1alpha.IUserLink|null); + } + + /** Represents an UpdateUserLinkRequest. */ + class UpdateUserLinkRequest implements IUpdateUserLinkRequest { + + /** + * Constructs a new UpdateUserLinkRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IUpdateUserLinkRequest); + + /** UpdateUserLinkRequest userLink. */ + public userLink?: (google.analytics.admin.v1alpha.IUserLink|null); + + /** + * Creates a new UpdateUserLinkRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateUserLinkRequest instance + */ + public static create(properties?: google.analytics.admin.v1alpha.IUpdateUserLinkRequest): google.analytics.admin.v1alpha.UpdateUserLinkRequest; + + /** + * Encodes the specified UpdateUserLinkRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.UpdateUserLinkRequest.verify|verify} messages. + * @param message UpdateUserLinkRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.IUpdateUserLinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateUserLinkRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.UpdateUserLinkRequest.verify|verify} messages. + * @param message UpdateUserLinkRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.IUpdateUserLinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateUserLinkRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateUserLinkRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.UpdateUserLinkRequest; + + /** + * Decodes an UpdateUserLinkRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateUserLinkRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.UpdateUserLinkRequest; + + /** + * Verifies an UpdateUserLinkRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UpdateUserLinkRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateUserLinkRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.UpdateUserLinkRequest; + + /** + * Creates a plain object from an UpdateUserLinkRequest message. Also converts values to other types if specified. + * @param message UpdateUserLinkRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.UpdateUserLinkRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateUserLinkRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateUserLinkRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a BatchUpdateUserLinksRequest. */ + interface IBatchUpdateUserLinksRequest { + + /** BatchUpdateUserLinksRequest parent */ + parent?: (string|null); + + /** BatchUpdateUserLinksRequest requests */ + requests?: (google.analytics.admin.v1alpha.IUpdateUserLinkRequest[]|null); + } + + /** Represents a BatchUpdateUserLinksRequest. */ + class BatchUpdateUserLinksRequest implements IBatchUpdateUserLinksRequest { + + /** + * Constructs a new BatchUpdateUserLinksRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IBatchUpdateUserLinksRequest); + + /** BatchUpdateUserLinksRequest parent. */ + public parent: string; + + /** BatchUpdateUserLinksRequest requests. */ + public requests: google.analytics.admin.v1alpha.IUpdateUserLinkRequest[]; + + /** + * Creates a new BatchUpdateUserLinksRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns BatchUpdateUserLinksRequest instance + */ + public static create(properties?: google.analytics.admin.v1alpha.IBatchUpdateUserLinksRequest): google.analytics.admin.v1alpha.BatchUpdateUserLinksRequest; + + /** + * Encodes the specified BatchUpdateUserLinksRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.BatchUpdateUserLinksRequest.verify|verify} messages. + * @param message BatchUpdateUserLinksRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.IBatchUpdateUserLinksRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BatchUpdateUserLinksRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.BatchUpdateUserLinksRequest.verify|verify} messages. + * @param message BatchUpdateUserLinksRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.IBatchUpdateUserLinksRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BatchUpdateUserLinksRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BatchUpdateUserLinksRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.BatchUpdateUserLinksRequest; + + /** + * Decodes a BatchUpdateUserLinksRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BatchUpdateUserLinksRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.BatchUpdateUserLinksRequest; + + /** + * Verifies a BatchUpdateUserLinksRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BatchUpdateUserLinksRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BatchUpdateUserLinksRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.BatchUpdateUserLinksRequest; + + /** + * Creates a plain object from a BatchUpdateUserLinksRequest message. Also converts values to other types if specified. + * @param message BatchUpdateUserLinksRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.BatchUpdateUserLinksRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BatchUpdateUserLinksRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BatchUpdateUserLinksRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a BatchUpdateUserLinksResponse. */ + interface IBatchUpdateUserLinksResponse { + + /** BatchUpdateUserLinksResponse userLinks */ + userLinks?: (google.analytics.admin.v1alpha.IUserLink[]|null); + } + + /** Represents a BatchUpdateUserLinksResponse. */ + class BatchUpdateUserLinksResponse implements IBatchUpdateUserLinksResponse { + + /** + * Constructs a new BatchUpdateUserLinksResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IBatchUpdateUserLinksResponse); + + /** BatchUpdateUserLinksResponse userLinks. */ + public userLinks: google.analytics.admin.v1alpha.IUserLink[]; + + /** + * Creates a new BatchUpdateUserLinksResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns BatchUpdateUserLinksResponse instance + */ + public static create(properties?: google.analytics.admin.v1alpha.IBatchUpdateUserLinksResponse): google.analytics.admin.v1alpha.BatchUpdateUserLinksResponse; + + /** + * Encodes the specified BatchUpdateUserLinksResponse message. Does not implicitly {@link google.analytics.admin.v1alpha.BatchUpdateUserLinksResponse.verify|verify} messages. + * @param message BatchUpdateUserLinksResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.IBatchUpdateUserLinksResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BatchUpdateUserLinksResponse message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.BatchUpdateUserLinksResponse.verify|verify} messages. + * @param message BatchUpdateUserLinksResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.IBatchUpdateUserLinksResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BatchUpdateUserLinksResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BatchUpdateUserLinksResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.BatchUpdateUserLinksResponse; + + /** + * Decodes a BatchUpdateUserLinksResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BatchUpdateUserLinksResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.BatchUpdateUserLinksResponse; + + /** + * Verifies a BatchUpdateUserLinksResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BatchUpdateUserLinksResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BatchUpdateUserLinksResponse + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.BatchUpdateUserLinksResponse; + + /** + * Creates a plain object from a BatchUpdateUserLinksResponse message. Also converts values to other types if specified. + * @param message BatchUpdateUserLinksResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.BatchUpdateUserLinksResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BatchUpdateUserLinksResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BatchUpdateUserLinksResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteUserLinkRequest. */ + interface IDeleteUserLinkRequest { + + /** DeleteUserLinkRequest name */ + name?: (string|null); + } + + /** Represents a DeleteUserLinkRequest. */ + class DeleteUserLinkRequest implements IDeleteUserLinkRequest { + + /** + * Constructs a new DeleteUserLinkRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IDeleteUserLinkRequest); + + /** DeleteUserLinkRequest name. */ + public name: string; + + /** + * Creates a new DeleteUserLinkRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteUserLinkRequest instance + */ + public static create(properties?: google.analytics.admin.v1alpha.IDeleteUserLinkRequest): google.analytics.admin.v1alpha.DeleteUserLinkRequest; + + /** + * Encodes the specified DeleteUserLinkRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.DeleteUserLinkRequest.verify|verify} messages. + * @param message DeleteUserLinkRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.IDeleteUserLinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteUserLinkRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.DeleteUserLinkRequest.verify|verify} messages. + * @param message DeleteUserLinkRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.IDeleteUserLinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteUserLinkRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteUserLinkRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.DeleteUserLinkRequest; + + /** + * Decodes a DeleteUserLinkRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteUserLinkRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.DeleteUserLinkRequest; + + /** + * Verifies a DeleteUserLinkRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteUserLinkRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteUserLinkRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.DeleteUserLinkRequest; + + /** + * Creates a plain object from a DeleteUserLinkRequest message. Also converts values to other types if specified. + * @param message DeleteUserLinkRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.DeleteUserLinkRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteUserLinkRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteUserLinkRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a BatchDeleteUserLinksRequest. */ + interface IBatchDeleteUserLinksRequest { + + /** BatchDeleteUserLinksRequest parent */ + parent?: (string|null); + + /** BatchDeleteUserLinksRequest requests */ + requests?: (google.analytics.admin.v1alpha.IDeleteUserLinkRequest[]|null); + } + + /** Represents a BatchDeleteUserLinksRequest. */ + class BatchDeleteUserLinksRequest implements IBatchDeleteUserLinksRequest { + + /** + * Constructs a new BatchDeleteUserLinksRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IBatchDeleteUserLinksRequest); + + /** BatchDeleteUserLinksRequest parent. */ + public parent: string; + + /** BatchDeleteUserLinksRequest requests. */ + public requests: google.analytics.admin.v1alpha.IDeleteUserLinkRequest[]; + + /** + * Creates a new BatchDeleteUserLinksRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns BatchDeleteUserLinksRequest instance + */ + public static create(properties?: google.analytics.admin.v1alpha.IBatchDeleteUserLinksRequest): google.analytics.admin.v1alpha.BatchDeleteUserLinksRequest; + + /** + * Encodes the specified BatchDeleteUserLinksRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.BatchDeleteUserLinksRequest.verify|verify} messages. + * @param message BatchDeleteUserLinksRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.IBatchDeleteUserLinksRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BatchDeleteUserLinksRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.BatchDeleteUserLinksRequest.verify|verify} messages. + * @param message BatchDeleteUserLinksRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.IBatchDeleteUserLinksRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BatchDeleteUserLinksRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BatchDeleteUserLinksRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.BatchDeleteUserLinksRequest; + + /** + * Decodes a BatchDeleteUserLinksRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BatchDeleteUserLinksRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.BatchDeleteUserLinksRequest; + + /** + * Verifies a BatchDeleteUserLinksRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BatchDeleteUserLinksRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BatchDeleteUserLinksRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.BatchDeleteUserLinksRequest; + + /** + * Creates a plain object from a BatchDeleteUserLinksRequest message. Also converts values to other types if specified. + * @param message BatchDeleteUserLinksRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.BatchDeleteUserLinksRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BatchDeleteUserLinksRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BatchDeleteUserLinksRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreateFirebaseLinkRequest. */ + interface ICreateFirebaseLinkRequest { + + /** CreateFirebaseLinkRequest parent */ + parent?: (string|null); + + /** CreateFirebaseLinkRequest firebaseLink */ + firebaseLink?: (google.analytics.admin.v1alpha.IFirebaseLink|null); + } + + /** Represents a CreateFirebaseLinkRequest. */ + class CreateFirebaseLinkRequest implements ICreateFirebaseLinkRequest { + + /** + * Constructs a new CreateFirebaseLinkRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.ICreateFirebaseLinkRequest); + + /** CreateFirebaseLinkRequest parent. */ + public parent: string; + + /** CreateFirebaseLinkRequest firebaseLink. */ + public firebaseLink?: (google.analytics.admin.v1alpha.IFirebaseLink|null); + + /** + * Creates a new CreateFirebaseLinkRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateFirebaseLinkRequest instance + */ + public static create(properties?: google.analytics.admin.v1alpha.ICreateFirebaseLinkRequest): google.analytics.admin.v1alpha.CreateFirebaseLinkRequest; + + /** + * Encodes the specified CreateFirebaseLinkRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.CreateFirebaseLinkRequest.verify|verify} messages. + * @param message CreateFirebaseLinkRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.ICreateFirebaseLinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateFirebaseLinkRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.CreateFirebaseLinkRequest.verify|verify} messages. + * @param message CreateFirebaseLinkRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.ICreateFirebaseLinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateFirebaseLinkRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateFirebaseLinkRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.CreateFirebaseLinkRequest; + + /** + * Decodes a CreateFirebaseLinkRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateFirebaseLinkRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.CreateFirebaseLinkRequest; + + /** + * Verifies a CreateFirebaseLinkRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateFirebaseLinkRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateFirebaseLinkRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.CreateFirebaseLinkRequest; + + /** + * Creates a plain object from a CreateFirebaseLinkRequest message. Also converts values to other types if specified. + * @param message CreateFirebaseLinkRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.CreateFirebaseLinkRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateFirebaseLinkRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateFirebaseLinkRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteFirebaseLinkRequest. */ + interface IDeleteFirebaseLinkRequest { + + /** DeleteFirebaseLinkRequest name */ + name?: (string|null); + } + + /** Represents a DeleteFirebaseLinkRequest. */ + class DeleteFirebaseLinkRequest implements IDeleteFirebaseLinkRequest { + + /** + * Constructs a new DeleteFirebaseLinkRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IDeleteFirebaseLinkRequest); + + /** DeleteFirebaseLinkRequest name. */ + public name: string; + + /** + * Creates a new DeleteFirebaseLinkRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteFirebaseLinkRequest instance + */ + public static create(properties?: google.analytics.admin.v1alpha.IDeleteFirebaseLinkRequest): google.analytics.admin.v1alpha.DeleteFirebaseLinkRequest; + + /** + * Encodes the specified DeleteFirebaseLinkRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.DeleteFirebaseLinkRequest.verify|verify} messages. + * @param message DeleteFirebaseLinkRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.IDeleteFirebaseLinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteFirebaseLinkRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.DeleteFirebaseLinkRequest.verify|verify} messages. + * @param message DeleteFirebaseLinkRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.IDeleteFirebaseLinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteFirebaseLinkRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteFirebaseLinkRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.DeleteFirebaseLinkRequest; + + /** + * Decodes a DeleteFirebaseLinkRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteFirebaseLinkRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.DeleteFirebaseLinkRequest; + + /** + * Verifies a DeleteFirebaseLinkRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteFirebaseLinkRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteFirebaseLinkRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.DeleteFirebaseLinkRequest; + + /** + * Creates a plain object from a DeleteFirebaseLinkRequest message. Also converts values to other types if specified. + * @param message DeleteFirebaseLinkRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.DeleteFirebaseLinkRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteFirebaseLinkRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteFirebaseLinkRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListFirebaseLinksRequest. */ + interface IListFirebaseLinksRequest { + + /** ListFirebaseLinksRequest parent */ + parent?: (string|null); + + /** ListFirebaseLinksRequest pageSize */ + pageSize?: (number|null); + + /** ListFirebaseLinksRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListFirebaseLinksRequest. */ + class ListFirebaseLinksRequest implements IListFirebaseLinksRequest { + + /** + * Constructs a new ListFirebaseLinksRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IListFirebaseLinksRequest); + + /** ListFirebaseLinksRequest parent. */ + public parent: string; + + /** ListFirebaseLinksRequest pageSize. */ + public pageSize: number; + + /** ListFirebaseLinksRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListFirebaseLinksRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListFirebaseLinksRequest instance + */ + public static create(properties?: google.analytics.admin.v1alpha.IListFirebaseLinksRequest): google.analytics.admin.v1alpha.ListFirebaseLinksRequest; + + /** + * Encodes the specified ListFirebaseLinksRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.ListFirebaseLinksRequest.verify|verify} messages. + * @param message ListFirebaseLinksRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.IListFirebaseLinksRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListFirebaseLinksRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.ListFirebaseLinksRequest.verify|verify} messages. + * @param message ListFirebaseLinksRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.IListFirebaseLinksRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListFirebaseLinksRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListFirebaseLinksRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.ListFirebaseLinksRequest; + + /** + * Decodes a ListFirebaseLinksRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListFirebaseLinksRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.ListFirebaseLinksRequest; + + /** + * Verifies a ListFirebaseLinksRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListFirebaseLinksRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListFirebaseLinksRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.ListFirebaseLinksRequest; + + /** + * Creates a plain object from a ListFirebaseLinksRequest message. Also converts values to other types if specified. + * @param message ListFirebaseLinksRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.ListFirebaseLinksRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListFirebaseLinksRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListFirebaseLinksRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListFirebaseLinksResponse. */ + interface IListFirebaseLinksResponse { + + /** ListFirebaseLinksResponse firebaseLinks */ + firebaseLinks?: (google.analytics.admin.v1alpha.IFirebaseLink[]|null); + + /** ListFirebaseLinksResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListFirebaseLinksResponse. */ + class ListFirebaseLinksResponse implements IListFirebaseLinksResponse { + + /** + * Constructs a new ListFirebaseLinksResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IListFirebaseLinksResponse); + + /** ListFirebaseLinksResponse firebaseLinks. */ + public firebaseLinks: google.analytics.admin.v1alpha.IFirebaseLink[]; + + /** ListFirebaseLinksResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListFirebaseLinksResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListFirebaseLinksResponse instance + */ + public static create(properties?: google.analytics.admin.v1alpha.IListFirebaseLinksResponse): google.analytics.admin.v1alpha.ListFirebaseLinksResponse; + + /** + * Encodes the specified ListFirebaseLinksResponse message. Does not implicitly {@link google.analytics.admin.v1alpha.ListFirebaseLinksResponse.verify|verify} messages. + * @param message ListFirebaseLinksResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.IListFirebaseLinksResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListFirebaseLinksResponse message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.ListFirebaseLinksResponse.verify|verify} messages. + * @param message ListFirebaseLinksResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.IListFirebaseLinksResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListFirebaseLinksResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListFirebaseLinksResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.ListFirebaseLinksResponse; + + /** + * Decodes a ListFirebaseLinksResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListFirebaseLinksResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.ListFirebaseLinksResponse; + + /** + * Verifies a ListFirebaseLinksResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListFirebaseLinksResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListFirebaseLinksResponse + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.ListFirebaseLinksResponse; + + /** + * Creates a plain object from a ListFirebaseLinksResponse message. Also converts values to other types if specified. + * @param message ListFirebaseLinksResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.ListFirebaseLinksResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListFirebaseLinksResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListFirebaseLinksResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetGlobalSiteTagRequest. */ + interface IGetGlobalSiteTagRequest { + + /** GetGlobalSiteTagRequest name */ + name?: (string|null); + } + + /** Represents a GetGlobalSiteTagRequest. */ + class GetGlobalSiteTagRequest implements IGetGlobalSiteTagRequest { + + /** + * Constructs a new GetGlobalSiteTagRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IGetGlobalSiteTagRequest); + + /** GetGlobalSiteTagRequest name. */ + public name: string; + + /** + * Creates a new GetGlobalSiteTagRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetGlobalSiteTagRequest instance + */ + public static create(properties?: google.analytics.admin.v1alpha.IGetGlobalSiteTagRequest): google.analytics.admin.v1alpha.GetGlobalSiteTagRequest; + + /** + * Encodes the specified GetGlobalSiteTagRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.GetGlobalSiteTagRequest.verify|verify} messages. + * @param message GetGlobalSiteTagRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.IGetGlobalSiteTagRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetGlobalSiteTagRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.GetGlobalSiteTagRequest.verify|verify} messages. + * @param message GetGlobalSiteTagRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.IGetGlobalSiteTagRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetGlobalSiteTagRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetGlobalSiteTagRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.GetGlobalSiteTagRequest; + + /** + * Decodes a GetGlobalSiteTagRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetGlobalSiteTagRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.GetGlobalSiteTagRequest; + + /** + * Verifies a GetGlobalSiteTagRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetGlobalSiteTagRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetGlobalSiteTagRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.GetGlobalSiteTagRequest; + + /** + * Creates a plain object from a GetGlobalSiteTagRequest message. Also converts values to other types if specified. + * @param message GetGlobalSiteTagRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.GetGlobalSiteTagRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetGlobalSiteTagRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetGlobalSiteTagRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreateGoogleAdsLinkRequest. */ + interface ICreateGoogleAdsLinkRequest { + + /** CreateGoogleAdsLinkRequest parent */ + parent?: (string|null); + + /** CreateGoogleAdsLinkRequest googleAdsLink */ + googleAdsLink?: (google.analytics.admin.v1alpha.IGoogleAdsLink|null); + } + + /** Represents a CreateGoogleAdsLinkRequest. */ + class CreateGoogleAdsLinkRequest implements ICreateGoogleAdsLinkRequest { + + /** + * Constructs a new CreateGoogleAdsLinkRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.ICreateGoogleAdsLinkRequest); + + /** CreateGoogleAdsLinkRequest parent. */ + public parent: string; + + /** CreateGoogleAdsLinkRequest googleAdsLink. */ + public googleAdsLink?: (google.analytics.admin.v1alpha.IGoogleAdsLink|null); + + /** + * Creates a new CreateGoogleAdsLinkRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateGoogleAdsLinkRequest instance + */ + public static create(properties?: google.analytics.admin.v1alpha.ICreateGoogleAdsLinkRequest): google.analytics.admin.v1alpha.CreateGoogleAdsLinkRequest; + + /** + * Encodes the specified CreateGoogleAdsLinkRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.CreateGoogleAdsLinkRequest.verify|verify} messages. + * @param message CreateGoogleAdsLinkRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.ICreateGoogleAdsLinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateGoogleAdsLinkRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.CreateGoogleAdsLinkRequest.verify|verify} messages. + * @param message CreateGoogleAdsLinkRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.ICreateGoogleAdsLinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateGoogleAdsLinkRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateGoogleAdsLinkRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.CreateGoogleAdsLinkRequest; + + /** + * Decodes a CreateGoogleAdsLinkRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateGoogleAdsLinkRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.CreateGoogleAdsLinkRequest; + + /** + * Verifies a CreateGoogleAdsLinkRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateGoogleAdsLinkRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateGoogleAdsLinkRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.CreateGoogleAdsLinkRequest; + + /** + * Creates a plain object from a CreateGoogleAdsLinkRequest message. Also converts values to other types if specified. + * @param message CreateGoogleAdsLinkRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.CreateGoogleAdsLinkRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateGoogleAdsLinkRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateGoogleAdsLinkRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateGoogleAdsLinkRequest. */ + interface IUpdateGoogleAdsLinkRequest { + + /** UpdateGoogleAdsLinkRequest googleAdsLink */ + googleAdsLink?: (google.analytics.admin.v1alpha.IGoogleAdsLink|null); + + /** UpdateGoogleAdsLinkRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + } + + /** Represents an UpdateGoogleAdsLinkRequest. */ + class UpdateGoogleAdsLinkRequest implements IUpdateGoogleAdsLinkRequest { + + /** + * Constructs a new UpdateGoogleAdsLinkRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IUpdateGoogleAdsLinkRequest); + + /** UpdateGoogleAdsLinkRequest googleAdsLink. */ + public googleAdsLink?: (google.analytics.admin.v1alpha.IGoogleAdsLink|null); + + /** UpdateGoogleAdsLinkRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** + * Creates a new UpdateGoogleAdsLinkRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateGoogleAdsLinkRequest instance + */ + public static create(properties?: google.analytics.admin.v1alpha.IUpdateGoogleAdsLinkRequest): google.analytics.admin.v1alpha.UpdateGoogleAdsLinkRequest; + + /** + * Encodes the specified UpdateGoogleAdsLinkRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.UpdateGoogleAdsLinkRequest.verify|verify} messages. + * @param message UpdateGoogleAdsLinkRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.IUpdateGoogleAdsLinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateGoogleAdsLinkRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.UpdateGoogleAdsLinkRequest.verify|verify} messages. + * @param message UpdateGoogleAdsLinkRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.IUpdateGoogleAdsLinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateGoogleAdsLinkRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateGoogleAdsLinkRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.UpdateGoogleAdsLinkRequest; + + /** + * Decodes an UpdateGoogleAdsLinkRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateGoogleAdsLinkRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.UpdateGoogleAdsLinkRequest; + + /** + * Verifies an UpdateGoogleAdsLinkRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UpdateGoogleAdsLinkRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateGoogleAdsLinkRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.UpdateGoogleAdsLinkRequest; + + /** + * Creates a plain object from an UpdateGoogleAdsLinkRequest message. Also converts values to other types if specified. + * @param message UpdateGoogleAdsLinkRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.UpdateGoogleAdsLinkRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateGoogleAdsLinkRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateGoogleAdsLinkRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteGoogleAdsLinkRequest. */ + interface IDeleteGoogleAdsLinkRequest { + + /** DeleteGoogleAdsLinkRequest name */ + name?: (string|null); + } + + /** Represents a DeleteGoogleAdsLinkRequest. */ + class DeleteGoogleAdsLinkRequest implements IDeleteGoogleAdsLinkRequest { + + /** + * Constructs a new DeleteGoogleAdsLinkRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IDeleteGoogleAdsLinkRequest); + + /** DeleteGoogleAdsLinkRequest name. */ + public name: string; + + /** + * Creates a new DeleteGoogleAdsLinkRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteGoogleAdsLinkRequest instance + */ + public static create(properties?: google.analytics.admin.v1alpha.IDeleteGoogleAdsLinkRequest): google.analytics.admin.v1alpha.DeleteGoogleAdsLinkRequest; + + /** + * Encodes the specified DeleteGoogleAdsLinkRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.DeleteGoogleAdsLinkRequest.verify|verify} messages. + * @param message DeleteGoogleAdsLinkRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.IDeleteGoogleAdsLinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteGoogleAdsLinkRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.DeleteGoogleAdsLinkRequest.verify|verify} messages. + * @param message DeleteGoogleAdsLinkRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.IDeleteGoogleAdsLinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteGoogleAdsLinkRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteGoogleAdsLinkRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.DeleteGoogleAdsLinkRequest; + + /** + * Decodes a DeleteGoogleAdsLinkRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteGoogleAdsLinkRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.DeleteGoogleAdsLinkRequest; + + /** + * Verifies a DeleteGoogleAdsLinkRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteGoogleAdsLinkRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteGoogleAdsLinkRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.DeleteGoogleAdsLinkRequest; + + /** + * Creates a plain object from a DeleteGoogleAdsLinkRequest message. Also converts values to other types if specified. + * @param message DeleteGoogleAdsLinkRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.DeleteGoogleAdsLinkRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteGoogleAdsLinkRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteGoogleAdsLinkRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListGoogleAdsLinksRequest. */ + interface IListGoogleAdsLinksRequest { + + /** ListGoogleAdsLinksRequest parent */ + parent?: (string|null); + + /** ListGoogleAdsLinksRequest pageSize */ + pageSize?: (number|null); + + /** ListGoogleAdsLinksRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListGoogleAdsLinksRequest. */ + class ListGoogleAdsLinksRequest implements IListGoogleAdsLinksRequest { + + /** + * Constructs a new ListGoogleAdsLinksRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IListGoogleAdsLinksRequest); + + /** ListGoogleAdsLinksRequest parent. */ + public parent: string; + + /** ListGoogleAdsLinksRequest pageSize. */ + public pageSize: number; + + /** ListGoogleAdsLinksRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListGoogleAdsLinksRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListGoogleAdsLinksRequest instance + */ + public static create(properties?: google.analytics.admin.v1alpha.IListGoogleAdsLinksRequest): google.analytics.admin.v1alpha.ListGoogleAdsLinksRequest; + + /** + * Encodes the specified ListGoogleAdsLinksRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.ListGoogleAdsLinksRequest.verify|verify} messages. + * @param message ListGoogleAdsLinksRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.IListGoogleAdsLinksRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListGoogleAdsLinksRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.ListGoogleAdsLinksRequest.verify|verify} messages. + * @param message ListGoogleAdsLinksRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.IListGoogleAdsLinksRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListGoogleAdsLinksRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListGoogleAdsLinksRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.ListGoogleAdsLinksRequest; + + /** + * Decodes a ListGoogleAdsLinksRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListGoogleAdsLinksRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.ListGoogleAdsLinksRequest; + + /** + * Verifies a ListGoogleAdsLinksRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListGoogleAdsLinksRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListGoogleAdsLinksRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.ListGoogleAdsLinksRequest; + + /** + * Creates a plain object from a ListGoogleAdsLinksRequest message. Also converts values to other types if specified. + * @param message ListGoogleAdsLinksRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.ListGoogleAdsLinksRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListGoogleAdsLinksRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListGoogleAdsLinksRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListGoogleAdsLinksResponse. */ + interface IListGoogleAdsLinksResponse { + + /** ListGoogleAdsLinksResponse googleAdsLinks */ + googleAdsLinks?: (google.analytics.admin.v1alpha.IGoogleAdsLink[]|null); + + /** ListGoogleAdsLinksResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListGoogleAdsLinksResponse. */ + class ListGoogleAdsLinksResponse implements IListGoogleAdsLinksResponse { + + /** + * Constructs a new ListGoogleAdsLinksResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IListGoogleAdsLinksResponse); + + /** ListGoogleAdsLinksResponse googleAdsLinks. */ + public googleAdsLinks: google.analytics.admin.v1alpha.IGoogleAdsLink[]; + + /** ListGoogleAdsLinksResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListGoogleAdsLinksResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListGoogleAdsLinksResponse instance + */ + public static create(properties?: google.analytics.admin.v1alpha.IListGoogleAdsLinksResponse): google.analytics.admin.v1alpha.ListGoogleAdsLinksResponse; + + /** + * Encodes the specified ListGoogleAdsLinksResponse message. Does not implicitly {@link google.analytics.admin.v1alpha.ListGoogleAdsLinksResponse.verify|verify} messages. + * @param message ListGoogleAdsLinksResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.IListGoogleAdsLinksResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListGoogleAdsLinksResponse message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.ListGoogleAdsLinksResponse.verify|verify} messages. + * @param message ListGoogleAdsLinksResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.IListGoogleAdsLinksResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListGoogleAdsLinksResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListGoogleAdsLinksResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.ListGoogleAdsLinksResponse; + + /** + * Decodes a ListGoogleAdsLinksResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListGoogleAdsLinksResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.ListGoogleAdsLinksResponse; + + /** + * Verifies a ListGoogleAdsLinksResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListGoogleAdsLinksResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListGoogleAdsLinksResponse + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.ListGoogleAdsLinksResponse; + + /** + * Creates a plain object from a ListGoogleAdsLinksResponse message. Also converts values to other types if specified. + * @param message ListGoogleAdsLinksResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.ListGoogleAdsLinksResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListGoogleAdsLinksResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListGoogleAdsLinksResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetDataSharingSettingsRequest. */ + interface IGetDataSharingSettingsRequest { + + /** GetDataSharingSettingsRequest name */ + name?: (string|null); + } + + /** Represents a GetDataSharingSettingsRequest. */ + class GetDataSharingSettingsRequest implements IGetDataSharingSettingsRequest { + + /** + * Constructs a new GetDataSharingSettingsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IGetDataSharingSettingsRequest); + + /** GetDataSharingSettingsRequest name. */ + public name: string; + + /** + * Creates a new GetDataSharingSettingsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetDataSharingSettingsRequest instance + */ + public static create(properties?: google.analytics.admin.v1alpha.IGetDataSharingSettingsRequest): google.analytics.admin.v1alpha.GetDataSharingSettingsRequest; + + /** + * Encodes the specified GetDataSharingSettingsRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.GetDataSharingSettingsRequest.verify|verify} messages. + * @param message GetDataSharingSettingsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.IGetDataSharingSettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetDataSharingSettingsRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.GetDataSharingSettingsRequest.verify|verify} messages. + * @param message GetDataSharingSettingsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.IGetDataSharingSettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetDataSharingSettingsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetDataSharingSettingsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.GetDataSharingSettingsRequest; + + /** + * Decodes a GetDataSharingSettingsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetDataSharingSettingsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.GetDataSharingSettingsRequest; + + /** + * Verifies a GetDataSharingSettingsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetDataSharingSettingsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetDataSharingSettingsRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.GetDataSharingSettingsRequest; + + /** + * Creates a plain object from a GetDataSharingSettingsRequest message. Also converts values to other types if specified. + * @param message GetDataSharingSettingsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.GetDataSharingSettingsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetDataSharingSettingsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetDataSharingSettingsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListAccountSummariesRequest. */ + interface IListAccountSummariesRequest { + + /** ListAccountSummariesRequest pageSize */ + pageSize?: (number|null); + + /** ListAccountSummariesRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListAccountSummariesRequest. */ + class ListAccountSummariesRequest implements IListAccountSummariesRequest { + + /** + * Constructs a new ListAccountSummariesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IListAccountSummariesRequest); + + /** ListAccountSummariesRequest pageSize. */ + public pageSize: number; + + /** ListAccountSummariesRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListAccountSummariesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListAccountSummariesRequest instance + */ + public static create(properties?: google.analytics.admin.v1alpha.IListAccountSummariesRequest): google.analytics.admin.v1alpha.ListAccountSummariesRequest; + + /** + * Encodes the specified ListAccountSummariesRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.ListAccountSummariesRequest.verify|verify} messages. + * @param message ListAccountSummariesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.IListAccountSummariesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListAccountSummariesRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.ListAccountSummariesRequest.verify|verify} messages. + * @param message ListAccountSummariesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.IListAccountSummariesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListAccountSummariesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListAccountSummariesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.ListAccountSummariesRequest; + + /** + * Decodes a ListAccountSummariesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListAccountSummariesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.ListAccountSummariesRequest; + + /** + * Verifies a ListAccountSummariesRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListAccountSummariesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListAccountSummariesRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.ListAccountSummariesRequest; + + /** + * Creates a plain object from a ListAccountSummariesRequest message. Also converts values to other types if specified. + * @param message ListAccountSummariesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.ListAccountSummariesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListAccountSummariesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListAccountSummariesRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListAccountSummariesResponse. */ + interface IListAccountSummariesResponse { + + /** ListAccountSummariesResponse accountSummaries */ + accountSummaries?: (google.analytics.admin.v1alpha.IAccountSummary[]|null); + + /** ListAccountSummariesResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListAccountSummariesResponse. */ + class ListAccountSummariesResponse implements IListAccountSummariesResponse { + + /** + * Constructs a new ListAccountSummariesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IListAccountSummariesResponse); + + /** ListAccountSummariesResponse accountSummaries. */ + public accountSummaries: google.analytics.admin.v1alpha.IAccountSummary[]; + + /** ListAccountSummariesResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListAccountSummariesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListAccountSummariesResponse instance + */ + public static create(properties?: google.analytics.admin.v1alpha.IListAccountSummariesResponse): google.analytics.admin.v1alpha.ListAccountSummariesResponse; + + /** + * Encodes the specified ListAccountSummariesResponse message. Does not implicitly {@link google.analytics.admin.v1alpha.ListAccountSummariesResponse.verify|verify} messages. + * @param message ListAccountSummariesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.IListAccountSummariesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListAccountSummariesResponse message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.ListAccountSummariesResponse.verify|verify} messages. + * @param message ListAccountSummariesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.IListAccountSummariesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListAccountSummariesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListAccountSummariesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.ListAccountSummariesResponse; + + /** + * Decodes a ListAccountSummariesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListAccountSummariesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.ListAccountSummariesResponse; + + /** + * Verifies a ListAccountSummariesResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListAccountSummariesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListAccountSummariesResponse + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.ListAccountSummariesResponse; + + /** + * Creates a plain object from a ListAccountSummariesResponse message. Also converts values to other types if specified. + * @param message ListAccountSummariesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.ListAccountSummariesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListAccountSummariesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListAccountSummariesResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AcknowledgeUserDataCollectionRequest. */ + interface IAcknowledgeUserDataCollectionRequest { + + /** AcknowledgeUserDataCollectionRequest property */ + property?: (string|null); + + /** AcknowledgeUserDataCollectionRequest acknowledgement */ + acknowledgement?: (string|null); + } + + /** Represents an AcknowledgeUserDataCollectionRequest. */ + class AcknowledgeUserDataCollectionRequest implements IAcknowledgeUserDataCollectionRequest { + + /** + * Constructs a new AcknowledgeUserDataCollectionRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IAcknowledgeUserDataCollectionRequest); + + /** AcknowledgeUserDataCollectionRequest property. */ + public property: string; + + /** AcknowledgeUserDataCollectionRequest acknowledgement. */ + public acknowledgement: string; + + /** + * Creates a new AcknowledgeUserDataCollectionRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns AcknowledgeUserDataCollectionRequest instance + */ + public static create(properties?: google.analytics.admin.v1alpha.IAcknowledgeUserDataCollectionRequest): google.analytics.admin.v1alpha.AcknowledgeUserDataCollectionRequest; + + /** + * Encodes the specified AcknowledgeUserDataCollectionRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.AcknowledgeUserDataCollectionRequest.verify|verify} messages. + * @param message AcknowledgeUserDataCollectionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.IAcknowledgeUserDataCollectionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AcknowledgeUserDataCollectionRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AcknowledgeUserDataCollectionRequest.verify|verify} messages. + * @param message AcknowledgeUserDataCollectionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.IAcknowledgeUserDataCollectionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AcknowledgeUserDataCollectionRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AcknowledgeUserDataCollectionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.AcknowledgeUserDataCollectionRequest; + + /** + * Decodes an AcknowledgeUserDataCollectionRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AcknowledgeUserDataCollectionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.AcknowledgeUserDataCollectionRequest; + + /** + * Verifies an AcknowledgeUserDataCollectionRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AcknowledgeUserDataCollectionRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AcknowledgeUserDataCollectionRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.AcknowledgeUserDataCollectionRequest; + + /** + * Creates a plain object from an AcknowledgeUserDataCollectionRequest message. Also converts values to other types if specified. + * @param message AcknowledgeUserDataCollectionRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.AcknowledgeUserDataCollectionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AcknowledgeUserDataCollectionRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AcknowledgeUserDataCollectionRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AcknowledgeUserDataCollectionResponse. */ + interface IAcknowledgeUserDataCollectionResponse { + } + + /** Represents an AcknowledgeUserDataCollectionResponse. */ + class AcknowledgeUserDataCollectionResponse implements IAcknowledgeUserDataCollectionResponse { + + /** + * Constructs a new AcknowledgeUserDataCollectionResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IAcknowledgeUserDataCollectionResponse); + + /** + * Creates a new AcknowledgeUserDataCollectionResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns AcknowledgeUserDataCollectionResponse instance + */ + public static create(properties?: google.analytics.admin.v1alpha.IAcknowledgeUserDataCollectionResponse): google.analytics.admin.v1alpha.AcknowledgeUserDataCollectionResponse; + + /** + * Encodes the specified AcknowledgeUserDataCollectionResponse message. Does not implicitly {@link google.analytics.admin.v1alpha.AcknowledgeUserDataCollectionResponse.verify|verify} messages. + * @param message AcknowledgeUserDataCollectionResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.IAcknowledgeUserDataCollectionResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AcknowledgeUserDataCollectionResponse message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AcknowledgeUserDataCollectionResponse.verify|verify} messages. + * @param message AcknowledgeUserDataCollectionResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.IAcknowledgeUserDataCollectionResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AcknowledgeUserDataCollectionResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AcknowledgeUserDataCollectionResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.AcknowledgeUserDataCollectionResponse; + + /** + * Decodes an AcknowledgeUserDataCollectionResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AcknowledgeUserDataCollectionResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.AcknowledgeUserDataCollectionResponse; + + /** + * Verifies an AcknowledgeUserDataCollectionResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AcknowledgeUserDataCollectionResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AcknowledgeUserDataCollectionResponse + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.AcknowledgeUserDataCollectionResponse; + + /** + * Creates a plain object from an AcknowledgeUserDataCollectionResponse message. Also converts values to other types if specified. + * @param message AcknowledgeUserDataCollectionResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.AcknowledgeUserDataCollectionResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AcknowledgeUserDataCollectionResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AcknowledgeUserDataCollectionResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SearchChangeHistoryEventsRequest. */ + interface ISearchChangeHistoryEventsRequest { + + /** SearchChangeHistoryEventsRequest account */ + account?: (string|null); + + /** SearchChangeHistoryEventsRequest property */ + property?: (string|null); + + /** SearchChangeHistoryEventsRequest resourceType */ + resourceType?: (google.analytics.admin.v1alpha.ChangeHistoryResourceType[]|null); + + /** SearchChangeHistoryEventsRequest action */ + action?: (google.analytics.admin.v1alpha.ActionType[]|null); + + /** SearchChangeHistoryEventsRequest actorEmail */ + actorEmail?: (string[]|null); + + /** SearchChangeHistoryEventsRequest earliestChangeTime */ + earliestChangeTime?: (google.protobuf.ITimestamp|null); + + /** SearchChangeHistoryEventsRequest latestChangeTime */ + latestChangeTime?: (google.protobuf.ITimestamp|null); + + /** SearchChangeHistoryEventsRequest pageSize */ + pageSize?: (number|null); + + /** SearchChangeHistoryEventsRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a SearchChangeHistoryEventsRequest. */ + class SearchChangeHistoryEventsRequest implements ISearchChangeHistoryEventsRequest { + + /** + * Constructs a new SearchChangeHistoryEventsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.ISearchChangeHistoryEventsRequest); + + /** SearchChangeHistoryEventsRequest account. */ + public account: string; + + /** SearchChangeHistoryEventsRequest property. */ + public property: string; + + /** SearchChangeHistoryEventsRequest resourceType. */ + public resourceType: google.analytics.admin.v1alpha.ChangeHistoryResourceType[]; + + /** SearchChangeHistoryEventsRequest action. */ + public action: google.analytics.admin.v1alpha.ActionType[]; + + /** SearchChangeHistoryEventsRequest actorEmail. */ + public actorEmail: string[]; + + /** SearchChangeHistoryEventsRequest earliestChangeTime. */ + public earliestChangeTime?: (google.protobuf.ITimestamp|null); + + /** SearchChangeHistoryEventsRequest latestChangeTime. */ + public latestChangeTime?: (google.protobuf.ITimestamp|null); + + /** SearchChangeHistoryEventsRequest pageSize. */ + public pageSize: number; + + /** SearchChangeHistoryEventsRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new SearchChangeHistoryEventsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns SearchChangeHistoryEventsRequest instance + */ + public static create(properties?: google.analytics.admin.v1alpha.ISearchChangeHistoryEventsRequest): google.analytics.admin.v1alpha.SearchChangeHistoryEventsRequest; + + /** + * Encodes the specified SearchChangeHistoryEventsRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.SearchChangeHistoryEventsRequest.verify|verify} messages. + * @param message SearchChangeHistoryEventsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.ISearchChangeHistoryEventsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SearchChangeHistoryEventsRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.SearchChangeHistoryEventsRequest.verify|verify} messages. + * @param message SearchChangeHistoryEventsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.ISearchChangeHistoryEventsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SearchChangeHistoryEventsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SearchChangeHistoryEventsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.SearchChangeHistoryEventsRequest; + + /** + * Decodes a SearchChangeHistoryEventsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SearchChangeHistoryEventsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.SearchChangeHistoryEventsRequest; + + /** + * Verifies a SearchChangeHistoryEventsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SearchChangeHistoryEventsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SearchChangeHistoryEventsRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.SearchChangeHistoryEventsRequest; + + /** + * Creates a plain object from a SearchChangeHistoryEventsRequest message. Also converts values to other types if specified. + * @param message SearchChangeHistoryEventsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.SearchChangeHistoryEventsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SearchChangeHistoryEventsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SearchChangeHistoryEventsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SearchChangeHistoryEventsResponse. */ + interface ISearchChangeHistoryEventsResponse { + + /** SearchChangeHistoryEventsResponse changeHistoryEvents */ + changeHistoryEvents?: (google.analytics.admin.v1alpha.IChangeHistoryEvent[]|null); + + /** SearchChangeHistoryEventsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a SearchChangeHistoryEventsResponse. */ + class SearchChangeHistoryEventsResponse implements ISearchChangeHistoryEventsResponse { + + /** + * Constructs a new SearchChangeHistoryEventsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.ISearchChangeHistoryEventsResponse); + + /** SearchChangeHistoryEventsResponse changeHistoryEvents. */ + public changeHistoryEvents: google.analytics.admin.v1alpha.IChangeHistoryEvent[]; + + /** SearchChangeHistoryEventsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new SearchChangeHistoryEventsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns SearchChangeHistoryEventsResponse instance + */ + public static create(properties?: google.analytics.admin.v1alpha.ISearchChangeHistoryEventsResponse): google.analytics.admin.v1alpha.SearchChangeHistoryEventsResponse; + + /** + * Encodes the specified SearchChangeHistoryEventsResponse message. Does not implicitly {@link google.analytics.admin.v1alpha.SearchChangeHistoryEventsResponse.verify|verify} messages. + * @param message SearchChangeHistoryEventsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.ISearchChangeHistoryEventsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SearchChangeHistoryEventsResponse message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.SearchChangeHistoryEventsResponse.verify|verify} messages. + * @param message SearchChangeHistoryEventsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.ISearchChangeHistoryEventsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SearchChangeHistoryEventsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SearchChangeHistoryEventsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.SearchChangeHistoryEventsResponse; + + /** + * Decodes a SearchChangeHistoryEventsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SearchChangeHistoryEventsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.SearchChangeHistoryEventsResponse; + + /** + * Verifies a SearchChangeHistoryEventsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SearchChangeHistoryEventsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SearchChangeHistoryEventsResponse + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.SearchChangeHistoryEventsResponse; + + /** + * Creates a plain object from a SearchChangeHistoryEventsResponse message. Also converts values to other types if specified. + * @param message SearchChangeHistoryEventsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.SearchChangeHistoryEventsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SearchChangeHistoryEventsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SearchChangeHistoryEventsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetMeasurementProtocolSecretRequest. */ + interface IGetMeasurementProtocolSecretRequest { + + /** GetMeasurementProtocolSecretRequest name */ + name?: (string|null); + } + + /** Represents a GetMeasurementProtocolSecretRequest. */ + class GetMeasurementProtocolSecretRequest implements IGetMeasurementProtocolSecretRequest { + + /** + * Constructs a new GetMeasurementProtocolSecretRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IGetMeasurementProtocolSecretRequest); + + /** GetMeasurementProtocolSecretRequest name. */ + public name: string; + + /** + * Creates a new GetMeasurementProtocolSecretRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetMeasurementProtocolSecretRequest instance + */ + public static create(properties?: google.analytics.admin.v1alpha.IGetMeasurementProtocolSecretRequest): google.analytics.admin.v1alpha.GetMeasurementProtocolSecretRequest; + + /** + * Encodes the specified GetMeasurementProtocolSecretRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.GetMeasurementProtocolSecretRequest.verify|verify} messages. + * @param message GetMeasurementProtocolSecretRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.IGetMeasurementProtocolSecretRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetMeasurementProtocolSecretRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.GetMeasurementProtocolSecretRequest.verify|verify} messages. + * @param message GetMeasurementProtocolSecretRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.IGetMeasurementProtocolSecretRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetMeasurementProtocolSecretRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetMeasurementProtocolSecretRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.GetMeasurementProtocolSecretRequest; + + /** + * Decodes a GetMeasurementProtocolSecretRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetMeasurementProtocolSecretRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.GetMeasurementProtocolSecretRequest; + + /** + * Verifies a GetMeasurementProtocolSecretRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetMeasurementProtocolSecretRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetMeasurementProtocolSecretRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.GetMeasurementProtocolSecretRequest; + + /** + * Creates a plain object from a GetMeasurementProtocolSecretRequest message. Also converts values to other types if specified. + * @param message GetMeasurementProtocolSecretRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.GetMeasurementProtocolSecretRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetMeasurementProtocolSecretRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetMeasurementProtocolSecretRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreateMeasurementProtocolSecretRequest. */ + interface ICreateMeasurementProtocolSecretRequest { + + /** CreateMeasurementProtocolSecretRequest parent */ + parent?: (string|null); + + /** CreateMeasurementProtocolSecretRequest measurementProtocolSecret */ + measurementProtocolSecret?: (google.analytics.admin.v1alpha.IMeasurementProtocolSecret|null); + } + + /** Represents a CreateMeasurementProtocolSecretRequest. */ + class CreateMeasurementProtocolSecretRequest implements ICreateMeasurementProtocolSecretRequest { + + /** + * Constructs a new CreateMeasurementProtocolSecretRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.ICreateMeasurementProtocolSecretRequest); + + /** CreateMeasurementProtocolSecretRequest parent. */ + public parent: string; + + /** CreateMeasurementProtocolSecretRequest measurementProtocolSecret. */ + public measurementProtocolSecret?: (google.analytics.admin.v1alpha.IMeasurementProtocolSecret|null); + + /** + * Creates a new CreateMeasurementProtocolSecretRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateMeasurementProtocolSecretRequest instance + */ + public static create(properties?: google.analytics.admin.v1alpha.ICreateMeasurementProtocolSecretRequest): google.analytics.admin.v1alpha.CreateMeasurementProtocolSecretRequest; + + /** + * Encodes the specified CreateMeasurementProtocolSecretRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.CreateMeasurementProtocolSecretRequest.verify|verify} messages. + * @param message CreateMeasurementProtocolSecretRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.ICreateMeasurementProtocolSecretRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateMeasurementProtocolSecretRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.CreateMeasurementProtocolSecretRequest.verify|verify} messages. + * @param message CreateMeasurementProtocolSecretRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.ICreateMeasurementProtocolSecretRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateMeasurementProtocolSecretRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateMeasurementProtocolSecretRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.CreateMeasurementProtocolSecretRequest; + + /** + * Decodes a CreateMeasurementProtocolSecretRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateMeasurementProtocolSecretRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.CreateMeasurementProtocolSecretRequest; + + /** + * Verifies a CreateMeasurementProtocolSecretRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateMeasurementProtocolSecretRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateMeasurementProtocolSecretRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.CreateMeasurementProtocolSecretRequest; + + /** + * Creates a plain object from a CreateMeasurementProtocolSecretRequest message. Also converts values to other types if specified. + * @param message CreateMeasurementProtocolSecretRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.CreateMeasurementProtocolSecretRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateMeasurementProtocolSecretRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateMeasurementProtocolSecretRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteMeasurementProtocolSecretRequest. */ + interface IDeleteMeasurementProtocolSecretRequest { + + /** DeleteMeasurementProtocolSecretRequest name */ + name?: (string|null); + } + + /** Represents a DeleteMeasurementProtocolSecretRequest. */ + class DeleteMeasurementProtocolSecretRequest implements IDeleteMeasurementProtocolSecretRequest { + + /** + * Constructs a new DeleteMeasurementProtocolSecretRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IDeleteMeasurementProtocolSecretRequest); + + /** DeleteMeasurementProtocolSecretRequest name. */ + public name: string; + + /** + * Creates a new DeleteMeasurementProtocolSecretRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteMeasurementProtocolSecretRequest instance + */ + public static create(properties?: google.analytics.admin.v1alpha.IDeleteMeasurementProtocolSecretRequest): google.analytics.admin.v1alpha.DeleteMeasurementProtocolSecretRequest; + + /** + * Encodes the specified DeleteMeasurementProtocolSecretRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.DeleteMeasurementProtocolSecretRequest.verify|verify} messages. + * @param message DeleteMeasurementProtocolSecretRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.IDeleteMeasurementProtocolSecretRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteMeasurementProtocolSecretRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.DeleteMeasurementProtocolSecretRequest.verify|verify} messages. + * @param message DeleteMeasurementProtocolSecretRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.IDeleteMeasurementProtocolSecretRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteMeasurementProtocolSecretRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteMeasurementProtocolSecretRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.DeleteMeasurementProtocolSecretRequest; + + /** + * Decodes a DeleteMeasurementProtocolSecretRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteMeasurementProtocolSecretRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.DeleteMeasurementProtocolSecretRequest; + + /** + * Verifies a DeleteMeasurementProtocolSecretRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteMeasurementProtocolSecretRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteMeasurementProtocolSecretRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.DeleteMeasurementProtocolSecretRequest; + + /** + * Creates a plain object from a DeleteMeasurementProtocolSecretRequest message. Also converts values to other types if specified. + * @param message DeleteMeasurementProtocolSecretRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.DeleteMeasurementProtocolSecretRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteMeasurementProtocolSecretRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteMeasurementProtocolSecretRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateMeasurementProtocolSecretRequest. */ + interface IUpdateMeasurementProtocolSecretRequest { + + /** UpdateMeasurementProtocolSecretRequest measurementProtocolSecret */ + measurementProtocolSecret?: (google.analytics.admin.v1alpha.IMeasurementProtocolSecret|null); + + /** UpdateMeasurementProtocolSecretRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + } + + /** Represents an UpdateMeasurementProtocolSecretRequest. */ + class UpdateMeasurementProtocolSecretRequest implements IUpdateMeasurementProtocolSecretRequest { + + /** + * Constructs a new UpdateMeasurementProtocolSecretRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IUpdateMeasurementProtocolSecretRequest); + + /** UpdateMeasurementProtocolSecretRequest measurementProtocolSecret. */ + public measurementProtocolSecret?: (google.analytics.admin.v1alpha.IMeasurementProtocolSecret|null); + + /** UpdateMeasurementProtocolSecretRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** + * Creates a new UpdateMeasurementProtocolSecretRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateMeasurementProtocolSecretRequest instance + */ + public static create(properties?: google.analytics.admin.v1alpha.IUpdateMeasurementProtocolSecretRequest): google.analytics.admin.v1alpha.UpdateMeasurementProtocolSecretRequest; + + /** + * Encodes the specified UpdateMeasurementProtocolSecretRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.UpdateMeasurementProtocolSecretRequest.verify|verify} messages. + * @param message UpdateMeasurementProtocolSecretRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.IUpdateMeasurementProtocolSecretRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateMeasurementProtocolSecretRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.UpdateMeasurementProtocolSecretRequest.verify|verify} messages. + * @param message UpdateMeasurementProtocolSecretRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.IUpdateMeasurementProtocolSecretRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateMeasurementProtocolSecretRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateMeasurementProtocolSecretRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.UpdateMeasurementProtocolSecretRequest; + + /** + * Decodes an UpdateMeasurementProtocolSecretRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateMeasurementProtocolSecretRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.UpdateMeasurementProtocolSecretRequest; + + /** + * Verifies an UpdateMeasurementProtocolSecretRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UpdateMeasurementProtocolSecretRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateMeasurementProtocolSecretRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.UpdateMeasurementProtocolSecretRequest; + + /** + * Creates a plain object from an UpdateMeasurementProtocolSecretRequest message. Also converts values to other types if specified. + * @param message UpdateMeasurementProtocolSecretRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.UpdateMeasurementProtocolSecretRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateMeasurementProtocolSecretRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateMeasurementProtocolSecretRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListMeasurementProtocolSecretsRequest. */ + interface IListMeasurementProtocolSecretsRequest { + + /** ListMeasurementProtocolSecretsRequest parent */ + parent?: (string|null); + + /** ListMeasurementProtocolSecretsRequest pageSize */ + pageSize?: (number|null); + + /** ListMeasurementProtocolSecretsRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListMeasurementProtocolSecretsRequest. */ + class ListMeasurementProtocolSecretsRequest implements IListMeasurementProtocolSecretsRequest { + + /** + * Constructs a new ListMeasurementProtocolSecretsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IListMeasurementProtocolSecretsRequest); + + /** ListMeasurementProtocolSecretsRequest parent. */ + public parent: string; + + /** ListMeasurementProtocolSecretsRequest pageSize. */ + public pageSize: number; + + /** ListMeasurementProtocolSecretsRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListMeasurementProtocolSecretsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListMeasurementProtocolSecretsRequest instance + */ + public static create(properties?: google.analytics.admin.v1alpha.IListMeasurementProtocolSecretsRequest): google.analytics.admin.v1alpha.ListMeasurementProtocolSecretsRequest; + + /** + * Encodes the specified ListMeasurementProtocolSecretsRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.ListMeasurementProtocolSecretsRequest.verify|verify} messages. + * @param message ListMeasurementProtocolSecretsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.IListMeasurementProtocolSecretsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListMeasurementProtocolSecretsRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.ListMeasurementProtocolSecretsRequest.verify|verify} messages. + * @param message ListMeasurementProtocolSecretsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.IListMeasurementProtocolSecretsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListMeasurementProtocolSecretsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListMeasurementProtocolSecretsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.ListMeasurementProtocolSecretsRequest; + + /** + * Decodes a ListMeasurementProtocolSecretsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListMeasurementProtocolSecretsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.ListMeasurementProtocolSecretsRequest; + + /** + * Verifies a ListMeasurementProtocolSecretsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListMeasurementProtocolSecretsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListMeasurementProtocolSecretsRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.ListMeasurementProtocolSecretsRequest; + + /** + * Creates a plain object from a ListMeasurementProtocolSecretsRequest message. Also converts values to other types if specified. + * @param message ListMeasurementProtocolSecretsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.ListMeasurementProtocolSecretsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListMeasurementProtocolSecretsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListMeasurementProtocolSecretsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListMeasurementProtocolSecretsResponse. */ + interface IListMeasurementProtocolSecretsResponse { + + /** ListMeasurementProtocolSecretsResponse measurementProtocolSecrets */ + measurementProtocolSecrets?: (google.analytics.admin.v1alpha.IMeasurementProtocolSecret[]|null); + + /** ListMeasurementProtocolSecretsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListMeasurementProtocolSecretsResponse. */ + class ListMeasurementProtocolSecretsResponse implements IListMeasurementProtocolSecretsResponse { + + /** + * Constructs a new ListMeasurementProtocolSecretsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IListMeasurementProtocolSecretsResponse); + + /** ListMeasurementProtocolSecretsResponse measurementProtocolSecrets. */ + public measurementProtocolSecrets: google.analytics.admin.v1alpha.IMeasurementProtocolSecret[]; + + /** ListMeasurementProtocolSecretsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListMeasurementProtocolSecretsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListMeasurementProtocolSecretsResponse instance + */ + public static create(properties?: google.analytics.admin.v1alpha.IListMeasurementProtocolSecretsResponse): google.analytics.admin.v1alpha.ListMeasurementProtocolSecretsResponse; + + /** + * Encodes the specified ListMeasurementProtocolSecretsResponse message. Does not implicitly {@link google.analytics.admin.v1alpha.ListMeasurementProtocolSecretsResponse.verify|verify} messages. + * @param message ListMeasurementProtocolSecretsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.IListMeasurementProtocolSecretsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListMeasurementProtocolSecretsResponse message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.ListMeasurementProtocolSecretsResponse.verify|verify} messages. + * @param message ListMeasurementProtocolSecretsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.IListMeasurementProtocolSecretsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListMeasurementProtocolSecretsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListMeasurementProtocolSecretsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.ListMeasurementProtocolSecretsResponse; + + /** + * Decodes a ListMeasurementProtocolSecretsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListMeasurementProtocolSecretsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.ListMeasurementProtocolSecretsResponse; + + /** + * Verifies a ListMeasurementProtocolSecretsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListMeasurementProtocolSecretsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListMeasurementProtocolSecretsResponse + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.ListMeasurementProtocolSecretsResponse; + + /** + * Creates a plain object from a ListMeasurementProtocolSecretsResponse message. Also converts values to other types if specified. + * @param message ListMeasurementProtocolSecretsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.ListMeasurementProtocolSecretsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListMeasurementProtocolSecretsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListMeasurementProtocolSecretsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetGoogleSignalsSettingsRequest. */ + interface IGetGoogleSignalsSettingsRequest { + + /** GetGoogleSignalsSettingsRequest name */ + name?: (string|null); + } + + /** Represents a GetGoogleSignalsSettingsRequest. */ + class GetGoogleSignalsSettingsRequest implements IGetGoogleSignalsSettingsRequest { + + /** + * Constructs a new GetGoogleSignalsSettingsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IGetGoogleSignalsSettingsRequest); + + /** GetGoogleSignalsSettingsRequest name. */ + public name: string; + + /** + * Creates a new GetGoogleSignalsSettingsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetGoogleSignalsSettingsRequest instance + */ + public static create(properties?: google.analytics.admin.v1alpha.IGetGoogleSignalsSettingsRequest): google.analytics.admin.v1alpha.GetGoogleSignalsSettingsRequest; + + /** + * Encodes the specified GetGoogleSignalsSettingsRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.GetGoogleSignalsSettingsRequest.verify|verify} messages. + * @param message GetGoogleSignalsSettingsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.IGetGoogleSignalsSettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetGoogleSignalsSettingsRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.GetGoogleSignalsSettingsRequest.verify|verify} messages. + * @param message GetGoogleSignalsSettingsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.IGetGoogleSignalsSettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetGoogleSignalsSettingsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetGoogleSignalsSettingsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.GetGoogleSignalsSettingsRequest; + + /** + * Decodes a GetGoogleSignalsSettingsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetGoogleSignalsSettingsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.GetGoogleSignalsSettingsRequest; + + /** + * Verifies a GetGoogleSignalsSettingsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetGoogleSignalsSettingsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetGoogleSignalsSettingsRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.GetGoogleSignalsSettingsRequest; + + /** + * Creates a plain object from a GetGoogleSignalsSettingsRequest message. Also converts values to other types if specified. + * @param message GetGoogleSignalsSettingsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.GetGoogleSignalsSettingsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetGoogleSignalsSettingsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetGoogleSignalsSettingsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateGoogleSignalsSettingsRequest. */ + interface IUpdateGoogleSignalsSettingsRequest { + + /** UpdateGoogleSignalsSettingsRequest googleSignalsSettings */ + googleSignalsSettings?: (google.analytics.admin.v1alpha.IGoogleSignalsSettings|null); + + /** UpdateGoogleSignalsSettingsRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + } + + /** Represents an UpdateGoogleSignalsSettingsRequest. */ + class UpdateGoogleSignalsSettingsRequest implements IUpdateGoogleSignalsSettingsRequest { + + /** + * Constructs a new UpdateGoogleSignalsSettingsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IUpdateGoogleSignalsSettingsRequest); + + /** UpdateGoogleSignalsSettingsRequest googleSignalsSettings. */ + public googleSignalsSettings?: (google.analytics.admin.v1alpha.IGoogleSignalsSettings|null); + + /** UpdateGoogleSignalsSettingsRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** + * Creates a new UpdateGoogleSignalsSettingsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateGoogleSignalsSettingsRequest instance + */ + public static create(properties?: google.analytics.admin.v1alpha.IUpdateGoogleSignalsSettingsRequest): google.analytics.admin.v1alpha.UpdateGoogleSignalsSettingsRequest; + + /** + * Encodes the specified UpdateGoogleSignalsSettingsRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.UpdateGoogleSignalsSettingsRequest.verify|verify} messages. + * @param message UpdateGoogleSignalsSettingsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.IUpdateGoogleSignalsSettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateGoogleSignalsSettingsRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.UpdateGoogleSignalsSettingsRequest.verify|verify} messages. + * @param message UpdateGoogleSignalsSettingsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.IUpdateGoogleSignalsSettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateGoogleSignalsSettingsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateGoogleSignalsSettingsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.UpdateGoogleSignalsSettingsRequest; + + /** + * Decodes an UpdateGoogleSignalsSettingsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateGoogleSignalsSettingsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.UpdateGoogleSignalsSettingsRequest; + + /** + * Verifies an UpdateGoogleSignalsSettingsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UpdateGoogleSignalsSettingsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateGoogleSignalsSettingsRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.UpdateGoogleSignalsSettingsRequest; + + /** + * Creates a plain object from an UpdateGoogleSignalsSettingsRequest message. Also converts values to other types if specified. + * @param message UpdateGoogleSignalsSettingsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.UpdateGoogleSignalsSettingsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateGoogleSignalsSettingsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateGoogleSignalsSettingsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreateConversionEventRequest. */ + interface ICreateConversionEventRequest { + + /** CreateConversionEventRequest conversionEvent */ + conversionEvent?: (google.analytics.admin.v1alpha.IConversionEvent|null); + + /** CreateConversionEventRequest parent */ + parent?: (string|null); + } + + /** Represents a CreateConversionEventRequest. */ + class CreateConversionEventRequest implements ICreateConversionEventRequest { + + /** + * Constructs a new CreateConversionEventRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.ICreateConversionEventRequest); + + /** CreateConversionEventRequest conversionEvent. */ + public conversionEvent?: (google.analytics.admin.v1alpha.IConversionEvent|null); + + /** CreateConversionEventRequest parent. */ + public parent: string; + + /** + * Creates a new CreateConversionEventRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateConversionEventRequest instance + */ + public static create(properties?: google.analytics.admin.v1alpha.ICreateConversionEventRequest): google.analytics.admin.v1alpha.CreateConversionEventRequest; + + /** + * Encodes the specified CreateConversionEventRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.CreateConversionEventRequest.verify|verify} messages. + * @param message CreateConversionEventRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.ICreateConversionEventRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateConversionEventRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.CreateConversionEventRequest.verify|verify} messages. + * @param message CreateConversionEventRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.ICreateConversionEventRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateConversionEventRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateConversionEventRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.CreateConversionEventRequest; + + /** + * Decodes a CreateConversionEventRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateConversionEventRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.CreateConversionEventRequest; + + /** + * Verifies a CreateConversionEventRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateConversionEventRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateConversionEventRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.CreateConversionEventRequest; + + /** + * Creates a plain object from a CreateConversionEventRequest message. Also converts values to other types if specified. + * @param message CreateConversionEventRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.CreateConversionEventRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateConversionEventRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateConversionEventRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetConversionEventRequest. */ + interface IGetConversionEventRequest { + + /** GetConversionEventRequest name */ + name?: (string|null); + } + + /** Represents a GetConversionEventRequest. */ + class GetConversionEventRequest implements IGetConversionEventRequest { + + /** + * Constructs a new GetConversionEventRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IGetConversionEventRequest); + + /** GetConversionEventRequest name. */ + public name: string; + + /** + * Creates a new GetConversionEventRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetConversionEventRequest instance + */ + public static create(properties?: google.analytics.admin.v1alpha.IGetConversionEventRequest): google.analytics.admin.v1alpha.GetConversionEventRequest; + + /** + * Encodes the specified GetConversionEventRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.GetConversionEventRequest.verify|verify} messages. + * @param message GetConversionEventRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.IGetConversionEventRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetConversionEventRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.GetConversionEventRequest.verify|verify} messages. + * @param message GetConversionEventRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.IGetConversionEventRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetConversionEventRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetConversionEventRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.GetConversionEventRequest; + + /** + * Decodes a GetConversionEventRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetConversionEventRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.GetConversionEventRequest; + + /** + * Verifies a GetConversionEventRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetConversionEventRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetConversionEventRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.GetConversionEventRequest; + + /** + * Creates a plain object from a GetConversionEventRequest message. Also converts values to other types if specified. + * @param message GetConversionEventRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.GetConversionEventRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetConversionEventRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetConversionEventRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteConversionEventRequest. */ + interface IDeleteConversionEventRequest { + + /** DeleteConversionEventRequest name */ + name?: (string|null); + } + + /** Represents a DeleteConversionEventRequest. */ + class DeleteConversionEventRequest implements IDeleteConversionEventRequest { + + /** + * Constructs a new DeleteConversionEventRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IDeleteConversionEventRequest); + + /** DeleteConversionEventRequest name. */ + public name: string; + + /** + * Creates a new DeleteConversionEventRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteConversionEventRequest instance + */ + public static create(properties?: google.analytics.admin.v1alpha.IDeleteConversionEventRequest): google.analytics.admin.v1alpha.DeleteConversionEventRequest; + + /** + * Encodes the specified DeleteConversionEventRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.DeleteConversionEventRequest.verify|verify} messages. + * @param message DeleteConversionEventRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.IDeleteConversionEventRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteConversionEventRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.DeleteConversionEventRequest.verify|verify} messages. + * @param message DeleteConversionEventRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.IDeleteConversionEventRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteConversionEventRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteConversionEventRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.DeleteConversionEventRequest; + + /** + * Decodes a DeleteConversionEventRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteConversionEventRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.DeleteConversionEventRequest; + + /** + * Verifies a DeleteConversionEventRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteConversionEventRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteConversionEventRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.DeleteConversionEventRequest; + + /** + * Creates a plain object from a DeleteConversionEventRequest message. Also converts values to other types if specified. + * @param message DeleteConversionEventRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.DeleteConversionEventRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteConversionEventRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteConversionEventRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListConversionEventsRequest. */ + interface IListConversionEventsRequest { + + /** ListConversionEventsRequest parent */ + parent?: (string|null); + + /** ListConversionEventsRequest pageSize */ + pageSize?: (number|null); + + /** ListConversionEventsRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListConversionEventsRequest. */ + class ListConversionEventsRequest implements IListConversionEventsRequest { + + /** + * Constructs a new ListConversionEventsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IListConversionEventsRequest); + + /** ListConversionEventsRequest parent. */ + public parent: string; + + /** ListConversionEventsRequest pageSize. */ + public pageSize: number; + + /** ListConversionEventsRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListConversionEventsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListConversionEventsRequest instance + */ + public static create(properties?: google.analytics.admin.v1alpha.IListConversionEventsRequest): google.analytics.admin.v1alpha.ListConversionEventsRequest; + + /** + * Encodes the specified ListConversionEventsRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.ListConversionEventsRequest.verify|verify} messages. + * @param message ListConversionEventsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.IListConversionEventsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListConversionEventsRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.ListConversionEventsRequest.verify|verify} messages. + * @param message ListConversionEventsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.IListConversionEventsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListConversionEventsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListConversionEventsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.ListConversionEventsRequest; + + /** + * Decodes a ListConversionEventsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListConversionEventsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.ListConversionEventsRequest; + + /** + * Verifies a ListConversionEventsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListConversionEventsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListConversionEventsRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.ListConversionEventsRequest; + + /** + * Creates a plain object from a ListConversionEventsRequest message. Also converts values to other types if specified. + * @param message ListConversionEventsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.ListConversionEventsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListConversionEventsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListConversionEventsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListConversionEventsResponse. */ + interface IListConversionEventsResponse { + + /** ListConversionEventsResponse conversionEvents */ + conversionEvents?: (google.analytics.admin.v1alpha.IConversionEvent[]|null); + + /** ListConversionEventsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListConversionEventsResponse. */ + class ListConversionEventsResponse implements IListConversionEventsResponse { + + /** + * Constructs a new ListConversionEventsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IListConversionEventsResponse); + + /** ListConversionEventsResponse conversionEvents. */ + public conversionEvents: google.analytics.admin.v1alpha.IConversionEvent[]; + + /** ListConversionEventsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListConversionEventsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListConversionEventsResponse instance + */ + public static create(properties?: google.analytics.admin.v1alpha.IListConversionEventsResponse): google.analytics.admin.v1alpha.ListConversionEventsResponse; + + /** + * Encodes the specified ListConversionEventsResponse message. Does not implicitly {@link google.analytics.admin.v1alpha.ListConversionEventsResponse.verify|verify} messages. + * @param message ListConversionEventsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.IListConversionEventsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListConversionEventsResponse message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.ListConversionEventsResponse.verify|verify} messages. + * @param message ListConversionEventsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.IListConversionEventsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListConversionEventsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListConversionEventsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.ListConversionEventsResponse; + + /** + * Decodes a ListConversionEventsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListConversionEventsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.ListConversionEventsResponse; + + /** + * Verifies a ListConversionEventsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListConversionEventsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListConversionEventsResponse + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.ListConversionEventsResponse; + + /** + * Creates a plain object from a ListConversionEventsResponse message. Also converts values to other types if specified. + * @param message ListConversionEventsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.ListConversionEventsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListConversionEventsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListConversionEventsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetDisplayVideo360AdvertiserLinkRequest. */ + interface IGetDisplayVideo360AdvertiserLinkRequest { + + /** GetDisplayVideo360AdvertiserLinkRequest name */ + name?: (string|null); + } + + /** Represents a GetDisplayVideo360AdvertiserLinkRequest. */ + class GetDisplayVideo360AdvertiserLinkRequest implements IGetDisplayVideo360AdvertiserLinkRequest { + + /** + * Constructs a new GetDisplayVideo360AdvertiserLinkRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IGetDisplayVideo360AdvertiserLinkRequest); + + /** GetDisplayVideo360AdvertiserLinkRequest name. */ + public name: string; + + /** + * Creates a new GetDisplayVideo360AdvertiserLinkRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetDisplayVideo360AdvertiserLinkRequest instance + */ + public static create(properties?: google.analytics.admin.v1alpha.IGetDisplayVideo360AdvertiserLinkRequest): google.analytics.admin.v1alpha.GetDisplayVideo360AdvertiserLinkRequest; + + /** + * Encodes the specified GetDisplayVideo360AdvertiserLinkRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.GetDisplayVideo360AdvertiserLinkRequest.verify|verify} messages. + * @param message GetDisplayVideo360AdvertiserLinkRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.IGetDisplayVideo360AdvertiserLinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetDisplayVideo360AdvertiserLinkRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.GetDisplayVideo360AdvertiserLinkRequest.verify|verify} messages. + * @param message GetDisplayVideo360AdvertiserLinkRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.IGetDisplayVideo360AdvertiserLinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetDisplayVideo360AdvertiserLinkRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetDisplayVideo360AdvertiserLinkRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.GetDisplayVideo360AdvertiserLinkRequest; + + /** + * Decodes a GetDisplayVideo360AdvertiserLinkRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetDisplayVideo360AdvertiserLinkRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.GetDisplayVideo360AdvertiserLinkRequest; + + /** + * Verifies a GetDisplayVideo360AdvertiserLinkRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetDisplayVideo360AdvertiserLinkRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetDisplayVideo360AdvertiserLinkRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.GetDisplayVideo360AdvertiserLinkRequest; + + /** + * Creates a plain object from a GetDisplayVideo360AdvertiserLinkRequest message. Also converts values to other types if specified. + * @param message GetDisplayVideo360AdvertiserLinkRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.GetDisplayVideo360AdvertiserLinkRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetDisplayVideo360AdvertiserLinkRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetDisplayVideo360AdvertiserLinkRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListDisplayVideo360AdvertiserLinksRequest. */ + interface IListDisplayVideo360AdvertiserLinksRequest { + + /** ListDisplayVideo360AdvertiserLinksRequest parent */ + parent?: (string|null); + + /** ListDisplayVideo360AdvertiserLinksRequest pageSize */ + pageSize?: (number|null); + + /** ListDisplayVideo360AdvertiserLinksRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListDisplayVideo360AdvertiserLinksRequest. */ + class ListDisplayVideo360AdvertiserLinksRequest implements IListDisplayVideo360AdvertiserLinksRequest { + + /** + * Constructs a new ListDisplayVideo360AdvertiserLinksRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinksRequest); + + /** ListDisplayVideo360AdvertiserLinksRequest parent. */ + public parent: string; + + /** ListDisplayVideo360AdvertiserLinksRequest pageSize. */ + public pageSize: number; + + /** ListDisplayVideo360AdvertiserLinksRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListDisplayVideo360AdvertiserLinksRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListDisplayVideo360AdvertiserLinksRequest instance + */ + public static create(properties?: google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinksRequest): google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinksRequest; + + /** + * Encodes the specified ListDisplayVideo360AdvertiserLinksRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinksRequest.verify|verify} messages. + * @param message ListDisplayVideo360AdvertiserLinksRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinksRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListDisplayVideo360AdvertiserLinksRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinksRequest.verify|verify} messages. + * @param message ListDisplayVideo360AdvertiserLinksRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinksRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListDisplayVideo360AdvertiserLinksRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListDisplayVideo360AdvertiserLinksRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinksRequest; + + /** + * Decodes a ListDisplayVideo360AdvertiserLinksRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListDisplayVideo360AdvertiserLinksRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinksRequest; + + /** + * Verifies a ListDisplayVideo360AdvertiserLinksRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListDisplayVideo360AdvertiserLinksRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListDisplayVideo360AdvertiserLinksRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinksRequest; + + /** + * Creates a plain object from a ListDisplayVideo360AdvertiserLinksRequest message. Also converts values to other types if specified. + * @param message ListDisplayVideo360AdvertiserLinksRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinksRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListDisplayVideo360AdvertiserLinksRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListDisplayVideo360AdvertiserLinksRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListDisplayVideo360AdvertiserLinksResponse. */ + interface IListDisplayVideo360AdvertiserLinksResponse { + + /** ListDisplayVideo360AdvertiserLinksResponse displayVideo_360AdvertiserLinks */ + displayVideo_360AdvertiserLinks?: (google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLink[]|null); + + /** ListDisplayVideo360AdvertiserLinksResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListDisplayVideo360AdvertiserLinksResponse. */ + class ListDisplayVideo360AdvertiserLinksResponse implements IListDisplayVideo360AdvertiserLinksResponse { + + /** + * Constructs a new ListDisplayVideo360AdvertiserLinksResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinksResponse); + + /** ListDisplayVideo360AdvertiserLinksResponse displayVideo_360AdvertiserLinks. */ + public displayVideo_360AdvertiserLinks: google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLink[]; + + /** ListDisplayVideo360AdvertiserLinksResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListDisplayVideo360AdvertiserLinksResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListDisplayVideo360AdvertiserLinksResponse instance + */ + public static create(properties?: google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinksResponse): google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinksResponse; + + /** + * Encodes the specified ListDisplayVideo360AdvertiserLinksResponse message. Does not implicitly {@link google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinksResponse.verify|verify} messages. + * @param message ListDisplayVideo360AdvertiserLinksResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinksResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListDisplayVideo360AdvertiserLinksResponse message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinksResponse.verify|verify} messages. + * @param message ListDisplayVideo360AdvertiserLinksResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinksResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListDisplayVideo360AdvertiserLinksResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListDisplayVideo360AdvertiserLinksResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinksResponse; + + /** + * Decodes a ListDisplayVideo360AdvertiserLinksResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListDisplayVideo360AdvertiserLinksResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinksResponse; + + /** + * Verifies a ListDisplayVideo360AdvertiserLinksResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListDisplayVideo360AdvertiserLinksResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListDisplayVideo360AdvertiserLinksResponse + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinksResponse; + + /** + * Creates a plain object from a ListDisplayVideo360AdvertiserLinksResponse message. Also converts values to other types if specified. + * @param message ListDisplayVideo360AdvertiserLinksResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinksResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListDisplayVideo360AdvertiserLinksResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListDisplayVideo360AdvertiserLinksResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreateDisplayVideo360AdvertiserLinkRequest. */ + interface ICreateDisplayVideo360AdvertiserLinkRequest { + + /** CreateDisplayVideo360AdvertiserLinkRequest parent */ + parent?: (string|null); + + /** CreateDisplayVideo360AdvertiserLinkRequest displayVideo_360AdvertiserLink */ + displayVideo_360AdvertiserLink?: (google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLink|null); + } + + /** Represents a CreateDisplayVideo360AdvertiserLinkRequest. */ + class CreateDisplayVideo360AdvertiserLinkRequest implements ICreateDisplayVideo360AdvertiserLinkRequest { + + /** + * Constructs a new CreateDisplayVideo360AdvertiserLinkRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.ICreateDisplayVideo360AdvertiserLinkRequest); + + /** CreateDisplayVideo360AdvertiserLinkRequest parent. */ + public parent: string; + + /** CreateDisplayVideo360AdvertiserLinkRequest displayVideo_360AdvertiserLink. */ + public displayVideo_360AdvertiserLink?: (google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLink|null); + + /** + * Creates a new CreateDisplayVideo360AdvertiserLinkRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateDisplayVideo360AdvertiserLinkRequest instance + */ + public static create(properties?: google.analytics.admin.v1alpha.ICreateDisplayVideo360AdvertiserLinkRequest): google.analytics.admin.v1alpha.CreateDisplayVideo360AdvertiserLinkRequest; + + /** + * Encodes the specified CreateDisplayVideo360AdvertiserLinkRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.CreateDisplayVideo360AdvertiserLinkRequest.verify|verify} messages. + * @param message CreateDisplayVideo360AdvertiserLinkRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.ICreateDisplayVideo360AdvertiserLinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateDisplayVideo360AdvertiserLinkRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.CreateDisplayVideo360AdvertiserLinkRequest.verify|verify} messages. + * @param message CreateDisplayVideo360AdvertiserLinkRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.ICreateDisplayVideo360AdvertiserLinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateDisplayVideo360AdvertiserLinkRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateDisplayVideo360AdvertiserLinkRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.CreateDisplayVideo360AdvertiserLinkRequest; + + /** + * Decodes a CreateDisplayVideo360AdvertiserLinkRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateDisplayVideo360AdvertiserLinkRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.CreateDisplayVideo360AdvertiserLinkRequest; + + /** + * Verifies a CreateDisplayVideo360AdvertiserLinkRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateDisplayVideo360AdvertiserLinkRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateDisplayVideo360AdvertiserLinkRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.CreateDisplayVideo360AdvertiserLinkRequest; + + /** + * Creates a plain object from a CreateDisplayVideo360AdvertiserLinkRequest message. Also converts values to other types if specified. + * @param message CreateDisplayVideo360AdvertiserLinkRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.CreateDisplayVideo360AdvertiserLinkRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateDisplayVideo360AdvertiserLinkRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateDisplayVideo360AdvertiserLinkRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteDisplayVideo360AdvertiserLinkRequest. */ + interface IDeleteDisplayVideo360AdvertiserLinkRequest { + + /** DeleteDisplayVideo360AdvertiserLinkRequest name */ + name?: (string|null); + } + + /** Represents a DeleteDisplayVideo360AdvertiserLinkRequest. */ + class DeleteDisplayVideo360AdvertiserLinkRequest implements IDeleteDisplayVideo360AdvertiserLinkRequest { + + /** + * Constructs a new DeleteDisplayVideo360AdvertiserLinkRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IDeleteDisplayVideo360AdvertiserLinkRequest); + + /** DeleteDisplayVideo360AdvertiserLinkRequest name. */ + public name: string; + + /** + * Creates a new DeleteDisplayVideo360AdvertiserLinkRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteDisplayVideo360AdvertiserLinkRequest instance + */ + public static create(properties?: google.analytics.admin.v1alpha.IDeleteDisplayVideo360AdvertiserLinkRequest): google.analytics.admin.v1alpha.DeleteDisplayVideo360AdvertiserLinkRequest; + + /** + * Encodes the specified DeleteDisplayVideo360AdvertiserLinkRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.DeleteDisplayVideo360AdvertiserLinkRequest.verify|verify} messages. + * @param message DeleteDisplayVideo360AdvertiserLinkRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.IDeleteDisplayVideo360AdvertiserLinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteDisplayVideo360AdvertiserLinkRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.DeleteDisplayVideo360AdvertiserLinkRequest.verify|verify} messages. + * @param message DeleteDisplayVideo360AdvertiserLinkRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.IDeleteDisplayVideo360AdvertiserLinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteDisplayVideo360AdvertiserLinkRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteDisplayVideo360AdvertiserLinkRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.DeleteDisplayVideo360AdvertiserLinkRequest; + + /** + * Decodes a DeleteDisplayVideo360AdvertiserLinkRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteDisplayVideo360AdvertiserLinkRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.DeleteDisplayVideo360AdvertiserLinkRequest; + + /** + * Verifies a DeleteDisplayVideo360AdvertiserLinkRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteDisplayVideo360AdvertiserLinkRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteDisplayVideo360AdvertiserLinkRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.DeleteDisplayVideo360AdvertiserLinkRequest; + + /** + * Creates a plain object from a DeleteDisplayVideo360AdvertiserLinkRequest message. Also converts values to other types if specified. + * @param message DeleteDisplayVideo360AdvertiserLinkRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.DeleteDisplayVideo360AdvertiserLinkRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteDisplayVideo360AdvertiserLinkRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteDisplayVideo360AdvertiserLinkRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateDisplayVideo360AdvertiserLinkRequest. */ + interface IUpdateDisplayVideo360AdvertiserLinkRequest { + + /** UpdateDisplayVideo360AdvertiserLinkRequest displayVideo_360AdvertiserLink */ + displayVideo_360AdvertiserLink?: (google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLink|null); + + /** UpdateDisplayVideo360AdvertiserLinkRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + } + + /** Represents an UpdateDisplayVideo360AdvertiserLinkRequest. */ + class UpdateDisplayVideo360AdvertiserLinkRequest implements IUpdateDisplayVideo360AdvertiserLinkRequest { + + /** + * Constructs a new UpdateDisplayVideo360AdvertiserLinkRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IUpdateDisplayVideo360AdvertiserLinkRequest); + + /** UpdateDisplayVideo360AdvertiserLinkRequest displayVideo_360AdvertiserLink. */ + public displayVideo_360AdvertiserLink?: (google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLink|null); + + /** UpdateDisplayVideo360AdvertiserLinkRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** + * Creates a new UpdateDisplayVideo360AdvertiserLinkRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateDisplayVideo360AdvertiserLinkRequest instance + */ + public static create(properties?: google.analytics.admin.v1alpha.IUpdateDisplayVideo360AdvertiserLinkRequest): google.analytics.admin.v1alpha.UpdateDisplayVideo360AdvertiserLinkRequest; + + /** + * Encodes the specified UpdateDisplayVideo360AdvertiserLinkRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.UpdateDisplayVideo360AdvertiserLinkRequest.verify|verify} messages. + * @param message UpdateDisplayVideo360AdvertiserLinkRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.IUpdateDisplayVideo360AdvertiserLinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateDisplayVideo360AdvertiserLinkRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.UpdateDisplayVideo360AdvertiserLinkRequest.verify|verify} messages. + * @param message UpdateDisplayVideo360AdvertiserLinkRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.IUpdateDisplayVideo360AdvertiserLinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateDisplayVideo360AdvertiserLinkRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateDisplayVideo360AdvertiserLinkRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.UpdateDisplayVideo360AdvertiserLinkRequest; + + /** + * Decodes an UpdateDisplayVideo360AdvertiserLinkRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateDisplayVideo360AdvertiserLinkRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.UpdateDisplayVideo360AdvertiserLinkRequest; + + /** + * Verifies an UpdateDisplayVideo360AdvertiserLinkRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UpdateDisplayVideo360AdvertiserLinkRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateDisplayVideo360AdvertiserLinkRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.UpdateDisplayVideo360AdvertiserLinkRequest; + + /** + * Creates a plain object from an UpdateDisplayVideo360AdvertiserLinkRequest message. Also converts values to other types if specified. + * @param message UpdateDisplayVideo360AdvertiserLinkRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.UpdateDisplayVideo360AdvertiserLinkRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateDisplayVideo360AdvertiserLinkRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateDisplayVideo360AdvertiserLinkRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetDisplayVideo360AdvertiserLinkProposalRequest. */ + interface IGetDisplayVideo360AdvertiserLinkProposalRequest { + + /** GetDisplayVideo360AdvertiserLinkProposalRequest name */ + name?: (string|null); + } + + /** Represents a GetDisplayVideo360AdvertiserLinkProposalRequest. */ + class GetDisplayVideo360AdvertiserLinkProposalRequest implements IGetDisplayVideo360AdvertiserLinkProposalRequest { + + /** + * Constructs a new GetDisplayVideo360AdvertiserLinkProposalRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IGetDisplayVideo360AdvertiserLinkProposalRequest); + + /** GetDisplayVideo360AdvertiserLinkProposalRequest name. */ + public name: string; + + /** + * Creates a new GetDisplayVideo360AdvertiserLinkProposalRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetDisplayVideo360AdvertiserLinkProposalRequest instance + */ + public static create(properties?: google.analytics.admin.v1alpha.IGetDisplayVideo360AdvertiserLinkProposalRequest): google.analytics.admin.v1alpha.GetDisplayVideo360AdvertiserLinkProposalRequest; + + /** + * Encodes the specified GetDisplayVideo360AdvertiserLinkProposalRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.GetDisplayVideo360AdvertiserLinkProposalRequest.verify|verify} messages. + * @param message GetDisplayVideo360AdvertiserLinkProposalRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.IGetDisplayVideo360AdvertiserLinkProposalRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetDisplayVideo360AdvertiserLinkProposalRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.GetDisplayVideo360AdvertiserLinkProposalRequest.verify|verify} messages. + * @param message GetDisplayVideo360AdvertiserLinkProposalRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.IGetDisplayVideo360AdvertiserLinkProposalRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetDisplayVideo360AdvertiserLinkProposalRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetDisplayVideo360AdvertiserLinkProposalRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.GetDisplayVideo360AdvertiserLinkProposalRequest; + + /** + * Decodes a GetDisplayVideo360AdvertiserLinkProposalRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetDisplayVideo360AdvertiserLinkProposalRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.GetDisplayVideo360AdvertiserLinkProposalRequest; + + /** + * Verifies a GetDisplayVideo360AdvertiserLinkProposalRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetDisplayVideo360AdvertiserLinkProposalRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetDisplayVideo360AdvertiserLinkProposalRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.GetDisplayVideo360AdvertiserLinkProposalRequest; + + /** + * Creates a plain object from a GetDisplayVideo360AdvertiserLinkProposalRequest message. Also converts values to other types if specified. + * @param message GetDisplayVideo360AdvertiserLinkProposalRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.GetDisplayVideo360AdvertiserLinkProposalRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetDisplayVideo360AdvertiserLinkProposalRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetDisplayVideo360AdvertiserLinkProposalRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListDisplayVideo360AdvertiserLinkProposalsRequest. */ + interface IListDisplayVideo360AdvertiserLinkProposalsRequest { + + /** ListDisplayVideo360AdvertiserLinkProposalsRequest parent */ + parent?: (string|null); + + /** ListDisplayVideo360AdvertiserLinkProposalsRequest pageSize */ + pageSize?: (number|null); + + /** ListDisplayVideo360AdvertiserLinkProposalsRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListDisplayVideo360AdvertiserLinkProposalsRequest. */ + class ListDisplayVideo360AdvertiserLinkProposalsRequest implements IListDisplayVideo360AdvertiserLinkProposalsRequest { + + /** + * Constructs a new ListDisplayVideo360AdvertiserLinkProposalsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinkProposalsRequest); + + /** ListDisplayVideo360AdvertiserLinkProposalsRequest parent. */ + public parent: string; + + /** ListDisplayVideo360AdvertiserLinkProposalsRequest pageSize. */ + public pageSize: number; + + /** ListDisplayVideo360AdvertiserLinkProposalsRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListDisplayVideo360AdvertiserLinkProposalsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListDisplayVideo360AdvertiserLinkProposalsRequest instance + */ + public static create(properties?: google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinkProposalsRequest): google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinkProposalsRequest; + + /** + * Encodes the specified ListDisplayVideo360AdvertiserLinkProposalsRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinkProposalsRequest.verify|verify} messages. + * @param message ListDisplayVideo360AdvertiserLinkProposalsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinkProposalsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListDisplayVideo360AdvertiserLinkProposalsRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinkProposalsRequest.verify|verify} messages. + * @param message ListDisplayVideo360AdvertiserLinkProposalsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinkProposalsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListDisplayVideo360AdvertiserLinkProposalsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListDisplayVideo360AdvertiserLinkProposalsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinkProposalsRequest; + + /** + * Decodes a ListDisplayVideo360AdvertiserLinkProposalsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListDisplayVideo360AdvertiserLinkProposalsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinkProposalsRequest; + + /** + * Verifies a ListDisplayVideo360AdvertiserLinkProposalsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListDisplayVideo360AdvertiserLinkProposalsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListDisplayVideo360AdvertiserLinkProposalsRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinkProposalsRequest; + + /** + * Creates a plain object from a ListDisplayVideo360AdvertiserLinkProposalsRequest message. Also converts values to other types if specified. + * @param message ListDisplayVideo360AdvertiserLinkProposalsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinkProposalsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListDisplayVideo360AdvertiserLinkProposalsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListDisplayVideo360AdvertiserLinkProposalsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListDisplayVideo360AdvertiserLinkProposalsResponse. */ + interface IListDisplayVideo360AdvertiserLinkProposalsResponse { + + /** ListDisplayVideo360AdvertiserLinkProposalsResponse displayVideo_360AdvertiserLinkProposals */ + displayVideo_360AdvertiserLinkProposals?: (google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLinkProposal[]|null); + + /** ListDisplayVideo360AdvertiserLinkProposalsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListDisplayVideo360AdvertiserLinkProposalsResponse. */ + class ListDisplayVideo360AdvertiserLinkProposalsResponse implements IListDisplayVideo360AdvertiserLinkProposalsResponse { + + /** + * Constructs a new ListDisplayVideo360AdvertiserLinkProposalsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinkProposalsResponse); + + /** ListDisplayVideo360AdvertiserLinkProposalsResponse displayVideo_360AdvertiserLinkProposals. */ + public displayVideo_360AdvertiserLinkProposals: google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLinkProposal[]; + + /** ListDisplayVideo360AdvertiserLinkProposalsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListDisplayVideo360AdvertiserLinkProposalsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListDisplayVideo360AdvertiserLinkProposalsResponse instance + */ + public static create(properties?: google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinkProposalsResponse): google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinkProposalsResponse; + + /** + * Encodes the specified ListDisplayVideo360AdvertiserLinkProposalsResponse message. Does not implicitly {@link google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinkProposalsResponse.verify|verify} messages. + * @param message ListDisplayVideo360AdvertiserLinkProposalsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinkProposalsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListDisplayVideo360AdvertiserLinkProposalsResponse message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinkProposalsResponse.verify|verify} messages. + * @param message ListDisplayVideo360AdvertiserLinkProposalsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinkProposalsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListDisplayVideo360AdvertiserLinkProposalsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListDisplayVideo360AdvertiserLinkProposalsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinkProposalsResponse; + + /** + * Decodes a ListDisplayVideo360AdvertiserLinkProposalsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListDisplayVideo360AdvertiserLinkProposalsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinkProposalsResponse; + + /** + * Verifies a ListDisplayVideo360AdvertiserLinkProposalsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListDisplayVideo360AdvertiserLinkProposalsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListDisplayVideo360AdvertiserLinkProposalsResponse + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinkProposalsResponse; + + /** + * Creates a plain object from a ListDisplayVideo360AdvertiserLinkProposalsResponse message. Also converts values to other types if specified. + * @param message ListDisplayVideo360AdvertiserLinkProposalsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinkProposalsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListDisplayVideo360AdvertiserLinkProposalsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListDisplayVideo360AdvertiserLinkProposalsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreateDisplayVideo360AdvertiserLinkProposalRequest. */ + interface ICreateDisplayVideo360AdvertiserLinkProposalRequest { + + /** CreateDisplayVideo360AdvertiserLinkProposalRequest parent */ + parent?: (string|null); + + /** CreateDisplayVideo360AdvertiserLinkProposalRequest displayVideo_360AdvertiserLinkProposal */ + displayVideo_360AdvertiserLinkProposal?: (google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLinkProposal|null); + } + + /** Represents a CreateDisplayVideo360AdvertiserLinkProposalRequest. */ + class CreateDisplayVideo360AdvertiserLinkProposalRequest implements ICreateDisplayVideo360AdvertiserLinkProposalRequest { + + /** + * Constructs a new CreateDisplayVideo360AdvertiserLinkProposalRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.ICreateDisplayVideo360AdvertiserLinkProposalRequest); + + /** CreateDisplayVideo360AdvertiserLinkProposalRequest parent. */ + public parent: string; + + /** CreateDisplayVideo360AdvertiserLinkProposalRequest displayVideo_360AdvertiserLinkProposal. */ + public displayVideo_360AdvertiserLinkProposal?: (google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLinkProposal|null); + + /** + * Creates a new CreateDisplayVideo360AdvertiserLinkProposalRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateDisplayVideo360AdvertiserLinkProposalRequest instance + */ + public static create(properties?: google.analytics.admin.v1alpha.ICreateDisplayVideo360AdvertiserLinkProposalRequest): google.analytics.admin.v1alpha.CreateDisplayVideo360AdvertiserLinkProposalRequest; + + /** + * Encodes the specified CreateDisplayVideo360AdvertiserLinkProposalRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.CreateDisplayVideo360AdvertiserLinkProposalRequest.verify|verify} messages. + * @param message CreateDisplayVideo360AdvertiserLinkProposalRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.ICreateDisplayVideo360AdvertiserLinkProposalRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateDisplayVideo360AdvertiserLinkProposalRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.CreateDisplayVideo360AdvertiserLinkProposalRequest.verify|verify} messages. + * @param message CreateDisplayVideo360AdvertiserLinkProposalRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.ICreateDisplayVideo360AdvertiserLinkProposalRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateDisplayVideo360AdvertiserLinkProposalRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateDisplayVideo360AdvertiserLinkProposalRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.CreateDisplayVideo360AdvertiserLinkProposalRequest; + + /** + * Decodes a CreateDisplayVideo360AdvertiserLinkProposalRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateDisplayVideo360AdvertiserLinkProposalRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.CreateDisplayVideo360AdvertiserLinkProposalRequest; + + /** + * Verifies a CreateDisplayVideo360AdvertiserLinkProposalRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateDisplayVideo360AdvertiserLinkProposalRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateDisplayVideo360AdvertiserLinkProposalRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.CreateDisplayVideo360AdvertiserLinkProposalRequest; + + /** + * Creates a plain object from a CreateDisplayVideo360AdvertiserLinkProposalRequest message. Also converts values to other types if specified. + * @param message CreateDisplayVideo360AdvertiserLinkProposalRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.CreateDisplayVideo360AdvertiserLinkProposalRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateDisplayVideo360AdvertiserLinkProposalRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateDisplayVideo360AdvertiserLinkProposalRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteDisplayVideo360AdvertiserLinkProposalRequest. */ + interface IDeleteDisplayVideo360AdvertiserLinkProposalRequest { + + /** DeleteDisplayVideo360AdvertiserLinkProposalRequest name */ + name?: (string|null); + } + + /** Represents a DeleteDisplayVideo360AdvertiserLinkProposalRequest. */ + class DeleteDisplayVideo360AdvertiserLinkProposalRequest implements IDeleteDisplayVideo360AdvertiserLinkProposalRequest { + + /** + * Constructs a new DeleteDisplayVideo360AdvertiserLinkProposalRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IDeleteDisplayVideo360AdvertiserLinkProposalRequest); + + /** DeleteDisplayVideo360AdvertiserLinkProposalRequest name. */ + public name: string; + + /** + * Creates a new DeleteDisplayVideo360AdvertiserLinkProposalRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteDisplayVideo360AdvertiserLinkProposalRequest instance + */ + public static create(properties?: google.analytics.admin.v1alpha.IDeleteDisplayVideo360AdvertiserLinkProposalRequest): google.analytics.admin.v1alpha.DeleteDisplayVideo360AdvertiserLinkProposalRequest; + + /** + * Encodes the specified DeleteDisplayVideo360AdvertiserLinkProposalRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.DeleteDisplayVideo360AdvertiserLinkProposalRequest.verify|verify} messages. + * @param message DeleteDisplayVideo360AdvertiserLinkProposalRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.IDeleteDisplayVideo360AdvertiserLinkProposalRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteDisplayVideo360AdvertiserLinkProposalRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.DeleteDisplayVideo360AdvertiserLinkProposalRequest.verify|verify} messages. + * @param message DeleteDisplayVideo360AdvertiserLinkProposalRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.IDeleteDisplayVideo360AdvertiserLinkProposalRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteDisplayVideo360AdvertiserLinkProposalRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteDisplayVideo360AdvertiserLinkProposalRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.DeleteDisplayVideo360AdvertiserLinkProposalRequest; + + /** + * Decodes a DeleteDisplayVideo360AdvertiserLinkProposalRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteDisplayVideo360AdvertiserLinkProposalRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.DeleteDisplayVideo360AdvertiserLinkProposalRequest; + + /** + * Verifies a DeleteDisplayVideo360AdvertiserLinkProposalRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteDisplayVideo360AdvertiserLinkProposalRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteDisplayVideo360AdvertiserLinkProposalRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.DeleteDisplayVideo360AdvertiserLinkProposalRequest; + + /** + * Creates a plain object from a DeleteDisplayVideo360AdvertiserLinkProposalRequest message. Also converts values to other types if specified. + * @param message DeleteDisplayVideo360AdvertiserLinkProposalRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.DeleteDisplayVideo360AdvertiserLinkProposalRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteDisplayVideo360AdvertiserLinkProposalRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteDisplayVideo360AdvertiserLinkProposalRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an ApproveDisplayVideo360AdvertiserLinkProposalRequest. */ + interface IApproveDisplayVideo360AdvertiserLinkProposalRequest { + + /** ApproveDisplayVideo360AdvertiserLinkProposalRequest name */ + name?: (string|null); + } + + /** Represents an ApproveDisplayVideo360AdvertiserLinkProposalRequest. */ + class ApproveDisplayVideo360AdvertiserLinkProposalRequest implements IApproveDisplayVideo360AdvertiserLinkProposalRequest { + + /** + * Constructs a new ApproveDisplayVideo360AdvertiserLinkProposalRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IApproveDisplayVideo360AdvertiserLinkProposalRequest); + + /** ApproveDisplayVideo360AdvertiserLinkProposalRequest name. */ + public name: string; + + /** + * Creates a new ApproveDisplayVideo360AdvertiserLinkProposalRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ApproveDisplayVideo360AdvertiserLinkProposalRequest instance + */ + public static create(properties?: google.analytics.admin.v1alpha.IApproveDisplayVideo360AdvertiserLinkProposalRequest): google.analytics.admin.v1alpha.ApproveDisplayVideo360AdvertiserLinkProposalRequest; + + /** + * Encodes the specified ApproveDisplayVideo360AdvertiserLinkProposalRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.ApproveDisplayVideo360AdvertiserLinkProposalRequest.verify|verify} messages. + * @param message ApproveDisplayVideo360AdvertiserLinkProposalRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.IApproveDisplayVideo360AdvertiserLinkProposalRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ApproveDisplayVideo360AdvertiserLinkProposalRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.ApproveDisplayVideo360AdvertiserLinkProposalRequest.verify|verify} messages. + * @param message ApproveDisplayVideo360AdvertiserLinkProposalRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.IApproveDisplayVideo360AdvertiserLinkProposalRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ApproveDisplayVideo360AdvertiserLinkProposalRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ApproveDisplayVideo360AdvertiserLinkProposalRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.ApproveDisplayVideo360AdvertiserLinkProposalRequest; + + /** + * Decodes an ApproveDisplayVideo360AdvertiserLinkProposalRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ApproveDisplayVideo360AdvertiserLinkProposalRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.ApproveDisplayVideo360AdvertiserLinkProposalRequest; + + /** + * Verifies an ApproveDisplayVideo360AdvertiserLinkProposalRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ApproveDisplayVideo360AdvertiserLinkProposalRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ApproveDisplayVideo360AdvertiserLinkProposalRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.ApproveDisplayVideo360AdvertiserLinkProposalRequest; + + /** + * Creates a plain object from an ApproveDisplayVideo360AdvertiserLinkProposalRequest message. Also converts values to other types if specified. + * @param message ApproveDisplayVideo360AdvertiserLinkProposalRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.ApproveDisplayVideo360AdvertiserLinkProposalRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ApproveDisplayVideo360AdvertiserLinkProposalRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ApproveDisplayVideo360AdvertiserLinkProposalRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an ApproveDisplayVideo360AdvertiserLinkProposalResponse. */ + interface IApproveDisplayVideo360AdvertiserLinkProposalResponse { + + /** ApproveDisplayVideo360AdvertiserLinkProposalResponse displayVideo_360AdvertiserLink */ + displayVideo_360AdvertiserLink?: (google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLink|null); + } + + /** Represents an ApproveDisplayVideo360AdvertiserLinkProposalResponse. */ + class ApproveDisplayVideo360AdvertiserLinkProposalResponse implements IApproveDisplayVideo360AdvertiserLinkProposalResponse { + + /** + * Constructs a new ApproveDisplayVideo360AdvertiserLinkProposalResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IApproveDisplayVideo360AdvertiserLinkProposalResponse); + + /** ApproveDisplayVideo360AdvertiserLinkProposalResponse displayVideo_360AdvertiserLink. */ + public displayVideo_360AdvertiserLink?: (google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLink|null); + + /** + * Creates a new ApproveDisplayVideo360AdvertiserLinkProposalResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ApproveDisplayVideo360AdvertiserLinkProposalResponse instance + */ + public static create(properties?: google.analytics.admin.v1alpha.IApproveDisplayVideo360AdvertiserLinkProposalResponse): google.analytics.admin.v1alpha.ApproveDisplayVideo360AdvertiserLinkProposalResponse; + + /** + * Encodes the specified ApproveDisplayVideo360AdvertiserLinkProposalResponse message. Does not implicitly {@link google.analytics.admin.v1alpha.ApproveDisplayVideo360AdvertiserLinkProposalResponse.verify|verify} messages. + * @param message ApproveDisplayVideo360AdvertiserLinkProposalResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.IApproveDisplayVideo360AdvertiserLinkProposalResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ApproveDisplayVideo360AdvertiserLinkProposalResponse message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.ApproveDisplayVideo360AdvertiserLinkProposalResponse.verify|verify} messages. + * @param message ApproveDisplayVideo360AdvertiserLinkProposalResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.IApproveDisplayVideo360AdvertiserLinkProposalResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ApproveDisplayVideo360AdvertiserLinkProposalResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ApproveDisplayVideo360AdvertiserLinkProposalResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.ApproveDisplayVideo360AdvertiserLinkProposalResponse; + + /** + * Decodes an ApproveDisplayVideo360AdvertiserLinkProposalResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ApproveDisplayVideo360AdvertiserLinkProposalResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.ApproveDisplayVideo360AdvertiserLinkProposalResponse; + + /** + * Verifies an ApproveDisplayVideo360AdvertiserLinkProposalResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ApproveDisplayVideo360AdvertiserLinkProposalResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ApproveDisplayVideo360AdvertiserLinkProposalResponse + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.ApproveDisplayVideo360AdvertiserLinkProposalResponse; + + /** + * Creates a plain object from an ApproveDisplayVideo360AdvertiserLinkProposalResponse message. Also converts values to other types if specified. + * @param message ApproveDisplayVideo360AdvertiserLinkProposalResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.ApproveDisplayVideo360AdvertiserLinkProposalResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ApproveDisplayVideo360AdvertiserLinkProposalResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ApproveDisplayVideo360AdvertiserLinkProposalResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CancelDisplayVideo360AdvertiserLinkProposalRequest. */ + interface ICancelDisplayVideo360AdvertiserLinkProposalRequest { + + /** CancelDisplayVideo360AdvertiserLinkProposalRequest name */ + name?: (string|null); + } + + /** Represents a CancelDisplayVideo360AdvertiserLinkProposalRequest. */ + class CancelDisplayVideo360AdvertiserLinkProposalRequest implements ICancelDisplayVideo360AdvertiserLinkProposalRequest { + + /** + * Constructs a new CancelDisplayVideo360AdvertiserLinkProposalRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.ICancelDisplayVideo360AdvertiserLinkProposalRequest); + + /** CancelDisplayVideo360AdvertiserLinkProposalRequest name. */ + public name: string; + + /** + * Creates a new CancelDisplayVideo360AdvertiserLinkProposalRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CancelDisplayVideo360AdvertiserLinkProposalRequest instance + */ + public static create(properties?: google.analytics.admin.v1alpha.ICancelDisplayVideo360AdvertiserLinkProposalRequest): google.analytics.admin.v1alpha.CancelDisplayVideo360AdvertiserLinkProposalRequest; + + /** + * Encodes the specified CancelDisplayVideo360AdvertiserLinkProposalRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.CancelDisplayVideo360AdvertiserLinkProposalRequest.verify|verify} messages. + * @param message CancelDisplayVideo360AdvertiserLinkProposalRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.ICancelDisplayVideo360AdvertiserLinkProposalRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CancelDisplayVideo360AdvertiserLinkProposalRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.CancelDisplayVideo360AdvertiserLinkProposalRequest.verify|verify} messages. + * @param message CancelDisplayVideo360AdvertiserLinkProposalRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.ICancelDisplayVideo360AdvertiserLinkProposalRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CancelDisplayVideo360AdvertiserLinkProposalRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CancelDisplayVideo360AdvertiserLinkProposalRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.CancelDisplayVideo360AdvertiserLinkProposalRequest; + + /** + * Decodes a CancelDisplayVideo360AdvertiserLinkProposalRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CancelDisplayVideo360AdvertiserLinkProposalRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.CancelDisplayVideo360AdvertiserLinkProposalRequest; + + /** + * Verifies a CancelDisplayVideo360AdvertiserLinkProposalRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CancelDisplayVideo360AdvertiserLinkProposalRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CancelDisplayVideo360AdvertiserLinkProposalRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.CancelDisplayVideo360AdvertiserLinkProposalRequest; + + /** + * Creates a plain object from a CancelDisplayVideo360AdvertiserLinkProposalRequest message. Also converts values to other types if specified. + * @param message CancelDisplayVideo360AdvertiserLinkProposalRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.CancelDisplayVideo360AdvertiserLinkProposalRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CancelDisplayVideo360AdvertiserLinkProposalRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CancelDisplayVideo360AdvertiserLinkProposalRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreateCustomDimensionRequest. */ + interface ICreateCustomDimensionRequest { + + /** CreateCustomDimensionRequest parent */ + parent?: (string|null); + + /** CreateCustomDimensionRequest customDimension */ + customDimension?: (google.analytics.admin.v1alpha.ICustomDimension|null); + } + + /** Represents a CreateCustomDimensionRequest. */ + class CreateCustomDimensionRequest implements ICreateCustomDimensionRequest { + + /** + * Constructs a new CreateCustomDimensionRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.ICreateCustomDimensionRequest); + + /** CreateCustomDimensionRequest parent. */ + public parent: string; + + /** CreateCustomDimensionRequest customDimension. */ + public customDimension?: (google.analytics.admin.v1alpha.ICustomDimension|null); + + /** + * Creates a new CreateCustomDimensionRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateCustomDimensionRequest instance + */ + public static create(properties?: google.analytics.admin.v1alpha.ICreateCustomDimensionRequest): google.analytics.admin.v1alpha.CreateCustomDimensionRequest; + + /** + * Encodes the specified CreateCustomDimensionRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.CreateCustomDimensionRequest.verify|verify} messages. + * @param message CreateCustomDimensionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.ICreateCustomDimensionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateCustomDimensionRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.CreateCustomDimensionRequest.verify|verify} messages. + * @param message CreateCustomDimensionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.ICreateCustomDimensionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateCustomDimensionRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateCustomDimensionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.CreateCustomDimensionRequest; + + /** + * Decodes a CreateCustomDimensionRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateCustomDimensionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.CreateCustomDimensionRequest; + + /** + * Verifies a CreateCustomDimensionRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateCustomDimensionRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateCustomDimensionRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.CreateCustomDimensionRequest; + + /** + * Creates a plain object from a CreateCustomDimensionRequest message. Also converts values to other types if specified. + * @param message CreateCustomDimensionRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.CreateCustomDimensionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateCustomDimensionRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateCustomDimensionRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateCustomDimensionRequest. */ + interface IUpdateCustomDimensionRequest { + + /** UpdateCustomDimensionRequest customDimension */ + customDimension?: (google.analytics.admin.v1alpha.ICustomDimension|null); + + /** UpdateCustomDimensionRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + } + + /** Represents an UpdateCustomDimensionRequest. */ + class UpdateCustomDimensionRequest implements IUpdateCustomDimensionRequest { + + /** + * Constructs a new UpdateCustomDimensionRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IUpdateCustomDimensionRequest); + + /** UpdateCustomDimensionRequest customDimension. */ + public customDimension?: (google.analytics.admin.v1alpha.ICustomDimension|null); + + /** UpdateCustomDimensionRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** + * Creates a new UpdateCustomDimensionRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateCustomDimensionRequest instance + */ + public static create(properties?: google.analytics.admin.v1alpha.IUpdateCustomDimensionRequest): google.analytics.admin.v1alpha.UpdateCustomDimensionRequest; + + /** + * Encodes the specified UpdateCustomDimensionRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.UpdateCustomDimensionRequest.verify|verify} messages. + * @param message UpdateCustomDimensionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.IUpdateCustomDimensionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateCustomDimensionRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.UpdateCustomDimensionRequest.verify|verify} messages. + * @param message UpdateCustomDimensionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.IUpdateCustomDimensionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateCustomDimensionRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateCustomDimensionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.UpdateCustomDimensionRequest; + + /** + * Decodes an UpdateCustomDimensionRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateCustomDimensionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.UpdateCustomDimensionRequest; + + /** + * Verifies an UpdateCustomDimensionRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UpdateCustomDimensionRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateCustomDimensionRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.UpdateCustomDimensionRequest; + + /** + * Creates a plain object from an UpdateCustomDimensionRequest message. Also converts values to other types if specified. + * @param message UpdateCustomDimensionRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.UpdateCustomDimensionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateCustomDimensionRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateCustomDimensionRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListCustomDimensionsRequest. */ + interface IListCustomDimensionsRequest { + + /** ListCustomDimensionsRequest parent */ + parent?: (string|null); + + /** ListCustomDimensionsRequest pageSize */ + pageSize?: (number|null); + + /** ListCustomDimensionsRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListCustomDimensionsRequest. */ + class ListCustomDimensionsRequest implements IListCustomDimensionsRequest { + + /** + * Constructs a new ListCustomDimensionsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IListCustomDimensionsRequest); + + /** ListCustomDimensionsRequest parent. */ + public parent: string; + + /** ListCustomDimensionsRequest pageSize. */ + public pageSize: number; + + /** ListCustomDimensionsRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListCustomDimensionsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListCustomDimensionsRequest instance + */ + public static create(properties?: google.analytics.admin.v1alpha.IListCustomDimensionsRequest): google.analytics.admin.v1alpha.ListCustomDimensionsRequest; + + /** + * Encodes the specified ListCustomDimensionsRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.ListCustomDimensionsRequest.verify|verify} messages. + * @param message ListCustomDimensionsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.IListCustomDimensionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListCustomDimensionsRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.ListCustomDimensionsRequest.verify|verify} messages. + * @param message ListCustomDimensionsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.IListCustomDimensionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListCustomDimensionsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListCustomDimensionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.ListCustomDimensionsRequest; + + /** + * Decodes a ListCustomDimensionsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListCustomDimensionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.ListCustomDimensionsRequest; + + /** + * Verifies a ListCustomDimensionsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListCustomDimensionsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListCustomDimensionsRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.ListCustomDimensionsRequest; + + /** + * Creates a plain object from a ListCustomDimensionsRequest message. Also converts values to other types if specified. + * @param message ListCustomDimensionsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.ListCustomDimensionsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListCustomDimensionsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListCustomDimensionsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListCustomDimensionsResponse. */ + interface IListCustomDimensionsResponse { + + /** ListCustomDimensionsResponse customDimensions */ + customDimensions?: (google.analytics.admin.v1alpha.ICustomDimension[]|null); + + /** ListCustomDimensionsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListCustomDimensionsResponse. */ + class ListCustomDimensionsResponse implements IListCustomDimensionsResponse { + + /** + * Constructs a new ListCustomDimensionsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IListCustomDimensionsResponse); + + /** ListCustomDimensionsResponse customDimensions. */ + public customDimensions: google.analytics.admin.v1alpha.ICustomDimension[]; + + /** ListCustomDimensionsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListCustomDimensionsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListCustomDimensionsResponse instance + */ + public static create(properties?: google.analytics.admin.v1alpha.IListCustomDimensionsResponse): google.analytics.admin.v1alpha.ListCustomDimensionsResponse; + + /** + * Encodes the specified ListCustomDimensionsResponse message. Does not implicitly {@link google.analytics.admin.v1alpha.ListCustomDimensionsResponse.verify|verify} messages. + * @param message ListCustomDimensionsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.IListCustomDimensionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListCustomDimensionsResponse message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.ListCustomDimensionsResponse.verify|verify} messages. + * @param message ListCustomDimensionsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.IListCustomDimensionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListCustomDimensionsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListCustomDimensionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.ListCustomDimensionsResponse; + + /** + * Decodes a ListCustomDimensionsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListCustomDimensionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.ListCustomDimensionsResponse; + + /** + * Verifies a ListCustomDimensionsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListCustomDimensionsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListCustomDimensionsResponse + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.ListCustomDimensionsResponse; + + /** + * Creates a plain object from a ListCustomDimensionsResponse message. Also converts values to other types if specified. + * @param message ListCustomDimensionsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.ListCustomDimensionsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListCustomDimensionsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListCustomDimensionsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an ArchiveCustomDimensionRequest. */ + interface IArchiveCustomDimensionRequest { + + /** ArchiveCustomDimensionRequest name */ + name?: (string|null); + } + + /** Represents an ArchiveCustomDimensionRequest. */ + class ArchiveCustomDimensionRequest implements IArchiveCustomDimensionRequest { + + /** + * Constructs a new ArchiveCustomDimensionRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IArchiveCustomDimensionRequest); + + /** ArchiveCustomDimensionRequest name. */ + public name: string; + + /** + * Creates a new ArchiveCustomDimensionRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ArchiveCustomDimensionRequest instance + */ + public static create(properties?: google.analytics.admin.v1alpha.IArchiveCustomDimensionRequest): google.analytics.admin.v1alpha.ArchiveCustomDimensionRequest; + + /** + * Encodes the specified ArchiveCustomDimensionRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.ArchiveCustomDimensionRequest.verify|verify} messages. + * @param message ArchiveCustomDimensionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.IArchiveCustomDimensionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ArchiveCustomDimensionRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.ArchiveCustomDimensionRequest.verify|verify} messages. + * @param message ArchiveCustomDimensionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.IArchiveCustomDimensionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ArchiveCustomDimensionRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ArchiveCustomDimensionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.ArchiveCustomDimensionRequest; + + /** + * Decodes an ArchiveCustomDimensionRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ArchiveCustomDimensionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.ArchiveCustomDimensionRequest; + + /** + * Verifies an ArchiveCustomDimensionRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ArchiveCustomDimensionRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ArchiveCustomDimensionRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.ArchiveCustomDimensionRequest; + + /** + * Creates a plain object from an ArchiveCustomDimensionRequest message. Also converts values to other types if specified. + * @param message ArchiveCustomDimensionRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.ArchiveCustomDimensionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ArchiveCustomDimensionRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ArchiveCustomDimensionRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetCustomDimensionRequest. */ + interface IGetCustomDimensionRequest { + + /** GetCustomDimensionRequest name */ + name?: (string|null); + } + + /** Represents a GetCustomDimensionRequest. */ + class GetCustomDimensionRequest implements IGetCustomDimensionRequest { + + /** + * Constructs a new GetCustomDimensionRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IGetCustomDimensionRequest); + + /** GetCustomDimensionRequest name. */ + public name: string; + + /** + * Creates a new GetCustomDimensionRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetCustomDimensionRequest instance + */ + public static create(properties?: google.analytics.admin.v1alpha.IGetCustomDimensionRequest): google.analytics.admin.v1alpha.GetCustomDimensionRequest; + + /** + * Encodes the specified GetCustomDimensionRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.GetCustomDimensionRequest.verify|verify} messages. + * @param message GetCustomDimensionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.IGetCustomDimensionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetCustomDimensionRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.GetCustomDimensionRequest.verify|verify} messages. + * @param message GetCustomDimensionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.IGetCustomDimensionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetCustomDimensionRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetCustomDimensionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.GetCustomDimensionRequest; + + /** + * Decodes a GetCustomDimensionRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetCustomDimensionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.GetCustomDimensionRequest; + + /** + * Verifies a GetCustomDimensionRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetCustomDimensionRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetCustomDimensionRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.GetCustomDimensionRequest; + + /** + * Creates a plain object from a GetCustomDimensionRequest message. Also converts values to other types if specified. + * @param message GetCustomDimensionRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.GetCustomDimensionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetCustomDimensionRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetCustomDimensionRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreateCustomMetricRequest. */ + interface ICreateCustomMetricRequest { + + /** CreateCustomMetricRequest parent */ + parent?: (string|null); + + /** CreateCustomMetricRequest customMetric */ + customMetric?: (google.analytics.admin.v1alpha.ICustomMetric|null); + } + + /** Represents a CreateCustomMetricRequest. */ + class CreateCustomMetricRequest implements ICreateCustomMetricRequest { + + /** + * Constructs a new CreateCustomMetricRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.ICreateCustomMetricRequest); + + /** CreateCustomMetricRequest parent. */ + public parent: string; + + /** CreateCustomMetricRequest customMetric. */ + public customMetric?: (google.analytics.admin.v1alpha.ICustomMetric|null); + + /** + * Creates a new CreateCustomMetricRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateCustomMetricRequest instance + */ + public static create(properties?: google.analytics.admin.v1alpha.ICreateCustomMetricRequest): google.analytics.admin.v1alpha.CreateCustomMetricRequest; + + /** + * Encodes the specified CreateCustomMetricRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.CreateCustomMetricRequest.verify|verify} messages. + * @param message CreateCustomMetricRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.ICreateCustomMetricRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateCustomMetricRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.CreateCustomMetricRequest.verify|verify} messages. + * @param message CreateCustomMetricRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.ICreateCustomMetricRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateCustomMetricRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateCustomMetricRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.CreateCustomMetricRequest; + + /** + * Decodes a CreateCustomMetricRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateCustomMetricRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.CreateCustomMetricRequest; + + /** + * Verifies a CreateCustomMetricRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateCustomMetricRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateCustomMetricRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.CreateCustomMetricRequest; + + /** + * Creates a plain object from a CreateCustomMetricRequest message. Also converts values to other types if specified. + * @param message CreateCustomMetricRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.CreateCustomMetricRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateCustomMetricRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateCustomMetricRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateCustomMetricRequest. */ + interface IUpdateCustomMetricRequest { + + /** UpdateCustomMetricRequest customMetric */ + customMetric?: (google.analytics.admin.v1alpha.ICustomMetric|null); + + /** UpdateCustomMetricRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + } + + /** Represents an UpdateCustomMetricRequest. */ + class UpdateCustomMetricRequest implements IUpdateCustomMetricRequest { + + /** + * Constructs a new UpdateCustomMetricRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IUpdateCustomMetricRequest); + + /** UpdateCustomMetricRequest customMetric. */ + public customMetric?: (google.analytics.admin.v1alpha.ICustomMetric|null); + + /** UpdateCustomMetricRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** + * Creates a new UpdateCustomMetricRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateCustomMetricRequest instance + */ + public static create(properties?: google.analytics.admin.v1alpha.IUpdateCustomMetricRequest): google.analytics.admin.v1alpha.UpdateCustomMetricRequest; + + /** + * Encodes the specified UpdateCustomMetricRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.UpdateCustomMetricRequest.verify|verify} messages. + * @param message UpdateCustomMetricRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.IUpdateCustomMetricRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateCustomMetricRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.UpdateCustomMetricRequest.verify|verify} messages. + * @param message UpdateCustomMetricRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.IUpdateCustomMetricRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateCustomMetricRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateCustomMetricRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.UpdateCustomMetricRequest; + + /** + * Decodes an UpdateCustomMetricRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateCustomMetricRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.UpdateCustomMetricRequest; + + /** + * Verifies an UpdateCustomMetricRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UpdateCustomMetricRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateCustomMetricRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.UpdateCustomMetricRequest; + + /** + * Creates a plain object from an UpdateCustomMetricRequest message. Also converts values to other types if specified. + * @param message UpdateCustomMetricRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.UpdateCustomMetricRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateCustomMetricRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateCustomMetricRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListCustomMetricsRequest. */ + interface IListCustomMetricsRequest { + + /** ListCustomMetricsRequest parent */ + parent?: (string|null); + + /** ListCustomMetricsRequest pageSize */ + pageSize?: (number|null); + + /** ListCustomMetricsRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListCustomMetricsRequest. */ + class ListCustomMetricsRequest implements IListCustomMetricsRequest { + + /** + * Constructs a new ListCustomMetricsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IListCustomMetricsRequest); + + /** ListCustomMetricsRequest parent. */ + public parent: string; + + /** ListCustomMetricsRequest pageSize. */ + public pageSize: number; + + /** ListCustomMetricsRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListCustomMetricsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListCustomMetricsRequest instance + */ + public static create(properties?: google.analytics.admin.v1alpha.IListCustomMetricsRequest): google.analytics.admin.v1alpha.ListCustomMetricsRequest; + + /** + * Encodes the specified ListCustomMetricsRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.ListCustomMetricsRequest.verify|verify} messages. + * @param message ListCustomMetricsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.IListCustomMetricsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListCustomMetricsRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.ListCustomMetricsRequest.verify|verify} messages. + * @param message ListCustomMetricsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.IListCustomMetricsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListCustomMetricsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListCustomMetricsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.ListCustomMetricsRequest; + + /** + * Decodes a ListCustomMetricsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListCustomMetricsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.ListCustomMetricsRequest; + + /** + * Verifies a ListCustomMetricsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListCustomMetricsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListCustomMetricsRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.ListCustomMetricsRequest; + + /** + * Creates a plain object from a ListCustomMetricsRequest message. Also converts values to other types if specified. + * @param message ListCustomMetricsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.ListCustomMetricsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListCustomMetricsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListCustomMetricsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListCustomMetricsResponse. */ + interface IListCustomMetricsResponse { + + /** ListCustomMetricsResponse customMetrics */ + customMetrics?: (google.analytics.admin.v1alpha.ICustomMetric[]|null); + + /** ListCustomMetricsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListCustomMetricsResponse. */ + class ListCustomMetricsResponse implements IListCustomMetricsResponse { + + /** + * Constructs a new ListCustomMetricsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IListCustomMetricsResponse); + + /** ListCustomMetricsResponse customMetrics. */ + public customMetrics: google.analytics.admin.v1alpha.ICustomMetric[]; + + /** ListCustomMetricsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListCustomMetricsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListCustomMetricsResponse instance + */ + public static create(properties?: google.analytics.admin.v1alpha.IListCustomMetricsResponse): google.analytics.admin.v1alpha.ListCustomMetricsResponse; + + /** + * Encodes the specified ListCustomMetricsResponse message. Does not implicitly {@link google.analytics.admin.v1alpha.ListCustomMetricsResponse.verify|verify} messages. + * @param message ListCustomMetricsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.IListCustomMetricsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListCustomMetricsResponse message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.ListCustomMetricsResponse.verify|verify} messages. + * @param message ListCustomMetricsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.IListCustomMetricsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListCustomMetricsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListCustomMetricsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.ListCustomMetricsResponse; + + /** + * Decodes a ListCustomMetricsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListCustomMetricsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.ListCustomMetricsResponse; + + /** + * Verifies a ListCustomMetricsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListCustomMetricsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListCustomMetricsResponse + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.ListCustomMetricsResponse; + + /** + * Creates a plain object from a ListCustomMetricsResponse message. Also converts values to other types if specified. + * @param message ListCustomMetricsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.ListCustomMetricsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListCustomMetricsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListCustomMetricsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an ArchiveCustomMetricRequest. */ + interface IArchiveCustomMetricRequest { + + /** ArchiveCustomMetricRequest name */ + name?: (string|null); + } + + /** Represents an ArchiveCustomMetricRequest. */ + class ArchiveCustomMetricRequest implements IArchiveCustomMetricRequest { + + /** + * Constructs a new ArchiveCustomMetricRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IArchiveCustomMetricRequest); + + /** ArchiveCustomMetricRequest name. */ + public name: string; + + /** + * Creates a new ArchiveCustomMetricRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ArchiveCustomMetricRequest instance + */ + public static create(properties?: google.analytics.admin.v1alpha.IArchiveCustomMetricRequest): google.analytics.admin.v1alpha.ArchiveCustomMetricRequest; + + /** + * Encodes the specified ArchiveCustomMetricRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.ArchiveCustomMetricRequest.verify|verify} messages. + * @param message ArchiveCustomMetricRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.IArchiveCustomMetricRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ArchiveCustomMetricRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.ArchiveCustomMetricRequest.verify|verify} messages. + * @param message ArchiveCustomMetricRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.IArchiveCustomMetricRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ArchiveCustomMetricRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ArchiveCustomMetricRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.ArchiveCustomMetricRequest; + + /** + * Decodes an ArchiveCustomMetricRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ArchiveCustomMetricRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.ArchiveCustomMetricRequest; + + /** + * Verifies an ArchiveCustomMetricRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ArchiveCustomMetricRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ArchiveCustomMetricRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.ArchiveCustomMetricRequest; + + /** + * Creates a plain object from an ArchiveCustomMetricRequest message. Also converts values to other types if specified. + * @param message ArchiveCustomMetricRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.ArchiveCustomMetricRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ArchiveCustomMetricRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ArchiveCustomMetricRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetCustomMetricRequest. */ + interface IGetCustomMetricRequest { + + /** GetCustomMetricRequest name */ + name?: (string|null); + } + + /** Represents a GetCustomMetricRequest. */ + class GetCustomMetricRequest implements IGetCustomMetricRequest { + + /** + * Constructs a new GetCustomMetricRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IGetCustomMetricRequest); + + /** GetCustomMetricRequest name. */ + public name: string; + + /** + * Creates a new GetCustomMetricRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetCustomMetricRequest instance + */ + public static create(properties?: google.analytics.admin.v1alpha.IGetCustomMetricRequest): google.analytics.admin.v1alpha.GetCustomMetricRequest; + + /** + * Encodes the specified GetCustomMetricRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.GetCustomMetricRequest.verify|verify} messages. + * @param message GetCustomMetricRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.IGetCustomMetricRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetCustomMetricRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.GetCustomMetricRequest.verify|verify} messages. + * @param message GetCustomMetricRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.IGetCustomMetricRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetCustomMetricRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetCustomMetricRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.GetCustomMetricRequest; + + /** + * Decodes a GetCustomMetricRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetCustomMetricRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.GetCustomMetricRequest; + + /** + * Verifies a GetCustomMetricRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetCustomMetricRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetCustomMetricRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.GetCustomMetricRequest; + + /** + * Creates a plain object from a GetCustomMetricRequest message. Also converts values to other types if specified. + * @param message GetCustomMetricRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.GetCustomMetricRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetCustomMetricRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetCustomMetricRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetDataRetentionSettingsRequest. */ + interface IGetDataRetentionSettingsRequest { + + /** GetDataRetentionSettingsRequest name */ + name?: (string|null); + } + + /** Represents a GetDataRetentionSettingsRequest. */ + class GetDataRetentionSettingsRequest implements IGetDataRetentionSettingsRequest { + + /** + * Constructs a new GetDataRetentionSettingsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IGetDataRetentionSettingsRequest); + + /** GetDataRetentionSettingsRequest name. */ + public name: string; + + /** + * Creates a new GetDataRetentionSettingsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetDataRetentionSettingsRequest instance + */ + public static create(properties?: google.analytics.admin.v1alpha.IGetDataRetentionSettingsRequest): google.analytics.admin.v1alpha.GetDataRetentionSettingsRequest; + + /** + * Encodes the specified GetDataRetentionSettingsRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.GetDataRetentionSettingsRequest.verify|verify} messages. + * @param message GetDataRetentionSettingsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.IGetDataRetentionSettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetDataRetentionSettingsRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.GetDataRetentionSettingsRequest.verify|verify} messages. + * @param message GetDataRetentionSettingsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.IGetDataRetentionSettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetDataRetentionSettingsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetDataRetentionSettingsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.GetDataRetentionSettingsRequest; + + /** + * Decodes a GetDataRetentionSettingsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetDataRetentionSettingsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.GetDataRetentionSettingsRequest; + + /** + * Verifies a GetDataRetentionSettingsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetDataRetentionSettingsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetDataRetentionSettingsRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.GetDataRetentionSettingsRequest; + + /** + * Creates a plain object from a GetDataRetentionSettingsRequest message. Also converts values to other types if specified. + * @param message GetDataRetentionSettingsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.GetDataRetentionSettingsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetDataRetentionSettingsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetDataRetentionSettingsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateDataRetentionSettingsRequest. */ + interface IUpdateDataRetentionSettingsRequest { + + /** UpdateDataRetentionSettingsRequest dataRetentionSettings */ + dataRetentionSettings?: (google.analytics.admin.v1alpha.IDataRetentionSettings|null); + + /** UpdateDataRetentionSettingsRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + } + + /** Represents an UpdateDataRetentionSettingsRequest. */ + class UpdateDataRetentionSettingsRequest implements IUpdateDataRetentionSettingsRequest { + + /** + * Constructs a new UpdateDataRetentionSettingsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IUpdateDataRetentionSettingsRequest); + + /** UpdateDataRetentionSettingsRequest dataRetentionSettings. */ + public dataRetentionSettings?: (google.analytics.admin.v1alpha.IDataRetentionSettings|null); + + /** UpdateDataRetentionSettingsRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** + * Creates a new UpdateDataRetentionSettingsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateDataRetentionSettingsRequest instance + */ + public static create(properties?: google.analytics.admin.v1alpha.IUpdateDataRetentionSettingsRequest): google.analytics.admin.v1alpha.UpdateDataRetentionSettingsRequest; + + /** + * Encodes the specified UpdateDataRetentionSettingsRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.UpdateDataRetentionSettingsRequest.verify|verify} messages. + * @param message UpdateDataRetentionSettingsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.IUpdateDataRetentionSettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateDataRetentionSettingsRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.UpdateDataRetentionSettingsRequest.verify|verify} messages. + * @param message UpdateDataRetentionSettingsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.IUpdateDataRetentionSettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateDataRetentionSettingsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateDataRetentionSettingsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.UpdateDataRetentionSettingsRequest; + + /** + * Decodes an UpdateDataRetentionSettingsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateDataRetentionSettingsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.UpdateDataRetentionSettingsRequest; + + /** + * Verifies an UpdateDataRetentionSettingsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UpdateDataRetentionSettingsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateDataRetentionSettingsRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.UpdateDataRetentionSettingsRequest; + + /** + * Creates a plain object from an UpdateDataRetentionSettingsRequest message. Also converts values to other types if specified. + * @param message UpdateDataRetentionSettingsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.UpdateDataRetentionSettingsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateDataRetentionSettingsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateDataRetentionSettingsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreateDataStreamRequest. */ + interface ICreateDataStreamRequest { + + /** CreateDataStreamRequest parent */ + parent?: (string|null); + + /** CreateDataStreamRequest dataStream */ + dataStream?: (google.analytics.admin.v1alpha.IDataStream|null); + } + + /** Represents a CreateDataStreamRequest. */ + class CreateDataStreamRequest implements ICreateDataStreamRequest { + + /** + * Constructs a new CreateDataStreamRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.ICreateDataStreamRequest); + + /** CreateDataStreamRequest parent. */ + public parent: string; + + /** CreateDataStreamRequest dataStream. */ + public dataStream?: (google.analytics.admin.v1alpha.IDataStream|null); + + /** + * Creates a new CreateDataStreamRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateDataStreamRequest instance + */ + public static create(properties?: google.analytics.admin.v1alpha.ICreateDataStreamRequest): google.analytics.admin.v1alpha.CreateDataStreamRequest; + + /** + * Encodes the specified CreateDataStreamRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.CreateDataStreamRequest.verify|verify} messages. + * @param message CreateDataStreamRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.ICreateDataStreamRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateDataStreamRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.CreateDataStreamRequest.verify|verify} messages. + * @param message CreateDataStreamRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.ICreateDataStreamRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateDataStreamRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateDataStreamRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.CreateDataStreamRequest; + + /** + * Decodes a CreateDataStreamRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateDataStreamRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.CreateDataStreamRequest; + + /** + * Verifies a CreateDataStreamRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateDataStreamRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateDataStreamRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.CreateDataStreamRequest; + + /** + * Creates a plain object from a CreateDataStreamRequest message. Also converts values to other types if specified. + * @param message CreateDataStreamRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.CreateDataStreamRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateDataStreamRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateDataStreamRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteDataStreamRequest. */ + interface IDeleteDataStreamRequest { + + /** DeleteDataStreamRequest name */ + name?: (string|null); + } + + /** Represents a DeleteDataStreamRequest. */ + class DeleteDataStreamRequest implements IDeleteDataStreamRequest { + + /** + * Constructs a new DeleteDataStreamRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IDeleteDataStreamRequest); + + /** DeleteDataStreamRequest name. */ + public name: string; + + /** + * Creates a new DeleteDataStreamRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteDataStreamRequest instance + */ + public static create(properties?: google.analytics.admin.v1alpha.IDeleteDataStreamRequest): google.analytics.admin.v1alpha.DeleteDataStreamRequest; + + /** + * Encodes the specified DeleteDataStreamRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.DeleteDataStreamRequest.verify|verify} messages. + * @param message DeleteDataStreamRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.IDeleteDataStreamRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteDataStreamRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.DeleteDataStreamRequest.verify|verify} messages. + * @param message DeleteDataStreamRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.IDeleteDataStreamRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteDataStreamRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteDataStreamRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.DeleteDataStreamRequest; + + /** + * Decodes a DeleteDataStreamRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteDataStreamRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.DeleteDataStreamRequest; + + /** + * Verifies a DeleteDataStreamRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteDataStreamRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteDataStreamRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.DeleteDataStreamRequest; + + /** + * Creates a plain object from a DeleteDataStreamRequest message. Also converts values to other types if specified. + * @param message DeleteDataStreamRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.DeleteDataStreamRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteDataStreamRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteDataStreamRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateDataStreamRequest. */ + interface IUpdateDataStreamRequest { + + /** UpdateDataStreamRequest dataStream */ + dataStream?: (google.analytics.admin.v1alpha.IDataStream|null); + + /** UpdateDataStreamRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + } + + /** Represents an UpdateDataStreamRequest. */ + class UpdateDataStreamRequest implements IUpdateDataStreamRequest { + + /** + * Constructs a new UpdateDataStreamRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IUpdateDataStreamRequest); + + /** UpdateDataStreamRequest dataStream. */ + public dataStream?: (google.analytics.admin.v1alpha.IDataStream|null); + + /** UpdateDataStreamRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** + * Creates a new UpdateDataStreamRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateDataStreamRequest instance + */ + public static create(properties?: google.analytics.admin.v1alpha.IUpdateDataStreamRequest): google.analytics.admin.v1alpha.UpdateDataStreamRequest; + + /** + * Encodes the specified UpdateDataStreamRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.UpdateDataStreamRequest.verify|verify} messages. + * @param message UpdateDataStreamRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.IUpdateDataStreamRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateDataStreamRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.UpdateDataStreamRequest.verify|verify} messages. + * @param message UpdateDataStreamRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.IUpdateDataStreamRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateDataStreamRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateDataStreamRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.UpdateDataStreamRequest; + + /** + * Decodes an UpdateDataStreamRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateDataStreamRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.UpdateDataStreamRequest; + + /** + * Verifies an UpdateDataStreamRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UpdateDataStreamRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateDataStreamRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.UpdateDataStreamRequest; + + /** + * Creates a plain object from an UpdateDataStreamRequest message. Also converts values to other types if specified. + * @param message UpdateDataStreamRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.UpdateDataStreamRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateDataStreamRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateDataStreamRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListDataStreamsRequest. */ + interface IListDataStreamsRequest { + + /** ListDataStreamsRequest parent */ + parent?: (string|null); + + /** ListDataStreamsRequest pageSize */ + pageSize?: (number|null); + + /** ListDataStreamsRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListDataStreamsRequest. */ + class ListDataStreamsRequest implements IListDataStreamsRequest { + + /** + * Constructs a new ListDataStreamsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IListDataStreamsRequest); + + /** ListDataStreamsRequest parent. */ + public parent: string; + + /** ListDataStreamsRequest pageSize. */ + public pageSize: number; + + /** ListDataStreamsRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListDataStreamsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListDataStreamsRequest instance + */ + public static create(properties?: google.analytics.admin.v1alpha.IListDataStreamsRequest): google.analytics.admin.v1alpha.ListDataStreamsRequest; + + /** + * Encodes the specified ListDataStreamsRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.ListDataStreamsRequest.verify|verify} messages. + * @param message ListDataStreamsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.IListDataStreamsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListDataStreamsRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.ListDataStreamsRequest.verify|verify} messages. + * @param message ListDataStreamsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.IListDataStreamsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListDataStreamsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListDataStreamsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.ListDataStreamsRequest; + + /** + * Decodes a ListDataStreamsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListDataStreamsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.ListDataStreamsRequest; + + /** + * Verifies a ListDataStreamsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListDataStreamsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListDataStreamsRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.ListDataStreamsRequest; + + /** + * Creates a plain object from a ListDataStreamsRequest message. Also converts values to other types if specified. + * @param message ListDataStreamsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.ListDataStreamsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListDataStreamsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListDataStreamsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListDataStreamsResponse. */ + interface IListDataStreamsResponse { + + /** ListDataStreamsResponse dataStreams */ + dataStreams?: (google.analytics.admin.v1alpha.IDataStream[]|null); + + /** ListDataStreamsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListDataStreamsResponse. */ + class ListDataStreamsResponse implements IListDataStreamsResponse { + + /** + * Constructs a new ListDataStreamsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IListDataStreamsResponse); + + /** ListDataStreamsResponse dataStreams. */ + public dataStreams: google.analytics.admin.v1alpha.IDataStream[]; + + /** ListDataStreamsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListDataStreamsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListDataStreamsResponse instance + */ + public static create(properties?: google.analytics.admin.v1alpha.IListDataStreamsResponse): google.analytics.admin.v1alpha.ListDataStreamsResponse; + + /** + * Encodes the specified ListDataStreamsResponse message. Does not implicitly {@link google.analytics.admin.v1alpha.ListDataStreamsResponse.verify|verify} messages. + * @param message ListDataStreamsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.IListDataStreamsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListDataStreamsResponse message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.ListDataStreamsResponse.verify|verify} messages. + * @param message ListDataStreamsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.IListDataStreamsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListDataStreamsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListDataStreamsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.ListDataStreamsResponse; + + /** + * Decodes a ListDataStreamsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListDataStreamsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.ListDataStreamsResponse; + + /** + * Verifies a ListDataStreamsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListDataStreamsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListDataStreamsResponse + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.ListDataStreamsResponse; + + /** + * Creates a plain object from a ListDataStreamsResponse message. Also converts values to other types if specified. + * @param message ListDataStreamsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.ListDataStreamsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListDataStreamsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListDataStreamsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetDataStreamRequest. */ + interface IGetDataStreamRequest { + + /** GetDataStreamRequest name */ + name?: (string|null); + } + + /** Represents a GetDataStreamRequest. */ + class GetDataStreamRequest implements IGetDataStreamRequest { + + /** + * Constructs a new GetDataStreamRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IGetDataStreamRequest); + + /** GetDataStreamRequest name. */ + public name: string; + + /** + * Creates a new GetDataStreamRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetDataStreamRequest instance + */ + public static create(properties?: google.analytics.admin.v1alpha.IGetDataStreamRequest): google.analytics.admin.v1alpha.GetDataStreamRequest; + + /** + * Encodes the specified GetDataStreamRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.GetDataStreamRequest.verify|verify} messages. + * @param message GetDataStreamRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.IGetDataStreamRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetDataStreamRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.GetDataStreamRequest.verify|verify} messages. + * @param message GetDataStreamRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.IGetDataStreamRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetDataStreamRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetDataStreamRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.GetDataStreamRequest; + + /** + * Decodes a GetDataStreamRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetDataStreamRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.GetDataStreamRequest; + + /** + * Verifies a GetDataStreamRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetDataStreamRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetDataStreamRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.GetDataStreamRequest; + + /** + * Creates a plain object from a GetDataStreamRequest message. Also converts values to other types if specified. + * @param message GetDataStreamRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.GetDataStreamRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetDataStreamRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetDataStreamRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetAudienceRequest. */ + interface IGetAudienceRequest { + + /** GetAudienceRequest name */ + name?: (string|null); + } + + /** Represents a GetAudienceRequest. */ + class GetAudienceRequest implements IGetAudienceRequest { + + /** + * Constructs a new GetAudienceRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IGetAudienceRequest); + + /** GetAudienceRequest name. */ + public name: string; + + /** + * Creates a new GetAudienceRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetAudienceRequest instance + */ + public static create(properties?: google.analytics.admin.v1alpha.IGetAudienceRequest): google.analytics.admin.v1alpha.GetAudienceRequest; + + /** + * Encodes the specified GetAudienceRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.GetAudienceRequest.verify|verify} messages. + * @param message GetAudienceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.IGetAudienceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetAudienceRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.GetAudienceRequest.verify|verify} messages. + * @param message GetAudienceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.IGetAudienceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetAudienceRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetAudienceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.GetAudienceRequest; + + /** + * Decodes a GetAudienceRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetAudienceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.GetAudienceRequest; + + /** + * Verifies a GetAudienceRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetAudienceRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetAudienceRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.GetAudienceRequest; + + /** + * Creates a plain object from a GetAudienceRequest message. Also converts values to other types if specified. + * @param message GetAudienceRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.GetAudienceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetAudienceRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetAudienceRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListAudiencesRequest. */ + interface IListAudiencesRequest { + + /** ListAudiencesRequest parent */ + parent?: (string|null); + + /** ListAudiencesRequest pageSize */ + pageSize?: (number|null); + + /** ListAudiencesRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListAudiencesRequest. */ + class ListAudiencesRequest implements IListAudiencesRequest { + + /** + * Constructs a new ListAudiencesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IListAudiencesRequest); + + /** ListAudiencesRequest parent. */ + public parent: string; + + /** ListAudiencesRequest pageSize. */ + public pageSize: number; + + /** ListAudiencesRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListAudiencesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListAudiencesRequest instance + */ + public static create(properties?: google.analytics.admin.v1alpha.IListAudiencesRequest): google.analytics.admin.v1alpha.ListAudiencesRequest; + + /** + * Encodes the specified ListAudiencesRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.ListAudiencesRequest.verify|verify} messages. + * @param message ListAudiencesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.IListAudiencesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListAudiencesRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.ListAudiencesRequest.verify|verify} messages. + * @param message ListAudiencesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.IListAudiencesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListAudiencesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListAudiencesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.ListAudiencesRequest; + + /** + * Decodes a ListAudiencesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListAudiencesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.ListAudiencesRequest; + + /** + * Verifies a ListAudiencesRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListAudiencesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListAudiencesRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.ListAudiencesRequest; + + /** + * Creates a plain object from a ListAudiencesRequest message. Also converts values to other types if specified. + * @param message ListAudiencesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.ListAudiencesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListAudiencesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListAudiencesRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListAudiencesResponse. */ + interface IListAudiencesResponse { + + /** ListAudiencesResponse audiences */ + audiences?: (google.analytics.admin.v1alpha.IAudience[]|null); + + /** ListAudiencesResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListAudiencesResponse. */ + class ListAudiencesResponse implements IListAudiencesResponse { + + /** + * Constructs a new ListAudiencesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IListAudiencesResponse); + + /** ListAudiencesResponse audiences. */ + public audiences: google.analytics.admin.v1alpha.IAudience[]; + + /** ListAudiencesResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListAudiencesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListAudiencesResponse instance + */ + public static create(properties?: google.analytics.admin.v1alpha.IListAudiencesResponse): google.analytics.admin.v1alpha.ListAudiencesResponse; + + /** + * Encodes the specified ListAudiencesResponse message. Does not implicitly {@link google.analytics.admin.v1alpha.ListAudiencesResponse.verify|verify} messages. + * @param message ListAudiencesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.IListAudiencesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListAudiencesResponse message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.ListAudiencesResponse.verify|verify} messages. + * @param message ListAudiencesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.IListAudiencesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListAudiencesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListAudiencesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.ListAudiencesResponse; + + /** + * Decodes a ListAudiencesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListAudiencesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.ListAudiencesResponse; + + /** + * Verifies a ListAudiencesResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListAudiencesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListAudiencesResponse + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.ListAudiencesResponse; + + /** + * Creates a plain object from a ListAudiencesResponse message. Also converts values to other types if specified. + * @param message ListAudiencesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.ListAudiencesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListAudiencesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListAudiencesResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreateAudienceRequest. */ + interface ICreateAudienceRequest { + + /** CreateAudienceRequest parent */ + parent?: (string|null); + + /** CreateAudienceRequest audience */ + audience?: (google.analytics.admin.v1alpha.IAudience|null); + } + + /** Represents a CreateAudienceRequest. */ + class CreateAudienceRequest implements ICreateAudienceRequest { + + /** + * Constructs a new CreateAudienceRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.ICreateAudienceRequest); + + /** CreateAudienceRequest parent. */ + public parent: string; + + /** CreateAudienceRequest audience. */ + public audience?: (google.analytics.admin.v1alpha.IAudience|null); + + /** + * Creates a new CreateAudienceRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateAudienceRequest instance + */ + public static create(properties?: google.analytics.admin.v1alpha.ICreateAudienceRequest): google.analytics.admin.v1alpha.CreateAudienceRequest; + + /** + * Encodes the specified CreateAudienceRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.CreateAudienceRequest.verify|verify} messages. + * @param message CreateAudienceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.ICreateAudienceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateAudienceRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.CreateAudienceRequest.verify|verify} messages. + * @param message CreateAudienceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.ICreateAudienceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateAudienceRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateAudienceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.CreateAudienceRequest; + + /** + * Decodes a CreateAudienceRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateAudienceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.CreateAudienceRequest; + + /** + * Verifies a CreateAudienceRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateAudienceRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateAudienceRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.CreateAudienceRequest; + + /** + * Creates a plain object from a CreateAudienceRequest message. Also converts values to other types if specified. + * @param message CreateAudienceRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.CreateAudienceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateAudienceRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateAudienceRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateAudienceRequest. */ + interface IUpdateAudienceRequest { + + /** UpdateAudienceRequest audience */ + audience?: (google.analytics.admin.v1alpha.IAudience|null); + + /** UpdateAudienceRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + } + + /** Represents an UpdateAudienceRequest. */ + class UpdateAudienceRequest implements IUpdateAudienceRequest { + + /** + * Constructs a new UpdateAudienceRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IUpdateAudienceRequest); + + /** UpdateAudienceRequest audience. */ + public audience?: (google.analytics.admin.v1alpha.IAudience|null); + + /** UpdateAudienceRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** + * Creates a new UpdateAudienceRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateAudienceRequest instance + */ + public static create(properties?: google.analytics.admin.v1alpha.IUpdateAudienceRequest): google.analytics.admin.v1alpha.UpdateAudienceRequest; + + /** + * Encodes the specified UpdateAudienceRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.UpdateAudienceRequest.verify|verify} messages. + * @param message UpdateAudienceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.IUpdateAudienceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateAudienceRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.UpdateAudienceRequest.verify|verify} messages. + * @param message UpdateAudienceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.IUpdateAudienceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateAudienceRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateAudienceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.UpdateAudienceRequest; + + /** + * Decodes an UpdateAudienceRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateAudienceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.UpdateAudienceRequest; + + /** + * Verifies an UpdateAudienceRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UpdateAudienceRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateAudienceRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.UpdateAudienceRequest; + + /** + * Creates a plain object from an UpdateAudienceRequest message. Also converts values to other types if specified. + * @param message UpdateAudienceRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.UpdateAudienceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateAudienceRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateAudienceRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an ArchiveAudienceRequest. */ + interface IArchiveAudienceRequest { + + /** ArchiveAudienceRequest name */ + name?: (string|null); + } + + /** Represents an ArchiveAudienceRequest. */ + class ArchiveAudienceRequest implements IArchiveAudienceRequest { + + /** + * Constructs a new ArchiveAudienceRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IArchiveAudienceRequest); + + /** ArchiveAudienceRequest name. */ + public name: string; + + /** + * Creates a new ArchiveAudienceRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ArchiveAudienceRequest instance + */ + public static create(properties?: google.analytics.admin.v1alpha.IArchiveAudienceRequest): google.analytics.admin.v1alpha.ArchiveAudienceRequest; + + /** + * Encodes the specified ArchiveAudienceRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.ArchiveAudienceRequest.verify|verify} messages. + * @param message ArchiveAudienceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.IArchiveAudienceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ArchiveAudienceRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.ArchiveAudienceRequest.verify|verify} messages. + * @param message ArchiveAudienceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.IArchiveAudienceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ArchiveAudienceRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ArchiveAudienceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.ArchiveAudienceRequest; + + /** + * Decodes an ArchiveAudienceRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ArchiveAudienceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.ArchiveAudienceRequest; + + /** + * Verifies an ArchiveAudienceRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ArchiveAudienceRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ArchiveAudienceRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.ArchiveAudienceRequest; + + /** + * Creates a plain object from an ArchiveAudienceRequest message. Also converts values to other types if specified. + * @param message ArchiveAudienceRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.ArchiveAudienceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ArchiveAudienceRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ArchiveAudienceRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetAttributionSettingsRequest. */ + interface IGetAttributionSettingsRequest { + + /** GetAttributionSettingsRequest name */ + name?: (string|null); + } + + /** Represents a GetAttributionSettingsRequest. */ + class GetAttributionSettingsRequest implements IGetAttributionSettingsRequest { + + /** + * Constructs a new GetAttributionSettingsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IGetAttributionSettingsRequest); + + /** GetAttributionSettingsRequest name. */ + public name: string; + + /** + * Creates a new GetAttributionSettingsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetAttributionSettingsRequest instance + */ + public static create(properties?: google.analytics.admin.v1alpha.IGetAttributionSettingsRequest): google.analytics.admin.v1alpha.GetAttributionSettingsRequest; + + /** + * Encodes the specified GetAttributionSettingsRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.GetAttributionSettingsRequest.verify|verify} messages. + * @param message GetAttributionSettingsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.IGetAttributionSettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetAttributionSettingsRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.GetAttributionSettingsRequest.verify|verify} messages. + * @param message GetAttributionSettingsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.IGetAttributionSettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetAttributionSettingsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetAttributionSettingsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.GetAttributionSettingsRequest; + + /** + * Decodes a GetAttributionSettingsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetAttributionSettingsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.GetAttributionSettingsRequest; + + /** + * Verifies a GetAttributionSettingsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetAttributionSettingsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetAttributionSettingsRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.GetAttributionSettingsRequest; + + /** + * Creates a plain object from a GetAttributionSettingsRequest message. Also converts values to other types if specified. + * @param message GetAttributionSettingsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.GetAttributionSettingsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetAttributionSettingsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetAttributionSettingsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateAttributionSettingsRequest. */ + interface IUpdateAttributionSettingsRequest { + + /** UpdateAttributionSettingsRequest attributionSettings */ + attributionSettings?: (google.analytics.admin.v1alpha.IAttributionSettings|null); + + /** UpdateAttributionSettingsRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + } + + /** Represents an UpdateAttributionSettingsRequest. */ + class UpdateAttributionSettingsRequest implements IUpdateAttributionSettingsRequest { + + /** + * Constructs a new UpdateAttributionSettingsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IUpdateAttributionSettingsRequest); + + /** UpdateAttributionSettingsRequest attributionSettings. */ + public attributionSettings?: (google.analytics.admin.v1alpha.IAttributionSettings|null); + + /** UpdateAttributionSettingsRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** + * Creates a new UpdateAttributionSettingsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateAttributionSettingsRequest instance + */ + public static create(properties?: google.analytics.admin.v1alpha.IUpdateAttributionSettingsRequest): google.analytics.admin.v1alpha.UpdateAttributionSettingsRequest; + + /** + * Encodes the specified UpdateAttributionSettingsRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.UpdateAttributionSettingsRequest.verify|verify} messages. + * @param message UpdateAttributionSettingsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.IUpdateAttributionSettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateAttributionSettingsRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.UpdateAttributionSettingsRequest.verify|verify} messages. + * @param message UpdateAttributionSettingsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.IUpdateAttributionSettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateAttributionSettingsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateAttributionSettingsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.UpdateAttributionSettingsRequest; + + /** + * Decodes an UpdateAttributionSettingsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateAttributionSettingsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.UpdateAttributionSettingsRequest; + + /** + * Verifies an UpdateAttributionSettingsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UpdateAttributionSettingsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateAttributionSettingsRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.UpdateAttributionSettingsRequest; + + /** + * Creates a plain object from an UpdateAttributionSettingsRequest message. Also converts values to other types if specified. + * @param message UpdateAttributionSettingsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.UpdateAttributionSettingsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateAttributionSettingsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateAttributionSettingsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** AudienceFilterScope enum. */ + enum AudienceFilterScope { + AUDIENCE_FILTER_SCOPE_UNSPECIFIED = 0, + AUDIENCE_FILTER_SCOPE_WITHIN_SAME_EVENT = 1, + AUDIENCE_FILTER_SCOPE_WITHIN_SAME_SESSION = 2, + AUDIENCE_FILTER_SCOPE_ACROSS_ALL_SESSIONS = 3 + } + + /** Properties of an AudienceDimensionOrMetricFilter. */ + interface IAudienceDimensionOrMetricFilter { + + /** AudienceDimensionOrMetricFilter stringFilter */ + stringFilter?: (google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.IStringFilter|null); + + /** AudienceDimensionOrMetricFilter inListFilter */ + inListFilter?: (google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.IInListFilter|null); + + /** AudienceDimensionOrMetricFilter numericFilter */ + numericFilter?: (google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.INumericFilter|null); + + /** AudienceDimensionOrMetricFilter betweenFilter */ + betweenFilter?: (google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.IBetweenFilter|null); + + /** AudienceDimensionOrMetricFilter fieldName */ + fieldName?: (string|null); + + /** AudienceDimensionOrMetricFilter atAnyPointInTime */ + atAnyPointInTime?: (boolean|null); + + /** AudienceDimensionOrMetricFilter inAnyNDayPeriod */ + inAnyNDayPeriod?: (number|null); + } + + /** Represents an AudienceDimensionOrMetricFilter. */ + class AudienceDimensionOrMetricFilter implements IAudienceDimensionOrMetricFilter { + + /** + * Constructs a new AudienceDimensionOrMetricFilter. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IAudienceDimensionOrMetricFilter); + + /** AudienceDimensionOrMetricFilter stringFilter. */ + public stringFilter?: (google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.IStringFilter|null); + + /** AudienceDimensionOrMetricFilter inListFilter. */ + public inListFilter?: (google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.IInListFilter|null); + + /** AudienceDimensionOrMetricFilter numericFilter. */ + public numericFilter?: (google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.INumericFilter|null); + + /** AudienceDimensionOrMetricFilter betweenFilter. */ + public betweenFilter?: (google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.IBetweenFilter|null); + + /** AudienceDimensionOrMetricFilter fieldName. */ + public fieldName: string; + + /** AudienceDimensionOrMetricFilter atAnyPointInTime. */ + public atAnyPointInTime: boolean; + + /** AudienceDimensionOrMetricFilter inAnyNDayPeriod. */ + public inAnyNDayPeriod: number; + + /** AudienceDimensionOrMetricFilter oneFilter. */ + public oneFilter?: ("stringFilter"|"inListFilter"|"numericFilter"|"betweenFilter"); + + /** + * Creates a new AudienceDimensionOrMetricFilter instance using the specified properties. + * @param [properties] Properties to set + * @returns AudienceDimensionOrMetricFilter instance + */ + public static create(properties?: google.analytics.admin.v1alpha.IAudienceDimensionOrMetricFilter): google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter; + + /** + * Encodes the specified AudienceDimensionOrMetricFilter message. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.verify|verify} messages. + * @param message AudienceDimensionOrMetricFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.IAudienceDimensionOrMetricFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AudienceDimensionOrMetricFilter message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.verify|verify} messages. + * @param message AudienceDimensionOrMetricFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.IAudienceDimensionOrMetricFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AudienceDimensionOrMetricFilter message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AudienceDimensionOrMetricFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter; + + /** + * Decodes an AudienceDimensionOrMetricFilter message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AudienceDimensionOrMetricFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter; + + /** + * Verifies an AudienceDimensionOrMetricFilter message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AudienceDimensionOrMetricFilter message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AudienceDimensionOrMetricFilter + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter; + + /** + * Creates a plain object from an AudienceDimensionOrMetricFilter message. Also converts values to other types if specified. + * @param message AudienceDimensionOrMetricFilter + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AudienceDimensionOrMetricFilter to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AudienceDimensionOrMetricFilter + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace AudienceDimensionOrMetricFilter { + + /** Properties of a StringFilter. */ + interface IStringFilter { + + /** StringFilter matchType */ + matchType?: (google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter.MatchType|keyof typeof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter.MatchType|null); + + /** StringFilter value */ + value?: (string|null); + + /** StringFilter caseSensitive */ + caseSensitive?: (boolean|null); + } + + /** Represents a StringFilter. */ + class StringFilter implements IStringFilter { + + /** + * Constructs a new StringFilter. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.IStringFilter); + + /** StringFilter matchType. */ + public matchType: (google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter.MatchType|keyof typeof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter.MatchType); + + /** StringFilter value. */ + public value: string; + + /** StringFilter caseSensitive. */ + public caseSensitive: boolean; + + /** + * Creates a new StringFilter instance using the specified properties. + * @param [properties] Properties to set + * @returns StringFilter instance + */ + public static create(properties?: google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.IStringFilter): google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter; + + /** + * Encodes the specified StringFilter message. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter.verify|verify} messages. + * @param message StringFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.IStringFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified StringFilter message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter.verify|verify} messages. + * @param message StringFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.IStringFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a StringFilter message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns StringFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter; + + /** + * Decodes a StringFilter message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns StringFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter; + + /** + * Verifies a StringFilter message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a StringFilter message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns StringFilter + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter; + + /** + * Creates a plain object from a StringFilter message. Also converts values to other types if specified. + * @param message StringFilter + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this StringFilter to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for StringFilter + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace StringFilter { + + /** MatchType enum. */ + enum MatchType { + MATCH_TYPE_UNSPECIFIED = 0, + EXACT = 1, + BEGINS_WITH = 2, + ENDS_WITH = 3, + CONTAINS = 4, + FULL_REGEXP = 5, + PARTIAL_REGEXP = 6 + } + } + + /** Properties of an InListFilter. */ + interface IInListFilter { + + /** InListFilter values */ + values?: (string[]|null); + + /** InListFilter caseSensitive */ + caseSensitive?: (boolean|null); + } + + /** Represents an InListFilter. */ + class InListFilter implements IInListFilter { + + /** + * Constructs a new InListFilter. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.IInListFilter); + + /** InListFilter values. */ + public values: string[]; + + /** InListFilter caseSensitive. */ + public caseSensitive: boolean; + + /** + * Creates a new InListFilter instance using the specified properties. + * @param [properties] Properties to set + * @returns InListFilter instance + */ + public static create(properties?: google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.IInListFilter): google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.InListFilter; + + /** + * Encodes the specified InListFilter message. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.InListFilter.verify|verify} messages. + * @param message InListFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.IInListFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified InListFilter message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.InListFilter.verify|verify} messages. + * @param message InListFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.IInListFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an InListFilter message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns InListFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.InListFilter; + + /** + * Decodes an InListFilter message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns InListFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.InListFilter; + + /** + * Verifies an InListFilter message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an InListFilter message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns InListFilter + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.InListFilter; + + /** + * Creates a plain object from an InListFilter message. Also converts values to other types if specified. + * @param message InListFilter + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.InListFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this InListFilter to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for InListFilter + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a NumericValue. */ + interface INumericValue { + + /** NumericValue int64Value */ + int64Value?: (number|Long|string|null); + + /** NumericValue doubleValue */ + doubleValue?: (number|null); + } + + /** Represents a NumericValue. */ + class NumericValue implements INumericValue { + + /** + * Constructs a new NumericValue. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.INumericValue); + + /** NumericValue int64Value. */ + public int64Value?: (number|Long|string|null); + + /** NumericValue doubleValue. */ + public doubleValue?: (number|null); + + /** NumericValue oneValue. */ + public oneValue?: ("int64Value"|"doubleValue"); + + /** + * Creates a new NumericValue instance using the specified properties. + * @param [properties] Properties to set + * @returns NumericValue instance + */ + public static create(properties?: google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.INumericValue): google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue; + + /** + * Encodes the specified NumericValue message. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue.verify|verify} messages. + * @param message NumericValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.INumericValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NumericValue message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue.verify|verify} messages. + * @param message NumericValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.INumericValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NumericValue message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NumericValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue; + + /** + * Decodes a NumericValue message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NumericValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue; + + /** + * Verifies a NumericValue message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a NumericValue message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NumericValue + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue; + + /** + * Creates a plain object from a NumericValue message. Also converts values to other types if specified. + * @param message NumericValue + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NumericValue to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NumericValue + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a NumericFilter. */ + interface INumericFilter { + + /** NumericFilter operation */ + operation?: (google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter.Operation|keyof typeof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter.Operation|null); + + /** NumericFilter value */ + value?: (google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.INumericValue|null); + } + + /** Represents a NumericFilter. */ + class NumericFilter implements INumericFilter { + + /** + * Constructs a new NumericFilter. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.INumericFilter); + + /** NumericFilter operation. */ + public operation: (google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter.Operation|keyof typeof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter.Operation); + + /** NumericFilter value. */ + public value?: (google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.INumericValue|null); + + /** + * Creates a new NumericFilter instance using the specified properties. + * @param [properties] Properties to set + * @returns NumericFilter instance + */ + public static create(properties?: google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.INumericFilter): google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter; + + /** + * Encodes the specified NumericFilter message. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter.verify|verify} messages. + * @param message NumericFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.INumericFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NumericFilter message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter.verify|verify} messages. + * @param message NumericFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.INumericFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NumericFilter message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NumericFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter; + + /** + * Decodes a NumericFilter message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NumericFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter; + + /** + * Verifies a NumericFilter message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a NumericFilter message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NumericFilter + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter; + + /** + * Creates a plain object from a NumericFilter message. Also converts values to other types if specified. + * @param message NumericFilter + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NumericFilter to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NumericFilter + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace NumericFilter { + + /** Operation enum. */ + enum Operation { + OPERATION_UNSPECIFIED = 0, + EQUAL = 1, + LESS_THAN = 2, + LESS_THAN_OR_EQUAL = 3, + GREATER_THAN = 4, + GREATER_THAN_OR_EQUAL = 5 + } + } + + /** Properties of a BetweenFilter. */ + interface IBetweenFilter { + + /** BetweenFilter fromValue */ + fromValue?: (google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.INumericValue|null); + + /** BetweenFilter toValue */ + toValue?: (google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.INumericValue|null); + } + + /** Represents a BetweenFilter. */ + class BetweenFilter implements IBetweenFilter { + + /** + * Constructs a new BetweenFilter. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.IBetweenFilter); + + /** BetweenFilter fromValue. */ + public fromValue?: (google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.INumericValue|null); + + /** BetweenFilter toValue. */ + public toValue?: (google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.INumericValue|null); + + /** + * Creates a new BetweenFilter instance using the specified properties. + * @param [properties] Properties to set + * @returns BetweenFilter instance + */ + public static create(properties?: google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.IBetweenFilter): google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.BetweenFilter; + + /** + * Encodes the specified BetweenFilter message. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.BetweenFilter.verify|verify} messages. + * @param message BetweenFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.IBetweenFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BetweenFilter message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.BetweenFilter.verify|verify} messages. + * @param message BetweenFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.IBetweenFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BetweenFilter message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BetweenFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.BetweenFilter; + + /** + * Decodes a BetweenFilter message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BetweenFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.BetweenFilter; + + /** + * Verifies a BetweenFilter message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BetweenFilter message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BetweenFilter + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.BetweenFilter; + + /** + * Creates a plain object from a BetweenFilter message. Also converts values to other types if specified. + * @param message BetweenFilter + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.BetweenFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BetweenFilter to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BetweenFilter + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of an AudienceEventFilter. */ + interface IAudienceEventFilter { + + /** AudienceEventFilter eventName */ + eventName?: (string|null); + + /** AudienceEventFilter eventParameterFilterExpression */ + eventParameterFilterExpression?: (google.analytics.admin.v1alpha.IAudienceFilterExpression|null); + } + + /** Represents an AudienceEventFilter. */ + class AudienceEventFilter implements IAudienceEventFilter { + + /** + * Constructs a new AudienceEventFilter. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IAudienceEventFilter); + + /** AudienceEventFilter eventName. */ + public eventName: string; + + /** AudienceEventFilter eventParameterFilterExpression. */ + public eventParameterFilterExpression?: (google.analytics.admin.v1alpha.IAudienceFilterExpression|null); + + /** + * Creates a new AudienceEventFilter instance using the specified properties. + * @param [properties] Properties to set + * @returns AudienceEventFilter instance + */ + public static create(properties?: google.analytics.admin.v1alpha.IAudienceEventFilter): google.analytics.admin.v1alpha.AudienceEventFilter; + + /** + * Encodes the specified AudienceEventFilter message. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceEventFilter.verify|verify} messages. + * @param message AudienceEventFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.IAudienceEventFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AudienceEventFilter message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceEventFilter.verify|verify} messages. + * @param message AudienceEventFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.IAudienceEventFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AudienceEventFilter message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AudienceEventFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.AudienceEventFilter; + + /** + * Decodes an AudienceEventFilter message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AudienceEventFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.AudienceEventFilter; + + /** + * Verifies an AudienceEventFilter message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AudienceEventFilter message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AudienceEventFilter + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.AudienceEventFilter; + + /** + * Creates a plain object from an AudienceEventFilter message. Also converts values to other types if specified. + * @param message AudienceEventFilter + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.AudienceEventFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AudienceEventFilter to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AudienceEventFilter + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AudienceFilterExpression. */ + interface IAudienceFilterExpression { + + /** AudienceFilterExpression andGroup */ + andGroup?: (google.analytics.admin.v1alpha.IAudienceFilterExpressionList|null); + + /** AudienceFilterExpression orGroup */ + orGroup?: (google.analytics.admin.v1alpha.IAudienceFilterExpressionList|null); + + /** AudienceFilterExpression notExpression */ + notExpression?: (google.analytics.admin.v1alpha.IAudienceFilterExpression|null); + + /** AudienceFilterExpression dimensionOrMetricFilter */ + dimensionOrMetricFilter?: (google.analytics.admin.v1alpha.IAudienceDimensionOrMetricFilter|null); + + /** AudienceFilterExpression eventFilter */ + eventFilter?: (google.analytics.admin.v1alpha.IAudienceEventFilter|null); + } + + /** Represents an AudienceFilterExpression. */ + class AudienceFilterExpression implements IAudienceFilterExpression { + + /** + * Constructs a new AudienceFilterExpression. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IAudienceFilterExpression); + + /** AudienceFilterExpression andGroup. */ + public andGroup?: (google.analytics.admin.v1alpha.IAudienceFilterExpressionList|null); + + /** AudienceFilterExpression orGroup. */ + public orGroup?: (google.analytics.admin.v1alpha.IAudienceFilterExpressionList|null); + + /** AudienceFilterExpression notExpression. */ + public notExpression?: (google.analytics.admin.v1alpha.IAudienceFilterExpression|null); + + /** AudienceFilterExpression dimensionOrMetricFilter. */ + public dimensionOrMetricFilter?: (google.analytics.admin.v1alpha.IAudienceDimensionOrMetricFilter|null); + + /** AudienceFilterExpression eventFilter. */ + public eventFilter?: (google.analytics.admin.v1alpha.IAudienceEventFilter|null); + + /** AudienceFilterExpression expr. */ + public expr?: ("andGroup"|"orGroup"|"notExpression"|"dimensionOrMetricFilter"|"eventFilter"); + + /** + * Creates a new AudienceFilterExpression instance using the specified properties. + * @param [properties] Properties to set + * @returns AudienceFilterExpression instance + */ + public static create(properties?: google.analytics.admin.v1alpha.IAudienceFilterExpression): google.analytics.admin.v1alpha.AudienceFilterExpression; + + /** + * Encodes the specified AudienceFilterExpression message. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceFilterExpression.verify|verify} messages. + * @param message AudienceFilterExpression message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.IAudienceFilterExpression, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AudienceFilterExpression message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceFilterExpression.verify|verify} messages. + * @param message AudienceFilterExpression message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.IAudienceFilterExpression, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AudienceFilterExpression message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AudienceFilterExpression + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.AudienceFilterExpression; + + /** + * Decodes an AudienceFilterExpression message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AudienceFilterExpression + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.AudienceFilterExpression; + + /** + * Verifies an AudienceFilterExpression message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AudienceFilterExpression message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AudienceFilterExpression + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.AudienceFilterExpression; + + /** + * Creates a plain object from an AudienceFilterExpression message. Also converts values to other types if specified. + * @param message AudienceFilterExpression + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.AudienceFilterExpression, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AudienceFilterExpression to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AudienceFilterExpression + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AudienceFilterExpressionList. */ + interface IAudienceFilterExpressionList { + + /** AudienceFilterExpressionList filterExpressions */ + filterExpressions?: (google.analytics.admin.v1alpha.IAudienceFilterExpression[]|null); + } + + /** Represents an AudienceFilterExpressionList. */ + class AudienceFilterExpressionList implements IAudienceFilterExpressionList { + + /** + * Constructs a new AudienceFilterExpressionList. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IAudienceFilterExpressionList); + + /** AudienceFilterExpressionList filterExpressions. */ + public filterExpressions: google.analytics.admin.v1alpha.IAudienceFilterExpression[]; + + /** + * Creates a new AudienceFilterExpressionList instance using the specified properties. + * @param [properties] Properties to set + * @returns AudienceFilterExpressionList instance + */ + public static create(properties?: google.analytics.admin.v1alpha.IAudienceFilterExpressionList): google.analytics.admin.v1alpha.AudienceFilterExpressionList; + + /** + * Encodes the specified AudienceFilterExpressionList message. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceFilterExpressionList.verify|verify} messages. + * @param message AudienceFilterExpressionList message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.IAudienceFilterExpressionList, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AudienceFilterExpressionList message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceFilterExpressionList.verify|verify} messages. + * @param message AudienceFilterExpressionList message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.IAudienceFilterExpressionList, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AudienceFilterExpressionList message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AudienceFilterExpressionList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.AudienceFilterExpressionList; + + /** + * Decodes an AudienceFilterExpressionList message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AudienceFilterExpressionList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.AudienceFilterExpressionList; + + /** + * Verifies an AudienceFilterExpressionList message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AudienceFilterExpressionList message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AudienceFilterExpressionList + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.AudienceFilterExpressionList; + + /** + * Creates a plain object from an AudienceFilterExpressionList message. Also converts values to other types if specified. + * @param message AudienceFilterExpressionList + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.AudienceFilterExpressionList, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AudienceFilterExpressionList to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AudienceFilterExpressionList + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AudienceSimpleFilter. */ + interface IAudienceSimpleFilter { + + /** AudienceSimpleFilter scope */ + scope?: (google.analytics.admin.v1alpha.AudienceFilterScope|keyof typeof google.analytics.admin.v1alpha.AudienceFilterScope|null); + + /** AudienceSimpleFilter filterExpression */ + filterExpression?: (google.analytics.admin.v1alpha.IAudienceFilterExpression|null); + } + + /** Represents an AudienceSimpleFilter. */ + class AudienceSimpleFilter implements IAudienceSimpleFilter { + + /** + * Constructs a new AudienceSimpleFilter. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IAudienceSimpleFilter); + + /** AudienceSimpleFilter scope. */ + public scope: (google.analytics.admin.v1alpha.AudienceFilterScope|keyof typeof google.analytics.admin.v1alpha.AudienceFilterScope); + + /** AudienceSimpleFilter filterExpression. */ + public filterExpression?: (google.analytics.admin.v1alpha.IAudienceFilterExpression|null); + + /** + * Creates a new AudienceSimpleFilter instance using the specified properties. + * @param [properties] Properties to set + * @returns AudienceSimpleFilter instance + */ + public static create(properties?: google.analytics.admin.v1alpha.IAudienceSimpleFilter): google.analytics.admin.v1alpha.AudienceSimpleFilter; + + /** + * Encodes the specified AudienceSimpleFilter message. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceSimpleFilter.verify|verify} messages. + * @param message AudienceSimpleFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.IAudienceSimpleFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AudienceSimpleFilter message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceSimpleFilter.verify|verify} messages. + * @param message AudienceSimpleFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.IAudienceSimpleFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AudienceSimpleFilter message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AudienceSimpleFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.AudienceSimpleFilter; + + /** + * Decodes an AudienceSimpleFilter message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AudienceSimpleFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.AudienceSimpleFilter; + + /** + * Verifies an AudienceSimpleFilter message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AudienceSimpleFilter message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AudienceSimpleFilter + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.AudienceSimpleFilter; + + /** + * Creates a plain object from an AudienceSimpleFilter message. Also converts values to other types if specified. + * @param message AudienceSimpleFilter + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.AudienceSimpleFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AudienceSimpleFilter to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AudienceSimpleFilter + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AudienceSequenceFilter. */ + interface IAudienceSequenceFilter { + + /** AudienceSequenceFilter scope */ + scope?: (google.analytics.admin.v1alpha.AudienceFilterScope|keyof typeof google.analytics.admin.v1alpha.AudienceFilterScope|null); + + /** AudienceSequenceFilter sequenceMaximumDuration */ + sequenceMaximumDuration?: (google.protobuf.IDuration|null); + + /** AudienceSequenceFilter sequenceSteps */ + sequenceSteps?: (google.analytics.admin.v1alpha.AudienceSequenceFilter.IAudienceSequenceStep[]|null); + } + + /** Represents an AudienceSequenceFilter. */ + class AudienceSequenceFilter implements IAudienceSequenceFilter { + + /** + * Constructs a new AudienceSequenceFilter. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IAudienceSequenceFilter); + + /** AudienceSequenceFilter scope. */ + public scope: (google.analytics.admin.v1alpha.AudienceFilterScope|keyof typeof google.analytics.admin.v1alpha.AudienceFilterScope); + + /** AudienceSequenceFilter sequenceMaximumDuration. */ + public sequenceMaximumDuration?: (google.protobuf.IDuration|null); + + /** AudienceSequenceFilter sequenceSteps. */ + public sequenceSteps: google.analytics.admin.v1alpha.AudienceSequenceFilter.IAudienceSequenceStep[]; + + /** + * Creates a new AudienceSequenceFilter instance using the specified properties. + * @param [properties] Properties to set + * @returns AudienceSequenceFilter instance + */ + public static create(properties?: google.analytics.admin.v1alpha.IAudienceSequenceFilter): google.analytics.admin.v1alpha.AudienceSequenceFilter; + + /** + * Encodes the specified AudienceSequenceFilter message. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceSequenceFilter.verify|verify} messages. + * @param message AudienceSequenceFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.IAudienceSequenceFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AudienceSequenceFilter message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceSequenceFilter.verify|verify} messages. + * @param message AudienceSequenceFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.IAudienceSequenceFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AudienceSequenceFilter message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AudienceSequenceFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.AudienceSequenceFilter; + + /** + * Decodes an AudienceSequenceFilter message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AudienceSequenceFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.AudienceSequenceFilter; + + /** + * Verifies an AudienceSequenceFilter message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AudienceSequenceFilter message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AudienceSequenceFilter + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.AudienceSequenceFilter; + + /** + * Creates a plain object from an AudienceSequenceFilter message. Also converts values to other types if specified. + * @param message AudienceSequenceFilter + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.AudienceSequenceFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AudienceSequenceFilter to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AudienceSequenceFilter + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace AudienceSequenceFilter { + + /** Properties of an AudienceSequenceStep. */ + interface IAudienceSequenceStep { + + /** AudienceSequenceStep scope */ + scope?: (google.analytics.admin.v1alpha.AudienceFilterScope|keyof typeof google.analytics.admin.v1alpha.AudienceFilterScope|null); + + /** AudienceSequenceStep immediatelyFollows */ + immediatelyFollows?: (boolean|null); + + /** AudienceSequenceStep constraintDuration */ + constraintDuration?: (google.protobuf.IDuration|null); + + /** AudienceSequenceStep filterExpression */ + filterExpression?: (google.analytics.admin.v1alpha.IAudienceFilterExpression|null); + } + + /** Represents an AudienceSequenceStep. */ + class AudienceSequenceStep implements IAudienceSequenceStep { + + /** + * Constructs a new AudienceSequenceStep. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.AudienceSequenceFilter.IAudienceSequenceStep); + + /** AudienceSequenceStep scope. */ + public scope: (google.analytics.admin.v1alpha.AudienceFilterScope|keyof typeof google.analytics.admin.v1alpha.AudienceFilterScope); + + /** AudienceSequenceStep immediatelyFollows. */ + public immediatelyFollows: boolean; + + /** AudienceSequenceStep constraintDuration. */ + public constraintDuration?: (google.protobuf.IDuration|null); + + /** AudienceSequenceStep filterExpression. */ + public filterExpression?: (google.analytics.admin.v1alpha.IAudienceFilterExpression|null); + + /** + * Creates a new AudienceSequenceStep instance using the specified properties. + * @param [properties] Properties to set + * @returns AudienceSequenceStep instance + */ + public static create(properties?: google.analytics.admin.v1alpha.AudienceSequenceFilter.IAudienceSequenceStep): google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep; + + /** + * Encodes the specified AudienceSequenceStep message. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep.verify|verify} messages. + * @param message AudienceSequenceStep message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.AudienceSequenceFilter.IAudienceSequenceStep, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AudienceSequenceStep message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep.verify|verify} messages. + * @param message AudienceSequenceStep message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.AudienceSequenceFilter.IAudienceSequenceStep, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AudienceSequenceStep message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AudienceSequenceStep + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep; + + /** + * Decodes an AudienceSequenceStep message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AudienceSequenceStep + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep; + + /** + * Verifies an AudienceSequenceStep message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AudienceSequenceStep message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AudienceSequenceStep + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep; + + /** + * Creates a plain object from an AudienceSequenceStep message. Also converts values to other types if specified. + * @param message AudienceSequenceStep + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AudienceSequenceStep to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AudienceSequenceStep + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of an AudienceFilterClause. */ + interface IAudienceFilterClause { + + /** AudienceFilterClause simpleFilter */ + simpleFilter?: (google.analytics.admin.v1alpha.IAudienceSimpleFilter|null); + + /** AudienceFilterClause sequenceFilter */ + sequenceFilter?: (google.analytics.admin.v1alpha.IAudienceSequenceFilter|null); + + /** AudienceFilterClause clauseType */ + clauseType?: (google.analytics.admin.v1alpha.AudienceFilterClause.AudienceClauseType|keyof typeof google.analytics.admin.v1alpha.AudienceFilterClause.AudienceClauseType|null); + } + + /** Represents an AudienceFilterClause. */ + class AudienceFilterClause implements IAudienceFilterClause { + + /** + * Constructs a new AudienceFilterClause. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IAudienceFilterClause); + + /** AudienceFilterClause simpleFilter. */ + public simpleFilter?: (google.analytics.admin.v1alpha.IAudienceSimpleFilter|null); + + /** AudienceFilterClause sequenceFilter. */ + public sequenceFilter?: (google.analytics.admin.v1alpha.IAudienceSequenceFilter|null); + + /** AudienceFilterClause clauseType. */ + public clauseType: (google.analytics.admin.v1alpha.AudienceFilterClause.AudienceClauseType|keyof typeof google.analytics.admin.v1alpha.AudienceFilterClause.AudienceClauseType); + + /** AudienceFilterClause filter. */ + public filter?: ("simpleFilter"|"sequenceFilter"); + + /** + * Creates a new AudienceFilterClause instance using the specified properties. + * @param [properties] Properties to set + * @returns AudienceFilterClause instance + */ + public static create(properties?: google.analytics.admin.v1alpha.IAudienceFilterClause): google.analytics.admin.v1alpha.AudienceFilterClause; + + /** + * Encodes the specified AudienceFilterClause message. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceFilterClause.verify|verify} messages. + * @param message AudienceFilterClause message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.IAudienceFilterClause, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AudienceFilterClause message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceFilterClause.verify|verify} messages. + * @param message AudienceFilterClause message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.IAudienceFilterClause, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AudienceFilterClause message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AudienceFilterClause + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.AudienceFilterClause; + + /** + * Decodes an AudienceFilterClause message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AudienceFilterClause + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.AudienceFilterClause; + + /** + * Verifies an AudienceFilterClause message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AudienceFilterClause message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AudienceFilterClause + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.AudienceFilterClause; + + /** + * Creates a plain object from an AudienceFilterClause message. Also converts values to other types if specified. + * @param message AudienceFilterClause + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.AudienceFilterClause, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AudienceFilterClause to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AudienceFilterClause + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace AudienceFilterClause { + + /** AudienceClauseType enum. */ + enum AudienceClauseType { + AUDIENCE_CLAUSE_TYPE_UNSPECIFIED = 0, + INCLUDE = 1, + EXCLUDE = 2 + } + } + + /** Properties of an AudienceEventTrigger. */ + interface IAudienceEventTrigger { + + /** AudienceEventTrigger eventName */ + eventName?: (string|null); + + /** AudienceEventTrigger logCondition */ + logCondition?: (google.analytics.admin.v1alpha.AudienceEventTrigger.LogCondition|keyof typeof google.analytics.admin.v1alpha.AudienceEventTrigger.LogCondition|null); + } + + /** Represents an AudienceEventTrigger. */ + class AudienceEventTrigger implements IAudienceEventTrigger { + + /** + * Constructs a new AudienceEventTrigger. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IAudienceEventTrigger); + + /** AudienceEventTrigger eventName. */ + public eventName: string; + + /** AudienceEventTrigger logCondition. */ + public logCondition: (google.analytics.admin.v1alpha.AudienceEventTrigger.LogCondition|keyof typeof google.analytics.admin.v1alpha.AudienceEventTrigger.LogCondition); + + /** + * Creates a new AudienceEventTrigger instance using the specified properties. + * @param [properties] Properties to set + * @returns AudienceEventTrigger instance + */ + public static create(properties?: google.analytics.admin.v1alpha.IAudienceEventTrigger): google.analytics.admin.v1alpha.AudienceEventTrigger; + + /** + * Encodes the specified AudienceEventTrigger message. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceEventTrigger.verify|verify} messages. + * @param message AudienceEventTrigger message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.IAudienceEventTrigger, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AudienceEventTrigger message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceEventTrigger.verify|verify} messages. + * @param message AudienceEventTrigger message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.IAudienceEventTrigger, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AudienceEventTrigger message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AudienceEventTrigger + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.AudienceEventTrigger; + + /** + * Decodes an AudienceEventTrigger message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AudienceEventTrigger + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.AudienceEventTrigger; + + /** + * Verifies an AudienceEventTrigger message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AudienceEventTrigger message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AudienceEventTrigger + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.AudienceEventTrigger; + + /** + * Creates a plain object from an AudienceEventTrigger message. Also converts values to other types if specified. + * @param message AudienceEventTrigger + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.AudienceEventTrigger, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AudienceEventTrigger to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AudienceEventTrigger + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace AudienceEventTrigger { + + /** LogCondition enum. */ + enum LogCondition { + LOG_CONDITION_UNSPECIFIED = 0, + AUDIENCE_JOINED = 1, + AUDIENCE_MEMBERSHIP_RENEWED = 2 + } + } + + /** Properties of an Audience. */ + interface IAudience { + + /** Audience name */ + name?: (string|null); + + /** Audience displayName */ + displayName?: (string|null); + + /** Audience description */ + description?: (string|null); + + /** Audience membershipDurationDays */ + membershipDurationDays?: (number|null); + + /** Audience adsPersonalizationEnabled */ + adsPersonalizationEnabled?: (boolean|null); + + /** Audience eventTrigger */ + eventTrigger?: (google.analytics.admin.v1alpha.IAudienceEventTrigger|null); + + /** Audience exclusionDurationMode */ + exclusionDurationMode?: (google.analytics.admin.v1alpha.Audience.AudienceExclusionDurationMode|keyof typeof google.analytics.admin.v1alpha.Audience.AudienceExclusionDurationMode|null); + + /** Audience filterClauses */ + filterClauses?: (google.analytics.admin.v1alpha.IAudienceFilterClause[]|null); + } + + /** Represents an Audience. */ + class Audience implements IAudience { + + /** + * Constructs a new Audience. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IAudience); + + /** Audience name. */ + public name: string; + + /** Audience displayName. */ + public displayName: string; + + /** Audience description. */ + public description: string; + + /** Audience membershipDurationDays. */ + public membershipDurationDays: number; + + /** Audience adsPersonalizationEnabled. */ + public adsPersonalizationEnabled: boolean; + + /** Audience eventTrigger. */ + public eventTrigger?: (google.analytics.admin.v1alpha.IAudienceEventTrigger|null); + + /** Audience exclusionDurationMode. */ + public exclusionDurationMode: (google.analytics.admin.v1alpha.Audience.AudienceExclusionDurationMode|keyof typeof google.analytics.admin.v1alpha.Audience.AudienceExclusionDurationMode); + + /** Audience filterClauses. */ + public filterClauses: google.analytics.admin.v1alpha.IAudienceFilterClause[]; + + /** + * Creates a new Audience instance using the specified properties. + * @param [properties] Properties to set + * @returns Audience instance + */ + public static create(properties?: google.analytics.admin.v1alpha.IAudience): google.analytics.admin.v1alpha.Audience; + + /** + * Encodes the specified Audience message. Does not implicitly {@link google.analytics.admin.v1alpha.Audience.verify|verify} messages. + * @param message Audience message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.IAudience, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Audience message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.Audience.verify|verify} messages. + * @param message Audience message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.IAudience, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Audience message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Audience + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.Audience; + + /** + * Decodes an Audience message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Audience + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.Audience; + + /** + * Verifies an Audience message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Audience message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Audience + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.Audience; + + /** + * Creates a plain object from an Audience message. Also converts values to other types if specified. + * @param message Audience + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.Audience, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Audience to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Audience + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Audience { + + /** AudienceExclusionDurationMode enum. */ + enum AudienceExclusionDurationMode { + AUDIENCE_EXCLUSION_DURATION_MODE_UNSPECIFIED = 0, + EXCLUDE_TEMPORARILY = 1, + EXCLUDE_PERMANENTLY = 2 + } + } + + /** IndustryCategory enum. */ + enum IndustryCategory { + INDUSTRY_CATEGORY_UNSPECIFIED = 0, + AUTOMOTIVE = 1, + BUSINESS_AND_INDUSTRIAL_MARKETS = 2, + FINANCE = 3, + HEALTHCARE = 4, + TECHNOLOGY = 5, + TRAVEL = 6, + OTHER = 7, + ARTS_AND_ENTERTAINMENT = 8, + BEAUTY_AND_FITNESS = 9, + BOOKS_AND_LITERATURE = 10, + FOOD_AND_DRINK = 11, + GAMES = 12, + HOBBIES_AND_LEISURE = 13, + HOME_AND_GARDEN = 14, + INTERNET_AND_TELECOM = 15, + LAW_AND_GOVERNMENT = 16, + NEWS = 17, + ONLINE_COMMUNITIES = 18, + PEOPLE_AND_SOCIETY = 19, + PETS_AND_ANIMALS = 20, + REAL_ESTATE = 21, + REFERENCE = 22, + SCIENCE = 23, + SPORTS = 24, + JOBS_AND_EDUCATION = 25, + SHOPPING = 26 + } + + /** ServiceLevel enum. */ + enum ServiceLevel { + SERVICE_LEVEL_UNSPECIFIED = 0, + GOOGLE_ANALYTICS_STANDARD = 1, + GOOGLE_ANALYTICS_360 = 2 + } + + /** ActorType enum. */ + enum ActorType { + ACTOR_TYPE_UNSPECIFIED = 0, + USER = 1, + SYSTEM = 2, + SUPPORT = 3 + } + + /** ActionType enum. */ + enum ActionType { + ACTION_TYPE_UNSPECIFIED = 0, + CREATED = 1, + UPDATED = 2, + DELETED = 3 + } + + /** ChangeHistoryResourceType enum. */ + enum ChangeHistoryResourceType { + CHANGE_HISTORY_RESOURCE_TYPE_UNSPECIFIED = 0, + ACCOUNT = 1, + PROPERTY = 2, + FIREBASE_LINK = 6, + GOOGLE_ADS_LINK = 7, + GOOGLE_SIGNALS_SETTINGS = 8, + CONVERSION_EVENT = 9, + MEASUREMENT_PROTOCOL_SECRET = 10, + CUSTOM_DIMENSION = 11, + CUSTOM_METRIC = 12, + DATA_RETENTION_SETTINGS = 13, + DISPLAY_VIDEO_360_ADVERTISER_LINK = 14, + DISPLAY_VIDEO_360_ADVERTISER_LINK_PROPOSAL = 15, + SEARCH_ADS_360_LINK = 16, + DATA_STREAM = 18, + ATTRIBUTION_SETTINGS = 20 + } + + /** GoogleSignalsState enum. */ + enum GoogleSignalsState { + GOOGLE_SIGNALS_STATE_UNSPECIFIED = 0, + GOOGLE_SIGNALS_ENABLED = 1, + GOOGLE_SIGNALS_DISABLED = 2 + } + + /** GoogleSignalsConsent enum. */ + enum GoogleSignalsConsent { + GOOGLE_SIGNALS_CONSENT_UNSPECIFIED = 0, + GOOGLE_SIGNALS_CONSENT_CONSENTED = 2, + GOOGLE_SIGNALS_CONSENT_NOT_CONSENTED = 1 + } + + /** LinkProposalInitiatingProduct enum. */ + enum LinkProposalInitiatingProduct { + LINK_PROPOSAL_INITIATING_PRODUCT_UNSPECIFIED = 0, + GOOGLE_ANALYTICS = 1, + LINKED_PRODUCT = 2 + } + + /** LinkProposalState enum. */ + enum LinkProposalState { + LINK_PROPOSAL_STATE_UNSPECIFIED = 0, + AWAITING_REVIEW_FROM_GOOGLE_ANALYTICS = 1, + AWAITING_REVIEW_FROM_LINKED_PRODUCT = 2, + WITHDRAWN = 3, + DECLINED = 4, + EXPIRED = 5, + OBSOLETE = 6 + } + + /** PropertyType enum. */ + enum PropertyType { + PROPERTY_TYPE_UNSPECIFIED = 0, + PROPERTY_TYPE_ORDINARY = 1, + PROPERTY_TYPE_SUBPROPERTY = 2, + PROPERTY_TYPE_ROLLUP = 3 + } + + /** Properties of an Account. */ + interface IAccount { + + /** Account name */ + name?: (string|null); + + /** Account createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** Account updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** Account displayName */ + displayName?: (string|null); + + /** Account regionCode */ + regionCode?: (string|null); + + /** Account deleted */ + deleted?: (boolean|null); + } + + /** Represents an Account. */ + class Account implements IAccount { + + /** + * Constructs a new Account. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IAccount); + + /** Account name. */ + public name: string; + + /** Account createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** Account updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** Account displayName. */ + public displayName: string; + + /** Account regionCode. */ + public regionCode: string; + + /** Account deleted. */ + public deleted: boolean; + + /** + * Creates a new Account instance using the specified properties. + * @param [properties] Properties to set + * @returns Account instance + */ + public static create(properties?: google.analytics.admin.v1alpha.IAccount): google.analytics.admin.v1alpha.Account; + + /** + * Encodes the specified Account message. Does not implicitly {@link google.analytics.admin.v1alpha.Account.verify|verify} messages. + * @param message Account message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.IAccount, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Account message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.Account.verify|verify} messages. + * @param message Account message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.IAccount, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Account message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Account + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.Account; + + /** + * Decodes an Account message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Account + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.Account; + + /** + * Verifies an Account message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Account message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Account + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.Account; + + /** + * Creates a plain object from an Account message. Also converts values to other types if specified. + * @param message Account + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.Account, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Account to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Account + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Property. */ + interface IProperty { + + /** Property name */ + name?: (string|null); + + /** Property propertyType */ + propertyType?: (google.analytics.admin.v1alpha.PropertyType|keyof typeof google.analytics.admin.v1alpha.PropertyType|null); + + /** Property createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** Property updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** Property parent */ + parent?: (string|null); + + /** Property displayName */ + displayName?: (string|null); + + /** Property industryCategory */ + industryCategory?: (google.analytics.admin.v1alpha.IndustryCategory|keyof typeof google.analytics.admin.v1alpha.IndustryCategory|null); + + /** Property timeZone */ + timeZone?: (string|null); + + /** Property currencyCode */ + currencyCode?: (string|null); + + /** Property serviceLevel */ + serviceLevel?: (google.analytics.admin.v1alpha.ServiceLevel|keyof typeof google.analytics.admin.v1alpha.ServiceLevel|null); + + /** Property deleteTime */ + deleteTime?: (google.protobuf.ITimestamp|null); + + /** Property expireTime */ + expireTime?: (google.protobuf.ITimestamp|null); + + /** Property account */ + account?: (string|null); + } + + /** Represents a Property. */ + class Property implements IProperty { + + /** + * Constructs a new Property. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IProperty); + + /** Property name. */ + public name: string; + + /** Property propertyType. */ + public propertyType: (google.analytics.admin.v1alpha.PropertyType|keyof typeof google.analytics.admin.v1alpha.PropertyType); + + /** Property createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** Property updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** Property parent. */ + public parent: string; + + /** Property displayName. */ + public displayName: string; + + /** Property industryCategory. */ + public industryCategory: (google.analytics.admin.v1alpha.IndustryCategory|keyof typeof google.analytics.admin.v1alpha.IndustryCategory); + + /** Property timeZone. */ + public timeZone: string; + + /** Property currencyCode. */ + public currencyCode: string; + + /** Property serviceLevel. */ + public serviceLevel: (google.analytics.admin.v1alpha.ServiceLevel|keyof typeof google.analytics.admin.v1alpha.ServiceLevel); + + /** Property deleteTime. */ + public deleteTime?: (google.protobuf.ITimestamp|null); + + /** Property expireTime. */ + public expireTime?: (google.protobuf.ITimestamp|null); + + /** Property account. */ + public account: string; + + /** + * Creates a new Property instance using the specified properties. + * @param [properties] Properties to set + * @returns Property instance + */ + public static create(properties?: google.analytics.admin.v1alpha.IProperty): google.analytics.admin.v1alpha.Property; + + /** + * Encodes the specified Property message. Does not implicitly {@link google.analytics.admin.v1alpha.Property.verify|verify} messages. + * @param message Property message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.IProperty, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Property message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.Property.verify|verify} messages. + * @param message Property message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.IProperty, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Property message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Property + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.Property; + + /** + * Decodes a Property message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Property + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.Property; + + /** + * Verifies a Property message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Property message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Property + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.Property; + + /** + * Creates a plain object from a Property message. Also converts values to other types if specified. + * @param message Property + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.Property, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Property to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Property + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DataStream. */ + interface IDataStream { + + /** DataStream webStreamData */ + webStreamData?: (google.analytics.admin.v1alpha.DataStream.IWebStreamData|null); + + /** DataStream androidAppStreamData */ + androidAppStreamData?: (google.analytics.admin.v1alpha.DataStream.IAndroidAppStreamData|null); + + /** DataStream iosAppStreamData */ + iosAppStreamData?: (google.analytics.admin.v1alpha.DataStream.IIosAppStreamData|null); + + /** DataStream name */ + name?: (string|null); + + /** DataStream type */ + type?: (google.analytics.admin.v1alpha.DataStream.DataStreamType|keyof typeof google.analytics.admin.v1alpha.DataStream.DataStreamType|null); + + /** DataStream displayName */ + displayName?: (string|null); + + /** DataStream createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** DataStream updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents a DataStream. */ + class DataStream implements IDataStream { + + /** + * Constructs a new DataStream. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IDataStream); + + /** DataStream webStreamData. */ + public webStreamData?: (google.analytics.admin.v1alpha.DataStream.IWebStreamData|null); + + /** DataStream androidAppStreamData. */ + public androidAppStreamData?: (google.analytics.admin.v1alpha.DataStream.IAndroidAppStreamData|null); + + /** DataStream iosAppStreamData. */ + public iosAppStreamData?: (google.analytics.admin.v1alpha.DataStream.IIosAppStreamData|null); + + /** DataStream name. */ + public name: string; + + /** DataStream type. */ + public type: (google.analytics.admin.v1alpha.DataStream.DataStreamType|keyof typeof google.analytics.admin.v1alpha.DataStream.DataStreamType); + + /** DataStream displayName. */ + public displayName: string; + + /** DataStream createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** DataStream updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** DataStream streamData. */ + public streamData?: ("webStreamData"|"androidAppStreamData"|"iosAppStreamData"); + + /** + * Creates a new DataStream instance using the specified properties. + * @param [properties] Properties to set + * @returns DataStream instance + */ + public static create(properties?: google.analytics.admin.v1alpha.IDataStream): google.analytics.admin.v1alpha.DataStream; + + /** + * Encodes the specified DataStream message. Does not implicitly {@link google.analytics.admin.v1alpha.DataStream.verify|verify} messages. + * @param message DataStream message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.IDataStream, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DataStream message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.DataStream.verify|verify} messages. + * @param message DataStream message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.IDataStream, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DataStream message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DataStream + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.DataStream; + + /** + * Decodes a DataStream message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DataStream + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.DataStream; + + /** + * Verifies a DataStream message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DataStream message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DataStream + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.DataStream; + + /** + * Creates a plain object from a DataStream message. Also converts values to other types if specified. + * @param message DataStream + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.DataStream, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DataStream to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DataStream + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace DataStream { + + /** Properties of a WebStreamData. */ + interface IWebStreamData { + + /** WebStreamData measurementId */ + measurementId?: (string|null); + + /** WebStreamData firebaseAppId */ + firebaseAppId?: (string|null); + + /** WebStreamData defaultUri */ + defaultUri?: (string|null); + } + + /** Represents a WebStreamData. */ + class WebStreamData implements IWebStreamData { + + /** + * Constructs a new WebStreamData. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.DataStream.IWebStreamData); + + /** WebStreamData measurementId. */ + public measurementId: string; + + /** WebStreamData firebaseAppId. */ + public firebaseAppId: string; + + /** WebStreamData defaultUri. */ + public defaultUri: string; + + /** + * Creates a new WebStreamData instance using the specified properties. + * @param [properties] Properties to set + * @returns WebStreamData instance + */ + public static create(properties?: google.analytics.admin.v1alpha.DataStream.IWebStreamData): google.analytics.admin.v1alpha.DataStream.WebStreamData; + + /** + * Encodes the specified WebStreamData message. Does not implicitly {@link google.analytics.admin.v1alpha.DataStream.WebStreamData.verify|verify} messages. + * @param message WebStreamData message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.DataStream.IWebStreamData, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified WebStreamData message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.DataStream.WebStreamData.verify|verify} messages. + * @param message WebStreamData message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.DataStream.IWebStreamData, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a WebStreamData message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns WebStreamData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.DataStream.WebStreamData; + + /** + * Decodes a WebStreamData message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns WebStreamData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.DataStream.WebStreamData; + + /** + * Verifies a WebStreamData message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a WebStreamData message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns WebStreamData + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.DataStream.WebStreamData; + + /** + * Creates a plain object from a WebStreamData message. Also converts values to other types if specified. + * @param message WebStreamData + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.DataStream.WebStreamData, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this WebStreamData to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for WebStreamData + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AndroidAppStreamData. */ + interface IAndroidAppStreamData { + + /** AndroidAppStreamData firebaseAppId */ + firebaseAppId?: (string|null); + + /** AndroidAppStreamData packageName */ + packageName?: (string|null); + } + + /** Represents an AndroidAppStreamData. */ + class AndroidAppStreamData implements IAndroidAppStreamData { + + /** + * Constructs a new AndroidAppStreamData. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.DataStream.IAndroidAppStreamData); + + /** AndroidAppStreamData firebaseAppId. */ + public firebaseAppId: string; + + /** AndroidAppStreamData packageName. */ + public packageName: string; + + /** + * Creates a new AndroidAppStreamData instance using the specified properties. + * @param [properties] Properties to set + * @returns AndroidAppStreamData instance + */ + public static create(properties?: google.analytics.admin.v1alpha.DataStream.IAndroidAppStreamData): google.analytics.admin.v1alpha.DataStream.AndroidAppStreamData; + + /** + * Encodes the specified AndroidAppStreamData message. Does not implicitly {@link google.analytics.admin.v1alpha.DataStream.AndroidAppStreamData.verify|verify} messages. + * @param message AndroidAppStreamData message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.DataStream.IAndroidAppStreamData, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AndroidAppStreamData message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.DataStream.AndroidAppStreamData.verify|verify} messages. + * @param message AndroidAppStreamData message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.DataStream.IAndroidAppStreamData, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AndroidAppStreamData message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AndroidAppStreamData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.DataStream.AndroidAppStreamData; + + /** + * Decodes an AndroidAppStreamData message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AndroidAppStreamData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.DataStream.AndroidAppStreamData; + + /** + * Verifies an AndroidAppStreamData message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AndroidAppStreamData message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AndroidAppStreamData + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.DataStream.AndroidAppStreamData; + + /** + * Creates a plain object from an AndroidAppStreamData message. Also converts values to other types if specified. + * @param message AndroidAppStreamData + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.DataStream.AndroidAppStreamData, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AndroidAppStreamData to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AndroidAppStreamData + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an IosAppStreamData. */ + interface IIosAppStreamData { + + /** IosAppStreamData firebaseAppId */ + firebaseAppId?: (string|null); + + /** IosAppStreamData bundleId */ + bundleId?: (string|null); + } + + /** Represents an IosAppStreamData. */ + class IosAppStreamData implements IIosAppStreamData { + + /** + * Constructs a new IosAppStreamData. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.DataStream.IIosAppStreamData); + + /** IosAppStreamData firebaseAppId. */ + public firebaseAppId: string; + + /** IosAppStreamData bundleId. */ + public bundleId: string; + + /** + * Creates a new IosAppStreamData instance using the specified properties. + * @param [properties] Properties to set + * @returns IosAppStreamData instance + */ + public static create(properties?: google.analytics.admin.v1alpha.DataStream.IIosAppStreamData): google.analytics.admin.v1alpha.DataStream.IosAppStreamData; + + /** + * Encodes the specified IosAppStreamData message. Does not implicitly {@link google.analytics.admin.v1alpha.DataStream.IosAppStreamData.verify|verify} messages. + * @param message IosAppStreamData message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.DataStream.IIosAppStreamData, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified IosAppStreamData message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.DataStream.IosAppStreamData.verify|verify} messages. + * @param message IosAppStreamData message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.DataStream.IIosAppStreamData, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an IosAppStreamData message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns IosAppStreamData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.DataStream.IosAppStreamData; + + /** + * Decodes an IosAppStreamData message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns IosAppStreamData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.DataStream.IosAppStreamData; + + /** + * Verifies an IosAppStreamData message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an IosAppStreamData message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns IosAppStreamData + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.DataStream.IosAppStreamData; + + /** + * Creates a plain object from an IosAppStreamData message. Also converts values to other types if specified. + * @param message IosAppStreamData + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.DataStream.IosAppStreamData, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this IosAppStreamData to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for IosAppStreamData + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** DataStreamType enum. */ + enum DataStreamType { + DATA_STREAM_TYPE_UNSPECIFIED = 0, + WEB_DATA_STREAM = 1, + ANDROID_APP_DATA_STREAM = 2, + IOS_APP_DATA_STREAM = 3 + } + } + + /** Properties of a UserLink. */ + interface IUserLink { + + /** UserLink name */ + name?: (string|null); + + /** UserLink emailAddress */ + emailAddress?: (string|null); + + /** UserLink directRoles */ + directRoles?: (string[]|null); + } + + /** Represents a UserLink. */ + class UserLink implements IUserLink { + + /** + * Constructs a new UserLink. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IUserLink); + + /** UserLink name. */ + public name: string; + + /** UserLink emailAddress. */ + public emailAddress: string; + + /** UserLink directRoles. */ + public directRoles: string[]; + + /** + * Creates a new UserLink instance using the specified properties. + * @param [properties] Properties to set + * @returns UserLink instance + */ + public static create(properties?: google.analytics.admin.v1alpha.IUserLink): google.analytics.admin.v1alpha.UserLink; + + /** + * Encodes the specified UserLink message. Does not implicitly {@link google.analytics.admin.v1alpha.UserLink.verify|verify} messages. + * @param message UserLink message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.IUserLink, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UserLink message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.UserLink.verify|verify} messages. + * @param message UserLink message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.IUserLink, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a UserLink message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UserLink + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.UserLink; + + /** + * Decodes a UserLink message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UserLink + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.UserLink; + + /** + * Verifies a UserLink message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a UserLink message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UserLink + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.UserLink; + + /** + * Creates a plain object from a UserLink message. Also converts values to other types if specified. + * @param message UserLink + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.UserLink, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UserLink to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UserLink + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AuditUserLink. */ + interface IAuditUserLink { + + /** AuditUserLink name */ + name?: (string|null); + + /** AuditUserLink emailAddress */ + emailAddress?: (string|null); + + /** AuditUserLink directRoles */ + directRoles?: (string[]|null); + + /** AuditUserLink effectiveRoles */ + effectiveRoles?: (string[]|null); + } + + /** Represents an AuditUserLink. */ + class AuditUserLink implements IAuditUserLink { + + /** + * Constructs a new AuditUserLink. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IAuditUserLink); + + /** AuditUserLink name. */ + public name: string; + + /** AuditUserLink emailAddress. */ + public emailAddress: string; + + /** AuditUserLink directRoles. */ + public directRoles: string[]; + + /** AuditUserLink effectiveRoles. */ + public effectiveRoles: string[]; + + /** + * Creates a new AuditUserLink instance using the specified properties. + * @param [properties] Properties to set + * @returns AuditUserLink instance + */ + public static create(properties?: google.analytics.admin.v1alpha.IAuditUserLink): google.analytics.admin.v1alpha.AuditUserLink; + + /** + * Encodes the specified AuditUserLink message. Does not implicitly {@link google.analytics.admin.v1alpha.AuditUserLink.verify|verify} messages. + * @param message AuditUserLink message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.IAuditUserLink, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AuditUserLink message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AuditUserLink.verify|verify} messages. + * @param message AuditUserLink message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.IAuditUserLink, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AuditUserLink message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AuditUserLink + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.AuditUserLink; + + /** + * Decodes an AuditUserLink message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AuditUserLink + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.AuditUserLink; + + /** + * Verifies an AuditUserLink message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AuditUserLink message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AuditUserLink + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.AuditUserLink; + + /** + * Creates a plain object from an AuditUserLink message. Also converts values to other types if specified. + * @param message AuditUserLink + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.AuditUserLink, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AuditUserLink to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AuditUserLink + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FirebaseLink. */ + interface IFirebaseLink { + + /** FirebaseLink name */ + name?: (string|null); + + /** FirebaseLink project */ + project?: (string|null); + + /** FirebaseLink createTime */ + createTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents a FirebaseLink. */ + class FirebaseLink implements IFirebaseLink { + + /** + * Constructs a new FirebaseLink. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IFirebaseLink); + + /** FirebaseLink name. */ + public name: string; + + /** FirebaseLink project. */ + public project: string; + + /** FirebaseLink createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** + * Creates a new FirebaseLink instance using the specified properties. + * @param [properties] Properties to set + * @returns FirebaseLink instance + */ + public static create(properties?: google.analytics.admin.v1alpha.IFirebaseLink): google.analytics.admin.v1alpha.FirebaseLink; + + /** + * Encodes the specified FirebaseLink message. Does not implicitly {@link google.analytics.admin.v1alpha.FirebaseLink.verify|verify} messages. + * @param message FirebaseLink message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.IFirebaseLink, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FirebaseLink message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.FirebaseLink.verify|verify} messages. + * @param message FirebaseLink message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.IFirebaseLink, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FirebaseLink message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FirebaseLink + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.FirebaseLink; + + /** + * Decodes a FirebaseLink message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FirebaseLink + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.FirebaseLink; + + /** + * Verifies a FirebaseLink message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FirebaseLink message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FirebaseLink + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.FirebaseLink; + + /** + * Creates a plain object from a FirebaseLink message. Also converts values to other types if specified. + * @param message FirebaseLink + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.FirebaseLink, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FirebaseLink to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FirebaseLink + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GlobalSiteTag. */ + interface IGlobalSiteTag { + + /** GlobalSiteTag name */ + name?: (string|null); + + /** GlobalSiteTag snippet */ + snippet?: (string|null); + } + + /** Represents a GlobalSiteTag. */ + class GlobalSiteTag implements IGlobalSiteTag { + + /** + * Constructs a new GlobalSiteTag. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IGlobalSiteTag); + + /** GlobalSiteTag name. */ + public name: string; + + /** GlobalSiteTag snippet. */ + public snippet: string; + + /** + * Creates a new GlobalSiteTag instance using the specified properties. + * @param [properties] Properties to set + * @returns GlobalSiteTag instance + */ + public static create(properties?: google.analytics.admin.v1alpha.IGlobalSiteTag): google.analytics.admin.v1alpha.GlobalSiteTag; + + /** + * Encodes the specified GlobalSiteTag message. Does not implicitly {@link google.analytics.admin.v1alpha.GlobalSiteTag.verify|verify} messages. + * @param message GlobalSiteTag message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.IGlobalSiteTag, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GlobalSiteTag message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.GlobalSiteTag.verify|verify} messages. + * @param message GlobalSiteTag message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.IGlobalSiteTag, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GlobalSiteTag message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GlobalSiteTag + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.GlobalSiteTag; + + /** + * Decodes a GlobalSiteTag message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GlobalSiteTag + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.GlobalSiteTag; + + /** + * Verifies a GlobalSiteTag message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GlobalSiteTag message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GlobalSiteTag + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.GlobalSiteTag; + + /** + * Creates a plain object from a GlobalSiteTag message. Also converts values to other types if specified. + * @param message GlobalSiteTag + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.GlobalSiteTag, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GlobalSiteTag to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GlobalSiteTag + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GoogleAdsLink. */ + interface IGoogleAdsLink { + + /** GoogleAdsLink name */ + name?: (string|null); + + /** GoogleAdsLink customerId */ + customerId?: (string|null); + + /** GoogleAdsLink canManageClients */ + canManageClients?: (boolean|null); + + /** GoogleAdsLink adsPersonalizationEnabled */ + adsPersonalizationEnabled?: (google.protobuf.IBoolValue|null); + + /** GoogleAdsLink createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** GoogleAdsLink updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** GoogleAdsLink creatorEmailAddress */ + creatorEmailAddress?: (string|null); + } + + /** Represents a GoogleAdsLink. */ + class GoogleAdsLink implements IGoogleAdsLink { + + /** + * Constructs a new GoogleAdsLink. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IGoogleAdsLink); + + /** GoogleAdsLink name. */ + public name: string; + + /** GoogleAdsLink customerId. */ + public customerId: string; + + /** GoogleAdsLink canManageClients. */ + public canManageClients: boolean; + + /** GoogleAdsLink adsPersonalizationEnabled. */ + public adsPersonalizationEnabled?: (google.protobuf.IBoolValue|null); + + /** GoogleAdsLink createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** GoogleAdsLink updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** GoogleAdsLink creatorEmailAddress. */ + public creatorEmailAddress: string; + + /** + * Creates a new GoogleAdsLink instance using the specified properties. + * @param [properties] Properties to set + * @returns GoogleAdsLink instance + */ + public static create(properties?: google.analytics.admin.v1alpha.IGoogleAdsLink): google.analytics.admin.v1alpha.GoogleAdsLink; + + /** + * Encodes the specified GoogleAdsLink message. Does not implicitly {@link google.analytics.admin.v1alpha.GoogleAdsLink.verify|verify} messages. + * @param message GoogleAdsLink message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.IGoogleAdsLink, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GoogleAdsLink message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.GoogleAdsLink.verify|verify} messages. + * @param message GoogleAdsLink message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.IGoogleAdsLink, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GoogleAdsLink message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GoogleAdsLink + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.GoogleAdsLink; + + /** + * Decodes a GoogleAdsLink message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GoogleAdsLink + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.GoogleAdsLink; + + /** + * Verifies a GoogleAdsLink message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GoogleAdsLink message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GoogleAdsLink + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.GoogleAdsLink; + + /** + * Creates a plain object from a GoogleAdsLink message. Also converts values to other types if specified. + * @param message GoogleAdsLink + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.GoogleAdsLink, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GoogleAdsLink to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GoogleAdsLink + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DataSharingSettings. */ + interface IDataSharingSettings { + + /** DataSharingSettings name */ + name?: (string|null); + + /** DataSharingSettings sharingWithGoogleSupportEnabled */ + sharingWithGoogleSupportEnabled?: (boolean|null); + + /** DataSharingSettings sharingWithGoogleAssignedSalesEnabled */ + sharingWithGoogleAssignedSalesEnabled?: (boolean|null); + + /** DataSharingSettings sharingWithGoogleAnySalesEnabled */ + sharingWithGoogleAnySalesEnabled?: (boolean|null); + + /** DataSharingSettings sharingWithGoogleProductsEnabled */ + sharingWithGoogleProductsEnabled?: (boolean|null); + + /** DataSharingSettings sharingWithOthersEnabled */ + sharingWithOthersEnabled?: (boolean|null); + } + + /** Represents a DataSharingSettings. */ + class DataSharingSettings implements IDataSharingSettings { + + /** + * Constructs a new DataSharingSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IDataSharingSettings); + + /** DataSharingSettings name. */ + public name: string; + + /** DataSharingSettings sharingWithGoogleSupportEnabled. */ + public sharingWithGoogleSupportEnabled: boolean; + + /** DataSharingSettings sharingWithGoogleAssignedSalesEnabled. */ + public sharingWithGoogleAssignedSalesEnabled: boolean; + + /** DataSharingSettings sharingWithGoogleAnySalesEnabled. */ + public sharingWithGoogleAnySalesEnabled: boolean; + + /** DataSharingSettings sharingWithGoogleProductsEnabled. */ + public sharingWithGoogleProductsEnabled: boolean; + + /** DataSharingSettings sharingWithOthersEnabled. */ + public sharingWithOthersEnabled: boolean; + + /** + * Creates a new DataSharingSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns DataSharingSettings instance + */ + public static create(properties?: google.analytics.admin.v1alpha.IDataSharingSettings): google.analytics.admin.v1alpha.DataSharingSettings; + + /** + * Encodes the specified DataSharingSettings message. Does not implicitly {@link google.analytics.admin.v1alpha.DataSharingSettings.verify|verify} messages. + * @param message DataSharingSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.IDataSharingSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DataSharingSettings message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.DataSharingSettings.verify|verify} messages. + * @param message DataSharingSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.IDataSharingSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DataSharingSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DataSharingSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.DataSharingSettings; + + /** + * Decodes a DataSharingSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DataSharingSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.DataSharingSettings; + + /** + * Verifies a DataSharingSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DataSharingSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DataSharingSettings + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.DataSharingSettings; + + /** + * Creates a plain object from a DataSharingSettings message. Also converts values to other types if specified. + * @param message DataSharingSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.DataSharingSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DataSharingSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DataSharingSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AccountSummary. */ + interface IAccountSummary { + + /** AccountSummary name */ + name?: (string|null); + + /** AccountSummary account */ + account?: (string|null); + + /** AccountSummary displayName */ + displayName?: (string|null); + + /** AccountSummary propertySummaries */ + propertySummaries?: (google.analytics.admin.v1alpha.IPropertySummary[]|null); + } + + /** Represents an AccountSummary. */ + class AccountSummary implements IAccountSummary { + + /** + * Constructs a new AccountSummary. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IAccountSummary); + + /** AccountSummary name. */ + public name: string; + + /** AccountSummary account. */ + public account: string; + + /** AccountSummary displayName. */ + public displayName: string; + + /** AccountSummary propertySummaries. */ + public propertySummaries: google.analytics.admin.v1alpha.IPropertySummary[]; + + /** + * Creates a new AccountSummary instance using the specified properties. + * @param [properties] Properties to set + * @returns AccountSummary instance + */ + public static create(properties?: google.analytics.admin.v1alpha.IAccountSummary): google.analytics.admin.v1alpha.AccountSummary; + + /** + * Encodes the specified AccountSummary message. Does not implicitly {@link google.analytics.admin.v1alpha.AccountSummary.verify|verify} messages. + * @param message AccountSummary message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.IAccountSummary, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AccountSummary message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AccountSummary.verify|verify} messages. + * @param message AccountSummary message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.IAccountSummary, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AccountSummary message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AccountSummary + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.AccountSummary; + + /** + * Decodes an AccountSummary message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AccountSummary + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.AccountSummary; + + /** + * Verifies an AccountSummary message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AccountSummary message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AccountSummary + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.AccountSummary; + + /** + * Creates a plain object from an AccountSummary message. Also converts values to other types if specified. + * @param message AccountSummary + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.AccountSummary, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AccountSummary to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AccountSummary + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PropertySummary. */ + interface IPropertySummary { + + /** PropertySummary property */ + property?: (string|null); + + /** PropertySummary displayName */ + displayName?: (string|null); + + /** PropertySummary propertyType */ + propertyType?: (google.analytics.admin.v1alpha.PropertyType|keyof typeof google.analytics.admin.v1alpha.PropertyType|null); + + /** PropertySummary parent */ + parent?: (string|null); + } + + /** Represents a PropertySummary. */ + class PropertySummary implements IPropertySummary { + + /** + * Constructs a new PropertySummary. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IPropertySummary); + + /** PropertySummary property. */ + public property: string; + + /** PropertySummary displayName. */ + public displayName: string; + + /** PropertySummary propertyType. */ + public propertyType: (google.analytics.admin.v1alpha.PropertyType|keyof typeof google.analytics.admin.v1alpha.PropertyType); + + /** PropertySummary parent. */ + public parent: string; + + /** + * Creates a new PropertySummary instance using the specified properties. + * @param [properties] Properties to set + * @returns PropertySummary instance + */ + public static create(properties?: google.analytics.admin.v1alpha.IPropertySummary): google.analytics.admin.v1alpha.PropertySummary; + + /** + * Encodes the specified PropertySummary message. Does not implicitly {@link google.analytics.admin.v1alpha.PropertySummary.verify|verify} messages. + * @param message PropertySummary message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.IPropertySummary, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PropertySummary message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.PropertySummary.verify|verify} messages. + * @param message PropertySummary message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.IPropertySummary, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PropertySummary message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PropertySummary + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.PropertySummary; + + /** + * Decodes a PropertySummary message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PropertySummary + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.PropertySummary; + + /** + * Verifies a PropertySummary message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PropertySummary message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PropertySummary + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.PropertySummary; + + /** + * Creates a plain object from a PropertySummary message. Also converts values to other types if specified. + * @param message PropertySummary + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.PropertySummary, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PropertySummary to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PropertySummary + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MeasurementProtocolSecret. */ + interface IMeasurementProtocolSecret { + + /** MeasurementProtocolSecret name */ + name?: (string|null); + + /** MeasurementProtocolSecret displayName */ + displayName?: (string|null); + + /** MeasurementProtocolSecret secretValue */ + secretValue?: (string|null); + } + + /** Represents a MeasurementProtocolSecret. */ + class MeasurementProtocolSecret implements IMeasurementProtocolSecret { + + /** + * Constructs a new MeasurementProtocolSecret. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IMeasurementProtocolSecret); + + /** MeasurementProtocolSecret name. */ + public name: string; + + /** MeasurementProtocolSecret displayName. */ + public displayName: string; + + /** MeasurementProtocolSecret secretValue. */ + public secretValue: string; + + /** + * Creates a new MeasurementProtocolSecret instance using the specified properties. + * @param [properties] Properties to set + * @returns MeasurementProtocolSecret instance + */ + public static create(properties?: google.analytics.admin.v1alpha.IMeasurementProtocolSecret): google.analytics.admin.v1alpha.MeasurementProtocolSecret; + + /** + * Encodes the specified MeasurementProtocolSecret message. Does not implicitly {@link google.analytics.admin.v1alpha.MeasurementProtocolSecret.verify|verify} messages. + * @param message MeasurementProtocolSecret message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.IMeasurementProtocolSecret, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MeasurementProtocolSecret message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.MeasurementProtocolSecret.verify|verify} messages. + * @param message MeasurementProtocolSecret message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.IMeasurementProtocolSecret, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MeasurementProtocolSecret message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MeasurementProtocolSecret + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.MeasurementProtocolSecret; + + /** + * Decodes a MeasurementProtocolSecret message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MeasurementProtocolSecret + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.MeasurementProtocolSecret; + + /** + * Verifies a MeasurementProtocolSecret message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MeasurementProtocolSecret message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MeasurementProtocolSecret + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.MeasurementProtocolSecret; + + /** + * Creates a plain object from a MeasurementProtocolSecret message. Also converts values to other types if specified. + * @param message MeasurementProtocolSecret + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.MeasurementProtocolSecret, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MeasurementProtocolSecret to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MeasurementProtocolSecret + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ChangeHistoryEvent. */ + interface IChangeHistoryEvent { + + /** ChangeHistoryEvent id */ + id?: (string|null); + + /** ChangeHistoryEvent changeTime */ + changeTime?: (google.protobuf.ITimestamp|null); + + /** ChangeHistoryEvent actorType */ + actorType?: (google.analytics.admin.v1alpha.ActorType|keyof typeof google.analytics.admin.v1alpha.ActorType|null); + + /** ChangeHistoryEvent userActorEmail */ + userActorEmail?: (string|null); + + /** ChangeHistoryEvent changesFiltered */ + changesFiltered?: (boolean|null); + + /** ChangeHistoryEvent changes */ + changes?: (google.analytics.admin.v1alpha.IChangeHistoryChange[]|null); + } + + /** Represents a ChangeHistoryEvent. */ + class ChangeHistoryEvent implements IChangeHistoryEvent { + + /** + * Constructs a new ChangeHistoryEvent. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IChangeHistoryEvent); + + /** ChangeHistoryEvent id. */ + public id: string; + + /** ChangeHistoryEvent changeTime. */ + public changeTime?: (google.protobuf.ITimestamp|null); + + /** ChangeHistoryEvent actorType. */ + public actorType: (google.analytics.admin.v1alpha.ActorType|keyof typeof google.analytics.admin.v1alpha.ActorType); + + /** ChangeHistoryEvent userActorEmail. */ + public userActorEmail: string; + + /** ChangeHistoryEvent changesFiltered. */ + public changesFiltered: boolean; + + /** ChangeHistoryEvent changes. */ + public changes: google.analytics.admin.v1alpha.IChangeHistoryChange[]; + + /** + * Creates a new ChangeHistoryEvent instance using the specified properties. + * @param [properties] Properties to set + * @returns ChangeHistoryEvent instance + */ + public static create(properties?: google.analytics.admin.v1alpha.IChangeHistoryEvent): google.analytics.admin.v1alpha.ChangeHistoryEvent; + + /** + * Encodes the specified ChangeHistoryEvent message. Does not implicitly {@link google.analytics.admin.v1alpha.ChangeHistoryEvent.verify|verify} messages. + * @param message ChangeHistoryEvent message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.IChangeHistoryEvent, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ChangeHistoryEvent message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.ChangeHistoryEvent.verify|verify} messages. + * @param message ChangeHistoryEvent message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.IChangeHistoryEvent, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ChangeHistoryEvent message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ChangeHistoryEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.ChangeHistoryEvent; + + /** + * Decodes a ChangeHistoryEvent message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ChangeHistoryEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.ChangeHistoryEvent; + + /** + * Verifies a ChangeHistoryEvent message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ChangeHistoryEvent message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ChangeHistoryEvent + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.ChangeHistoryEvent; + + /** + * Creates a plain object from a ChangeHistoryEvent message. Also converts values to other types if specified. + * @param message ChangeHistoryEvent + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.ChangeHistoryEvent, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ChangeHistoryEvent to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ChangeHistoryEvent + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ChangeHistoryChange. */ + interface IChangeHistoryChange { + + /** ChangeHistoryChange resource */ + resource?: (string|null); + + /** ChangeHistoryChange action */ + action?: (google.analytics.admin.v1alpha.ActionType|keyof typeof google.analytics.admin.v1alpha.ActionType|null); + + /** ChangeHistoryChange resourceBeforeChange */ + resourceBeforeChange?: (google.analytics.admin.v1alpha.ChangeHistoryChange.IChangeHistoryResource|null); + + /** ChangeHistoryChange resourceAfterChange */ + resourceAfterChange?: (google.analytics.admin.v1alpha.ChangeHistoryChange.IChangeHistoryResource|null); + } + + /** Represents a ChangeHistoryChange. */ + class ChangeHistoryChange implements IChangeHistoryChange { + + /** + * Constructs a new ChangeHistoryChange. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IChangeHistoryChange); + + /** ChangeHistoryChange resource. */ + public resource: string; + + /** ChangeHistoryChange action. */ + public action: (google.analytics.admin.v1alpha.ActionType|keyof typeof google.analytics.admin.v1alpha.ActionType); + + /** ChangeHistoryChange resourceBeforeChange. */ + public resourceBeforeChange?: (google.analytics.admin.v1alpha.ChangeHistoryChange.IChangeHistoryResource|null); + + /** ChangeHistoryChange resourceAfterChange. */ + public resourceAfterChange?: (google.analytics.admin.v1alpha.ChangeHistoryChange.IChangeHistoryResource|null); + + /** + * Creates a new ChangeHistoryChange instance using the specified properties. + * @param [properties] Properties to set + * @returns ChangeHistoryChange instance + */ + public static create(properties?: google.analytics.admin.v1alpha.IChangeHistoryChange): google.analytics.admin.v1alpha.ChangeHistoryChange; + + /** + * Encodes the specified ChangeHistoryChange message. Does not implicitly {@link google.analytics.admin.v1alpha.ChangeHistoryChange.verify|verify} messages. + * @param message ChangeHistoryChange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.IChangeHistoryChange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ChangeHistoryChange message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.ChangeHistoryChange.verify|verify} messages. + * @param message ChangeHistoryChange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.IChangeHistoryChange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ChangeHistoryChange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ChangeHistoryChange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.ChangeHistoryChange; + + /** + * Decodes a ChangeHistoryChange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ChangeHistoryChange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.ChangeHistoryChange; + + /** + * Verifies a ChangeHistoryChange message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ChangeHistoryChange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ChangeHistoryChange + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.ChangeHistoryChange; + + /** + * Creates a plain object from a ChangeHistoryChange message. Also converts values to other types if specified. + * @param message ChangeHistoryChange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.ChangeHistoryChange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ChangeHistoryChange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ChangeHistoryChange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ChangeHistoryChange { + + /** Properties of a ChangeHistoryResource. */ + interface IChangeHistoryResource { + + /** ChangeHistoryResource account */ + account?: (google.analytics.admin.v1alpha.IAccount|null); + + /** ChangeHistoryResource property */ + property?: (google.analytics.admin.v1alpha.IProperty|null); + + /** ChangeHistoryResource firebaseLink */ + firebaseLink?: (google.analytics.admin.v1alpha.IFirebaseLink|null); + + /** ChangeHistoryResource googleAdsLink */ + googleAdsLink?: (google.analytics.admin.v1alpha.IGoogleAdsLink|null); + + /** ChangeHistoryResource googleSignalsSettings */ + googleSignalsSettings?: (google.analytics.admin.v1alpha.IGoogleSignalsSettings|null); + + /** ChangeHistoryResource displayVideo_360AdvertiserLink */ + displayVideo_360AdvertiserLink?: (google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLink|null); + + /** ChangeHistoryResource displayVideo_360AdvertiserLinkProposal */ + displayVideo_360AdvertiserLinkProposal?: (google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLinkProposal|null); + + /** ChangeHistoryResource conversionEvent */ + conversionEvent?: (google.analytics.admin.v1alpha.IConversionEvent|null); + + /** ChangeHistoryResource measurementProtocolSecret */ + measurementProtocolSecret?: (google.analytics.admin.v1alpha.IMeasurementProtocolSecret|null); + + /** ChangeHistoryResource customDimension */ + customDimension?: (google.analytics.admin.v1alpha.ICustomDimension|null); + + /** ChangeHistoryResource customMetric */ + customMetric?: (google.analytics.admin.v1alpha.ICustomMetric|null); + + /** ChangeHistoryResource dataRetentionSettings */ + dataRetentionSettings?: (google.analytics.admin.v1alpha.IDataRetentionSettings|null); + + /** ChangeHistoryResource dataStream */ + dataStream?: (google.analytics.admin.v1alpha.IDataStream|null); + + /** ChangeHistoryResource attributionSettings */ + attributionSettings?: (google.analytics.admin.v1alpha.IAttributionSettings|null); + } + + /** Represents a ChangeHistoryResource. */ + class ChangeHistoryResource implements IChangeHistoryResource { + + /** + * Constructs a new ChangeHistoryResource. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.ChangeHistoryChange.IChangeHistoryResource); + + /** ChangeHistoryResource account. */ + public account?: (google.analytics.admin.v1alpha.IAccount|null); + + /** ChangeHistoryResource property. */ + public property?: (google.analytics.admin.v1alpha.IProperty|null); + + /** ChangeHistoryResource firebaseLink. */ + public firebaseLink?: (google.analytics.admin.v1alpha.IFirebaseLink|null); + + /** ChangeHistoryResource googleAdsLink. */ + public googleAdsLink?: (google.analytics.admin.v1alpha.IGoogleAdsLink|null); + + /** ChangeHistoryResource googleSignalsSettings. */ + public googleSignalsSettings?: (google.analytics.admin.v1alpha.IGoogleSignalsSettings|null); + + /** ChangeHistoryResource displayVideo_360AdvertiserLink. */ + public displayVideo_360AdvertiserLink?: (google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLink|null); + + /** ChangeHistoryResource displayVideo_360AdvertiserLinkProposal. */ + public displayVideo_360AdvertiserLinkProposal?: (google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLinkProposal|null); + + /** ChangeHistoryResource conversionEvent. */ + public conversionEvent?: (google.analytics.admin.v1alpha.IConversionEvent|null); + + /** ChangeHistoryResource measurementProtocolSecret. */ + public measurementProtocolSecret?: (google.analytics.admin.v1alpha.IMeasurementProtocolSecret|null); + + /** ChangeHistoryResource customDimension. */ + public customDimension?: (google.analytics.admin.v1alpha.ICustomDimension|null); + + /** ChangeHistoryResource customMetric. */ + public customMetric?: (google.analytics.admin.v1alpha.ICustomMetric|null); + + /** ChangeHistoryResource dataRetentionSettings. */ + public dataRetentionSettings?: (google.analytics.admin.v1alpha.IDataRetentionSettings|null); + + /** ChangeHistoryResource dataStream. */ + public dataStream?: (google.analytics.admin.v1alpha.IDataStream|null); + + /** ChangeHistoryResource attributionSettings. */ + public attributionSettings?: (google.analytics.admin.v1alpha.IAttributionSettings|null); + + /** ChangeHistoryResource resource. */ + public resource?: ("account"|"property"|"firebaseLink"|"googleAdsLink"|"googleSignalsSettings"|"displayVideo_360AdvertiserLink"|"displayVideo_360AdvertiserLinkProposal"|"conversionEvent"|"measurementProtocolSecret"|"customDimension"|"customMetric"|"dataRetentionSettings"|"dataStream"|"attributionSettings"); + + /** + * Creates a new ChangeHistoryResource instance using the specified properties. + * @param [properties] Properties to set + * @returns ChangeHistoryResource instance + */ + public static create(properties?: google.analytics.admin.v1alpha.ChangeHistoryChange.IChangeHistoryResource): google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource; + + /** + * Encodes the specified ChangeHistoryResource message. Does not implicitly {@link google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource.verify|verify} messages. + * @param message ChangeHistoryResource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.ChangeHistoryChange.IChangeHistoryResource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ChangeHistoryResource message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource.verify|verify} messages. + * @param message ChangeHistoryResource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.ChangeHistoryChange.IChangeHistoryResource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ChangeHistoryResource message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ChangeHistoryResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource; + + /** + * Decodes a ChangeHistoryResource message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ChangeHistoryResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource; + + /** + * Verifies a ChangeHistoryResource message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ChangeHistoryResource message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ChangeHistoryResource + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource; + + /** + * Creates a plain object from a ChangeHistoryResource message. Also converts values to other types if specified. + * @param message ChangeHistoryResource + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ChangeHistoryResource to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ChangeHistoryResource + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a DisplayVideo360AdvertiserLink. */ + interface IDisplayVideo360AdvertiserLink { + + /** DisplayVideo360AdvertiserLink name */ + name?: (string|null); + + /** DisplayVideo360AdvertiserLink advertiserId */ + advertiserId?: (string|null); + + /** DisplayVideo360AdvertiserLink advertiserDisplayName */ + advertiserDisplayName?: (string|null); + + /** DisplayVideo360AdvertiserLink adsPersonalizationEnabled */ + adsPersonalizationEnabled?: (google.protobuf.IBoolValue|null); + + /** DisplayVideo360AdvertiserLink campaignDataSharingEnabled */ + campaignDataSharingEnabled?: (google.protobuf.IBoolValue|null); + + /** DisplayVideo360AdvertiserLink costDataSharingEnabled */ + costDataSharingEnabled?: (google.protobuf.IBoolValue|null); + } + + /** Represents a DisplayVideo360AdvertiserLink. */ + class DisplayVideo360AdvertiserLink implements IDisplayVideo360AdvertiserLink { + + /** + * Constructs a new DisplayVideo360AdvertiserLink. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLink); + + /** DisplayVideo360AdvertiserLink name. */ + public name: string; + + /** DisplayVideo360AdvertiserLink advertiserId. */ + public advertiserId: string; + + /** DisplayVideo360AdvertiserLink advertiserDisplayName. */ + public advertiserDisplayName: string; + + /** DisplayVideo360AdvertiserLink adsPersonalizationEnabled. */ + public adsPersonalizationEnabled?: (google.protobuf.IBoolValue|null); + + /** DisplayVideo360AdvertiserLink campaignDataSharingEnabled. */ + public campaignDataSharingEnabled?: (google.protobuf.IBoolValue|null); + + /** DisplayVideo360AdvertiserLink costDataSharingEnabled. */ + public costDataSharingEnabled?: (google.protobuf.IBoolValue|null); + + /** + * Creates a new DisplayVideo360AdvertiserLink instance using the specified properties. + * @param [properties] Properties to set + * @returns DisplayVideo360AdvertiserLink instance + */ + public static create(properties?: google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLink): google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink; + + /** + * Encodes the specified DisplayVideo360AdvertiserLink message. Does not implicitly {@link google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink.verify|verify} messages. + * @param message DisplayVideo360AdvertiserLink message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLink, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DisplayVideo360AdvertiserLink message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink.verify|verify} messages. + * @param message DisplayVideo360AdvertiserLink message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLink, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DisplayVideo360AdvertiserLink message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DisplayVideo360AdvertiserLink + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink; + + /** + * Decodes a DisplayVideo360AdvertiserLink message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DisplayVideo360AdvertiserLink + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink; + + /** + * Verifies a DisplayVideo360AdvertiserLink message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DisplayVideo360AdvertiserLink message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DisplayVideo360AdvertiserLink + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink; + + /** + * Creates a plain object from a DisplayVideo360AdvertiserLink message. Also converts values to other types if specified. + * @param message DisplayVideo360AdvertiserLink + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DisplayVideo360AdvertiserLink to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DisplayVideo360AdvertiserLink + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DisplayVideo360AdvertiserLinkProposal. */ + interface IDisplayVideo360AdvertiserLinkProposal { + + /** DisplayVideo360AdvertiserLinkProposal name */ + name?: (string|null); + + /** DisplayVideo360AdvertiserLinkProposal advertiserId */ + advertiserId?: (string|null); + + /** DisplayVideo360AdvertiserLinkProposal linkProposalStatusDetails */ + linkProposalStatusDetails?: (google.analytics.admin.v1alpha.ILinkProposalStatusDetails|null); + + /** DisplayVideo360AdvertiserLinkProposal advertiserDisplayName */ + advertiserDisplayName?: (string|null); + + /** DisplayVideo360AdvertiserLinkProposal validationEmail */ + validationEmail?: (string|null); + + /** DisplayVideo360AdvertiserLinkProposal adsPersonalizationEnabled */ + adsPersonalizationEnabled?: (google.protobuf.IBoolValue|null); + + /** DisplayVideo360AdvertiserLinkProposal campaignDataSharingEnabled */ + campaignDataSharingEnabled?: (google.protobuf.IBoolValue|null); + + /** DisplayVideo360AdvertiserLinkProposal costDataSharingEnabled */ + costDataSharingEnabled?: (google.protobuf.IBoolValue|null); + } + + /** Represents a DisplayVideo360AdvertiserLinkProposal. */ + class DisplayVideo360AdvertiserLinkProposal implements IDisplayVideo360AdvertiserLinkProposal { + + /** + * Constructs a new DisplayVideo360AdvertiserLinkProposal. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLinkProposal); + + /** DisplayVideo360AdvertiserLinkProposal name. */ + public name: string; + + /** DisplayVideo360AdvertiserLinkProposal advertiserId. */ + public advertiserId: string; + + /** DisplayVideo360AdvertiserLinkProposal linkProposalStatusDetails. */ + public linkProposalStatusDetails?: (google.analytics.admin.v1alpha.ILinkProposalStatusDetails|null); + + /** DisplayVideo360AdvertiserLinkProposal advertiserDisplayName. */ + public advertiserDisplayName: string; + + /** DisplayVideo360AdvertiserLinkProposal validationEmail. */ + public validationEmail: string; + + /** DisplayVideo360AdvertiserLinkProposal adsPersonalizationEnabled. */ + public adsPersonalizationEnabled?: (google.protobuf.IBoolValue|null); + + /** DisplayVideo360AdvertiserLinkProposal campaignDataSharingEnabled. */ + public campaignDataSharingEnabled?: (google.protobuf.IBoolValue|null); + + /** DisplayVideo360AdvertiserLinkProposal costDataSharingEnabled. */ + public costDataSharingEnabled?: (google.protobuf.IBoolValue|null); + + /** + * Creates a new DisplayVideo360AdvertiserLinkProposal instance using the specified properties. + * @param [properties] Properties to set + * @returns DisplayVideo360AdvertiserLinkProposal instance + */ + public static create(properties?: google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLinkProposal): google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal; + + /** + * Encodes the specified DisplayVideo360AdvertiserLinkProposal message. Does not implicitly {@link google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal.verify|verify} messages. + * @param message DisplayVideo360AdvertiserLinkProposal message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLinkProposal, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DisplayVideo360AdvertiserLinkProposal message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal.verify|verify} messages. + * @param message DisplayVideo360AdvertiserLinkProposal message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLinkProposal, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DisplayVideo360AdvertiserLinkProposal message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DisplayVideo360AdvertiserLinkProposal + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal; + + /** + * Decodes a DisplayVideo360AdvertiserLinkProposal message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DisplayVideo360AdvertiserLinkProposal + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal; + + /** + * Verifies a DisplayVideo360AdvertiserLinkProposal message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DisplayVideo360AdvertiserLinkProposal message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DisplayVideo360AdvertiserLinkProposal + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal; + + /** + * Creates a plain object from a DisplayVideo360AdvertiserLinkProposal message. Also converts values to other types if specified. + * @param message DisplayVideo360AdvertiserLinkProposal + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DisplayVideo360AdvertiserLinkProposal to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DisplayVideo360AdvertiserLinkProposal + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a LinkProposalStatusDetails. */ + interface ILinkProposalStatusDetails { + + /** LinkProposalStatusDetails linkProposalInitiatingProduct */ + linkProposalInitiatingProduct?: (google.analytics.admin.v1alpha.LinkProposalInitiatingProduct|keyof typeof google.analytics.admin.v1alpha.LinkProposalInitiatingProduct|null); + + /** LinkProposalStatusDetails requestorEmail */ + requestorEmail?: (string|null); + + /** LinkProposalStatusDetails linkProposalState */ + linkProposalState?: (google.analytics.admin.v1alpha.LinkProposalState|keyof typeof google.analytics.admin.v1alpha.LinkProposalState|null); + } + + /** Represents a LinkProposalStatusDetails. */ + class LinkProposalStatusDetails implements ILinkProposalStatusDetails { + + /** + * Constructs a new LinkProposalStatusDetails. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.ILinkProposalStatusDetails); + + /** LinkProposalStatusDetails linkProposalInitiatingProduct. */ + public linkProposalInitiatingProduct: (google.analytics.admin.v1alpha.LinkProposalInitiatingProduct|keyof typeof google.analytics.admin.v1alpha.LinkProposalInitiatingProduct); + + /** LinkProposalStatusDetails requestorEmail. */ + public requestorEmail: string; + + /** LinkProposalStatusDetails linkProposalState. */ + public linkProposalState: (google.analytics.admin.v1alpha.LinkProposalState|keyof typeof google.analytics.admin.v1alpha.LinkProposalState); + + /** + * Creates a new LinkProposalStatusDetails instance using the specified properties. + * @param [properties] Properties to set + * @returns LinkProposalStatusDetails instance + */ + public static create(properties?: google.analytics.admin.v1alpha.ILinkProposalStatusDetails): google.analytics.admin.v1alpha.LinkProposalStatusDetails; + + /** + * Encodes the specified LinkProposalStatusDetails message. Does not implicitly {@link google.analytics.admin.v1alpha.LinkProposalStatusDetails.verify|verify} messages. + * @param message LinkProposalStatusDetails message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.ILinkProposalStatusDetails, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LinkProposalStatusDetails message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.LinkProposalStatusDetails.verify|verify} messages. + * @param message LinkProposalStatusDetails message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.ILinkProposalStatusDetails, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LinkProposalStatusDetails message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LinkProposalStatusDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.LinkProposalStatusDetails; + + /** + * Decodes a LinkProposalStatusDetails message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LinkProposalStatusDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.LinkProposalStatusDetails; + + /** + * Verifies a LinkProposalStatusDetails message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LinkProposalStatusDetails message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LinkProposalStatusDetails + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.LinkProposalStatusDetails; + + /** + * Creates a plain object from a LinkProposalStatusDetails message. Also converts values to other types if specified. + * @param message LinkProposalStatusDetails + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.LinkProposalStatusDetails, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LinkProposalStatusDetails to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LinkProposalStatusDetails + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ConversionEvent. */ + interface IConversionEvent { + + /** ConversionEvent name */ + name?: (string|null); + + /** ConversionEvent eventName */ + eventName?: (string|null); + + /** ConversionEvent createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** ConversionEvent deletable */ + deletable?: (boolean|null); + + /** ConversionEvent custom */ + custom?: (boolean|null); + } + + /** Represents a ConversionEvent. */ + class ConversionEvent implements IConversionEvent { + + /** + * Constructs a new ConversionEvent. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IConversionEvent); + + /** ConversionEvent name. */ + public name: string; + + /** ConversionEvent eventName. */ + public eventName: string; + + /** ConversionEvent createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** ConversionEvent deletable. */ + public deletable: boolean; + + /** ConversionEvent custom. */ + public custom: boolean; + + /** + * Creates a new ConversionEvent instance using the specified properties. + * @param [properties] Properties to set + * @returns ConversionEvent instance + */ + public static create(properties?: google.analytics.admin.v1alpha.IConversionEvent): google.analytics.admin.v1alpha.ConversionEvent; + + /** + * Encodes the specified ConversionEvent message. Does not implicitly {@link google.analytics.admin.v1alpha.ConversionEvent.verify|verify} messages. + * @param message ConversionEvent message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.IConversionEvent, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ConversionEvent message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.ConversionEvent.verify|verify} messages. + * @param message ConversionEvent message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.IConversionEvent, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ConversionEvent message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ConversionEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.ConversionEvent; + + /** + * Decodes a ConversionEvent message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ConversionEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.ConversionEvent; + + /** + * Verifies a ConversionEvent message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ConversionEvent message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ConversionEvent + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.ConversionEvent; + + /** + * Creates a plain object from a ConversionEvent message. Also converts values to other types if specified. + * @param message ConversionEvent + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.ConversionEvent, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ConversionEvent to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ConversionEvent + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GoogleSignalsSettings. */ + interface IGoogleSignalsSettings { + + /** GoogleSignalsSettings name */ + name?: (string|null); + + /** GoogleSignalsSettings state */ + state?: (google.analytics.admin.v1alpha.GoogleSignalsState|keyof typeof google.analytics.admin.v1alpha.GoogleSignalsState|null); + + /** GoogleSignalsSettings consent */ + consent?: (google.analytics.admin.v1alpha.GoogleSignalsConsent|keyof typeof google.analytics.admin.v1alpha.GoogleSignalsConsent|null); + } + + /** Represents a GoogleSignalsSettings. */ + class GoogleSignalsSettings implements IGoogleSignalsSettings { + + /** + * Constructs a new GoogleSignalsSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IGoogleSignalsSettings); + + /** GoogleSignalsSettings name. */ + public name: string; + + /** GoogleSignalsSettings state. */ + public state: (google.analytics.admin.v1alpha.GoogleSignalsState|keyof typeof google.analytics.admin.v1alpha.GoogleSignalsState); + + /** GoogleSignalsSettings consent. */ + public consent: (google.analytics.admin.v1alpha.GoogleSignalsConsent|keyof typeof google.analytics.admin.v1alpha.GoogleSignalsConsent); + + /** + * Creates a new GoogleSignalsSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns GoogleSignalsSettings instance + */ + public static create(properties?: google.analytics.admin.v1alpha.IGoogleSignalsSettings): google.analytics.admin.v1alpha.GoogleSignalsSettings; + + /** + * Encodes the specified GoogleSignalsSettings message. Does not implicitly {@link google.analytics.admin.v1alpha.GoogleSignalsSettings.verify|verify} messages. + * @param message GoogleSignalsSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.IGoogleSignalsSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GoogleSignalsSettings message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.GoogleSignalsSettings.verify|verify} messages. + * @param message GoogleSignalsSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.IGoogleSignalsSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GoogleSignalsSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GoogleSignalsSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.GoogleSignalsSettings; + + /** + * Decodes a GoogleSignalsSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GoogleSignalsSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.GoogleSignalsSettings; + + /** + * Verifies a GoogleSignalsSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GoogleSignalsSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GoogleSignalsSettings + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.GoogleSignalsSettings; + + /** + * Creates a plain object from a GoogleSignalsSettings message. Also converts values to other types if specified. + * @param message GoogleSignalsSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.GoogleSignalsSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GoogleSignalsSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GoogleSignalsSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CustomDimension. */ + interface ICustomDimension { + + /** CustomDimension name */ + name?: (string|null); + + /** CustomDimension parameterName */ + parameterName?: (string|null); + + /** CustomDimension displayName */ + displayName?: (string|null); + + /** CustomDimension description */ + description?: (string|null); + + /** CustomDimension scope */ + scope?: (google.analytics.admin.v1alpha.CustomDimension.DimensionScope|keyof typeof google.analytics.admin.v1alpha.CustomDimension.DimensionScope|null); + + /** CustomDimension disallowAdsPersonalization */ + disallowAdsPersonalization?: (boolean|null); + } + + /** Represents a CustomDimension. */ + class CustomDimension implements ICustomDimension { + + /** + * Constructs a new CustomDimension. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.ICustomDimension); + + /** CustomDimension name. */ + public name: string; + + /** CustomDimension parameterName. */ + public parameterName: string; + + /** CustomDimension displayName. */ + public displayName: string; + + /** CustomDimension description. */ + public description: string; + + /** CustomDimension scope. */ + public scope: (google.analytics.admin.v1alpha.CustomDimension.DimensionScope|keyof typeof google.analytics.admin.v1alpha.CustomDimension.DimensionScope); + + /** CustomDimension disallowAdsPersonalization. */ + public disallowAdsPersonalization: boolean; + + /** + * Creates a new CustomDimension instance using the specified properties. + * @param [properties] Properties to set + * @returns CustomDimension instance + */ + public static create(properties?: google.analytics.admin.v1alpha.ICustomDimension): google.analytics.admin.v1alpha.CustomDimension; + + /** + * Encodes the specified CustomDimension message. Does not implicitly {@link google.analytics.admin.v1alpha.CustomDimension.verify|verify} messages. + * @param message CustomDimension message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.ICustomDimension, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CustomDimension message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.CustomDimension.verify|verify} messages. + * @param message CustomDimension message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.ICustomDimension, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CustomDimension message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CustomDimension + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.CustomDimension; + + /** + * Decodes a CustomDimension message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CustomDimension + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.CustomDimension; + + /** + * Verifies a CustomDimension message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CustomDimension message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CustomDimension + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.CustomDimension; + + /** + * Creates a plain object from a CustomDimension message. Also converts values to other types if specified. + * @param message CustomDimension + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.CustomDimension, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CustomDimension to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CustomDimension + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace CustomDimension { + + /** DimensionScope enum. */ + enum DimensionScope { + DIMENSION_SCOPE_UNSPECIFIED = 0, + EVENT = 1, + USER = 2 + } + } + + /** Properties of a CustomMetric. */ + interface ICustomMetric { + + /** CustomMetric name */ + name?: (string|null); + + /** CustomMetric parameterName */ + parameterName?: (string|null); + + /** CustomMetric displayName */ + displayName?: (string|null); + + /** CustomMetric description */ + description?: (string|null); + + /** CustomMetric measurementUnit */ + measurementUnit?: (google.analytics.admin.v1alpha.CustomMetric.MeasurementUnit|keyof typeof google.analytics.admin.v1alpha.CustomMetric.MeasurementUnit|null); + + /** CustomMetric scope */ + scope?: (google.analytics.admin.v1alpha.CustomMetric.MetricScope|keyof typeof google.analytics.admin.v1alpha.CustomMetric.MetricScope|null); + + /** CustomMetric restrictedMetricType */ + restrictedMetricType?: (google.analytics.admin.v1alpha.CustomMetric.RestrictedMetricType[]|null); + } + + /** Represents a CustomMetric. */ + class CustomMetric implements ICustomMetric { + + /** + * Constructs a new CustomMetric. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.ICustomMetric); + + /** CustomMetric name. */ + public name: string; + + /** CustomMetric parameterName. */ + public parameterName: string; + + /** CustomMetric displayName. */ + public displayName: string; + + /** CustomMetric description. */ + public description: string; + + /** CustomMetric measurementUnit. */ + public measurementUnit: (google.analytics.admin.v1alpha.CustomMetric.MeasurementUnit|keyof typeof google.analytics.admin.v1alpha.CustomMetric.MeasurementUnit); + + /** CustomMetric scope. */ + public scope: (google.analytics.admin.v1alpha.CustomMetric.MetricScope|keyof typeof google.analytics.admin.v1alpha.CustomMetric.MetricScope); + + /** CustomMetric restrictedMetricType. */ + public restrictedMetricType: google.analytics.admin.v1alpha.CustomMetric.RestrictedMetricType[]; + + /** + * Creates a new CustomMetric instance using the specified properties. + * @param [properties] Properties to set + * @returns CustomMetric instance + */ + public static create(properties?: google.analytics.admin.v1alpha.ICustomMetric): google.analytics.admin.v1alpha.CustomMetric; + + /** + * Encodes the specified CustomMetric message. Does not implicitly {@link google.analytics.admin.v1alpha.CustomMetric.verify|verify} messages. + * @param message CustomMetric message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.ICustomMetric, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CustomMetric message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.CustomMetric.verify|verify} messages. + * @param message CustomMetric message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.ICustomMetric, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CustomMetric message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CustomMetric + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.CustomMetric; + + /** + * Decodes a CustomMetric message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CustomMetric + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.CustomMetric; + + /** + * Verifies a CustomMetric message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CustomMetric message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CustomMetric + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.CustomMetric; + + /** + * Creates a plain object from a CustomMetric message. Also converts values to other types if specified. + * @param message CustomMetric + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.CustomMetric, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CustomMetric to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CustomMetric + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace CustomMetric { + + /** MeasurementUnit enum. */ + enum MeasurementUnit { + MEASUREMENT_UNIT_UNSPECIFIED = 0, + STANDARD = 1, + CURRENCY = 2, + FEET = 3, + METERS = 4, + KILOMETERS = 5, + MILES = 6, + MILLISECONDS = 7, + SECONDS = 8, + MINUTES = 9, + HOURS = 10 + } + + /** MetricScope enum. */ + enum MetricScope { + METRIC_SCOPE_UNSPECIFIED = 0, + EVENT = 1 + } + + /** RestrictedMetricType enum. */ + enum RestrictedMetricType { + RESTRICTED_METRIC_TYPE_UNSPECIFIED = 0, + COST_DATA = 1, + REVENUE_DATA = 2 + } + } + + /** Properties of a DataRetentionSettings. */ + interface IDataRetentionSettings { + + /** DataRetentionSettings name */ + name?: (string|null); + + /** DataRetentionSettings eventDataRetention */ + eventDataRetention?: (google.analytics.admin.v1alpha.DataRetentionSettings.RetentionDuration|keyof typeof google.analytics.admin.v1alpha.DataRetentionSettings.RetentionDuration|null); + + /** DataRetentionSettings resetUserDataOnNewActivity */ + resetUserDataOnNewActivity?: (boolean|null); + } + + /** Represents a DataRetentionSettings. */ + class DataRetentionSettings implements IDataRetentionSettings { + + /** + * Constructs a new DataRetentionSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IDataRetentionSettings); + + /** DataRetentionSettings name. */ + public name: string; + + /** DataRetentionSettings eventDataRetention. */ + public eventDataRetention: (google.analytics.admin.v1alpha.DataRetentionSettings.RetentionDuration|keyof typeof google.analytics.admin.v1alpha.DataRetentionSettings.RetentionDuration); + + /** DataRetentionSettings resetUserDataOnNewActivity. */ + public resetUserDataOnNewActivity: boolean; + + /** + * Creates a new DataRetentionSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns DataRetentionSettings instance + */ + public static create(properties?: google.analytics.admin.v1alpha.IDataRetentionSettings): google.analytics.admin.v1alpha.DataRetentionSettings; + + /** + * Encodes the specified DataRetentionSettings message. Does not implicitly {@link google.analytics.admin.v1alpha.DataRetentionSettings.verify|verify} messages. + * @param message DataRetentionSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.IDataRetentionSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DataRetentionSettings message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.DataRetentionSettings.verify|verify} messages. + * @param message DataRetentionSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.IDataRetentionSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DataRetentionSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DataRetentionSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.DataRetentionSettings; + + /** + * Decodes a DataRetentionSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DataRetentionSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.DataRetentionSettings; + + /** + * Verifies a DataRetentionSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DataRetentionSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DataRetentionSettings + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.DataRetentionSettings; + + /** + * Creates a plain object from a DataRetentionSettings message. Also converts values to other types if specified. + * @param message DataRetentionSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.DataRetentionSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DataRetentionSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DataRetentionSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace DataRetentionSettings { + + /** RetentionDuration enum. */ + enum RetentionDuration { + RETENTION_DURATION_UNSPECIFIED = 0, + TWO_MONTHS = 1, + FOURTEEN_MONTHS = 3, + TWENTY_SIX_MONTHS = 4, + THIRTY_EIGHT_MONTHS = 5, + FIFTY_MONTHS = 6 + } + } + + /** Properties of an AttributionSettings. */ + interface IAttributionSettings { + + /** AttributionSettings name */ + name?: (string|null); + + /** AttributionSettings acquisitionConversionEventLookbackWindow */ + acquisitionConversionEventLookbackWindow?: (google.analytics.admin.v1alpha.AttributionSettings.AcquisitionConversionEventLookbackWindow|keyof typeof google.analytics.admin.v1alpha.AttributionSettings.AcquisitionConversionEventLookbackWindow|null); + + /** AttributionSettings otherConversionEventLookbackWindow */ + otherConversionEventLookbackWindow?: (google.analytics.admin.v1alpha.AttributionSettings.OtherConversionEventLookbackWindow|keyof typeof google.analytics.admin.v1alpha.AttributionSettings.OtherConversionEventLookbackWindow|null); + + /** AttributionSettings reportingAttributionModel */ + reportingAttributionModel?: (google.analytics.admin.v1alpha.AttributionSettings.ReportingAttributionModel|keyof typeof google.analytics.admin.v1alpha.AttributionSettings.ReportingAttributionModel|null); + } + + /** Represents an AttributionSettings. */ + class AttributionSettings implements IAttributionSettings { + + /** + * Constructs a new AttributionSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1alpha.IAttributionSettings); + + /** AttributionSettings name. */ + public name: string; + + /** AttributionSettings acquisitionConversionEventLookbackWindow. */ + public acquisitionConversionEventLookbackWindow: (google.analytics.admin.v1alpha.AttributionSettings.AcquisitionConversionEventLookbackWindow|keyof typeof google.analytics.admin.v1alpha.AttributionSettings.AcquisitionConversionEventLookbackWindow); + + /** AttributionSettings otherConversionEventLookbackWindow. */ + public otherConversionEventLookbackWindow: (google.analytics.admin.v1alpha.AttributionSettings.OtherConversionEventLookbackWindow|keyof typeof google.analytics.admin.v1alpha.AttributionSettings.OtherConversionEventLookbackWindow); + + /** AttributionSettings reportingAttributionModel. */ + public reportingAttributionModel: (google.analytics.admin.v1alpha.AttributionSettings.ReportingAttributionModel|keyof typeof google.analytics.admin.v1alpha.AttributionSettings.ReportingAttributionModel); + + /** + * Creates a new AttributionSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns AttributionSettings instance + */ + public static create(properties?: google.analytics.admin.v1alpha.IAttributionSettings): google.analytics.admin.v1alpha.AttributionSettings; + + /** + * Encodes the specified AttributionSettings message. Does not implicitly {@link google.analytics.admin.v1alpha.AttributionSettings.verify|verify} messages. + * @param message AttributionSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1alpha.IAttributionSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AttributionSettings message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AttributionSettings.verify|verify} messages. + * @param message AttributionSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1alpha.IAttributionSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AttributionSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AttributionSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1alpha.AttributionSettings; + + /** + * Decodes an AttributionSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AttributionSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1alpha.AttributionSettings; + + /** + * Verifies an AttributionSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AttributionSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AttributionSettings + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1alpha.AttributionSettings; + + /** + * Creates a plain object from an AttributionSettings message. Also converts values to other types if specified. + * @param message AttributionSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1alpha.AttributionSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AttributionSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AttributionSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace AttributionSettings { + + /** AcquisitionConversionEventLookbackWindow enum. */ + enum AcquisitionConversionEventLookbackWindow { + ACQUISITION_CONVERSION_EVENT_LOOKBACK_WINDOW_UNSPECIFIED = 0, + ACQUISITION_CONVERSION_EVENT_LOOKBACK_WINDOW_7_DAYS = 1, + ACQUISITION_CONVERSION_EVENT_LOOKBACK_WINDOW_30_DAYS = 2 + } + + /** OtherConversionEventLookbackWindow enum. */ + enum OtherConversionEventLookbackWindow { + OTHER_CONVERSION_EVENT_LOOKBACK_WINDOW_UNSPECIFIED = 0, + OTHER_CONVERSION_EVENT_LOOKBACK_WINDOW_30_DAYS = 1, + OTHER_CONVERSION_EVENT_LOOKBACK_WINDOW_60_DAYS = 2, + OTHER_CONVERSION_EVENT_LOOKBACK_WINDOW_90_DAYS = 3 + } + + /** ReportingAttributionModel enum. */ + enum ReportingAttributionModel { + REPORTING_ATTRIBUTION_MODEL_UNSPECIFIED = 0, + CROSS_CHANNEL_DATA_DRIVEN = 1, + CROSS_CHANNEL_LAST_CLICK = 2, + CROSS_CHANNEL_FIRST_CLICK = 3, + CROSS_CHANNEL_LINEAR = 4, + CROSS_CHANNEL_POSITION_BASED = 5, + CROSS_CHANNEL_TIME_DECAY = 6, + ADS_PREFERRED_LAST_CLICK = 7 + } + } + } + + /** Namespace v1beta. */ + namespace v1beta { + + /** Represents an AnalyticsAdminService */ + class AnalyticsAdminService extends $protobuf.rpc.Service { + + /** + * Constructs a new AnalyticsAdminService 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 AnalyticsAdminService 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): AnalyticsAdminService; + + /** + * Calls GetAccount. + * @param request GetAccountRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Account + */ + public getAccount(request: google.analytics.admin.v1beta.IGetAccountRequest, callback: google.analytics.admin.v1beta.AnalyticsAdminService.GetAccountCallback): void; + + /** + * Calls GetAccount. + * @param request GetAccountRequest message or plain object + * @returns Promise + */ + public getAccount(request: google.analytics.admin.v1beta.IGetAccountRequest): Promise; + + /** + * Calls ListAccounts. + * @param request ListAccountsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListAccountsResponse + */ + public listAccounts(request: google.analytics.admin.v1beta.IListAccountsRequest, callback: google.analytics.admin.v1beta.AnalyticsAdminService.ListAccountsCallback): void; + + /** + * Calls ListAccounts. + * @param request ListAccountsRequest message or plain object + * @returns Promise + */ + public listAccounts(request: google.analytics.admin.v1beta.IListAccountsRequest): Promise; + + /** + * Calls DeleteAccount. + * @param request DeleteAccountRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteAccount(request: google.analytics.admin.v1beta.IDeleteAccountRequest, callback: google.analytics.admin.v1beta.AnalyticsAdminService.DeleteAccountCallback): void; + + /** + * Calls DeleteAccount. + * @param request DeleteAccountRequest message or plain object + * @returns Promise + */ + public deleteAccount(request: google.analytics.admin.v1beta.IDeleteAccountRequest): Promise; + + /** + * Calls UpdateAccount. + * @param request UpdateAccountRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Account + */ + public updateAccount(request: google.analytics.admin.v1beta.IUpdateAccountRequest, callback: google.analytics.admin.v1beta.AnalyticsAdminService.UpdateAccountCallback): void; + + /** + * Calls UpdateAccount. + * @param request UpdateAccountRequest message or plain object + * @returns Promise + */ + public updateAccount(request: google.analytics.admin.v1beta.IUpdateAccountRequest): Promise; + + /** + * Calls ProvisionAccountTicket. + * @param request ProvisionAccountTicketRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ProvisionAccountTicketResponse + */ + public provisionAccountTicket(request: google.analytics.admin.v1beta.IProvisionAccountTicketRequest, callback: google.analytics.admin.v1beta.AnalyticsAdminService.ProvisionAccountTicketCallback): void; + + /** + * Calls ProvisionAccountTicket. + * @param request ProvisionAccountTicketRequest message or plain object + * @returns Promise + */ + public provisionAccountTicket(request: google.analytics.admin.v1beta.IProvisionAccountTicketRequest): Promise; + + /** + * Calls ListAccountSummaries. + * @param request ListAccountSummariesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListAccountSummariesResponse + */ + public listAccountSummaries(request: google.analytics.admin.v1beta.IListAccountSummariesRequest, callback: google.analytics.admin.v1beta.AnalyticsAdminService.ListAccountSummariesCallback): void; + + /** + * Calls ListAccountSummaries. + * @param request ListAccountSummariesRequest message or plain object + * @returns Promise + */ + public listAccountSummaries(request: google.analytics.admin.v1beta.IListAccountSummariesRequest): Promise; + + /** + * Calls GetProperty. + * @param request GetPropertyRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Property + */ + public getProperty(request: google.analytics.admin.v1beta.IGetPropertyRequest, callback: google.analytics.admin.v1beta.AnalyticsAdminService.GetPropertyCallback): void; + + /** + * Calls GetProperty. + * @param request GetPropertyRequest message or plain object + * @returns Promise + */ + public getProperty(request: google.analytics.admin.v1beta.IGetPropertyRequest): Promise; + + /** + * Calls ListProperties. + * @param request ListPropertiesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListPropertiesResponse + */ + public listProperties(request: google.analytics.admin.v1beta.IListPropertiesRequest, callback: google.analytics.admin.v1beta.AnalyticsAdminService.ListPropertiesCallback): void; + + /** + * Calls ListProperties. + * @param request ListPropertiesRequest message or plain object + * @returns Promise + */ + public listProperties(request: google.analytics.admin.v1beta.IListPropertiesRequest): Promise; + + /** + * Calls CreateProperty. + * @param request CreatePropertyRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Property + */ + public createProperty(request: google.analytics.admin.v1beta.ICreatePropertyRequest, callback: google.analytics.admin.v1beta.AnalyticsAdminService.CreatePropertyCallback): void; + + /** + * Calls CreateProperty. + * @param request CreatePropertyRequest message or plain object + * @returns Promise + */ + public createProperty(request: google.analytics.admin.v1beta.ICreatePropertyRequest): Promise; + + /** + * Calls DeleteProperty. + * @param request DeletePropertyRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Property + */ + public deleteProperty(request: google.analytics.admin.v1beta.IDeletePropertyRequest, callback: google.analytics.admin.v1beta.AnalyticsAdminService.DeletePropertyCallback): void; + + /** + * Calls DeleteProperty. + * @param request DeletePropertyRequest message or plain object + * @returns Promise + */ + public deleteProperty(request: google.analytics.admin.v1beta.IDeletePropertyRequest): Promise; + + /** + * Calls UpdateProperty. + * @param request UpdatePropertyRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Property + */ + public updateProperty(request: google.analytics.admin.v1beta.IUpdatePropertyRequest, callback: google.analytics.admin.v1beta.AnalyticsAdminService.UpdatePropertyCallback): void; + + /** + * Calls UpdateProperty. + * @param request UpdatePropertyRequest message or plain object + * @returns Promise + */ + public updateProperty(request: google.analytics.admin.v1beta.IUpdatePropertyRequest): Promise; + + /** + * Calls CreateFirebaseLink. + * @param request CreateFirebaseLinkRequest message or plain object + * @param callback Node-style callback called with the error, if any, and FirebaseLink + */ + public createFirebaseLink(request: google.analytics.admin.v1beta.ICreateFirebaseLinkRequest, callback: google.analytics.admin.v1beta.AnalyticsAdminService.CreateFirebaseLinkCallback): void; + + /** + * Calls CreateFirebaseLink. + * @param request CreateFirebaseLinkRequest message or plain object + * @returns Promise + */ + public createFirebaseLink(request: google.analytics.admin.v1beta.ICreateFirebaseLinkRequest): Promise; + + /** + * Calls DeleteFirebaseLink. + * @param request DeleteFirebaseLinkRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteFirebaseLink(request: google.analytics.admin.v1beta.IDeleteFirebaseLinkRequest, callback: google.analytics.admin.v1beta.AnalyticsAdminService.DeleteFirebaseLinkCallback): void; + + /** + * Calls DeleteFirebaseLink. + * @param request DeleteFirebaseLinkRequest message or plain object + * @returns Promise + */ + public deleteFirebaseLink(request: google.analytics.admin.v1beta.IDeleteFirebaseLinkRequest): Promise; + + /** + * Calls ListFirebaseLinks. + * @param request ListFirebaseLinksRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListFirebaseLinksResponse + */ + public listFirebaseLinks(request: google.analytics.admin.v1beta.IListFirebaseLinksRequest, callback: google.analytics.admin.v1beta.AnalyticsAdminService.ListFirebaseLinksCallback): void; + + /** + * Calls ListFirebaseLinks. + * @param request ListFirebaseLinksRequest message or plain object + * @returns Promise + */ + public listFirebaseLinks(request: google.analytics.admin.v1beta.IListFirebaseLinksRequest): Promise; + + /** + * Calls CreateGoogleAdsLink. + * @param request CreateGoogleAdsLinkRequest message or plain object + * @param callback Node-style callback called with the error, if any, and GoogleAdsLink + */ + public createGoogleAdsLink(request: google.analytics.admin.v1beta.ICreateGoogleAdsLinkRequest, callback: google.analytics.admin.v1beta.AnalyticsAdminService.CreateGoogleAdsLinkCallback): void; + + /** + * Calls CreateGoogleAdsLink. + * @param request CreateGoogleAdsLinkRequest message or plain object + * @returns Promise + */ + public createGoogleAdsLink(request: google.analytics.admin.v1beta.ICreateGoogleAdsLinkRequest): Promise; + + /** + * Calls UpdateGoogleAdsLink. + * @param request UpdateGoogleAdsLinkRequest message or plain object + * @param callback Node-style callback called with the error, if any, and GoogleAdsLink + */ + public updateGoogleAdsLink(request: google.analytics.admin.v1beta.IUpdateGoogleAdsLinkRequest, callback: google.analytics.admin.v1beta.AnalyticsAdminService.UpdateGoogleAdsLinkCallback): void; + + /** + * Calls UpdateGoogleAdsLink. + * @param request UpdateGoogleAdsLinkRequest message or plain object + * @returns Promise + */ + public updateGoogleAdsLink(request: google.analytics.admin.v1beta.IUpdateGoogleAdsLinkRequest): Promise; + + /** + * Calls DeleteGoogleAdsLink. + * @param request DeleteGoogleAdsLinkRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteGoogleAdsLink(request: google.analytics.admin.v1beta.IDeleteGoogleAdsLinkRequest, callback: google.analytics.admin.v1beta.AnalyticsAdminService.DeleteGoogleAdsLinkCallback): void; + + /** + * Calls DeleteGoogleAdsLink. + * @param request DeleteGoogleAdsLinkRequest message or plain object + * @returns Promise + */ + public deleteGoogleAdsLink(request: google.analytics.admin.v1beta.IDeleteGoogleAdsLinkRequest): Promise; + + /** + * Calls ListGoogleAdsLinks. + * @param request ListGoogleAdsLinksRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListGoogleAdsLinksResponse + */ + public listGoogleAdsLinks(request: google.analytics.admin.v1beta.IListGoogleAdsLinksRequest, callback: google.analytics.admin.v1beta.AnalyticsAdminService.ListGoogleAdsLinksCallback): void; + + /** + * Calls ListGoogleAdsLinks. + * @param request ListGoogleAdsLinksRequest message or plain object + * @returns Promise + */ + public listGoogleAdsLinks(request: google.analytics.admin.v1beta.IListGoogleAdsLinksRequest): Promise; + + /** + * Calls GetDataSharingSettings. + * @param request GetDataSharingSettingsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and DataSharingSettings + */ + public getDataSharingSettings(request: google.analytics.admin.v1beta.IGetDataSharingSettingsRequest, callback: google.analytics.admin.v1beta.AnalyticsAdminService.GetDataSharingSettingsCallback): void; + + /** + * Calls GetDataSharingSettings. + * @param request GetDataSharingSettingsRequest message or plain object + * @returns Promise + */ + public getDataSharingSettings(request: google.analytics.admin.v1beta.IGetDataSharingSettingsRequest): Promise; + + /** + * Calls GetMeasurementProtocolSecret. + * @param request GetMeasurementProtocolSecretRequest message or plain object + * @param callback Node-style callback called with the error, if any, and MeasurementProtocolSecret + */ + public getMeasurementProtocolSecret(request: google.analytics.admin.v1beta.IGetMeasurementProtocolSecretRequest, callback: google.analytics.admin.v1beta.AnalyticsAdminService.GetMeasurementProtocolSecretCallback): void; + + /** + * Calls GetMeasurementProtocolSecret. + * @param request GetMeasurementProtocolSecretRequest message or plain object + * @returns Promise + */ + public getMeasurementProtocolSecret(request: google.analytics.admin.v1beta.IGetMeasurementProtocolSecretRequest): Promise; + + /** + * Calls ListMeasurementProtocolSecrets. + * @param request ListMeasurementProtocolSecretsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListMeasurementProtocolSecretsResponse + */ + public listMeasurementProtocolSecrets(request: google.analytics.admin.v1beta.IListMeasurementProtocolSecretsRequest, callback: google.analytics.admin.v1beta.AnalyticsAdminService.ListMeasurementProtocolSecretsCallback): void; + + /** + * Calls ListMeasurementProtocolSecrets. + * @param request ListMeasurementProtocolSecretsRequest message or plain object + * @returns Promise + */ + public listMeasurementProtocolSecrets(request: google.analytics.admin.v1beta.IListMeasurementProtocolSecretsRequest): Promise; + + /** + * Calls CreateMeasurementProtocolSecret. + * @param request CreateMeasurementProtocolSecretRequest message or plain object + * @param callback Node-style callback called with the error, if any, and MeasurementProtocolSecret + */ + public createMeasurementProtocolSecret(request: google.analytics.admin.v1beta.ICreateMeasurementProtocolSecretRequest, callback: google.analytics.admin.v1beta.AnalyticsAdminService.CreateMeasurementProtocolSecretCallback): void; + + /** + * Calls CreateMeasurementProtocolSecret. + * @param request CreateMeasurementProtocolSecretRequest message or plain object + * @returns Promise + */ + public createMeasurementProtocolSecret(request: google.analytics.admin.v1beta.ICreateMeasurementProtocolSecretRequest): Promise; + + /** + * Calls DeleteMeasurementProtocolSecret. + * @param request DeleteMeasurementProtocolSecretRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteMeasurementProtocolSecret(request: google.analytics.admin.v1beta.IDeleteMeasurementProtocolSecretRequest, callback: google.analytics.admin.v1beta.AnalyticsAdminService.DeleteMeasurementProtocolSecretCallback): void; + + /** + * Calls DeleteMeasurementProtocolSecret. + * @param request DeleteMeasurementProtocolSecretRequest message or plain object + * @returns Promise + */ + public deleteMeasurementProtocolSecret(request: google.analytics.admin.v1beta.IDeleteMeasurementProtocolSecretRequest): Promise; + + /** + * Calls UpdateMeasurementProtocolSecret. + * @param request UpdateMeasurementProtocolSecretRequest message or plain object + * @param callback Node-style callback called with the error, if any, and MeasurementProtocolSecret + */ + public updateMeasurementProtocolSecret(request: google.analytics.admin.v1beta.IUpdateMeasurementProtocolSecretRequest, callback: google.analytics.admin.v1beta.AnalyticsAdminService.UpdateMeasurementProtocolSecretCallback): void; + + /** + * Calls UpdateMeasurementProtocolSecret. + * @param request UpdateMeasurementProtocolSecretRequest message or plain object + * @returns Promise + */ + public updateMeasurementProtocolSecret(request: google.analytics.admin.v1beta.IUpdateMeasurementProtocolSecretRequest): Promise; + + /** + * Calls AcknowledgeUserDataCollection. + * @param request AcknowledgeUserDataCollectionRequest message or plain object + * @param callback Node-style callback called with the error, if any, and AcknowledgeUserDataCollectionResponse + */ + public acknowledgeUserDataCollection(request: google.analytics.admin.v1beta.IAcknowledgeUserDataCollectionRequest, callback: google.analytics.admin.v1beta.AnalyticsAdminService.AcknowledgeUserDataCollectionCallback): void; + + /** + * Calls AcknowledgeUserDataCollection. + * @param request AcknowledgeUserDataCollectionRequest message or plain object + * @returns Promise + */ + public acknowledgeUserDataCollection(request: google.analytics.admin.v1beta.IAcknowledgeUserDataCollectionRequest): Promise; + + /** + * Calls SearchChangeHistoryEvents. + * @param request SearchChangeHistoryEventsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and SearchChangeHistoryEventsResponse + */ + public searchChangeHistoryEvents(request: google.analytics.admin.v1beta.ISearchChangeHistoryEventsRequest, callback: google.analytics.admin.v1beta.AnalyticsAdminService.SearchChangeHistoryEventsCallback): void; + + /** + * Calls SearchChangeHistoryEvents. + * @param request SearchChangeHistoryEventsRequest message or plain object + * @returns Promise + */ + public searchChangeHistoryEvents(request: google.analytics.admin.v1beta.ISearchChangeHistoryEventsRequest): Promise; + + /** + * Calls CreateConversionEvent. + * @param request CreateConversionEventRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ConversionEvent + */ + public createConversionEvent(request: google.analytics.admin.v1beta.ICreateConversionEventRequest, callback: google.analytics.admin.v1beta.AnalyticsAdminService.CreateConversionEventCallback): void; + + /** + * Calls CreateConversionEvent. + * @param request CreateConversionEventRequest message or plain object + * @returns Promise + */ + public createConversionEvent(request: google.analytics.admin.v1beta.ICreateConversionEventRequest): Promise; + + /** + * Calls GetConversionEvent. + * @param request GetConversionEventRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ConversionEvent + */ + public getConversionEvent(request: google.analytics.admin.v1beta.IGetConversionEventRequest, callback: google.analytics.admin.v1beta.AnalyticsAdminService.GetConversionEventCallback): void; + + /** + * Calls GetConversionEvent. + * @param request GetConversionEventRequest message or plain object + * @returns Promise + */ + public getConversionEvent(request: google.analytics.admin.v1beta.IGetConversionEventRequest): Promise; + + /** + * Calls DeleteConversionEvent. + * @param request DeleteConversionEventRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteConversionEvent(request: google.analytics.admin.v1beta.IDeleteConversionEventRequest, callback: google.analytics.admin.v1beta.AnalyticsAdminService.DeleteConversionEventCallback): void; + + /** + * Calls DeleteConversionEvent. + * @param request DeleteConversionEventRequest message or plain object + * @returns Promise + */ + public deleteConversionEvent(request: google.analytics.admin.v1beta.IDeleteConversionEventRequest): Promise; + + /** + * Calls ListConversionEvents. + * @param request ListConversionEventsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListConversionEventsResponse + */ + public listConversionEvents(request: google.analytics.admin.v1beta.IListConversionEventsRequest, callback: google.analytics.admin.v1beta.AnalyticsAdminService.ListConversionEventsCallback): void; + + /** + * Calls ListConversionEvents. + * @param request ListConversionEventsRequest message or plain object + * @returns Promise + */ + public listConversionEvents(request: google.analytics.admin.v1beta.IListConversionEventsRequest): Promise; + + /** + * Calls CreateCustomDimension. + * @param request CreateCustomDimensionRequest message or plain object + * @param callback Node-style callback called with the error, if any, and CustomDimension + */ + public createCustomDimension(request: google.analytics.admin.v1beta.ICreateCustomDimensionRequest, callback: google.analytics.admin.v1beta.AnalyticsAdminService.CreateCustomDimensionCallback): void; + + /** + * Calls CreateCustomDimension. + * @param request CreateCustomDimensionRequest message or plain object + * @returns Promise + */ + public createCustomDimension(request: google.analytics.admin.v1beta.ICreateCustomDimensionRequest): Promise; + + /** + * Calls UpdateCustomDimension. + * @param request UpdateCustomDimensionRequest message or plain object + * @param callback Node-style callback called with the error, if any, and CustomDimension + */ + public updateCustomDimension(request: google.analytics.admin.v1beta.IUpdateCustomDimensionRequest, callback: google.analytics.admin.v1beta.AnalyticsAdminService.UpdateCustomDimensionCallback): void; + + /** + * Calls UpdateCustomDimension. + * @param request UpdateCustomDimensionRequest message or plain object + * @returns Promise + */ + public updateCustomDimension(request: google.analytics.admin.v1beta.IUpdateCustomDimensionRequest): Promise; + + /** + * Calls ListCustomDimensions. + * @param request ListCustomDimensionsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListCustomDimensionsResponse + */ + public listCustomDimensions(request: google.analytics.admin.v1beta.IListCustomDimensionsRequest, callback: google.analytics.admin.v1beta.AnalyticsAdminService.ListCustomDimensionsCallback): void; + + /** + * Calls ListCustomDimensions. + * @param request ListCustomDimensionsRequest message or plain object + * @returns Promise + */ + public listCustomDimensions(request: google.analytics.admin.v1beta.IListCustomDimensionsRequest): Promise; + + /** + * Calls ArchiveCustomDimension. + * @param request ArchiveCustomDimensionRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public archiveCustomDimension(request: google.analytics.admin.v1beta.IArchiveCustomDimensionRequest, callback: google.analytics.admin.v1beta.AnalyticsAdminService.ArchiveCustomDimensionCallback): void; + + /** + * Calls ArchiveCustomDimension. + * @param request ArchiveCustomDimensionRequest message or plain object + * @returns Promise + */ + public archiveCustomDimension(request: google.analytics.admin.v1beta.IArchiveCustomDimensionRequest): Promise; + + /** + * Calls GetCustomDimension. + * @param request GetCustomDimensionRequest message or plain object + * @param callback Node-style callback called with the error, if any, and CustomDimension + */ + public getCustomDimension(request: google.analytics.admin.v1beta.IGetCustomDimensionRequest, callback: google.analytics.admin.v1beta.AnalyticsAdminService.GetCustomDimensionCallback): void; + + /** + * Calls GetCustomDimension. + * @param request GetCustomDimensionRequest message or plain object + * @returns Promise + */ + public getCustomDimension(request: google.analytics.admin.v1beta.IGetCustomDimensionRequest): Promise; + + /** + * Calls CreateCustomMetric. + * @param request CreateCustomMetricRequest message or plain object + * @param callback Node-style callback called with the error, if any, and CustomMetric + */ + public createCustomMetric(request: google.analytics.admin.v1beta.ICreateCustomMetricRequest, callback: google.analytics.admin.v1beta.AnalyticsAdminService.CreateCustomMetricCallback): void; + + /** + * Calls CreateCustomMetric. + * @param request CreateCustomMetricRequest message or plain object + * @returns Promise + */ + public createCustomMetric(request: google.analytics.admin.v1beta.ICreateCustomMetricRequest): Promise; + + /** + * Calls UpdateCustomMetric. + * @param request UpdateCustomMetricRequest message or plain object + * @param callback Node-style callback called with the error, if any, and CustomMetric + */ + public updateCustomMetric(request: google.analytics.admin.v1beta.IUpdateCustomMetricRequest, callback: google.analytics.admin.v1beta.AnalyticsAdminService.UpdateCustomMetricCallback): void; + + /** + * Calls UpdateCustomMetric. + * @param request UpdateCustomMetricRequest message or plain object + * @returns Promise + */ + public updateCustomMetric(request: google.analytics.admin.v1beta.IUpdateCustomMetricRequest): Promise; + + /** + * Calls ListCustomMetrics. + * @param request ListCustomMetricsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListCustomMetricsResponse + */ + public listCustomMetrics(request: google.analytics.admin.v1beta.IListCustomMetricsRequest, callback: google.analytics.admin.v1beta.AnalyticsAdminService.ListCustomMetricsCallback): void; + + /** + * Calls ListCustomMetrics. + * @param request ListCustomMetricsRequest message or plain object + * @returns Promise + */ + public listCustomMetrics(request: google.analytics.admin.v1beta.IListCustomMetricsRequest): Promise; + + /** + * Calls ArchiveCustomMetric. + * @param request ArchiveCustomMetricRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public archiveCustomMetric(request: google.analytics.admin.v1beta.IArchiveCustomMetricRequest, callback: google.analytics.admin.v1beta.AnalyticsAdminService.ArchiveCustomMetricCallback): void; + + /** + * Calls ArchiveCustomMetric. + * @param request ArchiveCustomMetricRequest message or plain object + * @returns Promise + */ + public archiveCustomMetric(request: google.analytics.admin.v1beta.IArchiveCustomMetricRequest): Promise; + + /** + * Calls GetCustomMetric. + * @param request GetCustomMetricRequest message or plain object + * @param callback Node-style callback called with the error, if any, and CustomMetric + */ + public getCustomMetric(request: google.analytics.admin.v1beta.IGetCustomMetricRequest, callback: google.analytics.admin.v1beta.AnalyticsAdminService.GetCustomMetricCallback): void; + + /** + * Calls GetCustomMetric. + * @param request GetCustomMetricRequest message or plain object + * @returns Promise + */ + public getCustomMetric(request: google.analytics.admin.v1beta.IGetCustomMetricRequest): Promise; + + /** + * Calls GetDataRetentionSettings. + * @param request GetDataRetentionSettingsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and DataRetentionSettings + */ + public getDataRetentionSettings(request: google.analytics.admin.v1beta.IGetDataRetentionSettingsRequest, callback: google.analytics.admin.v1beta.AnalyticsAdminService.GetDataRetentionSettingsCallback): void; + + /** + * Calls GetDataRetentionSettings. + * @param request GetDataRetentionSettingsRequest message or plain object + * @returns Promise + */ + public getDataRetentionSettings(request: google.analytics.admin.v1beta.IGetDataRetentionSettingsRequest): Promise; + + /** + * Calls UpdateDataRetentionSettings. + * @param request UpdateDataRetentionSettingsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and DataRetentionSettings + */ + public updateDataRetentionSettings(request: google.analytics.admin.v1beta.IUpdateDataRetentionSettingsRequest, callback: google.analytics.admin.v1beta.AnalyticsAdminService.UpdateDataRetentionSettingsCallback): void; + + /** + * Calls UpdateDataRetentionSettings. + * @param request UpdateDataRetentionSettingsRequest message or plain object + * @returns Promise + */ + public updateDataRetentionSettings(request: google.analytics.admin.v1beta.IUpdateDataRetentionSettingsRequest): Promise; + + /** + * Calls CreateDataStream. + * @param request CreateDataStreamRequest message or plain object + * @param callback Node-style callback called with the error, if any, and DataStream + */ + public createDataStream(request: google.analytics.admin.v1beta.ICreateDataStreamRequest, callback: google.analytics.admin.v1beta.AnalyticsAdminService.CreateDataStreamCallback): void; + + /** + * Calls CreateDataStream. + * @param request CreateDataStreamRequest message or plain object + * @returns Promise + */ + public createDataStream(request: google.analytics.admin.v1beta.ICreateDataStreamRequest): Promise; + + /** + * Calls DeleteDataStream. + * @param request DeleteDataStreamRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteDataStream(request: google.analytics.admin.v1beta.IDeleteDataStreamRequest, callback: google.analytics.admin.v1beta.AnalyticsAdminService.DeleteDataStreamCallback): void; + + /** + * Calls DeleteDataStream. + * @param request DeleteDataStreamRequest message or plain object + * @returns Promise + */ + public deleteDataStream(request: google.analytics.admin.v1beta.IDeleteDataStreamRequest): Promise; + + /** + * Calls UpdateDataStream. + * @param request UpdateDataStreamRequest message or plain object + * @param callback Node-style callback called with the error, if any, and DataStream + */ + public updateDataStream(request: google.analytics.admin.v1beta.IUpdateDataStreamRequest, callback: google.analytics.admin.v1beta.AnalyticsAdminService.UpdateDataStreamCallback): void; + + /** + * Calls UpdateDataStream. + * @param request UpdateDataStreamRequest message or plain object + * @returns Promise + */ + public updateDataStream(request: google.analytics.admin.v1beta.IUpdateDataStreamRequest): Promise; + + /** + * Calls ListDataStreams. + * @param request ListDataStreamsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListDataStreamsResponse + */ + public listDataStreams(request: google.analytics.admin.v1beta.IListDataStreamsRequest, callback: google.analytics.admin.v1beta.AnalyticsAdminService.ListDataStreamsCallback): void; + + /** + * Calls ListDataStreams. + * @param request ListDataStreamsRequest message or plain object + * @returns Promise + */ + public listDataStreams(request: google.analytics.admin.v1beta.IListDataStreamsRequest): Promise; + + /** + * Calls GetDataStream. + * @param request GetDataStreamRequest message or plain object + * @param callback Node-style callback called with the error, if any, and DataStream + */ + public getDataStream(request: google.analytics.admin.v1beta.IGetDataStreamRequest, callback: google.analytics.admin.v1beta.AnalyticsAdminService.GetDataStreamCallback): void; + + /** + * Calls GetDataStream. + * @param request GetDataStreamRequest message or plain object + * @returns Promise + */ + public getDataStream(request: google.analytics.admin.v1beta.IGetDataStreamRequest): Promise; + } + + namespace AnalyticsAdminService { + + /** + * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|getAccount}. + * @param error Error, if any + * @param [response] Account + */ + type GetAccountCallback = (error: (Error|null), response?: google.analytics.admin.v1beta.Account) => void; + + /** + * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|listAccounts}. + * @param error Error, if any + * @param [response] ListAccountsResponse + */ + type ListAccountsCallback = (error: (Error|null), response?: google.analytics.admin.v1beta.ListAccountsResponse) => void; + + /** + * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|deleteAccount}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteAccountCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|updateAccount}. + * @param error Error, if any + * @param [response] Account + */ + type UpdateAccountCallback = (error: (Error|null), response?: google.analytics.admin.v1beta.Account) => void; + + /** + * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|provisionAccountTicket}. + * @param error Error, if any + * @param [response] ProvisionAccountTicketResponse + */ + type ProvisionAccountTicketCallback = (error: (Error|null), response?: google.analytics.admin.v1beta.ProvisionAccountTicketResponse) => void; + + /** + * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|listAccountSummaries}. + * @param error Error, if any + * @param [response] ListAccountSummariesResponse + */ + type ListAccountSummariesCallback = (error: (Error|null), response?: google.analytics.admin.v1beta.ListAccountSummariesResponse) => void; + + /** + * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|getProperty}. + * @param error Error, if any + * @param [response] Property + */ + type GetPropertyCallback = (error: (Error|null), response?: google.analytics.admin.v1beta.Property) => void; + + /** + * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|listProperties}. + * @param error Error, if any + * @param [response] ListPropertiesResponse + */ + type ListPropertiesCallback = (error: (Error|null), response?: google.analytics.admin.v1beta.ListPropertiesResponse) => void; + + /** + * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|createProperty}. + * @param error Error, if any + * @param [response] Property + */ + type CreatePropertyCallback = (error: (Error|null), response?: google.analytics.admin.v1beta.Property) => void; + + /** + * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|deleteProperty}. + * @param error Error, if any + * @param [response] Property + */ + type DeletePropertyCallback = (error: (Error|null), response?: google.analytics.admin.v1beta.Property) => void; + + /** + * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|updateProperty}. + * @param error Error, if any + * @param [response] Property + */ + type UpdatePropertyCallback = (error: (Error|null), response?: google.analytics.admin.v1beta.Property) => void; + + /** + * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|createFirebaseLink}. + * @param error Error, if any + * @param [response] FirebaseLink + */ + type CreateFirebaseLinkCallback = (error: (Error|null), response?: google.analytics.admin.v1beta.FirebaseLink) => void; + + /** + * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|deleteFirebaseLink}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteFirebaseLinkCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|listFirebaseLinks}. + * @param error Error, if any + * @param [response] ListFirebaseLinksResponse + */ + type ListFirebaseLinksCallback = (error: (Error|null), response?: google.analytics.admin.v1beta.ListFirebaseLinksResponse) => void; + + /** + * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|createGoogleAdsLink}. + * @param error Error, if any + * @param [response] GoogleAdsLink + */ + type CreateGoogleAdsLinkCallback = (error: (Error|null), response?: google.analytics.admin.v1beta.GoogleAdsLink) => void; + + /** + * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|updateGoogleAdsLink}. + * @param error Error, if any + * @param [response] GoogleAdsLink + */ + type UpdateGoogleAdsLinkCallback = (error: (Error|null), response?: google.analytics.admin.v1beta.GoogleAdsLink) => void; + + /** + * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|deleteGoogleAdsLink}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteGoogleAdsLinkCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|listGoogleAdsLinks}. + * @param error Error, if any + * @param [response] ListGoogleAdsLinksResponse + */ + type ListGoogleAdsLinksCallback = (error: (Error|null), response?: google.analytics.admin.v1beta.ListGoogleAdsLinksResponse) => void; + + /** + * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|getDataSharingSettings}. + * @param error Error, if any + * @param [response] DataSharingSettings + */ + type GetDataSharingSettingsCallback = (error: (Error|null), response?: google.analytics.admin.v1beta.DataSharingSettings) => void; + + /** + * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|getMeasurementProtocolSecret}. + * @param error Error, if any + * @param [response] MeasurementProtocolSecret + */ + type GetMeasurementProtocolSecretCallback = (error: (Error|null), response?: google.analytics.admin.v1beta.MeasurementProtocolSecret) => void; + + /** + * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|listMeasurementProtocolSecrets}. + * @param error Error, if any + * @param [response] ListMeasurementProtocolSecretsResponse + */ + type ListMeasurementProtocolSecretsCallback = (error: (Error|null), response?: google.analytics.admin.v1beta.ListMeasurementProtocolSecretsResponse) => void; + + /** + * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|createMeasurementProtocolSecret}. + * @param error Error, if any + * @param [response] MeasurementProtocolSecret + */ + type CreateMeasurementProtocolSecretCallback = (error: (Error|null), response?: google.analytics.admin.v1beta.MeasurementProtocolSecret) => void; + + /** + * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|deleteMeasurementProtocolSecret}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteMeasurementProtocolSecretCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|updateMeasurementProtocolSecret}. + * @param error Error, if any + * @param [response] MeasurementProtocolSecret + */ + type UpdateMeasurementProtocolSecretCallback = (error: (Error|null), response?: google.analytics.admin.v1beta.MeasurementProtocolSecret) => void; + + /** + * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|acknowledgeUserDataCollection}. + * @param error Error, if any + * @param [response] AcknowledgeUserDataCollectionResponse + */ + type AcknowledgeUserDataCollectionCallback = (error: (Error|null), response?: google.analytics.admin.v1beta.AcknowledgeUserDataCollectionResponse) => void; + + /** + * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|searchChangeHistoryEvents}. + * @param error Error, if any + * @param [response] SearchChangeHistoryEventsResponse + */ + type SearchChangeHistoryEventsCallback = (error: (Error|null), response?: google.analytics.admin.v1beta.SearchChangeHistoryEventsResponse) => void; + + /** + * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|createConversionEvent}. + * @param error Error, if any + * @param [response] ConversionEvent + */ + type CreateConversionEventCallback = (error: (Error|null), response?: google.analytics.admin.v1beta.ConversionEvent) => void; + + /** + * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|getConversionEvent}. + * @param error Error, if any + * @param [response] ConversionEvent + */ + type GetConversionEventCallback = (error: (Error|null), response?: google.analytics.admin.v1beta.ConversionEvent) => void; + + /** + * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|deleteConversionEvent}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteConversionEventCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|listConversionEvents}. + * @param error Error, if any + * @param [response] ListConversionEventsResponse + */ + type ListConversionEventsCallback = (error: (Error|null), response?: google.analytics.admin.v1beta.ListConversionEventsResponse) => void; + + /** + * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|createCustomDimension}. + * @param error Error, if any + * @param [response] CustomDimension + */ + type CreateCustomDimensionCallback = (error: (Error|null), response?: google.analytics.admin.v1beta.CustomDimension) => void; + + /** + * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|updateCustomDimension}. + * @param error Error, if any + * @param [response] CustomDimension + */ + type UpdateCustomDimensionCallback = (error: (Error|null), response?: google.analytics.admin.v1beta.CustomDimension) => void; + + /** + * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|listCustomDimensions}. + * @param error Error, if any + * @param [response] ListCustomDimensionsResponse + */ + type ListCustomDimensionsCallback = (error: (Error|null), response?: google.analytics.admin.v1beta.ListCustomDimensionsResponse) => void; + + /** + * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|archiveCustomDimension}. + * @param error Error, if any + * @param [response] Empty + */ + type ArchiveCustomDimensionCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|getCustomDimension}. + * @param error Error, if any + * @param [response] CustomDimension + */ + type GetCustomDimensionCallback = (error: (Error|null), response?: google.analytics.admin.v1beta.CustomDimension) => void; + + /** + * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|createCustomMetric}. + * @param error Error, if any + * @param [response] CustomMetric + */ + type CreateCustomMetricCallback = (error: (Error|null), response?: google.analytics.admin.v1beta.CustomMetric) => void; + + /** + * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|updateCustomMetric}. + * @param error Error, if any + * @param [response] CustomMetric + */ + type UpdateCustomMetricCallback = (error: (Error|null), response?: google.analytics.admin.v1beta.CustomMetric) => void; + + /** + * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|listCustomMetrics}. + * @param error Error, if any + * @param [response] ListCustomMetricsResponse + */ + type ListCustomMetricsCallback = (error: (Error|null), response?: google.analytics.admin.v1beta.ListCustomMetricsResponse) => void; + + /** + * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|archiveCustomMetric}. + * @param error Error, if any + * @param [response] Empty + */ + type ArchiveCustomMetricCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|getCustomMetric}. + * @param error Error, if any + * @param [response] CustomMetric + */ + type GetCustomMetricCallback = (error: (Error|null), response?: google.analytics.admin.v1beta.CustomMetric) => void; + + /** + * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|getDataRetentionSettings}. + * @param error Error, if any + * @param [response] DataRetentionSettings + */ + type GetDataRetentionSettingsCallback = (error: (Error|null), response?: google.analytics.admin.v1beta.DataRetentionSettings) => void; + + /** + * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|updateDataRetentionSettings}. + * @param error Error, if any + * @param [response] DataRetentionSettings + */ + type UpdateDataRetentionSettingsCallback = (error: (Error|null), response?: google.analytics.admin.v1beta.DataRetentionSettings) => void; + + /** + * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|createDataStream}. + * @param error Error, if any + * @param [response] DataStream + */ + type CreateDataStreamCallback = (error: (Error|null), response?: google.analytics.admin.v1beta.DataStream) => void; + + /** + * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|deleteDataStream}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteDataStreamCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|updateDataStream}. + * @param error Error, if any + * @param [response] DataStream + */ + type UpdateDataStreamCallback = (error: (Error|null), response?: google.analytics.admin.v1beta.DataStream) => void; + + /** + * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|listDataStreams}. + * @param error Error, if any + * @param [response] ListDataStreamsResponse + */ + type ListDataStreamsCallback = (error: (Error|null), response?: google.analytics.admin.v1beta.ListDataStreamsResponse) => void; + + /** + * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|getDataStream}. + * @param error Error, if any + * @param [response] DataStream + */ + type GetDataStreamCallback = (error: (Error|null), response?: google.analytics.admin.v1beta.DataStream) => void; + } + + /** Properties of a GetAccountRequest. */ + interface IGetAccountRequest { + + /** GetAccountRequest name */ + name?: (string|null); + } + + /** Represents a GetAccountRequest. */ + class GetAccountRequest implements IGetAccountRequest { + + /** + * Constructs a new GetAccountRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1beta.IGetAccountRequest); + + /** GetAccountRequest name. */ + public name: string; + + /** + * Creates a new GetAccountRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetAccountRequest instance + */ + public static create(properties?: google.analytics.admin.v1beta.IGetAccountRequest): google.analytics.admin.v1beta.GetAccountRequest; + + /** + * Encodes the specified GetAccountRequest message. Does not implicitly {@link google.analytics.admin.v1beta.GetAccountRequest.verify|verify} messages. + * @param message GetAccountRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1beta.IGetAccountRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetAccountRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.GetAccountRequest.verify|verify} messages. + * @param message GetAccountRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1beta.IGetAccountRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetAccountRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetAccountRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1beta.GetAccountRequest; + + /** + * Decodes a GetAccountRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetAccountRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1beta.GetAccountRequest; + + /** + * Verifies a GetAccountRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetAccountRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetAccountRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1beta.GetAccountRequest; + + /** + * Creates a plain object from a GetAccountRequest message. Also converts values to other types if specified. + * @param message GetAccountRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1beta.GetAccountRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetAccountRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetAccountRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListAccountsRequest. */ + interface IListAccountsRequest { + + /** ListAccountsRequest pageSize */ + pageSize?: (number|null); + + /** ListAccountsRequest pageToken */ + pageToken?: (string|null); + + /** ListAccountsRequest showDeleted */ + showDeleted?: (boolean|null); + } + + /** Represents a ListAccountsRequest. */ + class ListAccountsRequest implements IListAccountsRequest { + + /** + * Constructs a new ListAccountsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1beta.IListAccountsRequest); + + /** ListAccountsRequest pageSize. */ + public pageSize: number; + + /** ListAccountsRequest pageToken. */ + public pageToken: string; + + /** ListAccountsRequest showDeleted. */ + public showDeleted: boolean; + + /** + * Creates a new ListAccountsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListAccountsRequest instance + */ + public static create(properties?: google.analytics.admin.v1beta.IListAccountsRequest): google.analytics.admin.v1beta.ListAccountsRequest; + + /** + * Encodes the specified ListAccountsRequest message. Does not implicitly {@link google.analytics.admin.v1beta.ListAccountsRequest.verify|verify} messages. + * @param message ListAccountsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1beta.IListAccountsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListAccountsRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.ListAccountsRequest.verify|verify} messages. + * @param message ListAccountsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1beta.IListAccountsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListAccountsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListAccountsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1beta.ListAccountsRequest; + + /** + * Decodes a ListAccountsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListAccountsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1beta.ListAccountsRequest; + + /** + * Verifies a ListAccountsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListAccountsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListAccountsRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1beta.ListAccountsRequest; + + /** + * Creates a plain object from a ListAccountsRequest message. Also converts values to other types if specified. + * @param message ListAccountsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1beta.ListAccountsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListAccountsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListAccountsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListAccountsResponse. */ + interface IListAccountsResponse { + + /** ListAccountsResponse accounts */ + accounts?: (google.analytics.admin.v1beta.IAccount[]|null); + + /** ListAccountsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListAccountsResponse. */ + class ListAccountsResponse implements IListAccountsResponse { + + /** + * Constructs a new ListAccountsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1beta.IListAccountsResponse); + + /** ListAccountsResponse accounts. */ + public accounts: google.analytics.admin.v1beta.IAccount[]; + + /** ListAccountsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListAccountsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListAccountsResponse instance + */ + public static create(properties?: google.analytics.admin.v1beta.IListAccountsResponse): google.analytics.admin.v1beta.ListAccountsResponse; + + /** + * Encodes the specified ListAccountsResponse message. Does not implicitly {@link google.analytics.admin.v1beta.ListAccountsResponse.verify|verify} messages. + * @param message ListAccountsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1beta.IListAccountsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListAccountsResponse message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.ListAccountsResponse.verify|verify} messages. + * @param message ListAccountsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1beta.IListAccountsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListAccountsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListAccountsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1beta.ListAccountsResponse; + + /** + * Decodes a ListAccountsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListAccountsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1beta.ListAccountsResponse; + + /** + * Verifies a ListAccountsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListAccountsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListAccountsResponse + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1beta.ListAccountsResponse; + + /** + * Creates a plain object from a ListAccountsResponse message. Also converts values to other types if specified. + * @param message ListAccountsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1beta.ListAccountsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListAccountsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListAccountsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteAccountRequest. */ + interface IDeleteAccountRequest { + + /** DeleteAccountRequest name */ + name?: (string|null); + } + + /** Represents a DeleteAccountRequest. */ + class DeleteAccountRequest implements IDeleteAccountRequest { + + /** + * Constructs a new DeleteAccountRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1beta.IDeleteAccountRequest); + + /** DeleteAccountRequest name. */ + public name: string; + + /** + * Creates a new DeleteAccountRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteAccountRequest instance + */ + public static create(properties?: google.analytics.admin.v1beta.IDeleteAccountRequest): google.analytics.admin.v1beta.DeleteAccountRequest; + + /** + * Encodes the specified DeleteAccountRequest message. Does not implicitly {@link google.analytics.admin.v1beta.DeleteAccountRequest.verify|verify} messages. + * @param message DeleteAccountRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1beta.IDeleteAccountRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteAccountRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.DeleteAccountRequest.verify|verify} messages. + * @param message DeleteAccountRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1beta.IDeleteAccountRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteAccountRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteAccountRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1beta.DeleteAccountRequest; + + /** + * Decodes a DeleteAccountRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteAccountRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1beta.DeleteAccountRequest; + + /** + * Verifies a DeleteAccountRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteAccountRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteAccountRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1beta.DeleteAccountRequest; + + /** + * Creates a plain object from a DeleteAccountRequest message. Also converts values to other types if specified. + * @param message DeleteAccountRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1beta.DeleteAccountRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteAccountRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteAccountRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateAccountRequest. */ + interface IUpdateAccountRequest { + + /** UpdateAccountRequest account */ + account?: (google.analytics.admin.v1beta.IAccount|null); + + /** UpdateAccountRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + } + + /** Represents an UpdateAccountRequest. */ + class UpdateAccountRequest implements IUpdateAccountRequest { + + /** + * Constructs a new UpdateAccountRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1beta.IUpdateAccountRequest); + + /** UpdateAccountRequest account. */ + public account?: (google.analytics.admin.v1beta.IAccount|null); + + /** UpdateAccountRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** + * Creates a new UpdateAccountRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateAccountRequest instance + */ + public static create(properties?: google.analytics.admin.v1beta.IUpdateAccountRequest): google.analytics.admin.v1beta.UpdateAccountRequest; + + /** + * Encodes the specified UpdateAccountRequest message. Does not implicitly {@link google.analytics.admin.v1beta.UpdateAccountRequest.verify|verify} messages. + * @param message UpdateAccountRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1beta.IUpdateAccountRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateAccountRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.UpdateAccountRequest.verify|verify} messages. + * @param message UpdateAccountRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1beta.IUpdateAccountRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateAccountRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateAccountRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1beta.UpdateAccountRequest; + + /** + * Decodes an UpdateAccountRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateAccountRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1beta.UpdateAccountRequest; + + /** + * Verifies an UpdateAccountRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UpdateAccountRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateAccountRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1beta.UpdateAccountRequest; + + /** + * Creates a plain object from an UpdateAccountRequest message. Also converts values to other types if specified. + * @param message UpdateAccountRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1beta.UpdateAccountRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateAccountRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateAccountRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ProvisionAccountTicketRequest. */ + interface IProvisionAccountTicketRequest { + + /** ProvisionAccountTicketRequest account */ + account?: (google.analytics.admin.v1beta.IAccount|null); + + /** ProvisionAccountTicketRequest redirectUri */ + redirectUri?: (string|null); + } + + /** Represents a ProvisionAccountTicketRequest. */ + class ProvisionAccountTicketRequest implements IProvisionAccountTicketRequest { + + /** + * Constructs a new ProvisionAccountTicketRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1beta.IProvisionAccountTicketRequest); + + /** ProvisionAccountTicketRequest account. */ + public account?: (google.analytics.admin.v1beta.IAccount|null); + + /** ProvisionAccountTicketRequest redirectUri. */ + public redirectUri: string; + + /** + * Creates a new ProvisionAccountTicketRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ProvisionAccountTicketRequest instance + */ + public static create(properties?: google.analytics.admin.v1beta.IProvisionAccountTicketRequest): google.analytics.admin.v1beta.ProvisionAccountTicketRequest; + + /** + * Encodes the specified ProvisionAccountTicketRequest message. Does not implicitly {@link google.analytics.admin.v1beta.ProvisionAccountTicketRequest.verify|verify} messages. + * @param message ProvisionAccountTicketRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1beta.IProvisionAccountTicketRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ProvisionAccountTicketRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.ProvisionAccountTicketRequest.verify|verify} messages. + * @param message ProvisionAccountTicketRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1beta.IProvisionAccountTicketRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ProvisionAccountTicketRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ProvisionAccountTicketRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1beta.ProvisionAccountTicketRequest; + + /** + * Decodes a ProvisionAccountTicketRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ProvisionAccountTicketRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1beta.ProvisionAccountTicketRequest; + + /** + * Verifies a ProvisionAccountTicketRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ProvisionAccountTicketRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ProvisionAccountTicketRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1beta.ProvisionAccountTicketRequest; + + /** + * Creates a plain object from a ProvisionAccountTicketRequest message. Also converts values to other types if specified. + * @param message ProvisionAccountTicketRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1beta.ProvisionAccountTicketRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ProvisionAccountTicketRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ProvisionAccountTicketRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ProvisionAccountTicketResponse. */ + interface IProvisionAccountTicketResponse { + + /** ProvisionAccountTicketResponse accountTicketId */ + accountTicketId?: (string|null); + } + + /** Represents a ProvisionAccountTicketResponse. */ + class ProvisionAccountTicketResponse implements IProvisionAccountTicketResponse { + + /** + * Constructs a new ProvisionAccountTicketResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1beta.IProvisionAccountTicketResponse); + + /** ProvisionAccountTicketResponse accountTicketId. */ + public accountTicketId: string; + + /** + * Creates a new ProvisionAccountTicketResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ProvisionAccountTicketResponse instance + */ + public static create(properties?: google.analytics.admin.v1beta.IProvisionAccountTicketResponse): google.analytics.admin.v1beta.ProvisionAccountTicketResponse; + + /** + * Encodes the specified ProvisionAccountTicketResponse message. Does not implicitly {@link google.analytics.admin.v1beta.ProvisionAccountTicketResponse.verify|verify} messages. + * @param message ProvisionAccountTicketResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1beta.IProvisionAccountTicketResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ProvisionAccountTicketResponse message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.ProvisionAccountTicketResponse.verify|verify} messages. + * @param message ProvisionAccountTicketResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1beta.IProvisionAccountTicketResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ProvisionAccountTicketResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ProvisionAccountTicketResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1beta.ProvisionAccountTicketResponse; + + /** + * Decodes a ProvisionAccountTicketResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ProvisionAccountTicketResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1beta.ProvisionAccountTicketResponse; + + /** + * Verifies a ProvisionAccountTicketResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ProvisionAccountTicketResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ProvisionAccountTicketResponse + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1beta.ProvisionAccountTicketResponse; + + /** + * Creates a plain object from a ProvisionAccountTicketResponse message. Also converts values to other types if specified. + * @param message ProvisionAccountTicketResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1beta.ProvisionAccountTicketResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ProvisionAccountTicketResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ProvisionAccountTicketResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetPropertyRequest. */ + interface IGetPropertyRequest { + + /** GetPropertyRequest name */ + name?: (string|null); + } + + /** Represents a GetPropertyRequest. */ + class GetPropertyRequest implements IGetPropertyRequest { + + /** + * Constructs a new GetPropertyRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1beta.IGetPropertyRequest); + + /** GetPropertyRequest name. */ + public name: string; + + /** + * Creates a new GetPropertyRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetPropertyRequest instance + */ + public static create(properties?: google.analytics.admin.v1beta.IGetPropertyRequest): google.analytics.admin.v1beta.GetPropertyRequest; + + /** + * Encodes the specified GetPropertyRequest message. Does not implicitly {@link google.analytics.admin.v1beta.GetPropertyRequest.verify|verify} messages. + * @param message GetPropertyRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1beta.IGetPropertyRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetPropertyRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.GetPropertyRequest.verify|verify} messages. + * @param message GetPropertyRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1beta.IGetPropertyRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetPropertyRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetPropertyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1beta.GetPropertyRequest; + + /** + * Decodes a GetPropertyRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetPropertyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1beta.GetPropertyRequest; + + /** + * Verifies a GetPropertyRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetPropertyRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetPropertyRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1beta.GetPropertyRequest; + + /** + * Creates a plain object from a GetPropertyRequest message. Also converts values to other types if specified. + * @param message GetPropertyRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1beta.GetPropertyRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetPropertyRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetPropertyRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListPropertiesRequest. */ + interface IListPropertiesRequest { + + /** ListPropertiesRequest filter */ + filter?: (string|null); + + /** ListPropertiesRequest pageSize */ + pageSize?: (number|null); + + /** ListPropertiesRequest pageToken */ + pageToken?: (string|null); + + /** ListPropertiesRequest showDeleted */ + showDeleted?: (boolean|null); + } + + /** Represents a ListPropertiesRequest. */ + class ListPropertiesRequest implements IListPropertiesRequest { + + /** + * Constructs a new ListPropertiesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1beta.IListPropertiesRequest); + + /** ListPropertiesRequest filter. */ + public filter: string; + + /** ListPropertiesRequest pageSize. */ + public pageSize: number; + + /** ListPropertiesRequest pageToken. */ + public pageToken: string; + + /** ListPropertiesRequest showDeleted. */ + public showDeleted: boolean; + + /** + * Creates a new ListPropertiesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListPropertiesRequest instance + */ + public static create(properties?: google.analytics.admin.v1beta.IListPropertiesRequest): google.analytics.admin.v1beta.ListPropertiesRequest; + + /** + * Encodes the specified ListPropertiesRequest message. Does not implicitly {@link google.analytics.admin.v1beta.ListPropertiesRequest.verify|verify} messages. + * @param message ListPropertiesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1beta.IListPropertiesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListPropertiesRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.ListPropertiesRequest.verify|verify} messages. + * @param message ListPropertiesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1beta.IListPropertiesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListPropertiesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListPropertiesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1beta.ListPropertiesRequest; + + /** + * Decodes a ListPropertiesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListPropertiesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1beta.ListPropertiesRequest; + + /** + * Verifies a ListPropertiesRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListPropertiesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListPropertiesRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1beta.ListPropertiesRequest; + + /** + * Creates a plain object from a ListPropertiesRequest message. Also converts values to other types if specified. + * @param message ListPropertiesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1beta.ListPropertiesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListPropertiesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListPropertiesRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListPropertiesResponse. */ + interface IListPropertiesResponse { + + /** ListPropertiesResponse properties */ + properties?: (google.analytics.admin.v1beta.IProperty[]|null); + + /** ListPropertiesResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListPropertiesResponse. */ + class ListPropertiesResponse implements IListPropertiesResponse { + + /** + * Constructs a new ListPropertiesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1beta.IListPropertiesResponse); + + /** ListPropertiesResponse properties. */ + public properties: google.analytics.admin.v1beta.IProperty[]; + + /** ListPropertiesResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListPropertiesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListPropertiesResponse instance + */ + public static create(properties?: google.analytics.admin.v1beta.IListPropertiesResponse): google.analytics.admin.v1beta.ListPropertiesResponse; + + /** + * Encodes the specified ListPropertiesResponse message. Does not implicitly {@link google.analytics.admin.v1beta.ListPropertiesResponse.verify|verify} messages. + * @param message ListPropertiesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1beta.IListPropertiesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListPropertiesResponse message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.ListPropertiesResponse.verify|verify} messages. + * @param message ListPropertiesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1beta.IListPropertiesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListPropertiesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListPropertiesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1beta.ListPropertiesResponse; + + /** + * Decodes a ListPropertiesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListPropertiesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1beta.ListPropertiesResponse; + + /** + * Verifies a ListPropertiesResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListPropertiesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListPropertiesResponse + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1beta.ListPropertiesResponse; + + /** + * Creates a plain object from a ListPropertiesResponse message. Also converts values to other types if specified. + * @param message ListPropertiesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1beta.ListPropertiesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListPropertiesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListPropertiesResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdatePropertyRequest. */ + interface IUpdatePropertyRequest { + + /** UpdatePropertyRequest property */ + property?: (google.analytics.admin.v1beta.IProperty|null); + + /** UpdatePropertyRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + } + + /** Represents an UpdatePropertyRequest. */ + class UpdatePropertyRequest implements IUpdatePropertyRequest { + + /** + * Constructs a new UpdatePropertyRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1beta.IUpdatePropertyRequest); + + /** UpdatePropertyRequest property. */ + public property?: (google.analytics.admin.v1beta.IProperty|null); + + /** UpdatePropertyRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** + * Creates a new UpdatePropertyRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdatePropertyRequest instance + */ + public static create(properties?: google.analytics.admin.v1beta.IUpdatePropertyRequest): google.analytics.admin.v1beta.UpdatePropertyRequest; + + /** + * Encodes the specified UpdatePropertyRequest message. Does not implicitly {@link google.analytics.admin.v1beta.UpdatePropertyRequest.verify|verify} messages. + * @param message UpdatePropertyRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1beta.IUpdatePropertyRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdatePropertyRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.UpdatePropertyRequest.verify|verify} messages. + * @param message UpdatePropertyRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1beta.IUpdatePropertyRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdatePropertyRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdatePropertyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1beta.UpdatePropertyRequest; + + /** + * Decodes an UpdatePropertyRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdatePropertyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1beta.UpdatePropertyRequest; + + /** + * Verifies an UpdatePropertyRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UpdatePropertyRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdatePropertyRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1beta.UpdatePropertyRequest; + + /** + * Creates a plain object from an UpdatePropertyRequest message. Also converts values to other types if specified. + * @param message UpdatePropertyRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1beta.UpdatePropertyRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdatePropertyRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdatePropertyRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreatePropertyRequest. */ + interface ICreatePropertyRequest { + + /** CreatePropertyRequest property */ + property?: (google.analytics.admin.v1beta.IProperty|null); + } + + /** Represents a CreatePropertyRequest. */ + class CreatePropertyRequest implements ICreatePropertyRequest { + + /** + * Constructs a new CreatePropertyRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1beta.ICreatePropertyRequest); + + /** CreatePropertyRequest property. */ + public property?: (google.analytics.admin.v1beta.IProperty|null); + + /** + * Creates a new CreatePropertyRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreatePropertyRequest instance + */ + public static create(properties?: google.analytics.admin.v1beta.ICreatePropertyRequest): google.analytics.admin.v1beta.CreatePropertyRequest; + + /** + * Encodes the specified CreatePropertyRequest message. Does not implicitly {@link google.analytics.admin.v1beta.CreatePropertyRequest.verify|verify} messages. + * @param message CreatePropertyRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1beta.ICreatePropertyRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreatePropertyRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.CreatePropertyRequest.verify|verify} messages. + * @param message CreatePropertyRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1beta.ICreatePropertyRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreatePropertyRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreatePropertyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1beta.CreatePropertyRequest; + + /** + * Decodes a CreatePropertyRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreatePropertyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1beta.CreatePropertyRequest; + + /** + * Verifies a CreatePropertyRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreatePropertyRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreatePropertyRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1beta.CreatePropertyRequest; + + /** + * Creates a plain object from a CreatePropertyRequest message. Also converts values to other types if specified. + * @param message CreatePropertyRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1beta.CreatePropertyRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreatePropertyRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreatePropertyRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeletePropertyRequest. */ + interface IDeletePropertyRequest { + + /** DeletePropertyRequest name */ + name?: (string|null); + } + + /** Represents a DeletePropertyRequest. */ + class DeletePropertyRequest implements IDeletePropertyRequest { + + /** + * Constructs a new DeletePropertyRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1beta.IDeletePropertyRequest); + + /** DeletePropertyRequest name. */ + public name: string; + + /** + * Creates a new DeletePropertyRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeletePropertyRequest instance + */ + public static create(properties?: google.analytics.admin.v1beta.IDeletePropertyRequest): google.analytics.admin.v1beta.DeletePropertyRequest; + + /** + * Encodes the specified DeletePropertyRequest message. Does not implicitly {@link google.analytics.admin.v1beta.DeletePropertyRequest.verify|verify} messages. + * @param message DeletePropertyRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1beta.IDeletePropertyRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeletePropertyRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.DeletePropertyRequest.verify|verify} messages. + * @param message DeletePropertyRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1beta.IDeletePropertyRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeletePropertyRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeletePropertyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1beta.DeletePropertyRequest; + + /** + * Decodes a DeletePropertyRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeletePropertyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1beta.DeletePropertyRequest; + + /** + * Verifies a DeletePropertyRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeletePropertyRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeletePropertyRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1beta.DeletePropertyRequest; + + /** + * Creates a plain object from a DeletePropertyRequest message. Also converts values to other types if specified. + * @param message DeletePropertyRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1beta.DeletePropertyRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeletePropertyRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeletePropertyRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreateFirebaseLinkRequest. */ + interface ICreateFirebaseLinkRequest { + + /** CreateFirebaseLinkRequest parent */ + parent?: (string|null); + + /** CreateFirebaseLinkRequest firebaseLink */ + firebaseLink?: (google.analytics.admin.v1beta.IFirebaseLink|null); + } + + /** Represents a CreateFirebaseLinkRequest. */ + class CreateFirebaseLinkRequest implements ICreateFirebaseLinkRequest { + + /** + * Constructs a new CreateFirebaseLinkRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1beta.ICreateFirebaseLinkRequest); + + /** CreateFirebaseLinkRequest parent. */ + public parent: string; + + /** CreateFirebaseLinkRequest firebaseLink. */ + public firebaseLink?: (google.analytics.admin.v1beta.IFirebaseLink|null); + + /** + * Creates a new CreateFirebaseLinkRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateFirebaseLinkRequest instance + */ + public static create(properties?: google.analytics.admin.v1beta.ICreateFirebaseLinkRequest): google.analytics.admin.v1beta.CreateFirebaseLinkRequest; + + /** + * Encodes the specified CreateFirebaseLinkRequest message. Does not implicitly {@link google.analytics.admin.v1beta.CreateFirebaseLinkRequest.verify|verify} messages. + * @param message CreateFirebaseLinkRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1beta.ICreateFirebaseLinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateFirebaseLinkRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.CreateFirebaseLinkRequest.verify|verify} messages. + * @param message CreateFirebaseLinkRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1beta.ICreateFirebaseLinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateFirebaseLinkRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateFirebaseLinkRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1beta.CreateFirebaseLinkRequest; + + /** + * Decodes a CreateFirebaseLinkRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateFirebaseLinkRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1beta.CreateFirebaseLinkRequest; + + /** + * Verifies a CreateFirebaseLinkRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateFirebaseLinkRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateFirebaseLinkRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1beta.CreateFirebaseLinkRequest; + + /** + * Creates a plain object from a CreateFirebaseLinkRequest message. Also converts values to other types if specified. + * @param message CreateFirebaseLinkRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1beta.CreateFirebaseLinkRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateFirebaseLinkRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateFirebaseLinkRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteFirebaseLinkRequest. */ + interface IDeleteFirebaseLinkRequest { + + /** DeleteFirebaseLinkRequest name */ + name?: (string|null); + } + + /** Represents a DeleteFirebaseLinkRequest. */ + class DeleteFirebaseLinkRequest implements IDeleteFirebaseLinkRequest { + + /** + * Constructs a new DeleteFirebaseLinkRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1beta.IDeleteFirebaseLinkRequest); + + /** DeleteFirebaseLinkRequest name. */ + public name: string; + + /** + * Creates a new DeleteFirebaseLinkRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteFirebaseLinkRequest instance + */ + public static create(properties?: google.analytics.admin.v1beta.IDeleteFirebaseLinkRequest): google.analytics.admin.v1beta.DeleteFirebaseLinkRequest; + + /** + * Encodes the specified DeleteFirebaseLinkRequest message. Does not implicitly {@link google.analytics.admin.v1beta.DeleteFirebaseLinkRequest.verify|verify} messages. + * @param message DeleteFirebaseLinkRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1beta.IDeleteFirebaseLinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteFirebaseLinkRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.DeleteFirebaseLinkRequest.verify|verify} messages. + * @param message DeleteFirebaseLinkRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1beta.IDeleteFirebaseLinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteFirebaseLinkRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteFirebaseLinkRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1beta.DeleteFirebaseLinkRequest; + + /** + * Decodes a DeleteFirebaseLinkRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteFirebaseLinkRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1beta.DeleteFirebaseLinkRequest; + + /** + * Verifies a DeleteFirebaseLinkRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteFirebaseLinkRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteFirebaseLinkRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1beta.DeleteFirebaseLinkRequest; + + /** + * Creates a plain object from a DeleteFirebaseLinkRequest message. Also converts values to other types if specified. + * @param message DeleteFirebaseLinkRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1beta.DeleteFirebaseLinkRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteFirebaseLinkRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteFirebaseLinkRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListFirebaseLinksRequest. */ + interface IListFirebaseLinksRequest { + + /** ListFirebaseLinksRequest parent */ + parent?: (string|null); + + /** ListFirebaseLinksRequest pageSize */ + pageSize?: (number|null); + + /** ListFirebaseLinksRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListFirebaseLinksRequest. */ + class ListFirebaseLinksRequest implements IListFirebaseLinksRequest { + + /** + * Constructs a new ListFirebaseLinksRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1beta.IListFirebaseLinksRequest); + + /** ListFirebaseLinksRequest parent. */ + public parent: string; + + /** ListFirebaseLinksRequest pageSize. */ + public pageSize: number; + + /** ListFirebaseLinksRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListFirebaseLinksRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListFirebaseLinksRequest instance + */ + public static create(properties?: google.analytics.admin.v1beta.IListFirebaseLinksRequest): google.analytics.admin.v1beta.ListFirebaseLinksRequest; + + /** + * Encodes the specified ListFirebaseLinksRequest message. Does not implicitly {@link google.analytics.admin.v1beta.ListFirebaseLinksRequest.verify|verify} messages. + * @param message ListFirebaseLinksRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1beta.IListFirebaseLinksRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListFirebaseLinksRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.ListFirebaseLinksRequest.verify|verify} messages. + * @param message ListFirebaseLinksRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1beta.IListFirebaseLinksRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListFirebaseLinksRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListFirebaseLinksRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1beta.ListFirebaseLinksRequest; + + /** + * Decodes a ListFirebaseLinksRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListFirebaseLinksRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1beta.ListFirebaseLinksRequest; + + /** + * Verifies a ListFirebaseLinksRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListFirebaseLinksRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListFirebaseLinksRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1beta.ListFirebaseLinksRequest; + + /** + * Creates a plain object from a ListFirebaseLinksRequest message. Also converts values to other types if specified. + * @param message ListFirebaseLinksRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1beta.ListFirebaseLinksRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListFirebaseLinksRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListFirebaseLinksRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListFirebaseLinksResponse. */ + interface IListFirebaseLinksResponse { + + /** ListFirebaseLinksResponse firebaseLinks */ + firebaseLinks?: (google.analytics.admin.v1beta.IFirebaseLink[]|null); + + /** ListFirebaseLinksResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListFirebaseLinksResponse. */ + class ListFirebaseLinksResponse implements IListFirebaseLinksResponse { + + /** + * Constructs a new ListFirebaseLinksResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1beta.IListFirebaseLinksResponse); + + /** ListFirebaseLinksResponse firebaseLinks. */ + public firebaseLinks: google.analytics.admin.v1beta.IFirebaseLink[]; + + /** ListFirebaseLinksResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListFirebaseLinksResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListFirebaseLinksResponse instance + */ + public static create(properties?: google.analytics.admin.v1beta.IListFirebaseLinksResponse): google.analytics.admin.v1beta.ListFirebaseLinksResponse; + + /** + * Encodes the specified ListFirebaseLinksResponse message. Does not implicitly {@link google.analytics.admin.v1beta.ListFirebaseLinksResponse.verify|verify} messages. + * @param message ListFirebaseLinksResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1beta.IListFirebaseLinksResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListFirebaseLinksResponse message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.ListFirebaseLinksResponse.verify|verify} messages. + * @param message ListFirebaseLinksResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1beta.IListFirebaseLinksResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListFirebaseLinksResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListFirebaseLinksResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1beta.ListFirebaseLinksResponse; + + /** + * Decodes a ListFirebaseLinksResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListFirebaseLinksResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1beta.ListFirebaseLinksResponse; + + /** + * Verifies a ListFirebaseLinksResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListFirebaseLinksResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListFirebaseLinksResponse + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1beta.ListFirebaseLinksResponse; + + /** + * Creates a plain object from a ListFirebaseLinksResponse message. Also converts values to other types if specified. + * @param message ListFirebaseLinksResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1beta.ListFirebaseLinksResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListFirebaseLinksResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListFirebaseLinksResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreateGoogleAdsLinkRequest. */ + interface ICreateGoogleAdsLinkRequest { + + /** CreateGoogleAdsLinkRequest parent */ + parent?: (string|null); + + /** CreateGoogleAdsLinkRequest googleAdsLink */ + googleAdsLink?: (google.analytics.admin.v1beta.IGoogleAdsLink|null); + } + + /** Represents a CreateGoogleAdsLinkRequest. */ + class CreateGoogleAdsLinkRequest implements ICreateGoogleAdsLinkRequest { + + /** + * Constructs a new CreateGoogleAdsLinkRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1beta.ICreateGoogleAdsLinkRequest); + + /** CreateGoogleAdsLinkRequest parent. */ + public parent: string; + + /** CreateGoogleAdsLinkRequest googleAdsLink. */ + public googleAdsLink?: (google.analytics.admin.v1beta.IGoogleAdsLink|null); + + /** + * Creates a new CreateGoogleAdsLinkRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateGoogleAdsLinkRequest instance + */ + public static create(properties?: google.analytics.admin.v1beta.ICreateGoogleAdsLinkRequest): google.analytics.admin.v1beta.CreateGoogleAdsLinkRequest; + + /** + * Encodes the specified CreateGoogleAdsLinkRequest message. Does not implicitly {@link google.analytics.admin.v1beta.CreateGoogleAdsLinkRequest.verify|verify} messages. + * @param message CreateGoogleAdsLinkRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1beta.ICreateGoogleAdsLinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateGoogleAdsLinkRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.CreateGoogleAdsLinkRequest.verify|verify} messages. + * @param message CreateGoogleAdsLinkRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1beta.ICreateGoogleAdsLinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateGoogleAdsLinkRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateGoogleAdsLinkRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1beta.CreateGoogleAdsLinkRequest; + + /** + * Decodes a CreateGoogleAdsLinkRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateGoogleAdsLinkRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1beta.CreateGoogleAdsLinkRequest; + + /** + * Verifies a CreateGoogleAdsLinkRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateGoogleAdsLinkRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateGoogleAdsLinkRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1beta.CreateGoogleAdsLinkRequest; + + /** + * Creates a plain object from a CreateGoogleAdsLinkRequest message. Also converts values to other types if specified. + * @param message CreateGoogleAdsLinkRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1beta.CreateGoogleAdsLinkRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateGoogleAdsLinkRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateGoogleAdsLinkRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateGoogleAdsLinkRequest. */ + interface IUpdateGoogleAdsLinkRequest { + + /** UpdateGoogleAdsLinkRequest googleAdsLink */ + googleAdsLink?: (google.analytics.admin.v1beta.IGoogleAdsLink|null); + + /** UpdateGoogleAdsLinkRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + } + + /** Represents an UpdateGoogleAdsLinkRequest. */ + class UpdateGoogleAdsLinkRequest implements IUpdateGoogleAdsLinkRequest { + + /** + * Constructs a new UpdateGoogleAdsLinkRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1beta.IUpdateGoogleAdsLinkRequest); + + /** UpdateGoogleAdsLinkRequest googleAdsLink. */ + public googleAdsLink?: (google.analytics.admin.v1beta.IGoogleAdsLink|null); + + /** UpdateGoogleAdsLinkRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** + * Creates a new UpdateGoogleAdsLinkRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateGoogleAdsLinkRequest instance + */ + public static create(properties?: google.analytics.admin.v1beta.IUpdateGoogleAdsLinkRequest): google.analytics.admin.v1beta.UpdateGoogleAdsLinkRequest; + + /** + * Encodes the specified UpdateGoogleAdsLinkRequest message. Does not implicitly {@link google.analytics.admin.v1beta.UpdateGoogleAdsLinkRequest.verify|verify} messages. + * @param message UpdateGoogleAdsLinkRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1beta.IUpdateGoogleAdsLinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateGoogleAdsLinkRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.UpdateGoogleAdsLinkRequest.verify|verify} messages. + * @param message UpdateGoogleAdsLinkRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1beta.IUpdateGoogleAdsLinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateGoogleAdsLinkRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateGoogleAdsLinkRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1beta.UpdateGoogleAdsLinkRequest; + + /** + * Decodes an UpdateGoogleAdsLinkRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateGoogleAdsLinkRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1beta.UpdateGoogleAdsLinkRequest; + + /** + * Verifies an UpdateGoogleAdsLinkRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UpdateGoogleAdsLinkRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateGoogleAdsLinkRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1beta.UpdateGoogleAdsLinkRequest; + + /** + * Creates a plain object from an UpdateGoogleAdsLinkRequest message. Also converts values to other types if specified. + * @param message UpdateGoogleAdsLinkRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1beta.UpdateGoogleAdsLinkRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateGoogleAdsLinkRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateGoogleAdsLinkRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteGoogleAdsLinkRequest. */ + interface IDeleteGoogleAdsLinkRequest { + + /** DeleteGoogleAdsLinkRequest name */ + name?: (string|null); + } + + /** Represents a DeleteGoogleAdsLinkRequest. */ + class DeleteGoogleAdsLinkRequest implements IDeleteGoogleAdsLinkRequest { + + /** + * Constructs a new DeleteGoogleAdsLinkRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1beta.IDeleteGoogleAdsLinkRequest); + + /** DeleteGoogleAdsLinkRequest name. */ + public name: string; + + /** + * Creates a new DeleteGoogleAdsLinkRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteGoogleAdsLinkRequest instance + */ + public static create(properties?: google.analytics.admin.v1beta.IDeleteGoogleAdsLinkRequest): google.analytics.admin.v1beta.DeleteGoogleAdsLinkRequest; + + /** + * Encodes the specified DeleteGoogleAdsLinkRequest message. Does not implicitly {@link google.analytics.admin.v1beta.DeleteGoogleAdsLinkRequest.verify|verify} messages. + * @param message DeleteGoogleAdsLinkRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1beta.IDeleteGoogleAdsLinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteGoogleAdsLinkRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.DeleteGoogleAdsLinkRequest.verify|verify} messages. + * @param message DeleteGoogleAdsLinkRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1beta.IDeleteGoogleAdsLinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteGoogleAdsLinkRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteGoogleAdsLinkRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1beta.DeleteGoogleAdsLinkRequest; + + /** + * Decodes a DeleteGoogleAdsLinkRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteGoogleAdsLinkRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1beta.DeleteGoogleAdsLinkRequest; + + /** + * Verifies a DeleteGoogleAdsLinkRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteGoogleAdsLinkRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteGoogleAdsLinkRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1beta.DeleteGoogleAdsLinkRequest; + + /** + * Creates a plain object from a DeleteGoogleAdsLinkRequest message. Also converts values to other types if specified. + * @param message DeleteGoogleAdsLinkRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1beta.DeleteGoogleAdsLinkRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteGoogleAdsLinkRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteGoogleAdsLinkRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListGoogleAdsLinksRequest. */ + interface IListGoogleAdsLinksRequest { + + /** ListGoogleAdsLinksRequest parent */ + parent?: (string|null); + + /** ListGoogleAdsLinksRequest pageSize */ + pageSize?: (number|null); + + /** ListGoogleAdsLinksRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListGoogleAdsLinksRequest. */ + class ListGoogleAdsLinksRequest implements IListGoogleAdsLinksRequest { + + /** + * Constructs a new ListGoogleAdsLinksRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1beta.IListGoogleAdsLinksRequest); + + /** ListGoogleAdsLinksRequest parent. */ + public parent: string; + + /** ListGoogleAdsLinksRequest pageSize. */ + public pageSize: number; + + /** ListGoogleAdsLinksRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListGoogleAdsLinksRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListGoogleAdsLinksRequest instance + */ + public static create(properties?: google.analytics.admin.v1beta.IListGoogleAdsLinksRequest): google.analytics.admin.v1beta.ListGoogleAdsLinksRequest; + + /** + * Encodes the specified ListGoogleAdsLinksRequest message. Does not implicitly {@link google.analytics.admin.v1beta.ListGoogleAdsLinksRequest.verify|verify} messages. + * @param message ListGoogleAdsLinksRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1beta.IListGoogleAdsLinksRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListGoogleAdsLinksRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.ListGoogleAdsLinksRequest.verify|verify} messages. + * @param message ListGoogleAdsLinksRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1beta.IListGoogleAdsLinksRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListGoogleAdsLinksRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListGoogleAdsLinksRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1beta.ListGoogleAdsLinksRequest; + + /** + * Decodes a ListGoogleAdsLinksRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListGoogleAdsLinksRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1beta.ListGoogleAdsLinksRequest; + + /** + * Verifies a ListGoogleAdsLinksRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListGoogleAdsLinksRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListGoogleAdsLinksRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1beta.ListGoogleAdsLinksRequest; + + /** + * Creates a plain object from a ListGoogleAdsLinksRequest message. Also converts values to other types if specified. + * @param message ListGoogleAdsLinksRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1beta.ListGoogleAdsLinksRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListGoogleAdsLinksRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListGoogleAdsLinksRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListGoogleAdsLinksResponse. */ + interface IListGoogleAdsLinksResponse { + + /** ListGoogleAdsLinksResponse googleAdsLinks */ + googleAdsLinks?: (google.analytics.admin.v1beta.IGoogleAdsLink[]|null); + + /** ListGoogleAdsLinksResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListGoogleAdsLinksResponse. */ + class ListGoogleAdsLinksResponse implements IListGoogleAdsLinksResponse { + + /** + * Constructs a new ListGoogleAdsLinksResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1beta.IListGoogleAdsLinksResponse); + + /** ListGoogleAdsLinksResponse googleAdsLinks. */ + public googleAdsLinks: google.analytics.admin.v1beta.IGoogleAdsLink[]; + + /** ListGoogleAdsLinksResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListGoogleAdsLinksResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListGoogleAdsLinksResponse instance + */ + public static create(properties?: google.analytics.admin.v1beta.IListGoogleAdsLinksResponse): google.analytics.admin.v1beta.ListGoogleAdsLinksResponse; + + /** + * Encodes the specified ListGoogleAdsLinksResponse message. Does not implicitly {@link google.analytics.admin.v1beta.ListGoogleAdsLinksResponse.verify|verify} messages. + * @param message ListGoogleAdsLinksResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1beta.IListGoogleAdsLinksResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListGoogleAdsLinksResponse message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.ListGoogleAdsLinksResponse.verify|verify} messages. + * @param message ListGoogleAdsLinksResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1beta.IListGoogleAdsLinksResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListGoogleAdsLinksResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListGoogleAdsLinksResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1beta.ListGoogleAdsLinksResponse; + + /** + * Decodes a ListGoogleAdsLinksResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListGoogleAdsLinksResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1beta.ListGoogleAdsLinksResponse; + + /** + * Verifies a ListGoogleAdsLinksResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListGoogleAdsLinksResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListGoogleAdsLinksResponse + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1beta.ListGoogleAdsLinksResponse; + + /** + * Creates a plain object from a ListGoogleAdsLinksResponse message. Also converts values to other types if specified. + * @param message ListGoogleAdsLinksResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1beta.ListGoogleAdsLinksResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListGoogleAdsLinksResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListGoogleAdsLinksResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetDataSharingSettingsRequest. */ + interface IGetDataSharingSettingsRequest { + + /** GetDataSharingSettingsRequest name */ + name?: (string|null); + } + + /** Represents a GetDataSharingSettingsRequest. */ + class GetDataSharingSettingsRequest implements IGetDataSharingSettingsRequest { + + /** + * Constructs a new GetDataSharingSettingsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1beta.IGetDataSharingSettingsRequest); + + /** GetDataSharingSettingsRequest name. */ + public name: string; + + /** + * Creates a new GetDataSharingSettingsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetDataSharingSettingsRequest instance + */ + public static create(properties?: google.analytics.admin.v1beta.IGetDataSharingSettingsRequest): google.analytics.admin.v1beta.GetDataSharingSettingsRequest; + + /** + * Encodes the specified GetDataSharingSettingsRequest message. Does not implicitly {@link google.analytics.admin.v1beta.GetDataSharingSettingsRequest.verify|verify} messages. + * @param message GetDataSharingSettingsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1beta.IGetDataSharingSettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetDataSharingSettingsRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.GetDataSharingSettingsRequest.verify|verify} messages. + * @param message GetDataSharingSettingsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1beta.IGetDataSharingSettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetDataSharingSettingsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetDataSharingSettingsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1beta.GetDataSharingSettingsRequest; + + /** + * Decodes a GetDataSharingSettingsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetDataSharingSettingsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1beta.GetDataSharingSettingsRequest; + + /** + * Verifies a GetDataSharingSettingsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetDataSharingSettingsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetDataSharingSettingsRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1beta.GetDataSharingSettingsRequest; + + /** + * Creates a plain object from a GetDataSharingSettingsRequest message. Also converts values to other types if specified. + * @param message GetDataSharingSettingsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1beta.GetDataSharingSettingsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetDataSharingSettingsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetDataSharingSettingsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListAccountSummariesRequest. */ + interface IListAccountSummariesRequest { + + /** ListAccountSummariesRequest pageSize */ + pageSize?: (number|null); + + /** ListAccountSummariesRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListAccountSummariesRequest. */ + class ListAccountSummariesRequest implements IListAccountSummariesRequest { + + /** + * Constructs a new ListAccountSummariesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1beta.IListAccountSummariesRequest); + + /** ListAccountSummariesRequest pageSize. */ + public pageSize: number; + + /** ListAccountSummariesRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListAccountSummariesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListAccountSummariesRequest instance + */ + public static create(properties?: google.analytics.admin.v1beta.IListAccountSummariesRequest): google.analytics.admin.v1beta.ListAccountSummariesRequest; + + /** + * Encodes the specified ListAccountSummariesRequest message. Does not implicitly {@link google.analytics.admin.v1beta.ListAccountSummariesRequest.verify|verify} messages. + * @param message ListAccountSummariesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1beta.IListAccountSummariesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListAccountSummariesRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.ListAccountSummariesRequest.verify|verify} messages. + * @param message ListAccountSummariesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1beta.IListAccountSummariesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListAccountSummariesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListAccountSummariesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1beta.ListAccountSummariesRequest; + + /** + * Decodes a ListAccountSummariesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListAccountSummariesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1beta.ListAccountSummariesRequest; + + /** + * Verifies a ListAccountSummariesRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListAccountSummariesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListAccountSummariesRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1beta.ListAccountSummariesRequest; + + /** + * Creates a plain object from a ListAccountSummariesRequest message. Also converts values to other types if specified. + * @param message ListAccountSummariesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1beta.ListAccountSummariesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListAccountSummariesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListAccountSummariesRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListAccountSummariesResponse. */ + interface IListAccountSummariesResponse { + + /** ListAccountSummariesResponse accountSummaries */ + accountSummaries?: (google.analytics.admin.v1beta.IAccountSummary[]|null); + + /** ListAccountSummariesResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListAccountSummariesResponse. */ + class ListAccountSummariesResponse implements IListAccountSummariesResponse { + + /** + * Constructs a new ListAccountSummariesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1beta.IListAccountSummariesResponse); + + /** ListAccountSummariesResponse accountSummaries. */ + public accountSummaries: google.analytics.admin.v1beta.IAccountSummary[]; + + /** ListAccountSummariesResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListAccountSummariesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListAccountSummariesResponse instance + */ + public static create(properties?: google.analytics.admin.v1beta.IListAccountSummariesResponse): google.analytics.admin.v1beta.ListAccountSummariesResponse; + + /** + * Encodes the specified ListAccountSummariesResponse message. Does not implicitly {@link google.analytics.admin.v1beta.ListAccountSummariesResponse.verify|verify} messages. + * @param message ListAccountSummariesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1beta.IListAccountSummariesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListAccountSummariesResponse message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.ListAccountSummariesResponse.verify|verify} messages. + * @param message ListAccountSummariesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1beta.IListAccountSummariesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListAccountSummariesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListAccountSummariesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1beta.ListAccountSummariesResponse; + + /** + * Decodes a ListAccountSummariesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListAccountSummariesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1beta.ListAccountSummariesResponse; + + /** + * Verifies a ListAccountSummariesResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListAccountSummariesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListAccountSummariesResponse + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1beta.ListAccountSummariesResponse; + + /** + * Creates a plain object from a ListAccountSummariesResponse message. Also converts values to other types if specified. + * @param message ListAccountSummariesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1beta.ListAccountSummariesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListAccountSummariesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListAccountSummariesResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AcknowledgeUserDataCollectionRequest. */ + interface IAcknowledgeUserDataCollectionRequest { + + /** AcknowledgeUserDataCollectionRequest property */ + property?: (string|null); + + /** AcknowledgeUserDataCollectionRequest acknowledgement */ + acknowledgement?: (string|null); + } + + /** Represents an AcknowledgeUserDataCollectionRequest. */ + class AcknowledgeUserDataCollectionRequest implements IAcknowledgeUserDataCollectionRequest { + + /** + * Constructs a new AcknowledgeUserDataCollectionRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1beta.IAcknowledgeUserDataCollectionRequest); + + /** AcknowledgeUserDataCollectionRequest property. */ + public property: string; + + /** AcknowledgeUserDataCollectionRequest acknowledgement. */ + public acknowledgement: string; + + /** + * Creates a new AcknowledgeUserDataCollectionRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns AcknowledgeUserDataCollectionRequest instance + */ + public static create(properties?: google.analytics.admin.v1beta.IAcknowledgeUserDataCollectionRequest): google.analytics.admin.v1beta.AcknowledgeUserDataCollectionRequest; + + /** + * Encodes the specified AcknowledgeUserDataCollectionRequest message. Does not implicitly {@link google.analytics.admin.v1beta.AcknowledgeUserDataCollectionRequest.verify|verify} messages. + * @param message AcknowledgeUserDataCollectionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1beta.IAcknowledgeUserDataCollectionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AcknowledgeUserDataCollectionRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.AcknowledgeUserDataCollectionRequest.verify|verify} messages. + * @param message AcknowledgeUserDataCollectionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1beta.IAcknowledgeUserDataCollectionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AcknowledgeUserDataCollectionRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AcknowledgeUserDataCollectionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1beta.AcknowledgeUserDataCollectionRequest; + + /** + * Decodes an AcknowledgeUserDataCollectionRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AcknowledgeUserDataCollectionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1beta.AcknowledgeUserDataCollectionRequest; + + /** + * Verifies an AcknowledgeUserDataCollectionRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AcknowledgeUserDataCollectionRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AcknowledgeUserDataCollectionRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1beta.AcknowledgeUserDataCollectionRequest; + + /** + * Creates a plain object from an AcknowledgeUserDataCollectionRequest message. Also converts values to other types if specified. + * @param message AcknowledgeUserDataCollectionRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1beta.AcknowledgeUserDataCollectionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AcknowledgeUserDataCollectionRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AcknowledgeUserDataCollectionRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AcknowledgeUserDataCollectionResponse. */ + interface IAcknowledgeUserDataCollectionResponse { + } + + /** Represents an AcknowledgeUserDataCollectionResponse. */ + class AcknowledgeUserDataCollectionResponse implements IAcknowledgeUserDataCollectionResponse { + + /** + * Constructs a new AcknowledgeUserDataCollectionResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1beta.IAcknowledgeUserDataCollectionResponse); + + /** + * Creates a new AcknowledgeUserDataCollectionResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns AcknowledgeUserDataCollectionResponse instance + */ + public static create(properties?: google.analytics.admin.v1beta.IAcknowledgeUserDataCollectionResponse): google.analytics.admin.v1beta.AcknowledgeUserDataCollectionResponse; + + /** + * Encodes the specified AcknowledgeUserDataCollectionResponse message. Does not implicitly {@link google.analytics.admin.v1beta.AcknowledgeUserDataCollectionResponse.verify|verify} messages. + * @param message AcknowledgeUserDataCollectionResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1beta.IAcknowledgeUserDataCollectionResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AcknowledgeUserDataCollectionResponse message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.AcknowledgeUserDataCollectionResponse.verify|verify} messages. + * @param message AcknowledgeUserDataCollectionResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1beta.IAcknowledgeUserDataCollectionResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AcknowledgeUserDataCollectionResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AcknowledgeUserDataCollectionResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1beta.AcknowledgeUserDataCollectionResponse; + + /** + * Decodes an AcknowledgeUserDataCollectionResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AcknowledgeUserDataCollectionResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1beta.AcknowledgeUserDataCollectionResponse; + + /** + * Verifies an AcknowledgeUserDataCollectionResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AcknowledgeUserDataCollectionResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AcknowledgeUserDataCollectionResponse + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1beta.AcknowledgeUserDataCollectionResponse; + + /** + * Creates a plain object from an AcknowledgeUserDataCollectionResponse message. Also converts values to other types if specified. + * @param message AcknowledgeUserDataCollectionResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1beta.AcknowledgeUserDataCollectionResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AcknowledgeUserDataCollectionResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AcknowledgeUserDataCollectionResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SearchChangeHistoryEventsRequest. */ + interface ISearchChangeHistoryEventsRequest { + + /** SearchChangeHistoryEventsRequest account */ + account?: (string|null); + + /** SearchChangeHistoryEventsRequest property */ + property?: (string|null); + + /** SearchChangeHistoryEventsRequest resourceType */ + resourceType?: (google.analytics.admin.v1beta.ChangeHistoryResourceType[]|null); + + /** SearchChangeHistoryEventsRequest action */ + action?: (google.analytics.admin.v1beta.ActionType[]|null); + + /** SearchChangeHistoryEventsRequest actorEmail */ + actorEmail?: (string[]|null); + + /** SearchChangeHistoryEventsRequest earliestChangeTime */ + earliestChangeTime?: (google.protobuf.ITimestamp|null); + + /** SearchChangeHistoryEventsRequest latestChangeTime */ + latestChangeTime?: (google.protobuf.ITimestamp|null); + + /** SearchChangeHistoryEventsRequest pageSize */ + pageSize?: (number|null); + + /** SearchChangeHistoryEventsRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a SearchChangeHistoryEventsRequest. */ + class SearchChangeHistoryEventsRequest implements ISearchChangeHistoryEventsRequest { + + /** + * Constructs a new SearchChangeHistoryEventsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1beta.ISearchChangeHistoryEventsRequest); + + /** SearchChangeHistoryEventsRequest account. */ + public account: string; + + /** SearchChangeHistoryEventsRequest property. */ + public property: string; + + /** SearchChangeHistoryEventsRequest resourceType. */ + public resourceType: google.analytics.admin.v1beta.ChangeHistoryResourceType[]; + + /** SearchChangeHistoryEventsRequest action. */ + public action: google.analytics.admin.v1beta.ActionType[]; + + /** SearchChangeHistoryEventsRequest actorEmail. */ + public actorEmail: string[]; + + /** SearchChangeHistoryEventsRequest earliestChangeTime. */ + public earliestChangeTime?: (google.protobuf.ITimestamp|null); + + /** SearchChangeHistoryEventsRequest latestChangeTime. */ + public latestChangeTime?: (google.protobuf.ITimestamp|null); + + /** SearchChangeHistoryEventsRequest pageSize. */ + public pageSize: number; + + /** SearchChangeHistoryEventsRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new SearchChangeHistoryEventsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns SearchChangeHistoryEventsRequest instance + */ + public static create(properties?: google.analytics.admin.v1beta.ISearchChangeHistoryEventsRequest): google.analytics.admin.v1beta.SearchChangeHistoryEventsRequest; + + /** + * Encodes the specified SearchChangeHistoryEventsRequest message. Does not implicitly {@link google.analytics.admin.v1beta.SearchChangeHistoryEventsRequest.verify|verify} messages. + * @param message SearchChangeHistoryEventsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1beta.ISearchChangeHistoryEventsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SearchChangeHistoryEventsRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.SearchChangeHistoryEventsRequest.verify|verify} messages. + * @param message SearchChangeHistoryEventsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1beta.ISearchChangeHistoryEventsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SearchChangeHistoryEventsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SearchChangeHistoryEventsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1beta.SearchChangeHistoryEventsRequest; + + /** + * Decodes a SearchChangeHistoryEventsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SearchChangeHistoryEventsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1beta.SearchChangeHistoryEventsRequest; + + /** + * Verifies a SearchChangeHistoryEventsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SearchChangeHistoryEventsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SearchChangeHistoryEventsRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1beta.SearchChangeHistoryEventsRequest; + + /** + * Creates a plain object from a SearchChangeHistoryEventsRequest message. Also converts values to other types if specified. + * @param message SearchChangeHistoryEventsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1beta.SearchChangeHistoryEventsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SearchChangeHistoryEventsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SearchChangeHistoryEventsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SearchChangeHistoryEventsResponse. */ + interface ISearchChangeHistoryEventsResponse { + + /** SearchChangeHistoryEventsResponse changeHistoryEvents */ + changeHistoryEvents?: (google.analytics.admin.v1beta.IChangeHistoryEvent[]|null); + + /** SearchChangeHistoryEventsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a SearchChangeHistoryEventsResponse. */ + class SearchChangeHistoryEventsResponse implements ISearchChangeHistoryEventsResponse { + + /** + * Constructs a new SearchChangeHistoryEventsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1beta.ISearchChangeHistoryEventsResponse); + + /** SearchChangeHistoryEventsResponse changeHistoryEvents. */ + public changeHistoryEvents: google.analytics.admin.v1beta.IChangeHistoryEvent[]; + + /** SearchChangeHistoryEventsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new SearchChangeHistoryEventsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns SearchChangeHistoryEventsResponse instance + */ + public static create(properties?: google.analytics.admin.v1beta.ISearchChangeHistoryEventsResponse): google.analytics.admin.v1beta.SearchChangeHistoryEventsResponse; + + /** + * Encodes the specified SearchChangeHistoryEventsResponse message. Does not implicitly {@link google.analytics.admin.v1beta.SearchChangeHistoryEventsResponse.verify|verify} messages. + * @param message SearchChangeHistoryEventsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1beta.ISearchChangeHistoryEventsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SearchChangeHistoryEventsResponse message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.SearchChangeHistoryEventsResponse.verify|verify} messages. + * @param message SearchChangeHistoryEventsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1beta.ISearchChangeHistoryEventsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SearchChangeHistoryEventsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SearchChangeHistoryEventsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1beta.SearchChangeHistoryEventsResponse; + + /** + * Decodes a SearchChangeHistoryEventsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SearchChangeHistoryEventsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1beta.SearchChangeHistoryEventsResponse; + + /** + * Verifies a SearchChangeHistoryEventsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SearchChangeHistoryEventsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SearchChangeHistoryEventsResponse + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1beta.SearchChangeHistoryEventsResponse; + + /** + * Creates a plain object from a SearchChangeHistoryEventsResponse message. Also converts values to other types if specified. + * @param message SearchChangeHistoryEventsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1beta.SearchChangeHistoryEventsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SearchChangeHistoryEventsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SearchChangeHistoryEventsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetMeasurementProtocolSecretRequest. */ + interface IGetMeasurementProtocolSecretRequest { + + /** GetMeasurementProtocolSecretRequest name */ + name?: (string|null); + } + + /** Represents a GetMeasurementProtocolSecretRequest. */ + class GetMeasurementProtocolSecretRequest implements IGetMeasurementProtocolSecretRequest { + + /** + * Constructs a new GetMeasurementProtocolSecretRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1beta.IGetMeasurementProtocolSecretRequest); + + /** GetMeasurementProtocolSecretRequest name. */ + public name: string; + + /** + * Creates a new GetMeasurementProtocolSecretRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetMeasurementProtocolSecretRequest instance + */ + public static create(properties?: google.analytics.admin.v1beta.IGetMeasurementProtocolSecretRequest): google.analytics.admin.v1beta.GetMeasurementProtocolSecretRequest; + + /** + * Encodes the specified GetMeasurementProtocolSecretRequest message. Does not implicitly {@link google.analytics.admin.v1beta.GetMeasurementProtocolSecretRequest.verify|verify} messages. + * @param message GetMeasurementProtocolSecretRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1beta.IGetMeasurementProtocolSecretRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetMeasurementProtocolSecretRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.GetMeasurementProtocolSecretRequest.verify|verify} messages. + * @param message GetMeasurementProtocolSecretRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1beta.IGetMeasurementProtocolSecretRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetMeasurementProtocolSecretRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetMeasurementProtocolSecretRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1beta.GetMeasurementProtocolSecretRequest; + + /** + * Decodes a GetMeasurementProtocolSecretRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetMeasurementProtocolSecretRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1beta.GetMeasurementProtocolSecretRequest; + + /** + * Verifies a GetMeasurementProtocolSecretRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetMeasurementProtocolSecretRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetMeasurementProtocolSecretRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1beta.GetMeasurementProtocolSecretRequest; + + /** + * Creates a plain object from a GetMeasurementProtocolSecretRequest message. Also converts values to other types if specified. + * @param message GetMeasurementProtocolSecretRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1beta.GetMeasurementProtocolSecretRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetMeasurementProtocolSecretRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetMeasurementProtocolSecretRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreateMeasurementProtocolSecretRequest. */ + interface ICreateMeasurementProtocolSecretRequest { + + /** CreateMeasurementProtocolSecretRequest parent */ + parent?: (string|null); + + /** CreateMeasurementProtocolSecretRequest measurementProtocolSecret */ + measurementProtocolSecret?: (google.analytics.admin.v1beta.IMeasurementProtocolSecret|null); + } + + /** Represents a CreateMeasurementProtocolSecretRequest. */ + class CreateMeasurementProtocolSecretRequest implements ICreateMeasurementProtocolSecretRequest { + + /** + * Constructs a new CreateMeasurementProtocolSecretRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1beta.ICreateMeasurementProtocolSecretRequest); + + /** CreateMeasurementProtocolSecretRequest parent. */ + public parent: string; + + /** CreateMeasurementProtocolSecretRequest measurementProtocolSecret. */ + public measurementProtocolSecret?: (google.analytics.admin.v1beta.IMeasurementProtocolSecret|null); + + /** + * Creates a new CreateMeasurementProtocolSecretRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateMeasurementProtocolSecretRequest instance + */ + public static create(properties?: google.analytics.admin.v1beta.ICreateMeasurementProtocolSecretRequest): google.analytics.admin.v1beta.CreateMeasurementProtocolSecretRequest; + + /** + * Encodes the specified CreateMeasurementProtocolSecretRequest message. Does not implicitly {@link google.analytics.admin.v1beta.CreateMeasurementProtocolSecretRequest.verify|verify} messages. + * @param message CreateMeasurementProtocolSecretRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1beta.ICreateMeasurementProtocolSecretRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateMeasurementProtocolSecretRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.CreateMeasurementProtocolSecretRequest.verify|verify} messages. + * @param message CreateMeasurementProtocolSecretRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1beta.ICreateMeasurementProtocolSecretRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateMeasurementProtocolSecretRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateMeasurementProtocolSecretRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1beta.CreateMeasurementProtocolSecretRequest; + + /** + * Decodes a CreateMeasurementProtocolSecretRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateMeasurementProtocolSecretRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1beta.CreateMeasurementProtocolSecretRequest; + + /** + * Verifies a CreateMeasurementProtocolSecretRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateMeasurementProtocolSecretRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateMeasurementProtocolSecretRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1beta.CreateMeasurementProtocolSecretRequest; + + /** + * Creates a plain object from a CreateMeasurementProtocolSecretRequest message. Also converts values to other types if specified. + * @param message CreateMeasurementProtocolSecretRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1beta.CreateMeasurementProtocolSecretRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateMeasurementProtocolSecretRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateMeasurementProtocolSecretRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteMeasurementProtocolSecretRequest. */ + interface IDeleteMeasurementProtocolSecretRequest { + + /** DeleteMeasurementProtocolSecretRequest name */ + name?: (string|null); + } + + /** Represents a DeleteMeasurementProtocolSecretRequest. */ + class DeleteMeasurementProtocolSecretRequest implements IDeleteMeasurementProtocolSecretRequest { + + /** + * Constructs a new DeleteMeasurementProtocolSecretRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1beta.IDeleteMeasurementProtocolSecretRequest); + + /** DeleteMeasurementProtocolSecretRequest name. */ + public name: string; + + /** + * Creates a new DeleteMeasurementProtocolSecretRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteMeasurementProtocolSecretRequest instance + */ + public static create(properties?: google.analytics.admin.v1beta.IDeleteMeasurementProtocolSecretRequest): google.analytics.admin.v1beta.DeleteMeasurementProtocolSecretRequest; + + /** + * Encodes the specified DeleteMeasurementProtocolSecretRequest message. Does not implicitly {@link google.analytics.admin.v1beta.DeleteMeasurementProtocolSecretRequest.verify|verify} messages. + * @param message DeleteMeasurementProtocolSecretRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1beta.IDeleteMeasurementProtocolSecretRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteMeasurementProtocolSecretRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.DeleteMeasurementProtocolSecretRequest.verify|verify} messages. + * @param message DeleteMeasurementProtocolSecretRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1beta.IDeleteMeasurementProtocolSecretRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteMeasurementProtocolSecretRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteMeasurementProtocolSecretRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1beta.DeleteMeasurementProtocolSecretRequest; + + /** + * Decodes a DeleteMeasurementProtocolSecretRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteMeasurementProtocolSecretRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1beta.DeleteMeasurementProtocolSecretRequest; + + /** + * Verifies a DeleteMeasurementProtocolSecretRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteMeasurementProtocolSecretRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteMeasurementProtocolSecretRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1beta.DeleteMeasurementProtocolSecretRequest; + + /** + * Creates a plain object from a DeleteMeasurementProtocolSecretRequest message. Also converts values to other types if specified. + * @param message DeleteMeasurementProtocolSecretRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1beta.DeleteMeasurementProtocolSecretRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteMeasurementProtocolSecretRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteMeasurementProtocolSecretRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateMeasurementProtocolSecretRequest. */ + interface IUpdateMeasurementProtocolSecretRequest { + + /** UpdateMeasurementProtocolSecretRequest measurementProtocolSecret */ + measurementProtocolSecret?: (google.analytics.admin.v1beta.IMeasurementProtocolSecret|null); + + /** UpdateMeasurementProtocolSecretRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + } + + /** Represents an UpdateMeasurementProtocolSecretRequest. */ + class UpdateMeasurementProtocolSecretRequest implements IUpdateMeasurementProtocolSecretRequest { + + /** + * Constructs a new UpdateMeasurementProtocolSecretRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1beta.IUpdateMeasurementProtocolSecretRequest); + + /** UpdateMeasurementProtocolSecretRequest measurementProtocolSecret. */ + public measurementProtocolSecret?: (google.analytics.admin.v1beta.IMeasurementProtocolSecret|null); + + /** UpdateMeasurementProtocolSecretRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** + * Creates a new UpdateMeasurementProtocolSecretRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateMeasurementProtocolSecretRequest instance + */ + public static create(properties?: google.analytics.admin.v1beta.IUpdateMeasurementProtocolSecretRequest): google.analytics.admin.v1beta.UpdateMeasurementProtocolSecretRequest; + + /** + * Encodes the specified UpdateMeasurementProtocolSecretRequest message. Does not implicitly {@link google.analytics.admin.v1beta.UpdateMeasurementProtocolSecretRequest.verify|verify} messages. + * @param message UpdateMeasurementProtocolSecretRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1beta.IUpdateMeasurementProtocolSecretRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateMeasurementProtocolSecretRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.UpdateMeasurementProtocolSecretRequest.verify|verify} messages. + * @param message UpdateMeasurementProtocolSecretRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1beta.IUpdateMeasurementProtocolSecretRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateMeasurementProtocolSecretRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateMeasurementProtocolSecretRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1beta.UpdateMeasurementProtocolSecretRequest; + + /** + * Decodes an UpdateMeasurementProtocolSecretRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateMeasurementProtocolSecretRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1beta.UpdateMeasurementProtocolSecretRequest; + + /** + * Verifies an UpdateMeasurementProtocolSecretRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UpdateMeasurementProtocolSecretRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateMeasurementProtocolSecretRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1beta.UpdateMeasurementProtocolSecretRequest; + + /** + * Creates a plain object from an UpdateMeasurementProtocolSecretRequest message. Also converts values to other types if specified. + * @param message UpdateMeasurementProtocolSecretRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1beta.UpdateMeasurementProtocolSecretRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateMeasurementProtocolSecretRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateMeasurementProtocolSecretRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListMeasurementProtocolSecretsRequest. */ + interface IListMeasurementProtocolSecretsRequest { + + /** ListMeasurementProtocolSecretsRequest parent */ + parent?: (string|null); + + /** ListMeasurementProtocolSecretsRequest pageSize */ + pageSize?: (number|null); + + /** ListMeasurementProtocolSecretsRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListMeasurementProtocolSecretsRequest. */ + class ListMeasurementProtocolSecretsRequest implements IListMeasurementProtocolSecretsRequest { + + /** + * Constructs a new ListMeasurementProtocolSecretsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1beta.IListMeasurementProtocolSecretsRequest); + + /** ListMeasurementProtocolSecretsRequest parent. */ + public parent: string; + + /** ListMeasurementProtocolSecretsRequest pageSize. */ + public pageSize: number; + + /** ListMeasurementProtocolSecretsRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListMeasurementProtocolSecretsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListMeasurementProtocolSecretsRequest instance + */ + public static create(properties?: google.analytics.admin.v1beta.IListMeasurementProtocolSecretsRequest): google.analytics.admin.v1beta.ListMeasurementProtocolSecretsRequest; + + /** + * Encodes the specified ListMeasurementProtocolSecretsRequest message. Does not implicitly {@link google.analytics.admin.v1beta.ListMeasurementProtocolSecretsRequest.verify|verify} messages. + * @param message ListMeasurementProtocolSecretsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1beta.IListMeasurementProtocolSecretsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListMeasurementProtocolSecretsRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.ListMeasurementProtocolSecretsRequest.verify|verify} messages. + * @param message ListMeasurementProtocolSecretsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1beta.IListMeasurementProtocolSecretsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListMeasurementProtocolSecretsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListMeasurementProtocolSecretsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1beta.ListMeasurementProtocolSecretsRequest; + + /** + * Decodes a ListMeasurementProtocolSecretsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListMeasurementProtocolSecretsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1beta.ListMeasurementProtocolSecretsRequest; + + /** + * Verifies a ListMeasurementProtocolSecretsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListMeasurementProtocolSecretsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListMeasurementProtocolSecretsRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1beta.ListMeasurementProtocolSecretsRequest; + + /** + * Creates a plain object from a ListMeasurementProtocolSecretsRequest message. Also converts values to other types if specified. + * @param message ListMeasurementProtocolSecretsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1beta.ListMeasurementProtocolSecretsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListMeasurementProtocolSecretsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListMeasurementProtocolSecretsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListMeasurementProtocolSecretsResponse. */ + interface IListMeasurementProtocolSecretsResponse { + + /** ListMeasurementProtocolSecretsResponse measurementProtocolSecrets */ + measurementProtocolSecrets?: (google.analytics.admin.v1beta.IMeasurementProtocolSecret[]|null); + + /** ListMeasurementProtocolSecretsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListMeasurementProtocolSecretsResponse. */ + class ListMeasurementProtocolSecretsResponse implements IListMeasurementProtocolSecretsResponse { + + /** + * Constructs a new ListMeasurementProtocolSecretsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1beta.IListMeasurementProtocolSecretsResponse); + + /** ListMeasurementProtocolSecretsResponse measurementProtocolSecrets. */ + public measurementProtocolSecrets: google.analytics.admin.v1beta.IMeasurementProtocolSecret[]; + + /** ListMeasurementProtocolSecretsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListMeasurementProtocolSecretsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListMeasurementProtocolSecretsResponse instance + */ + public static create(properties?: google.analytics.admin.v1beta.IListMeasurementProtocolSecretsResponse): google.analytics.admin.v1beta.ListMeasurementProtocolSecretsResponse; + + /** + * Encodes the specified ListMeasurementProtocolSecretsResponse message. Does not implicitly {@link google.analytics.admin.v1beta.ListMeasurementProtocolSecretsResponse.verify|verify} messages. + * @param message ListMeasurementProtocolSecretsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1beta.IListMeasurementProtocolSecretsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListMeasurementProtocolSecretsResponse message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.ListMeasurementProtocolSecretsResponse.verify|verify} messages. + * @param message ListMeasurementProtocolSecretsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1beta.IListMeasurementProtocolSecretsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListMeasurementProtocolSecretsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListMeasurementProtocolSecretsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1beta.ListMeasurementProtocolSecretsResponse; + + /** + * Decodes a ListMeasurementProtocolSecretsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListMeasurementProtocolSecretsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1beta.ListMeasurementProtocolSecretsResponse; + + /** + * Verifies a ListMeasurementProtocolSecretsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListMeasurementProtocolSecretsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListMeasurementProtocolSecretsResponse + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1beta.ListMeasurementProtocolSecretsResponse; + + /** + * Creates a plain object from a ListMeasurementProtocolSecretsResponse message. Also converts values to other types if specified. + * @param message ListMeasurementProtocolSecretsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1beta.ListMeasurementProtocolSecretsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListMeasurementProtocolSecretsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListMeasurementProtocolSecretsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreateConversionEventRequest. */ + interface ICreateConversionEventRequest { + + /** CreateConversionEventRequest conversionEvent */ + conversionEvent?: (google.analytics.admin.v1beta.IConversionEvent|null); + + /** CreateConversionEventRequest parent */ + parent?: (string|null); + } + + /** Represents a CreateConversionEventRequest. */ + class CreateConversionEventRequest implements ICreateConversionEventRequest { + + /** + * Constructs a new CreateConversionEventRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1beta.ICreateConversionEventRequest); + + /** CreateConversionEventRequest conversionEvent. */ + public conversionEvent?: (google.analytics.admin.v1beta.IConversionEvent|null); + + /** CreateConversionEventRequest parent. */ + public parent: string; + + /** + * Creates a new CreateConversionEventRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateConversionEventRequest instance + */ + public static create(properties?: google.analytics.admin.v1beta.ICreateConversionEventRequest): google.analytics.admin.v1beta.CreateConversionEventRequest; + + /** + * Encodes the specified CreateConversionEventRequest message. Does not implicitly {@link google.analytics.admin.v1beta.CreateConversionEventRequest.verify|verify} messages. + * @param message CreateConversionEventRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1beta.ICreateConversionEventRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateConversionEventRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.CreateConversionEventRequest.verify|verify} messages. + * @param message CreateConversionEventRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1beta.ICreateConversionEventRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateConversionEventRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateConversionEventRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1beta.CreateConversionEventRequest; + + /** + * Decodes a CreateConversionEventRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateConversionEventRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1beta.CreateConversionEventRequest; + + /** + * Verifies a CreateConversionEventRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateConversionEventRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateConversionEventRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1beta.CreateConversionEventRequest; + + /** + * Creates a plain object from a CreateConversionEventRequest message. Also converts values to other types if specified. + * @param message CreateConversionEventRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1beta.CreateConversionEventRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateConversionEventRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateConversionEventRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetConversionEventRequest. */ + interface IGetConversionEventRequest { + + /** GetConversionEventRequest name */ + name?: (string|null); + } + + /** Represents a GetConversionEventRequest. */ + class GetConversionEventRequest implements IGetConversionEventRequest { + + /** + * Constructs a new GetConversionEventRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1beta.IGetConversionEventRequest); + + /** GetConversionEventRequest name. */ + public name: string; + + /** + * Creates a new GetConversionEventRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetConversionEventRequest instance + */ + public static create(properties?: google.analytics.admin.v1beta.IGetConversionEventRequest): google.analytics.admin.v1beta.GetConversionEventRequest; + + /** + * Encodes the specified GetConversionEventRequest message. Does not implicitly {@link google.analytics.admin.v1beta.GetConversionEventRequest.verify|verify} messages. + * @param message GetConversionEventRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1beta.IGetConversionEventRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetConversionEventRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.GetConversionEventRequest.verify|verify} messages. + * @param message GetConversionEventRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1beta.IGetConversionEventRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetConversionEventRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetConversionEventRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1beta.GetConversionEventRequest; + + /** + * Decodes a GetConversionEventRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetConversionEventRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1beta.GetConversionEventRequest; + + /** + * Verifies a GetConversionEventRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetConversionEventRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetConversionEventRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1beta.GetConversionEventRequest; + + /** + * Creates a plain object from a GetConversionEventRequest message. Also converts values to other types if specified. + * @param message GetConversionEventRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1beta.GetConversionEventRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetConversionEventRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetConversionEventRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteConversionEventRequest. */ + interface IDeleteConversionEventRequest { + + /** DeleteConversionEventRequest name */ + name?: (string|null); + } + + /** Represents a DeleteConversionEventRequest. */ + class DeleteConversionEventRequest implements IDeleteConversionEventRequest { + + /** + * Constructs a new DeleteConversionEventRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1beta.IDeleteConversionEventRequest); + + /** DeleteConversionEventRequest name. */ + public name: string; + + /** + * Creates a new DeleteConversionEventRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteConversionEventRequest instance + */ + public static create(properties?: google.analytics.admin.v1beta.IDeleteConversionEventRequest): google.analytics.admin.v1beta.DeleteConversionEventRequest; + + /** + * Encodes the specified DeleteConversionEventRequest message. Does not implicitly {@link google.analytics.admin.v1beta.DeleteConversionEventRequest.verify|verify} messages. + * @param message DeleteConversionEventRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1beta.IDeleteConversionEventRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteConversionEventRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.DeleteConversionEventRequest.verify|verify} messages. + * @param message DeleteConversionEventRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1beta.IDeleteConversionEventRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteConversionEventRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteConversionEventRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1beta.DeleteConversionEventRequest; + + /** + * Decodes a DeleteConversionEventRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteConversionEventRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1beta.DeleteConversionEventRequest; + + /** + * Verifies a DeleteConversionEventRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteConversionEventRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteConversionEventRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1beta.DeleteConversionEventRequest; + + /** + * Creates a plain object from a DeleteConversionEventRequest message. Also converts values to other types if specified. + * @param message DeleteConversionEventRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1beta.DeleteConversionEventRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteConversionEventRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteConversionEventRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListConversionEventsRequest. */ + interface IListConversionEventsRequest { + + /** ListConversionEventsRequest parent */ + parent?: (string|null); + + /** ListConversionEventsRequest pageSize */ + pageSize?: (number|null); + + /** ListConversionEventsRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListConversionEventsRequest. */ + class ListConversionEventsRequest implements IListConversionEventsRequest { + + /** + * Constructs a new ListConversionEventsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1beta.IListConversionEventsRequest); + + /** ListConversionEventsRequest parent. */ + public parent: string; + + /** ListConversionEventsRequest pageSize. */ + public pageSize: number; + + /** ListConversionEventsRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListConversionEventsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListConversionEventsRequest instance + */ + public static create(properties?: google.analytics.admin.v1beta.IListConversionEventsRequest): google.analytics.admin.v1beta.ListConversionEventsRequest; + + /** + * Encodes the specified ListConversionEventsRequest message. Does not implicitly {@link google.analytics.admin.v1beta.ListConversionEventsRequest.verify|verify} messages. + * @param message ListConversionEventsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1beta.IListConversionEventsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListConversionEventsRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.ListConversionEventsRequest.verify|verify} messages. + * @param message ListConversionEventsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1beta.IListConversionEventsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListConversionEventsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListConversionEventsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1beta.ListConversionEventsRequest; + + /** + * Decodes a ListConversionEventsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListConversionEventsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1beta.ListConversionEventsRequest; + + /** + * Verifies a ListConversionEventsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListConversionEventsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListConversionEventsRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1beta.ListConversionEventsRequest; + + /** + * Creates a plain object from a ListConversionEventsRequest message. Also converts values to other types if specified. + * @param message ListConversionEventsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1beta.ListConversionEventsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListConversionEventsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListConversionEventsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListConversionEventsResponse. */ + interface IListConversionEventsResponse { + + /** ListConversionEventsResponse conversionEvents */ + conversionEvents?: (google.analytics.admin.v1beta.IConversionEvent[]|null); + + /** ListConversionEventsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListConversionEventsResponse. */ + class ListConversionEventsResponse implements IListConversionEventsResponse { + + /** + * Constructs a new ListConversionEventsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1beta.IListConversionEventsResponse); + + /** ListConversionEventsResponse conversionEvents. */ + public conversionEvents: google.analytics.admin.v1beta.IConversionEvent[]; + + /** ListConversionEventsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListConversionEventsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListConversionEventsResponse instance + */ + public static create(properties?: google.analytics.admin.v1beta.IListConversionEventsResponse): google.analytics.admin.v1beta.ListConversionEventsResponse; + + /** + * Encodes the specified ListConversionEventsResponse message. Does not implicitly {@link google.analytics.admin.v1beta.ListConversionEventsResponse.verify|verify} messages. + * @param message ListConversionEventsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1beta.IListConversionEventsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListConversionEventsResponse message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.ListConversionEventsResponse.verify|verify} messages. + * @param message ListConversionEventsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1beta.IListConversionEventsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListConversionEventsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListConversionEventsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1beta.ListConversionEventsResponse; + + /** + * Decodes a ListConversionEventsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListConversionEventsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1beta.ListConversionEventsResponse; + + /** + * Verifies a ListConversionEventsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListConversionEventsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListConversionEventsResponse + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1beta.ListConversionEventsResponse; + + /** + * Creates a plain object from a ListConversionEventsResponse message. Also converts values to other types if specified. + * @param message ListConversionEventsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1beta.ListConversionEventsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListConversionEventsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListConversionEventsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreateCustomDimensionRequest. */ + interface ICreateCustomDimensionRequest { + + /** CreateCustomDimensionRequest parent */ + parent?: (string|null); + + /** CreateCustomDimensionRequest customDimension */ + customDimension?: (google.analytics.admin.v1beta.ICustomDimension|null); + } + + /** Represents a CreateCustomDimensionRequest. */ + class CreateCustomDimensionRequest implements ICreateCustomDimensionRequest { + + /** + * Constructs a new CreateCustomDimensionRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1beta.ICreateCustomDimensionRequest); + + /** CreateCustomDimensionRequest parent. */ + public parent: string; + + /** CreateCustomDimensionRequest customDimension. */ + public customDimension?: (google.analytics.admin.v1beta.ICustomDimension|null); + + /** + * Creates a new CreateCustomDimensionRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateCustomDimensionRequest instance + */ + public static create(properties?: google.analytics.admin.v1beta.ICreateCustomDimensionRequest): google.analytics.admin.v1beta.CreateCustomDimensionRequest; + + /** + * Encodes the specified CreateCustomDimensionRequest message. Does not implicitly {@link google.analytics.admin.v1beta.CreateCustomDimensionRequest.verify|verify} messages. + * @param message CreateCustomDimensionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1beta.ICreateCustomDimensionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateCustomDimensionRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.CreateCustomDimensionRequest.verify|verify} messages. + * @param message CreateCustomDimensionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1beta.ICreateCustomDimensionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateCustomDimensionRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateCustomDimensionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1beta.CreateCustomDimensionRequest; + + /** + * Decodes a CreateCustomDimensionRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateCustomDimensionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1beta.CreateCustomDimensionRequest; + + /** + * Verifies a CreateCustomDimensionRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateCustomDimensionRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateCustomDimensionRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1beta.CreateCustomDimensionRequest; + + /** + * Creates a plain object from a CreateCustomDimensionRequest message. Also converts values to other types if specified. + * @param message CreateCustomDimensionRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1beta.CreateCustomDimensionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateCustomDimensionRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateCustomDimensionRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateCustomDimensionRequest. */ + interface IUpdateCustomDimensionRequest { + + /** UpdateCustomDimensionRequest customDimension */ + customDimension?: (google.analytics.admin.v1beta.ICustomDimension|null); + + /** UpdateCustomDimensionRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + } + + /** Represents an UpdateCustomDimensionRequest. */ + class UpdateCustomDimensionRequest implements IUpdateCustomDimensionRequest { + + /** + * Constructs a new UpdateCustomDimensionRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1beta.IUpdateCustomDimensionRequest); + + /** UpdateCustomDimensionRequest customDimension. */ + public customDimension?: (google.analytics.admin.v1beta.ICustomDimension|null); + + /** UpdateCustomDimensionRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** + * Creates a new UpdateCustomDimensionRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateCustomDimensionRequest instance + */ + public static create(properties?: google.analytics.admin.v1beta.IUpdateCustomDimensionRequest): google.analytics.admin.v1beta.UpdateCustomDimensionRequest; + + /** + * Encodes the specified UpdateCustomDimensionRequest message. Does not implicitly {@link google.analytics.admin.v1beta.UpdateCustomDimensionRequest.verify|verify} messages. + * @param message UpdateCustomDimensionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1beta.IUpdateCustomDimensionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateCustomDimensionRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.UpdateCustomDimensionRequest.verify|verify} messages. + * @param message UpdateCustomDimensionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1beta.IUpdateCustomDimensionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateCustomDimensionRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateCustomDimensionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1beta.UpdateCustomDimensionRequest; + + /** + * Decodes an UpdateCustomDimensionRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateCustomDimensionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1beta.UpdateCustomDimensionRequest; + + /** + * Verifies an UpdateCustomDimensionRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UpdateCustomDimensionRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateCustomDimensionRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1beta.UpdateCustomDimensionRequest; + + /** + * Creates a plain object from an UpdateCustomDimensionRequest message. Also converts values to other types if specified. + * @param message UpdateCustomDimensionRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1beta.UpdateCustomDimensionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateCustomDimensionRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateCustomDimensionRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListCustomDimensionsRequest. */ + interface IListCustomDimensionsRequest { + + /** ListCustomDimensionsRequest parent */ + parent?: (string|null); + + /** ListCustomDimensionsRequest pageSize */ + pageSize?: (number|null); + + /** ListCustomDimensionsRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListCustomDimensionsRequest. */ + class ListCustomDimensionsRequest implements IListCustomDimensionsRequest { + + /** + * Constructs a new ListCustomDimensionsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1beta.IListCustomDimensionsRequest); + + /** ListCustomDimensionsRequest parent. */ + public parent: string; + + /** ListCustomDimensionsRequest pageSize. */ + public pageSize: number; + + /** ListCustomDimensionsRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListCustomDimensionsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListCustomDimensionsRequest instance + */ + public static create(properties?: google.analytics.admin.v1beta.IListCustomDimensionsRequest): google.analytics.admin.v1beta.ListCustomDimensionsRequest; + + /** + * Encodes the specified ListCustomDimensionsRequest message. Does not implicitly {@link google.analytics.admin.v1beta.ListCustomDimensionsRequest.verify|verify} messages. + * @param message ListCustomDimensionsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1beta.IListCustomDimensionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListCustomDimensionsRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.ListCustomDimensionsRequest.verify|verify} messages. + * @param message ListCustomDimensionsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1beta.IListCustomDimensionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListCustomDimensionsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListCustomDimensionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1beta.ListCustomDimensionsRequest; + + /** + * Decodes a ListCustomDimensionsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListCustomDimensionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1beta.ListCustomDimensionsRequest; + + /** + * Verifies a ListCustomDimensionsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListCustomDimensionsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListCustomDimensionsRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1beta.ListCustomDimensionsRequest; + + /** + * Creates a plain object from a ListCustomDimensionsRequest message. Also converts values to other types if specified. + * @param message ListCustomDimensionsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1beta.ListCustomDimensionsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListCustomDimensionsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListCustomDimensionsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListCustomDimensionsResponse. */ + interface IListCustomDimensionsResponse { + + /** ListCustomDimensionsResponse customDimensions */ + customDimensions?: (google.analytics.admin.v1beta.ICustomDimension[]|null); + + /** ListCustomDimensionsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListCustomDimensionsResponse. */ + class ListCustomDimensionsResponse implements IListCustomDimensionsResponse { + + /** + * Constructs a new ListCustomDimensionsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1beta.IListCustomDimensionsResponse); + + /** ListCustomDimensionsResponse customDimensions. */ + public customDimensions: google.analytics.admin.v1beta.ICustomDimension[]; + + /** ListCustomDimensionsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListCustomDimensionsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListCustomDimensionsResponse instance + */ + public static create(properties?: google.analytics.admin.v1beta.IListCustomDimensionsResponse): google.analytics.admin.v1beta.ListCustomDimensionsResponse; + + /** + * Encodes the specified ListCustomDimensionsResponse message. Does not implicitly {@link google.analytics.admin.v1beta.ListCustomDimensionsResponse.verify|verify} messages. + * @param message ListCustomDimensionsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1beta.IListCustomDimensionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListCustomDimensionsResponse message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.ListCustomDimensionsResponse.verify|verify} messages. + * @param message ListCustomDimensionsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1beta.IListCustomDimensionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListCustomDimensionsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListCustomDimensionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1beta.ListCustomDimensionsResponse; + + /** + * Decodes a ListCustomDimensionsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListCustomDimensionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1beta.ListCustomDimensionsResponse; + + /** + * Verifies a ListCustomDimensionsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListCustomDimensionsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListCustomDimensionsResponse + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1beta.ListCustomDimensionsResponse; + + /** + * Creates a plain object from a ListCustomDimensionsResponse message. Also converts values to other types if specified. + * @param message ListCustomDimensionsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1beta.ListCustomDimensionsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListCustomDimensionsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListCustomDimensionsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an ArchiveCustomDimensionRequest. */ + interface IArchiveCustomDimensionRequest { + + /** ArchiveCustomDimensionRequest name */ + name?: (string|null); + } + + /** Represents an ArchiveCustomDimensionRequest. */ + class ArchiveCustomDimensionRequest implements IArchiveCustomDimensionRequest { + + /** + * Constructs a new ArchiveCustomDimensionRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1beta.IArchiveCustomDimensionRequest); + + /** ArchiveCustomDimensionRequest name. */ + public name: string; + + /** + * Creates a new ArchiveCustomDimensionRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ArchiveCustomDimensionRequest instance + */ + public static create(properties?: google.analytics.admin.v1beta.IArchiveCustomDimensionRequest): google.analytics.admin.v1beta.ArchiveCustomDimensionRequest; + + /** + * Encodes the specified ArchiveCustomDimensionRequest message. Does not implicitly {@link google.analytics.admin.v1beta.ArchiveCustomDimensionRequest.verify|verify} messages. + * @param message ArchiveCustomDimensionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1beta.IArchiveCustomDimensionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ArchiveCustomDimensionRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.ArchiveCustomDimensionRequest.verify|verify} messages. + * @param message ArchiveCustomDimensionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1beta.IArchiveCustomDimensionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ArchiveCustomDimensionRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ArchiveCustomDimensionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1beta.ArchiveCustomDimensionRequest; + + /** + * Decodes an ArchiveCustomDimensionRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ArchiveCustomDimensionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1beta.ArchiveCustomDimensionRequest; + + /** + * Verifies an ArchiveCustomDimensionRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ArchiveCustomDimensionRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ArchiveCustomDimensionRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1beta.ArchiveCustomDimensionRequest; + + /** + * Creates a plain object from an ArchiveCustomDimensionRequest message. Also converts values to other types if specified. + * @param message ArchiveCustomDimensionRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1beta.ArchiveCustomDimensionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ArchiveCustomDimensionRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ArchiveCustomDimensionRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetCustomDimensionRequest. */ + interface IGetCustomDimensionRequest { + + /** GetCustomDimensionRequest name */ + name?: (string|null); + } + + /** Represents a GetCustomDimensionRequest. */ + class GetCustomDimensionRequest implements IGetCustomDimensionRequest { + + /** + * Constructs a new GetCustomDimensionRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1beta.IGetCustomDimensionRequest); + + /** GetCustomDimensionRequest name. */ + public name: string; + + /** + * Creates a new GetCustomDimensionRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetCustomDimensionRequest instance + */ + public static create(properties?: google.analytics.admin.v1beta.IGetCustomDimensionRequest): google.analytics.admin.v1beta.GetCustomDimensionRequest; + + /** + * Encodes the specified GetCustomDimensionRequest message. Does not implicitly {@link google.analytics.admin.v1beta.GetCustomDimensionRequest.verify|verify} messages. + * @param message GetCustomDimensionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1beta.IGetCustomDimensionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetCustomDimensionRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.GetCustomDimensionRequest.verify|verify} messages. + * @param message GetCustomDimensionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1beta.IGetCustomDimensionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetCustomDimensionRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetCustomDimensionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1beta.GetCustomDimensionRequest; + + /** + * Decodes a GetCustomDimensionRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetCustomDimensionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1beta.GetCustomDimensionRequest; + + /** + * Verifies a GetCustomDimensionRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetCustomDimensionRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetCustomDimensionRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1beta.GetCustomDimensionRequest; + + /** + * Creates a plain object from a GetCustomDimensionRequest message. Also converts values to other types if specified. + * @param message GetCustomDimensionRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1beta.GetCustomDimensionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetCustomDimensionRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetCustomDimensionRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreateCustomMetricRequest. */ + interface ICreateCustomMetricRequest { + + /** CreateCustomMetricRequest parent */ + parent?: (string|null); + + /** CreateCustomMetricRequest customMetric */ + customMetric?: (google.analytics.admin.v1beta.ICustomMetric|null); + } + + /** Represents a CreateCustomMetricRequest. */ + class CreateCustomMetricRequest implements ICreateCustomMetricRequest { + + /** + * Constructs a new CreateCustomMetricRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1beta.ICreateCustomMetricRequest); + + /** CreateCustomMetricRequest parent. */ + public parent: string; + + /** CreateCustomMetricRequest customMetric. */ + public customMetric?: (google.analytics.admin.v1beta.ICustomMetric|null); + + /** + * Creates a new CreateCustomMetricRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateCustomMetricRequest instance + */ + public static create(properties?: google.analytics.admin.v1beta.ICreateCustomMetricRequest): google.analytics.admin.v1beta.CreateCustomMetricRequest; + + /** + * Encodes the specified CreateCustomMetricRequest message. Does not implicitly {@link google.analytics.admin.v1beta.CreateCustomMetricRequest.verify|verify} messages. + * @param message CreateCustomMetricRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1beta.ICreateCustomMetricRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateCustomMetricRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.CreateCustomMetricRequest.verify|verify} messages. + * @param message CreateCustomMetricRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1beta.ICreateCustomMetricRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateCustomMetricRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateCustomMetricRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1beta.CreateCustomMetricRequest; + + /** + * Decodes a CreateCustomMetricRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateCustomMetricRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1beta.CreateCustomMetricRequest; + + /** + * Verifies a CreateCustomMetricRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateCustomMetricRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateCustomMetricRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1beta.CreateCustomMetricRequest; + + /** + * Creates a plain object from a CreateCustomMetricRequest message. Also converts values to other types if specified. + * @param message CreateCustomMetricRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1beta.CreateCustomMetricRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateCustomMetricRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateCustomMetricRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateCustomMetricRequest. */ + interface IUpdateCustomMetricRequest { + + /** UpdateCustomMetricRequest customMetric */ + customMetric?: (google.analytics.admin.v1beta.ICustomMetric|null); + + /** UpdateCustomMetricRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + } + + /** Represents an UpdateCustomMetricRequest. */ + class UpdateCustomMetricRequest implements IUpdateCustomMetricRequest { + + /** + * Constructs a new UpdateCustomMetricRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1beta.IUpdateCustomMetricRequest); + + /** UpdateCustomMetricRequest customMetric. */ + public customMetric?: (google.analytics.admin.v1beta.ICustomMetric|null); + + /** UpdateCustomMetricRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** + * Creates a new UpdateCustomMetricRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateCustomMetricRequest instance + */ + public static create(properties?: google.analytics.admin.v1beta.IUpdateCustomMetricRequest): google.analytics.admin.v1beta.UpdateCustomMetricRequest; + + /** + * Encodes the specified UpdateCustomMetricRequest message. Does not implicitly {@link google.analytics.admin.v1beta.UpdateCustomMetricRequest.verify|verify} messages. + * @param message UpdateCustomMetricRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1beta.IUpdateCustomMetricRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateCustomMetricRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.UpdateCustomMetricRequest.verify|verify} messages. + * @param message UpdateCustomMetricRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1beta.IUpdateCustomMetricRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateCustomMetricRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateCustomMetricRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1beta.UpdateCustomMetricRequest; + + /** + * Decodes an UpdateCustomMetricRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateCustomMetricRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1beta.UpdateCustomMetricRequest; + + /** + * Verifies an UpdateCustomMetricRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UpdateCustomMetricRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateCustomMetricRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1beta.UpdateCustomMetricRequest; + + /** + * Creates a plain object from an UpdateCustomMetricRequest message. Also converts values to other types if specified. + * @param message UpdateCustomMetricRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1beta.UpdateCustomMetricRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateCustomMetricRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateCustomMetricRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListCustomMetricsRequest. */ + interface IListCustomMetricsRequest { + + /** ListCustomMetricsRequest parent */ + parent?: (string|null); + + /** ListCustomMetricsRequest pageSize */ + pageSize?: (number|null); + + /** ListCustomMetricsRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListCustomMetricsRequest. */ + class ListCustomMetricsRequest implements IListCustomMetricsRequest { + + /** + * Constructs a new ListCustomMetricsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1beta.IListCustomMetricsRequest); + + /** ListCustomMetricsRequest parent. */ + public parent: string; + + /** ListCustomMetricsRequest pageSize. */ + public pageSize: number; + + /** ListCustomMetricsRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListCustomMetricsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListCustomMetricsRequest instance + */ + public static create(properties?: google.analytics.admin.v1beta.IListCustomMetricsRequest): google.analytics.admin.v1beta.ListCustomMetricsRequest; + + /** + * Encodes the specified ListCustomMetricsRequest message. Does not implicitly {@link google.analytics.admin.v1beta.ListCustomMetricsRequest.verify|verify} messages. + * @param message ListCustomMetricsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1beta.IListCustomMetricsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListCustomMetricsRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.ListCustomMetricsRequest.verify|verify} messages. + * @param message ListCustomMetricsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1beta.IListCustomMetricsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListCustomMetricsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListCustomMetricsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1beta.ListCustomMetricsRequest; + + /** + * Decodes a ListCustomMetricsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListCustomMetricsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1beta.ListCustomMetricsRequest; + + /** + * Verifies a ListCustomMetricsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListCustomMetricsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListCustomMetricsRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1beta.ListCustomMetricsRequest; + + /** + * Creates a plain object from a ListCustomMetricsRequest message. Also converts values to other types if specified. + * @param message ListCustomMetricsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1beta.ListCustomMetricsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListCustomMetricsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListCustomMetricsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListCustomMetricsResponse. */ + interface IListCustomMetricsResponse { + + /** ListCustomMetricsResponse customMetrics */ + customMetrics?: (google.analytics.admin.v1beta.ICustomMetric[]|null); + + /** ListCustomMetricsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListCustomMetricsResponse. */ + class ListCustomMetricsResponse implements IListCustomMetricsResponse { + + /** + * Constructs a new ListCustomMetricsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1beta.IListCustomMetricsResponse); + + /** ListCustomMetricsResponse customMetrics. */ + public customMetrics: google.analytics.admin.v1beta.ICustomMetric[]; + + /** ListCustomMetricsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListCustomMetricsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListCustomMetricsResponse instance + */ + public static create(properties?: google.analytics.admin.v1beta.IListCustomMetricsResponse): google.analytics.admin.v1beta.ListCustomMetricsResponse; + + /** + * Encodes the specified ListCustomMetricsResponse message. Does not implicitly {@link google.analytics.admin.v1beta.ListCustomMetricsResponse.verify|verify} messages. + * @param message ListCustomMetricsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1beta.IListCustomMetricsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListCustomMetricsResponse message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.ListCustomMetricsResponse.verify|verify} messages. + * @param message ListCustomMetricsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1beta.IListCustomMetricsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListCustomMetricsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListCustomMetricsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1beta.ListCustomMetricsResponse; + + /** + * Decodes a ListCustomMetricsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListCustomMetricsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1beta.ListCustomMetricsResponse; + + /** + * Verifies a ListCustomMetricsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListCustomMetricsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListCustomMetricsResponse + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1beta.ListCustomMetricsResponse; + + /** + * Creates a plain object from a ListCustomMetricsResponse message. Also converts values to other types if specified. + * @param message ListCustomMetricsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1beta.ListCustomMetricsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListCustomMetricsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListCustomMetricsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an ArchiveCustomMetricRequest. */ + interface IArchiveCustomMetricRequest { + + /** ArchiveCustomMetricRequest name */ + name?: (string|null); + } + + /** Represents an ArchiveCustomMetricRequest. */ + class ArchiveCustomMetricRequest implements IArchiveCustomMetricRequest { + + /** + * Constructs a new ArchiveCustomMetricRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1beta.IArchiveCustomMetricRequest); + + /** ArchiveCustomMetricRequest name. */ + public name: string; + + /** + * Creates a new ArchiveCustomMetricRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ArchiveCustomMetricRequest instance + */ + public static create(properties?: google.analytics.admin.v1beta.IArchiveCustomMetricRequest): google.analytics.admin.v1beta.ArchiveCustomMetricRequest; + + /** + * Encodes the specified ArchiveCustomMetricRequest message. Does not implicitly {@link google.analytics.admin.v1beta.ArchiveCustomMetricRequest.verify|verify} messages. + * @param message ArchiveCustomMetricRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1beta.IArchiveCustomMetricRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ArchiveCustomMetricRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.ArchiveCustomMetricRequest.verify|verify} messages. + * @param message ArchiveCustomMetricRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1beta.IArchiveCustomMetricRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ArchiveCustomMetricRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ArchiveCustomMetricRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1beta.ArchiveCustomMetricRequest; + + /** + * Decodes an ArchiveCustomMetricRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ArchiveCustomMetricRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1beta.ArchiveCustomMetricRequest; + + /** + * Verifies an ArchiveCustomMetricRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ArchiveCustomMetricRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ArchiveCustomMetricRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1beta.ArchiveCustomMetricRequest; + + /** + * Creates a plain object from an ArchiveCustomMetricRequest message. Also converts values to other types if specified. + * @param message ArchiveCustomMetricRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1beta.ArchiveCustomMetricRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ArchiveCustomMetricRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ArchiveCustomMetricRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetCustomMetricRequest. */ + interface IGetCustomMetricRequest { + + /** GetCustomMetricRequest name */ + name?: (string|null); + } + + /** Represents a GetCustomMetricRequest. */ + class GetCustomMetricRequest implements IGetCustomMetricRequest { + + /** + * Constructs a new GetCustomMetricRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1beta.IGetCustomMetricRequest); + + /** GetCustomMetricRequest name. */ + public name: string; + + /** + * Creates a new GetCustomMetricRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetCustomMetricRequest instance + */ + public static create(properties?: google.analytics.admin.v1beta.IGetCustomMetricRequest): google.analytics.admin.v1beta.GetCustomMetricRequest; + + /** + * Encodes the specified GetCustomMetricRequest message. Does not implicitly {@link google.analytics.admin.v1beta.GetCustomMetricRequest.verify|verify} messages. + * @param message GetCustomMetricRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1beta.IGetCustomMetricRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetCustomMetricRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.GetCustomMetricRequest.verify|verify} messages. + * @param message GetCustomMetricRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1beta.IGetCustomMetricRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetCustomMetricRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetCustomMetricRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1beta.GetCustomMetricRequest; + + /** + * Decodes a GetCustomMetricRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetCustomMetricRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1beta.GetCustomMetricRequest; + + /** + * Verifies a GetCustomMetricRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetCustomMetricRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetCustomMetricRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1beta.GetCustomMetricRequest; + + /** + * Creates a plain object from a GetCustomMetricRequest message. Also converts values to other types if specified. + * @param message GetCustomMetricRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1beta.GetCustomMetricRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetCustomMetricRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetCustomMetricRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetDataRetentionSettingsRequest. */ + interface IGetDataRetentionSettingsRequest { + + /** GetDataRetentionSettingsRequest name */ + name?: (string|null); + } + + /** Represents a GetDataRetentionSettingsRequest. */ + class GetDataRetentionSettingsRequest implements IGetDataRetentionSettingsRequest { + + /** + * Constructs a new GetDataRetentionSettingsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1beta.IGetDataRetentionSettingsRequest); + + /** GetDataRetentionSettingsRequest name. */ + public name: string; + + /** + * Creates a new GetDataRetentionSettingsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetDataRetentionSettingsRequest instance + */ + public static create(properties?: google.analytics.admin.v1beta.IGetDataRetentionSettingsRequest): google.analytics.admin.v1beta.GetDataRetentionSettingsRequest; + + /** + * Encodes the specified GetDataRetentionSettingsRequest message. Does not implicitly {@link google.analytics.admin.v1beta.GetDataRetentionSettingsRequest.verify|verify} messages. + * @param message GetDataRetentionSettingsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1beta.IGetDataRetentionSettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetDataRetentionSettingsRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.GetDataRetentionSettingsRequest.verify|verify} messages. + * @param message GetDataRetentionSettingsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1beta.IGetDataRetentionSettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetDataRetentionSettingsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetDataRetentionSettingsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1beta.GetDataRetentionSettingsRequest; + + /** + * Decodes a GetDataRetentionSettingsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetDataRetentionSettingsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1beta.GetDataRetentionSettingsRequest; + + /** + * Verifies a GetDataRetentionSettingsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetDataRetentionSettingsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetDataRetentionSettingsRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1beta.GetDataRetentionSettingsRequest; + + /** + * Creates a plain object from a GetDataRetentionSettingsRequest message. Also converts values to other types if specified. + * @param message GetDataRetentionSettingsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1beta.GetDataRetentionSettingsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetDataRetentionSettingsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetDataRetentionSettingsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateDataRetentionSettingsRequest. */ + interface IUpdateDataRetentionSettingsRequest { + + /** UpdateDataRetentionSettingsRequest dataRetentionSettings */ + dataRetentionSettings?: (google.analytics.admin.v1beta.IDataRetentionSettings|null); + + /** UpdateDataRetentionSettingsRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + } + + /** Represents an UpdateDataRetentionSettingsRequest. */ + class UpdateDataRetentionSettingsRequest implements IUpdateDataRetentionSettingsRequest { + + /** + * Constructs a new UpdateDataRetentionSettingsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1beta.IUpdateDataRetentionSettingsRequest); + + /** UpdateDataRetentionSettingsRequest dataRetentionSettings. */ + public dataRetentionSettings?: (google.analytics.admin.v1beta.IDataRetentionSettings|null); + + /** UpdateDataRetentionSettingsRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** + * Creates a new UpdateDataRetentionSettingsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateDataRetentionSettingsRequest instance + */ + public static create(properties?: google.analytics.admin.v1beta.IUpdateDataRetentionSettingsRequest): google.analytics.admin.v1beta.UpdateDataRetentionSettingsRequest; + + /** + * Encodes the specified UpdateDataRetentionSettingsRequest message. Does not implicitly {@link google.analytics.admin.v1beta.UpdateDataRetentionSettingsRequest.verify|verify} messages. + * @param message UpdateDataRetentionSettingsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1beta.IUpdateDataRetentionSettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateDataRetentionSettingsRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.UpdateDataRetentionSettingsRequest.verify|verify} messages. + * @param message UpdateDataRetentionSettingsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1beta.IUpdateDataRetentionSettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateDataRetentionSettingsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateDataRetentionSettingsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1beta.UpdateDataRetentionSettingsRequest; + + /** + * Decodes an UpdateDataRetentionSettingsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateDataRetentionSettingsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1beta.UpdateDataRetentionSettingsRequest; + + /** + * Verifies an UpdateDataRetentionSettingsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UpdateDataRetentionSettingsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateDataRetentionSettingsRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1beta.UpdateDataRetentionSettingsRequest; + + /** + * Creates a plain object from an UpdateDataRetentionSettingsRequest message. Also converts values to other types if specified. + * @param message UpdateDataRetentionSettingsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1beta.UpdateDataRetentionSettingsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateDataRetentionSettingsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateDataRetentionSettingsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreateDataStreamRequest. */ + interface ICreateDataStreamRequest { + + /** CreateDataStreamRequest parent */ + parent?: (string|null); + + /** CreateDataStreamRequest dataStream */ + dataStream?: (google.analytics.admin.v1beta.IDataStream|null); + } + + /** Represents a CreateDataStreamRequest. */ + class CreateDataStreamRequest implements ICreateDataStreamRequest { + + /** + * Constructs a new CreateDataStreamRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1beta.ICreateDataStreamRequest); + + /** CreateDataStreamRequest parent. */ + public parent: string; + + /** CreateDataStreamRequest dataStream. */ + public dataStream?: (google.analytics.admin.v1beta.IDataStream|null); + + /** + * Creates a new CreateDataStreamRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateDataStreamRequest instance + */ + public static create(properties?: google.analytics.admin.v1beta.ICreateDataStreamRequest): google.analytics.admin.v1beta.CreateDataStreamRequest; + + /** + * Encodes the specified CreateDataStreamRequest message. Does not implicitly {@link google.analytics.admin.v1beta.CreateDataStreamRequest.verify|verify} messages. + * @param message CreateDataStreamRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1beta.ICreateDataStreamRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateDataStreamRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.CreateDataStreamRequest.verify|verify} messages. + * @param message CreateDataStreamRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1beta.ICreateDataStreamRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateDataStreamRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateDataStreamRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1beta.CreateDataStreamRequest; + + /** + * Decodes a CreateDataStreamRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateDataStreamRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1beta.CreateDataStreamRequest; + + /** + * Verifies a CreateDataStreamRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateDataStreamRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateDataStreamRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1beta.CreateDataStreamRequest; + + /** + * Creates a plain object from a CreateDataStreamRequest message. Also converts values to other types if specified. + * @param message CreateDataStreamRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1beta.CreateDataStreamRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateDataStreamRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateDataStreamRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteDataStreamRequest. */ + interface IDeleteDataStreamRequest { + + /** DeleteDataStreamRequest name */ + name?: (string|null); + } + + /** Represents a DeleteDataStreamRequest. */ + class DeleteDataStreamRequest implements IDeleteDataStreamRequest { + + /** + * Constructs a new DeleteDataStreamRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1beta.IDeleteDataStreamRequest); + + /** DeleteDataStreamRequest name. */ + public name: string; + + /** + * Creates a new DeleteDataStreamRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteDataStreamRequest instance + */ + public static create(properties?: google.analytics.admin.v1beta.IDeleteDataStreamRequest): google.analytics.admin.v1beta.DeleteDataStreamRequest; + + /** + * Encodes the specified DeleteDataStreamRequest message. Does not implicitly {@link google.analytics.admin.v1beta.DeleteDataStreamRequest.verify|verify} messages. + * @param message DeleteDataStreamRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1beta.IDeleteDataStreamRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteDataStreamRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.DeleteDataStreamRequest.verify|verify} messages. + * @param message DeleteDataStreamRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1beta.IDeleteDataStreamRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteDataStreamRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteDataStreamRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1beta.DeleteDataStreamRequest; + + /** + * Decodes a DeleteDataStreamRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteDataStreamRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1beta.DeleteDataStreamRequest; + + /** + * Verifies a DeleteDataStreamRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteDataStreamRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteDataStreamRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1beta.DeleteDataStreamRequest; + + /** + * Creates a plain object from a DeleteDataStreamRequest message. Also converts values to other types if specified. + * @param message DeleteDataStreamRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1beta.DeleteDataStreamRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteDataStreamRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteDataStreamRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateDataStreamRequest. */ + interface IUpdateDataStreamRequest { + + /** UpdateDataStreamRequest dataStream */ + dataStream?: (google.analytics.admin.v1beta.IDataStream|null); + + /** UpdateDataStreamRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + } + + /** Represents an UpdateDataStreamRequest. */ + class UpdateDataStreamRequest implements IUpdateDataStreamRequest { + + /** + * Constructs a new UpdateDataStreamRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1beta.IUpdateDataStreamRequest); + + /** UpdateDataStreamRequest dataStream. */ + public dataStream?: (google.analytics.admin.v1beta.IDataStream|null); + + /** UpdateDataStreamRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** + * Creates a new UpdateDataStreamRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateDataStreamRequest instance + */ + public static create(properties?: google.analytics.admin.v1beta.IUpdateDataStreamRequest): google.analytics.admin.v1beta.UpdateDataStreamRequest; + + /** + * Encodes the specified UpdateDataStreamRequest message. Does not implicitly {@link google.analytics.admin.v1beta.UpdateDataStreamRequest.verify|verify} messages. + * @param message UpdateDataStreamRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1beta.IUpdateDataStreamRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateDataStreamRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.UpdateDataStreamRequest.verify|verify} messages. + * @param message UpdateDataStreamRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1beta.IUpdateDataStreamRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateDataStreamRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateDataStreamRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1beta.UpdateDataStreamRequest; + + /** + * Decodes an UpdateDataStreamRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateDataStreamRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1beta.UpdateDataStreamRequest; + + /** + * Verifies an UpdateDataStreamRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UpdateDataStreamRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateDataStreamRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1beta.UpdateDataStreamRequest; + + /** + * Creates a plain object from an UpdateDataStreamRequest message. Also converts values to other types if specified. + * @param message UpdateDataStreamRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1beta.UpdateDataStreamRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateDataStreamRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateDataStreamRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListDataStreamsRequest. */ + interface IListDataStreamsRequest { + + /** ListDataStreamsRequest parent */ + parent?: (string|null); + + /** ListDataStreamsRequest pageSize */ + pageSize?: (number|null); + + /** ListDataStreamsRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListDataStreamsRequest. */ + class ListDataStreamsRequest implements IListDataStreamsRequest { + + /** + * Constructs a new ListDataStreamsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1beta.IListDataStreamsRequest); + + /** ListDataStreamsRequest parent. */ + public parent: string; + + /** ListDataStreamsRequest pageSize. */ + public pageSize: number; + + /** ListDataStreamsRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListDataStreamsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListDataStreamsRequest instance + */ + public static create(properties?: google.analytics.admin.v1beta.IListDataStreamsRequest): google.analytics.admin.v1beta.ListDataStreamsRequest; + + /** + * Encodes the specified ListDataStreamsRequest message. Does not implicitly {@link google.analytics.admin.v1beta.ListDataStreamsRequest.verify|verify} messages. + * @param message ListDataStreamsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1beta.IListDataStreamsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListDataStreamsRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.ListDataStreamsRequest.verify|verify} messages. + * @param message ListDataStreamsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1beta.IListDataStreamsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListDataStreamsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListDataStreamsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1beta.ListDataStreamsRequest; + + /** + * Decodes a ListDataStreamsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListDataStreamsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1beta.ListDataStreamsRequest; + + /** + * Verifies a ListDataStreamsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListDataStreamsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListDataStreamsRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1beta.ListDataStreamsRequest; + + /** + * Creates a plain object from a ListDataStreamsRequest message. Also converts values to other types if specified. + * @param message ListDataStreamsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1beta.ListDataStreamsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListDataStreamsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListDataStreamsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListDataStreamsResponse. */ + interface IListDataStreamsResponse { + + /** ListDataStreamsResponse dataStreams */ + dataStreams?: (google.analytics.admin.v1beta.IDataStream[]|null); + + /** ListDataStreamsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListDataStreamsResponse. */ + class ListDataStreamsResponse implements IListDataStreamsResponse { + + /** + * Constructs a new ListDataStreamsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1beta.IListDataStreamsResponse); + + /** ListDataStreamsResponse dataStreams. */ + public dataStreams: google.analytics.admin.v1beta.IDataStream[]; + + /** ListDataStreamsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListDataStreamsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListDataStreamsResponse instance + */ + public static create(properties?: google.analytics.admin.v1beta.IListDataStreamsResponse): google.analytics.admin.v1beta.ListDataStreamsResponse; + + /** + * Encodes the specified ListDataStreamsResponse message. Does not implicitly {@link google.analytics.admin.v1beta.ListDataStreamsResponse.verify|verify} messages. + * @param message ListDataStreamsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1beta.IListDataStreamsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListDataStreamsResponse message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.ListDataStreamsResponse.verify|verify} messages. + * @param message ListDataStreamsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1beta.IListDataStreamsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListDataStreamsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListDataStreamsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1beta.ListDataStreamsResponse; + + /** + * Decodes a ListDataStreamsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListDataStreamsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1beta.ListDataStreamsResponse; + + /** + * Verifies a ListDataStreamsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListDataStreamsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListDataStreamsResponse + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1beta.ListDataStreamsResponse; + + /** + * Creates a plain object from a ListDataStreamsResponse message. Also converts values to other types if specified. + * @param message ListDataStreamsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1beta.ListDataStreamsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListDataStreamsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListDataStreamsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetDataStreamRequest. */ + interface IGetDataStreamRequest { + + /** GetDataStreamRequest name */ + name?: (string|null); + } + + /** Represents a GetDataStreamRequest. */ + class GetDataStreamRequest implements IGetDataStreamRequest { + + /** + * Constructs a new GetDataStreamRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1beta.IGetDataStreamRequest); + + /** GetDataStreamRequest name. */ + public name: string; + + /** + * Creates a new GetDataStreamRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetDataStreamRequest instance + */ + public static create(properties?: google.analytics.admin.v1beta.IGetDataStreamRequest): google.analytics.admin.v1beta.GetDataStreamRequest; + + /** + * Encodes the specified GetDataStreamRequest message. Does not implicitly {@link google.analytics.admin.v1beta.GetDataStreamRequest.verify|verify} messages. + * @param message GetDataStreamRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1beta.IGetDataStreamRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetDataStreamRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.GetDataStreamRequest.verify|verify} messages. + * @param message GetDataStreamRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1beta.IGetDataStreamRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetDataStreamRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetDataStreamRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1beta.GetDataStreamRequest; + + /** + * Decodes a GetDataStreamRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetDataStreamRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1beta.GetDataStreamRequest; + + /** + * Verifies a GetDataStreamRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetDataStreamRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetDataStreamRequest + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1beta.GetDataStreamRequest; + + /** + * Creates a plain object from a GetDataStreamRequest message. Also converts values to other types if specified. + * @param message GetDataStreamRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1beta.GetDataStreamRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetDataStreamRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetDataStreamRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** IndustryCategory enum. */ + enum IndustryCategory { + INDUSTRY_CATEGORY_UNSPECIFIED = 0, + AUTOMOTIVE = 1, + BUSINESS_AND_INDUSTRIAL_MARKETS = 2, + FINANCE = 3, + HEALTHCARE = 4, + TECHNOLOGY = 5, + TRAVEL = 6, + OTHER = 7, + ARTS_AND_ENTERTAINMENT = 8, + BEAUTY_AND_FITNESS = 9, + BOOKS_AND_LITERATURE = 10, + FOOD_AND_DRINK = 11, + GAMES = 12, + HOBBIES_AND_LEISURE = 13, + HOME_AND_GARDEN = 14, + INTERNET_AND_TELECOM = 15, + LAW_AND_GOVERNMENT = 16, + NEWS = 17, + ONLINE_COMMUNITIES = 18, + PEOPLE_AND_SOCIETY = 19, + PETS_AND_ANIMALS = 20, + REAL_ESTATE = 21, + REFERENCE = 22, + SCIENCE = 23, + SPORTS = 24, + JOBS_AND_EDUCATION = 25, + SHOPPING = 26 + } + + /** ServiceLevel enum. */ + enum ServiceLevel { + SERVICE_LEVEL_UNSPECIFIED = 0, + GOOGLE_ANALYTICS_STANDARD = 1, + GOOGLE_ANALYTICS_360 = 2 + } + + /** ActorType enum. */ + enum ActorType { + ACTOR_TYPE_UNSPECIFIED = 0, + USER = 1, + SYSTEM = 2, + SUPPORT = 3 + } + + /** ActionType enum. */ + enum ActionType { + ACTION_TYPE_UNSPECIFIED = 0, + CREATED = 1, + UPDATED = 2, + DELETED = 3 + } + + /** ChangeHistoryResourceType enum. */ + enum ChangeHistoryResourceType { + CHANGE_HISTORY_RESOURCE_TYPE_UNSPECIFIED = 0, + ACCOUNT = 1, + PROPERTY = 2, + FIREBASE_LINK = 6, + GOOGLE_ADS_LINK = 7, + GOOGLE_SIGNALS_SETTINGS = 8, + CONVERSION_EVENT = 9, + MEASUREMENT_PROTOCOL_SECRET = 10, + DATA_RETENTION_SETTINGS = 13, + DISPLAY_VIDEO_360_ADVERTISER_LINK = 14, + DISPLAY_VIDEO_360_ADVERTISER_LINK_PROPOSAL = 15, + DATA_STREAM = 18, + ATTRIBUTION_SETTINGS = 20 + } + + /** PropertyType enum. */ + enum PropertyType { + PROPERTY_TYPE_UNSPECIFIED = 0, + PROPERTY_TYPE_ORDINARY = 1, + PROPERTY_TYPE_SUBPROPERTY = 2, + PROPERTY_TYPE_ROLLUP = 3 + } + + /** Properties of an Account. */ + interface IAccount { + + /** Account name */ + name?: (string|null); + + /** Account createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** Account updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** Account displayName */ + displayName?: (string|null); + + /** Account regionCode */ + regionCode?: (string|null); + + /** Account deleted */ + deleted?: (boolean|null); + } + + /** Represents an Account. */ + class Account implements IAccount { + + /** + * Constructs a new Account. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1beta.IAccount); + + /** Account name. */ + public name: string; + + /** Account createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** Account updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** Account displayName. */ + public displayName: string; + + /** Account regionCode. */ + public regionCode: string; + + /** Account deleted. */ + public deleted: boolean; + + /** + * Creates a new Account instance using the specified properties. + * @param [properties] Properties to set + * @returns Account instance + */ + public static create(properties?: google.analytics.admin.v1beta.IAccount): google.analytics.admin.v1beta.Account; + + /** + * Encodes the specified Account message. Does not implicitly {@link google.analytics.admin.v1beta.Account.verify|verify} messages. + * @param message Account message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1beta.IAccount, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Account message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.Account.verify|verify} messages. + * @param message Account message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1beta.IAccount, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Account message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Account + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1beta.Account; + + /** + * Decodes an Account message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Account + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1beta.Account; + + /** + * Verifies an Account message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Account message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Account + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1beta.Account; + + /** + * Creates a plain object from an Account message. Also converts values to other types if specified. + * @param message Account + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1beta.Account, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Account to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Account + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Property. */ + interface IProperty { + + /** Property name */ + name?: (string|null); + + /** Property propertyType */ + propertyType?: (google.analytics.admin.v1beta.PropertyType|keyof typeof google.analytics.admin.v1beta.PropertyType|null); + + /** Property createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** Property updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** Property parent */ + parent?: (string|null); + + /** Property displayName */ + displayName?: (string|null); + + /** Property industryCategory */ + industryCategory?: (google.analytics.admin.v1beta.IndustryCategory|keyof typeof google.analytics.admin.v1beta.IndustryCategory|null); + + /** Property timeZone */ + timeZone?: (string|null); + + /** Property currencyCode */ + currencyCode?: (string|null); + + /** Property serviceLevel */ + serviceLevel?: (google.analytics.admin.v1beta.ServiceLevel|keyof typeof google.analytics.admin.v1beta.ServiceLevel|null); + + /** Property deleteTime */ + deleteTime?: (google.protobuf.ITimestamp|null); + + /** Property expireTime */ + expireTime?: (google.protobuf.ITimestamp|null); + + /** Property account */ + account?: (string|null); + } + + /** Represents a Property. */ + class Property implements IProperty { + + /** + * Constructs a new Property. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1beta.IProperty); + + /** Property name. */ + public name: string; + + /** Property propertyType. */ + public propertyType: (google.analytics.admin.v1beta.PropertyType|keyof typeof google.analytics.admin.v1beta.PropertyType); + + /** Property createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** Property updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** Property parent. */ + public parent: string; + + /** Property displayName. */ + public displayName: string; + + /** Property industryCategory. */ + public industryCategory: (google.analytics.admin.v1beta.IndustryCategory|keyof typeof google.analytics.admin.v1beta.IndustryCategory); + + /** Property timeZone. */ + public timeZone: string; + + /** Property currencyCode. */ + public currencyCode: string; + + /** Property serviceLevel. */ + public serviceLevel: (google.analytics.admin.v1beta.ServiceLevel|keyof typeof google.analytics.admin.v1beta.ServiceLevel); + + /** Property deleteTime. */ + public deleteTime?: (google.protobuf.ITimestamp|null); + + /** Property expireTime. */ + public expireTime?: (google.protobuf.ITimestamp|null); + + /** Property account. */ + public account: string; + + /** + * Creates a new Property instance using the specified properties. + * @param [properties] Properties to set + * @returns Property instance + */ + public static create(properties?: google.analytics.admin.v1beta.IProperty): google.analytics.admin.v1beta.Property; + + /** + * Encodes the specified Property message. Does not implicitly {@link google.analytics.admin.v1beta.Property.verify|verify} messages. + * @param message Property message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1beta.IProperty, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Property message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.Property.verify|verify} messages. + * @param message Property message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1beta.IProperty, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Property message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Property + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1beta.Property; + + /** + * Decodes a Property message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Property + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1beta.Property; + + /** + * Verifies a Property message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Property message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Property + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1beta.Property; + + /** + * Creates a plain object from a Property message. Also converts values to other types if specified. + * @param message Property + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1beta.Property, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Property to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Property + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DataStream. */ + interface IDataStream { + + /** DataStream webStreamData */ + webStreamData?: (google.analytics.admin.v1beta.DataStream.IWebStreamData|null); + + /** DataStream androidAppStreamData */ + androidAppStreamData?: (google.analytics.admin.v1beta.DataStream.IAndroidAppStreamData|null); + + /** DataStream iosAppStreamData */ + iosAppStreamData?: (google.analytics.admin.v1beta.DataStream.IIosAppStreamData|null); + + /** DataStream name */ + name?: (string|null); + + /** DataStream type */ + type?: (google.analytics.admin.v1beta.DataStream.DataStreamType|keyof typeof google.analytics.admin.v1beta.DataStream.DataStreamType|null); + + /** DataStream displayName */ + displayName?: (string|null); + + /** DataStream createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** DataStream updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents a DataStream. */ + class DataStream implements IDataStream { + + /** + * Constructs a new DataStream. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1beta.IDataStream); + + /** DataStream webStreamData. */ + public webStreamData?: (google.analytics.admin.v1beta.DataStream.IWebStreamData|null); + + /** DataStream androidAppStreamData. */ + public androidAppStreamData?: (google.analytics.admin.v1beta.DataStream.IAndroidAppStreamData|null); + + /** DataStream iosAppStreamData. */ + public iosAppStreamData?: (google.analytics.admin.v1beta.DataStream.IIosAppStreamData|null); + + /** DataStream name. */ + public name: string; + + /** DataStream type. */ + public type: (google.analytics.admin.v1beta.DataStream.DataStreamType|keyof typeof google.analytics.admin.v1beta.DataStream.DataStreamType); + + /** DataStream displayName. */ + public displayName: string; + + /** DataStream createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** DataStream updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** DataStream streamData. */ + public streamData?: ("webStreamData"|"androidAppStreamData"|"iosAppStreamData"); + + /** + * Creates a new DataStream instance using the specified properties. + * @param [properties] Properties to set + * @returns DataStream instance + */ + public static create(properties?: google.analytics.admin.v1beta.IDataStream): google.analytics.admin.v1beta.DataStream; + + /** + * Encodes the specified DataStream message. Does not implicitly {@link google.analytics.admin.v1beta.DataStream.verify|verify} messages. + * @param message DataStream message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1beta.IDataStream, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DataStream message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.DataStream.verify|verify} messages. + * @param message DataStream message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1beta.IDataStream, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DataStream message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DataStream + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1beta.DataStream; + + /** + * Decodes a DataStream message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DataStream + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1beta.DataStream; + + /** + * Verifies a DataStream message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DataStream message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DataStream + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1beta.DataStream; + + /** + * Creates a plain object from a DataStream message. Also converts values to other types if specified. + * @param message DataStream + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1beta.DataStream, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DataStream to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DataStream + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace DataStream { + + /** Properties of a WebStreamData. */ + interface IWebStreamData { + + /** WebStreamData measurementId */ + measurementId?: (string|null); + + /** WebStreamData firebaseAppId */ + firebaseAppId?: (string|null); + + /** WebStreamData defaultUri */ + defaultUri?: (string|null); + } + + /** Represents a WebStreamData. */ + class WebStreamData implements IWebStreamData { + + /** + * Constructs a new WebStreamData. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1beta.DataStream.IWebStreamData); + + /** WebStreamData measurementId. */ + public measurementId: string; + + /** WebStreamData firebaseAppId. */ + public firebaseAppId: string; + + /** WebStreamData defaultUri. */ + public defaultUri: string; + + /** + * Creates a new WebStreamData instance using the specified properties. + * @param [properties] Properties to set + * @returns WebStreamData instance + */ + public static create(properties?: google.analytics.admin.v1beta.DataStream.IWebStreamData): google.analytics.admin.v1beta.DataStream.WebStreamData; + + /** + * Encodes the specified WebStreamData message. Does not implicitly {@link google.analytics.admin.v1beta.DataStream.WebStreamData.verify|verify} messages. + * @param message WebStreamData message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1beta.DataStream.IWebStreamData, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified WebStreamData message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.DataStream.WebStreamData.verify|verify} messages. + * @param message WebStreamData message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1beta.DataStream.IWebStreamData, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a WebStreamData message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns WebStreamData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1beta.DataStream.WebStreamData; + + /** + * Decodes a WebStreamData message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns WebStreamData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1beta.DataStream.WebStreamData; + + /** + * Verifies a WebStreamData message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a WebStreamData message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns WebStreamData + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1beta.DataStream.WebStreamData; + + /** + * Creates a plain object from a WebStreamData message. Also converts values to other types if specified. + * @param message WebStreamData + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1beta.DataStream.WebStreamData, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this WebStreamData to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for WebStreamData + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AndroidAppStreamData. */ + interface IAndroidAppStreamData { + + /** AndroidAppStreamData firebaseAppId */ + firebaseAppId?: (string|null); + + /** AndroidAppStreamData packageName */ + packageName?: (string|null); + } + + /** Represents an AndroidAppStreamData. */ + class AndroidAppStreamData implements IAndroidAppStreamData { + + /** + * Constructs a new AndroidAppStreamData. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1beta.DataStream.IAndroidAppStreamData); + + /** AndroidAppStreamData firebaseAppId. */ + public firebaseAppId: string; + + /** AndroidAppStreamData packageName. */ + public packageName: string; + + /** + * Creates a new AndroidAppStreamData instance using the specified properties. + * @param [properties] Properties to set + * @returns AndroidAppStreamData instance + */ + public static create(properties?: google.analytics.admin.v1beta.DataStream.IAndroidAppStreamData): google.analytics.admin.v1beta.DataStream.AndroidAppStreamData; + + /** + * Encodes the specified AndroidAppStreamData message. Does not implicitly {@link google.analytics.admin.v1beta.DataStream.AndroidAppStreamData.verify|verify} messages. + * @param message AndroidAppStreamData message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1beta.DataStream.IAndroidAppStreamData, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AndroidAppStreamData message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.DataStream.AndroidAppStreamData.verify|verify} messages. + * @param message AndroidAppStreamData message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1beta.DataStream.IAndroidAppStreamData, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AndroidAppStreamData message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AndroidAppStreamData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1beta.DataStream.AndroidAppStreamData; + + /** + * Decodes an AndroidAppStreamData message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AndroidAppStreamData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1beta.DataStream.AndroidAppStreamData; + + /** + * Verifies an AndroidAppStreamData message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AndroidAppStreamData message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AndroidAppStreamData + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1beta.DataStream.AndroidAppStreamData; + + /** + * Creates a plain object from an AndroidAppStreamData message. Also converts values to other types if specified. + * @param message AndroidAppStreamData + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1beta.DataStream.AndroidAppStreamData, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AndroidAppStreamData to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AndroidAppStreamData + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an IosAppStreamData. */ + interface IIosAppStreamData { + + /** IosAppStreamData firebaseAppId */ + firebaseAppId?: (string|null); + + /** IosAppStreamData bundleId */ + bundleId?: (string|null); + } + + /** Represents an IosAppStreamData. */ + class IosAppStreamData implements IIosAppStreamData { + + /** + * Constructs a new IosAppStreamData. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1beta.DataStream.IIosAppStreamData); + + /** IosAppStreamData firebaseAppId. */ + public firebaseAppId: string; + + /** IosAppStreamData bundleId. */ + public bundleId: string; + + /** + * Creates a new IosAppStreamData instance using the specified properties. + * @param [properties] Properties to set + * @returns IosAppStreamData instance + */ + public static create(properties?: google.analytics.admin.v1beta.DataStream.IIosAppStreamData): google.analytics.admin.v1beta.DataStream.IosAppStreamData; + + /** + * Encodes the specified IosAppStreamData message. Does not implicitly {@link google.analytics.admin.v1beta.DataStream.IosAppStreamData.verify|verify} messages. + * @param message IosAppStreamData message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1beta.DataStream.IIosAppStreamData, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified IosAppStreamData message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.DataStream.IosAppStreamData.verify|verify} messages. + * @param message IosAppStreamData message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1beta.DataStream.IIosAppStreamData, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an IosAppStreamData message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns IosAppStreamData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1beta.DataStream.IosAppStreamData; + + /** + * Decodes an IosAppStreamData message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns IosAppStreamData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1beta.DataStream.IosAppStreamData; + + /** + * Verifies an IosAppStreamData message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an IosAppStreamData message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns IosAppStreamData + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1beta.DataStream.IosAppStreamData; + + /** + * Creates a plain object from an IosAppStreamData message. Also converts values to other types if specified. + * @param message IosAppStreamData + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1beta.DataStream.IosAppStreamData, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this IosAppStreamData to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for IosAppStreamData + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** DataStreamType enum. */ + enum DataStreamType { + DATA_STREAM_TYPE_UNSPECIFIED = 0, + WEB_DATA_STREAM = 1, + ANDROID_APP_DATA_STREAM = 2, + IOS_APP_DATA_STREAM = 3 + } + } + + /** Properties of a FirebaseLink. */ + interface IFirebaseLink { + + /** FirebaseLink name */ + name?: (string|null); + + /** FirebaseLink project */ + project?: (string|null); + + /** FirebaseLink createTime */ + createTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents a FirebaseLink. */ + class FirebaseLink implements IFirebaseLink { + + /** + * Constructs a new FirebaseLink. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1beta.IFirebaseLink); + + /** FirebaseLink name. */ + public name: string; + + /** FirebaseLink project. */ + public project: string; + + /** FirebaseLink createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** + * Creates a new FirebaseLink instance using the specified properties. + * @param [properties] Properties to set + * @returns FirebaseLink instance + */ + public static create(properties?: google.analytics.admin.v1beta.IFirebaseLink): google.analytics.admin.v1beta.FirebaseLink; + + /** + * Encodes the specified FirebaseLink message. Does not implicitly {@link google.analytics.admin.v1beta.FirebaseLink.verify|verify} messages. + * @param message FirebaseLink message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1beta.IFirebaseLink, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FirebaseLink message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.FirebaseLink.verify|verify} messages. + * @param message FirebaseLink message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1beta.IFirebaseLink, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FirebaseLink message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FirebaseLink + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1beta.FirebaseLink; + + /** + * Decodes a FirebaseLink message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FirebaseLink + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1beta.FirebaseLink; + + /** + * Verifies a FirebaseLink message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FirebaseLink message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FirebaseLink + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1beta.FirebaseLink; + + /** + * Creates a plain object from a FirebaseLink message. Also converts values to other types if specified. + * @param message FirebaseLink + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1beta.FirebaseLink, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FirebaseLink to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FirebaseLink + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GoogleAdsLink. */ + interface IGoogleAdsLink { + + /** GoogleAdsLink name */ + name?: (string|null); + + /** GoogleAdsLink customerId */ + customerId?: (string|null); + + /** GoogleAdsLink canManageClients */ + canManageClients?: (boolean|null); + + /** GoogleAdsLink adsPersonalizationEnabled */ + adsPersonalizationEnabled?: (google.protobuf.IBoolValue|null); + + /** GoogleAdsLink createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** GoogleAdsLink updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** GoogleAdsLink creatorEmailAddress */ + creatorEmailAddress?: (string|null); + } + + /** Represents a GoogleAdsLink. */ + class GoogleAdsLink implements IGoogleAdsLink { + + /** + * Constructs a new GoogleAdsLink. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1beta.IGoogleAdsLink); + + /** GoogleAdsLink name. */ + public name: string; + + /** GoogleAdsLink customerId. */ + public customerId: string; + + /** GoogleAdsLink canManageClients. */ + public canManageClients: boolean; + + /** GoogleAdsLink adsPersonalizationEnabled. */ + public adsPersonalizationEnabled?: (google.protobuf.IBoolValue|null); + + /** GoogleAdsLink createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** GoogleAdsLink updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** GoogleAdsLink creatorEmailAddress. */ + public creatorEmailAddress: string; + + /** + * Creates a new GoogleAdsLink instance using the specified properties. + * @param [properties] Properties to set + * @returns GoogleAdsLink instance + */ + public static create(properties?: google.analytics.admin.v1beta.IGoogleAdsLink): google.analytics.admin.v1beta.GoogleAdsLink; + + /** + * Encodes the specified GoogleAdsLink message. Does not implicitly {@link google.analytics.admin.v1beta.GoogleAdsLink.verify|verify} messages. + * @param message GoogleAdsLink message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1beta.IGoogleAdsLink, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GoogleAdsLink message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.GoogleAdsLink.verify|verify} messages. + * @param message GoogleAdsLink message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1beta.IGoogleAdsLink, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GoogleAdsLink message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GoogleAdsLink + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1beta.GoogleAdsLink; + + /** + * Decodes a GoogleAdsLink message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GoogleAdsLink + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1beta.GoogleAdsLink; + + /** + * Verifies a GoogleAdsLink message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GoogleAdsLink message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GoogleAdsLink + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1beta.GoogleAdsLink; + + /** + * Creates a plain object from a GoogleAdsLink message. Also converts values to other types if specified. + * @param message GoogleAdsLink + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1beta.GoogleAdsLink, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GoogleAdsLink to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GoogleAdsLink + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DataSharingSettings. */ + interface IDataSharingSettings { + + /** DataSharingSettings name */ + name?: (string|null); + + /** DataSharingSettings sharingWithGoogleSupportEnabled */ + sharingWithGoogleSupportEnabled?: (boolean|null); + + /** DataSharingSettings sharingWithGoogleAssignedSalesEnabled */ + sharingWithGoogleAssignedSalesEnabled?: (boolean|null); + + /** DataSharingSettings sharingWithGoogleAnySalesEnabled */ + sharingWithGoogleAnySalesEnabled?: (boolean|null); + + /** DataSharingSettings sharingWithGoogleProductsEnabled */ + sharingWithGoogleProductsEnabled?: (boolean|null); + + /** DataSharingSettings sharingWithOthersEnabled */ + sharingWithOthersEnabled?: (boolean|null); + } + + /** Represents a DataSharingSettings. */ + class DataSharingSettings implements IDataSharingSettings { + + /** + * Constructs a new DataSharingSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1beta.IDataSharingSettings); + + /** DataSharingSettings name. */ + public name: string; + + /** DataSharingSettings sharingWithGoogleSupportEnabled. */ + public sharingWithGoogleSupportEnabled: boolean; + + /** DataSharingSettings sharingWithGoogleAssignedSalesEnabled. */ + public sharingWithGoogleAssignedSalesEnabled: boolean; + + /** DataSharingSettings sharingWithGoogleAnySalesEnabled. */ + public sharingWithGoogleAnySalesEnabled: boolean; + + /** DataSharingSettings sharingWithGoogleProductsEnabled. */ + public sharingWithGoogleProductsEnabled: boolean; + + /** DataSharingSettings sharingWithOthersEnabled. */ + public sharingWithOthersEnabled: boolean; + + /** + * Creates a new DataSharingSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns DataSharingSettings instance + */ + public static create(properties?: google.analytics.admin.v1beta.IDataSharingSettings): google.analytics.admin.v1beta.DataSharingSettings; + + /** + * Encodes the specified DataSharingSettings message. Does not implicitly {@link google.analytics.admin.v1beta.DataSharingSettings.verify|verify} messages. + * @param message DataSharingSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1beta.IDataSharingSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DataSharingSettings message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.DataSharingSettings.verify|verify} messages. + * @param message DataSharingSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1beta.IDataSharingSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DataSharingSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DataSharingSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1beta.DataSharingSettings; + + /** + * Decodes a DataSharingSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DataSharingSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1beta.DataSharingSettings; + + /** + * Verifies a DataSharingSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DataSharingSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DataSharingSettings + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1beta.DataSharingSettings; + + /** + * Creates a plain object from a DataSharingSettings message. Also converts values to other types if specified. + * @param message DataSharingSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1beta.DataSharingSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DataSharingSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DataSharingSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AccountSummary. */ + interface IAccountSummary { + + /** AccountSummary name */ + name?: (string|null); + + /** AccountSummary account */ + account?: (string|null); + + /** AccountSummary displayName */ + displayName?: (string|null); + + /** AccountSummary propertySummaries */ + propertySummaries?: (google.analytics.admin.v1beta.IPropertySummary[]|null); + } + + /** Represents an AccountSummary. */ + class AccountSummary implements IAccountSummary { + + /** + * Constructs a new AccountSummary. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1beta.IAccountSummary); + + /** AccountSummary name. */ + public name: string; + + /** AccountSummary account. */ + public account: string; + + /** AccountSummary displayName. */ + public displayName: string; + + /** AccountSummary propertySummaries. */ + public propertySummaries: google.analytics.admin.v1beta.IPropertySummary[]; + + /** + * Creates a new AccountSummary instance using the specified properties. + * @param [properties] Properties to set + * @returns AccountSummary instance + */ + public static create(properties?: google.analytics.admin.v1beta.IAccountSummary): google.analytics.admin.v1beta.AccountSummary; + + /** + * Encodes the specified AccountSummary message. Does not implicitly {@link google.analytics.admin.v1beta.AccountSummary.verify|verify} messages. + * @param message AccountSummary message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1beta.IAccountSummary, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AccountSummary message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.AccountSummary.verify|verify} messages. + * @param message AccountSummary message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1beta.IAccountSummary, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AccountSummary message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AccountSummary + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1beta.AccountSummary; + + /** + * Decodes an AccountSummary message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AccountSummary + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1beta.AccountSummary; + + /** + * Verifies an AccountSummary message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AccountSummary message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AccountSummary + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1beta.AccountSummary; + + /** + * Creates a plain object from an AccountSummary message. Also converts values to other types if specified. + * @param message AccountSummary + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1beta.AccountSummary, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AccountSummary to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AccountSummary + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PropertySummary. */ + interface IPropertySummary { + + /** PropertySummary property */ + property?: (string|null); + + /** PropertySummary displayName */ + displayName?: (string|null); + + /** PropertySummary propertyType */ + propertyType?: (google.analytics.admin.v1beta.PropertyType|keyof typeof google.analytics.admin.v1beta.PropertyType|null); + + /** PropertySummary parent */ + parent?: (string|null); + } + + /** Represents a PropertySummary. */ + class PropertySummary implements IPropertySummary { + + /** + * Constructs a new PropertySummary. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1beta.IPropertySummary); + + /** PropertySummary property. */ + public property: string; + + /** PropertySummary displayName. */ + public displayName: string; + + /** PropertySummary propertyType. */ + public propertyType: (google.analytics.admin.v1beta.PropertyType|keyof typeof google.analytics.admin.v1beta.PropertyType); + + /** PropertySummary parent. */ + public parent: string; + + /** + * Creates a new PropertySummary instance using the specified properties. + * @param [properties] Properties to set + * @returns PropertySummary instance + */ + public static create(properties?: google.analytics.admin.v1beta.IPropertySummary): google.analytics.admin.v1beta.PropertySummary; + + /** + * Encodes the specified PropertySummary message. Does not implicitly {@link google.analytics.admin.v1beta.PropertySummary.verify|verify} messages. + * @param message PropertySummary message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1beta.IPropertySummary, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PropertySummary message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.PropertySummary.verify|verify} messages. + * @param message PropertySummary message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1beta.IPropertySummary, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PropertySummary message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PropertySummary + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1beta.PropertySummary; + + /** + * Decodes a PropertySummary message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PropertySummary + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1beta.PropertySummary; + + /** + * Verifies a PropertySummary message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PropertySummary message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PropertySummary + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1beta.PropertySummary; + + /** + * Creates a plain object from a PropertySummary message. Also converts values to other types if specified. + * @param message PropertySummary + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1beta.PropertySummary, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PropertySummary to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PropertySummary + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MeasurementProtocolSecret. */ + interface IMeasurementProtocolSecret { + + /** MeasurementProtocolSecret name */ + name?: (string|null); + + /** MeasurementProtocolSecret displayName */ + displayName?: (string|null); + + /** MeasurementProtocolSecret secretValue */ + secretValue?: (string|null); + } + + /** Represents a MeasurementProtocolSecret. */ + class MeasurementProtocolSecret implements IMeasurementProtocolSecret { + + /** + * Constructs a new MeasurementProtocolSecret. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1beta.IMeasurementProtocolSecret); + + /** MeasurementProtocolSecret name. */ + public name: string; + + /** MeasurementProtocolSecret displayName. */ + public displayName: string; + + /** MeasurementProtocolSecret secretValue. */ + public secretValue: string; + + /** + * Creates a new MeasurementProtocolSecret instance using the specified properties. + * @param [properties] Properties to set + * @returns MeasurementProtocolSecret instance + */ + public static create(properties?: google.analytics.admin.v1beta.IMeasurementProtocolSecret): google.analytics.admin.v1beta.MeasurementProtocolSecret; + + /** + * Encodes the specified MeasurementProtocolSecret message. Does not implicitly {@link google.analytics.admin.v1beta.MeasurementProtocolSecret.verify|verify} messages. + * @param message MeasurementProtocolSecret message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1beta.IMeasurementProtocolSecret, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MeasurementProtocolSecret message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.MeasurementProtocolSecret.verify|verify} messages. + * @param message MeasurementProtocolSecret message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1beta.IMeasurementProtocolSecret, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MeasurementProtocolSecret message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MeasurementProtocolSecret + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1beta.MeasurementProtocolSecret; + + /** + * Decodes a MeasurementProtocolSecret message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MeasurementProtocolSecret + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1beta.MeasurementProtocolSecret; + + /** + * Verifies a MeasurementProtocolSecret message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MeasurementProtocolSecret message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MeasurementProtocolSecret + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1beta.MeasurementProtocolSecret; + + /** + * Creates a plain object from a MeasurementProtocolSecret message. Also converts values to other types if specified. + * @param message MeasurementProtocolSecret + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1beta.MeasurementProtocolSecret, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MeasurementProtocolSecret to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MeasurementProtocolSecret + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ChangeHistoryEvent. */ + interface IChangeHistoryEvent { + + /** ChangeHistoryEvent id */ + id?: (string|null); + + /** ChangeHistoryEvent changeTime */ + changeTime?: (google.protobuf.ITimestamp|null); + + /** ChangeHistoryEvent actorType */ + actorType?: (google.analytics.admin.v1beta.ActorType|keyof typeof google.analytics.admin.v1beta.ActorType|null); + + /** ChangeHistoryEvent userActorEmail */ + userActorEmail?: (string|null); + + /** ChangeHistoryEvent changesFiltered */ + changesFiltered?: (boolean|null); + + /** ChangeHistoryEvent changes */ + changes?: (google.analytics.admin.v1beta.IChangeHistoryChange[]|null); + } + + /** Represents a ChangeHistoryEvent. */ + class ChangeHistoryEvent implements IChangeHistoryEvent { + + /** + * Constructs a new ChangeHistoryEvent. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1beta.IChangeHistoryEvent); + + /** ChangeHistoryEvent id. */ + public id: string; + + /** ChangeHistoryEvent changeTime. */ + public changeTime?: (google.protobuf.ITimestamp|null); + + /** ChangeHistoryEvent actorType. */ + public actorType: (google.analytics.admin.v1beta.ActorType|keyof typeof google.analytics.admin.v1beta.ActorType); + + /** ChangeHistoryEvent userActorEmail. */ + public userActorEmail: string; + + /** ChangeHistoryEvent changesFiltered. */ + public changesFiltered: boolean; + + /** ChangeHistoryEvent changes. */ + public changes: google.analytics.admin.v1beta.IChangeHistoryChange[]; + + /** + * Creates a new ChangeHistoryEvent instance using the specified properties. + * @param [properties] Properties to set + * @returns ChangeHistoryEvent instance + */ + public static create(properties?: google.analytics.admin.v1beta.IChangeHistoryEvent): google.analytics.admin.v1beta.ChangeHistoryEvent; + + /** + * Encodes the specified ChangeHistoryEvent message. Does not implicitly {@link google.analytics.admin.v1beta.ChangeHistoryEvent.verify|verify} messages. + * @param message ChangeHistoryEvent message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1beta.IChangeHistoryEvent, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ChangeHistoryEvent message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.ChangeHistoryEvent.verify|verify} messages. + * @param message ChangeHistoryEvent message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1beta.IChangeHistoryEvent, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ChangeHistoryEvent message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ChangeHistoryEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1beta.ChangeHistoryEvent; + + /** + * Decodes a ChangeHistoryEvent message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ChangeHistoryEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1beta.ChangeHistoryEvent; + + /** + * Verifies a ChangeHistoryEvent message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ChangeHistoryEvent message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ChangeHistoryEvent + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1beta.ChangeHistoryEvent; + + /** + * Creates a plain object from a ChangeHistoryEvent message. Also converts values to other types if specified. + * @param message ChangeHistoryEvent + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1beta.ChangeHistoryEvent, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ChangeHistoryEvent to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ChangeHistoryEvent + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ChangeHistoryChange. */ + interface IChangeHistoryChange { + + /** ChangeHistoryChange resource */ + resource?: (string|null); + + /** ChangeHistoryChange action */ + action?: (google.analytics.admin.v1beta.ActionType|keyof typeof google.analytics.admin.v1beta.ActionType|null); + + /** ChangeHistoryChange resourceBeforeChange */ + resourceBeforeChange?: (google.analytics.admin.v1beta.ChangeHistoryChange.IChangeHistoryResource|null); + + /** ChangeHistoryChange resourceAfterChange */ + resourceAfterChange?: (google.analytics.admin.v1beta.ChangeHistoryChange.IChangeHistoryResource|null); + } + + /** Represents a ChangeHistoryChange. */ + class ChangeHistoryChange implements IChangeHistoryChange { + + /** + * Constructs a new ChangeHistoryChange. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1beta.IChangeHistoryChange); + + /** ChangeHistoryChange resource. */ + public resource: string; + + /** ChangeHistoryChange action. */ + public action: (google.analytics.admin.v1beta.ActionType|keyof typeof google.analytics.admin.v1beta.ActionType); + + /** ChangeHistoryChange resourceBeforeChange. */ + public resourceBeforeChange?: (google.analytics.admin.v1beta.ChangeHistoryChange.IChangeHistoryResource|null); + + /** ChangeHistoryChange resourceAfterChange. */ + public resourceAfterChange?: (google.analytics.admin.v1beta.ChangeHistoryChange.IChangeHistoryResource|null); + + /** + * Creates a new ChangeHistoryChange instance using the specified properties. + * @param [properties] Properties to set + * @returns ChangeHistoryChange instance + */ + public static create(properties?: google.analytics.admin.v1beta.IChangeHistoryChange): google.analytics.admin.v1beta.ChangeHistoryChange; + + /** + * Encodes the specified ChangeHistoryChange message. Does not implicitly {@link google.analytics.admin.v1beta.ChangeHistoryChange.verify|verify} messages. + * @param message ChangeHistoryChange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1beta.IChangeHistoryChange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ChangeHistoryChange message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.ChangeHistoryChange.verify|verify} messages. + * @param message ChangeHistoryChange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1beta.IChangeHistoryChange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ChangeHistoryChange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ChangeHistoryChange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1beta.ChangeHistoryChange; + + /** + * Decodes a ChangeHistoryChange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ChangeHistoryChange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1beta.ChangeHistoryChange; + + /** + * Verifies a ChangeHistoryChange message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ChangeHistoryChange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ChangeHistoryChange + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1beta.ChangeHistoryChange; + + /** + * Creates a plain object from a ChangeHistoryChange message. Also converts values to other types if specified. + * @param message ChangeHistoryChange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1beta.ChangeHistoryChange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ChangeHistoryChange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ChangeHistoryChange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ChangeHistoryChange { + + /** Properties of a ChangeHistoryResource. */ + interface IChangeHistoryResource { + + /** ChangeHistoryResource account */ + account?: (google.analytics.admin.v1beta.IAccount|null); + + /** ChangeHistoryResource property */ + property?: (google.analytics.admin.v1beta.IProperty|null); + + /** ChangeHistoryResource firebaseLink */ + firebaseLink?: (google.analytics.admin.v1beta.IFirebaseLink|null); + + /** ChangeHistoryResource googleAdsLink */ + googleAdsLink?: (google.analytics.admin.v1beta.IGoogleAdsLink|null); + + /** ChangeHistoryResource conversionEvent */ + conversionEvent?: (google.analytics.admin.v1beta.IConversionEvent|null); + + /** ChangeHistoryResource measurementProtocolSecret */ + measurementProtocolSecret?: (google.analytics.admin.v1beta.IMeasurementProtocolSecret|null); + + /** ChangeHistoryResource dataRetentionSettings */ + dataRetentionSettings?: (google.analytics.admin.v1beta.IDataRetentionSettings|null); + + /** ChangeHistoryResource dataStream */ + dataStream?: (google.analytics.admin.v1beta.IDataStream|null); + } + + /** Represents a ChangeHistoryResource. */ + class ChangeHistoryResource implements IChangeHistoryResource { + + /** + * Constructs a new ChangeHistoryResource. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1beta.ChangeHistoryChange.IChangeHistoryResource); + + /** ChangeHistoryResource account. */ + public account?: (google.analytics.admin.v1beta.IAccount|null); + + /** ChangeHistoryResource property. */ + public property?: (google.analytics.admin.v1beta.IProperty|null); + + /** ChangeHistoryResource firebaseLink. */ + public firebaseLink?: (google.analytics.admin.v1beta.IFirebaseLink|null); + + /** ChangeHistoryResource googleAdsLink. */ + public googleAdsLink?: (google.analytics.admin.v1beta.IGoogleAdsLink|null); + + /** ChangeHistoryResource conversionEvent. */ + public conversionEvent?: (google.analytics.admin.v1beta.IConversionEvent|null); + + /** ChangeHistoryResource measurementProtocolSecret. */ + public measurementProtocolSecret?: (google.analytics.admin.v1beta.IMeasurementProtocolSecret|null); + + /** ChangeHistoryResource dataRetentionSettings. */ + public dataRetentionSettings?: (google.analytics.admin.v1beta.IDataRetentionSettings|null); + + /** ChangeHistoryResource dataStream. */ + public dataStream?: (google.analytics.admin.v1beta.IDataStream|null); + + /** ChangeHistoryResource resource. */ + public resource?: ("account"|"property"|"firebaseLink"|"googleAdsLink"|"conversionEvent"|"measurementProtocolSecret"|"dataRetentionSettings"|"dataStream"); + + /** + * Creates a new ChangeHistoryResource instance using the specified properties. + * @param [properties] Properties to set + * @returns ChangeHistoryResource instance + */ + public static create(properties?: google.analytics.admin.v1beta.ChangeHistoryChange.IChangeHistoryResource): google.analytics.admin.v1beta.ChangeHistoryChange.ChangeHistoryResource; + + /** + * Encodes the specified ChangeHistoryResource message. Does not implicitly {@link google.analytics.admin.v1beta.ChangeHistoryChange.ChangeHistoryResource.verify|verify} messages. + * @param message ChangeHistoryResource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1beta.ChangeHistoryChange.IChangeHistoryResource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ChangeHistoryResource message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.ChangeHistoryChange.ChangeHistoryResource.verify|verify} messages. + * @param message ChangeHistoryResource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1beta.ChangeHistoryChange.IChangeHistoryResource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ChangeHistoryResource message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ChangeHistoryResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1beta.ChangeHistoryChange.ChangeHistoryResource; + + /** + * Decodes a ChangeHistoryResource message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ChangeHistoryResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1beta.ChangeHistoryChange.ChangeHistoryResource; + + /** + * Verifies a ChangeHistoryResource message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ChangeHistoryResource message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ChangeHistoryResource + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1beta.ChangeHistoryChange.ChangeHistoryResource; + + /** + * Creates a plain object from a ChangeHistoryResource message. Also converts values to other types if specified. + * @param message ChangeHistoryResource + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1beta.ChangeHistoryChange.ChangeHistoryResource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ChangeHistoryResource to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ChangeHistoryResource + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a ConversionEvent. */ + interface IConversionEvent { + + /** ConversionEvent name */ + name?: (string|null); + + /** ConversionEvent eventName */ + eventName?: (string|null); + + /** ConversionEvent createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** ConversionEvent deletable */ + deletable?: (boolean|null); + + /** ConversionEvent custom */ + custom?: (boolean|null); + } + + /** Represents a ConversionEvent. */ + class ConversionEvent implements IConversionEvent { + + /** + * Constructs a new ConversionEvent. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1beta.IConversionEvent); + + /** ConversionEvent name. */ + public name: string; + + /** ConversionEvent eventName. */ + public eventName: string; + + /** ConversionEvent createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** ConversionEvent deletable. */ + public deletable: boolean; + + /** ConversionEvent custom. */ + public custom: boolean; + + /** + * Creates a new ConversionEvent instance using the specified properties. + * @param [properties] Properties to set + * @returns ConversionEvent instance + */ + public static create(properties?: google.analytics.admin.v1beta.IConversionEvent): google.analytics.admin.v1beta.ConversionEvent; + + /** + * Encodes the specified ConversionEvent message. Does not implicitly {@link google.analytics.admin.v1beta.ConversionEvent.verify|verify} messages. + * @param message ConversionEvent message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1beta.IConversionEvent, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ConversionEvent message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.ConversionEvent.verify|verify} messages. + * @param message ConversionEvent message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1beta.IConversionEvent, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ConversionEvent message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ConversionEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1beta.ConversionEvent; + + /** + * Decodes a ConversionEvent message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ConversionEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1beta.ConversionEvent; + + /** + * Verifies a ConversionEvent message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ConversionEvent message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ConversionEvent + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1beta.ConversionEvent; + + /** + * Creates a plain object from a ConversionEvent message. Also converts values to other types if specified. + * @param message ConversionEvent + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1beta.ConversionEvent, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ConversionEvent to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ConversionEvent + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CustomDimension. */ + interface ICustomDimension { + + /** CustomDimension name */ + name?: (string|null); + + /** CustomDimension parameterName */ + parameterName?: (string|null); + + /** CustomDimension displayName */ + displayName?: (string|null); + + /** CustomDimension description */ + description?: (string|null); + + /** CustomDimension scope */ + scope?: (google.analytics.admin.v1beta.CustomDimension.DimensionScope|keyof typeof google.analytics.admin.v1beta.CustomDimension.DimensionScope|null); + + /** CustomDimension disallowAdsPersonalization */ + disallowAdsPersonalization?: (boolean|null); + } + + /** Represents a CustomDimension. */ + class CustomDimension implements ICustomDimension { + + /** + * Constructs a new CustomDimension. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1beta.ICustomDimension); + + /** CustomDimension name. */ + public name: string; + + /** CustomDimension parameterName. */ + public parameterName: string; + + /** CustomDimension displayName. */ + public displayName: string; + + /** CustomDimension description. */ + public description: string; + + /** CustomDimension scope. */ + public scope: (google.analytics.admin.v1beta.CustomDimension.DimensionScope|keyof typeof google.analytics.admin.v1beta.CustomDimension.DimensionScope); + + /** CustomDimension disallowAdsPersonalization. */ + public disallowAdsPersonalization: boolean; + + /** + * Creates a new CustomDimension instance using the specified properties. + * @param [properties] Properties to set + * @returns CustomDimension instance + */ + public static create(properties?: google.analytics.admin.v1beta.ICustomDimension): google.analytics.admin.v1beta.CustomDimension; + + /** + * Encodes the specified CustomDimension message. Does not implicitly {@link google.analytics.admin.v1beta.CustomDimension.verify|verify} messages. + * @param message CustomDimension message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1beta.ICustomDimension, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CustomDimension message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.CustomDimension.verify|verify} messages. + * @param message CustomDimension message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1beta.ICustomDimension, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CustomDimension message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CustomDimension + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1beta.CustomDimension; + + /** + * Decodes a CustomDimension message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CustomDimension + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1beta.CustomDimension; + + /** + * Verifies a CustomDimension message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CustomDimension message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CustomDimension + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1beta.CustomDimension; + + /** + * Creates a plain object from a CustomDimension message. Also converts values to other types if specified. + * @param message CustomDimension + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1beta.CustomDimension, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CustomDimension to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CustomDimension + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace CustomDimension { + + /** DimensionScope enum. */ + enum DimensionScope { + DIMENSION_SCOPE_UNSPECIFIED = 0, + EVENT = 1, + USER = 2 + } + } + + /** Properties of a CustomMetric. */ + interface ICustomMetric { + + /** CustomMetric name */ + name?: (string|null); + + /** CustomMetric parameterName */ + parameterName?: (string|null); + + /** CustomMetric displayName */ + displayName?: (string|null); + + /** CustomMetric description */ + description?: (string|null); + + /** CustomMetric measurementUnit */ + measurementUnit?: (google.analytics.admin.v1beta.CustomMetric.MeasurementUnit|keyof typeof google.analytics.admin.v1beta.CustomMetric.MeasurementUnit|null); + + /** CustomMetric scope */ + scope?: (google.analytics.admin.v1beta.CustomMetric.MetricScope|keyof typeof google.analytics.admin.v1beta.CustomMetric.MetricScope|null); + + /** CustomMetric restrictedMetricType */ + restrictedMetricType?: (google.analytics.admin.v1beta.CustomMetric.RestrictedMetricType[]|null); + } + + /** Represents a CustomMetric. */ + class CustomMetric implements ICustomMetric { + + /** + * Constructs a new CustomMetric. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1beta.ICustomMetric); + + /** CustomMetric name. */ + public name: string; + + /** CustomMetric parameterName. */ + public parameterName: string; + + /** CustomMetric displayName. */ + public displayName: string; + + /** CustomMetric description. */ + public description: string; + + /** CustomMetric measurementUnit. */ + public measurementUnit: (google.analytics.admin.v1beta.CustomMetric.MeasurementUnit|keyof typeof google.analytics.admin.v1beta.CustomMetric.MeasurementUnit); + + /** CustomMetric scope. */ + public scope: (google.analytics.admin.v1beta.CustomMetric.MetricScope|keyof typeof google.analytics.admin.v1beta.CustomMetric.MetricScope); + + /** CustomMetric restrictedMetricType. */ + public restrictedMetricType: google.analytics.admin.v1beta.CustomMetric.RestrictedMetricType[]; + + /** + * Creates a new CustomMetric instance using the specified properties. + * @param [properties] Properties to set + * @returns CustomMetric instance + */ + public static create(properties?: google.analytics.admin.v1beta.ICustomMetric): google.analytics.admin.v1beta.CustomMetric; + + /** + * Encodes the specified CustomMetric message. Does not implicitly {@link google.analytics.admin.v1beta.CustomMetric.verify|verify} messages. + * @param message CustomMetric message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1beta.ICustomMetric, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CustomMetric message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.CustomMetric.verify|verify} messages. + * @param message CustomMetric message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1beta.ICustomMetric, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CustomMetric message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CustomMetric + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1beta.CustomMetric; + + /** + * Decodes a CustomMetric message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CustomMetric + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1beta.CustomMetric; + + /** + * Verifies a CustomMetric message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CustomMetric message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CustomMetric + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1beta.CustomMetric; + + /** + * Creates a plain object from a CustomMetric message. Also converts values to other types if specified. + * @param message CustomMetric + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1beta.CustomMetric, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CustomMetric to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CustomMetric + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace CustomMetric { + + /** MeasurementUnit enum. */ + enum MeasurementUnit { + MEASUREMENT_UNIT_UNSPECIFIED = 0, + STANDARD = 1, + CURRENCY = 2, + FEET = 3, + METERS = 4, + KILOMETERS = 5, + MILES = 6, + MILLISECONDS = 7, + SECONDS = 8, + MINUTES = 9, + HOURS = 10 + } + + /** MetricScope enum. */ + enum MetricScope { + METRIC_SCOPE_UNSPECIFIED = 0, + EVENT = 1 + } + + /** RestrictedMetricType enum. */ + enum RestrictedMetricType { + RESTRICTED_METRIC_TYPE_UNSPECIFIED = 0, + COST_DATA = 1, + REVENUE_DATA = 2 + } + } + + /** Properties of a DataRetentionSettings. */ + interface IDataRetentionSettings { + + /** DataRetentionSettings name */ + name?: (string|null); + + /** DataRetentionSettings eventDataRetention */ + eventDataRetention?: (google.analytics.admin.v1beta.DataRetentionSettings.RetentionDuration|keyof typeof google.analytics.admin.v1beta.DataRetentionSettings.RetentionDuration|null); + + /** DataRetentionSettings resetUserDataOnNewActivity */ + resetUserDataOnNewActivity?: (boolean|null); + } + + /** Represents a DataRetentionSettings. */ + class DataRetentionSettings implements IDataRetentionSettings { + + /** + * Constructs a new DataRetentionSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.analytics.admin.v1beta.IDataRetentionSettings); + + /** DataRetentionSettings name. */ + public name: string; + + /** DataRetentionSettings eventDataRetention. */ + public eventDataRetention: (google.analytics.admin.v1beta.DataRetentionSettings.RetentionDuration|keyof typeof google.analytics.admin.v1beta.DataRetentionSettings.RetentionDuration); + + /** DataRetentionSettings resetUserDataOnNewActivity. */ + public resetUserDataOnNewActivity: boolean; + + /** + * Creates a new DataRetentionSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns DataRetentionSettings instance + */ + public static create(properties?: google.analytics.admin.v1beta.IDataRetentionSettings): google.analytics.admin.v1beta.DataRetentionSettings; + + /** + * Encodes the specified DataRetentionSettings message. Does not implicitly {@link google.analytics.admin.v1beta.DataRetentionSettings.verify|verify} messages. + * @param message DataRetentionSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.analytics.admin.v1beta.IDataRetentionSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DataRetentionSettings message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.DataRetentionSettings.verify|verify} messages. + * @param message DataRetentionSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.analytics.admin.v1beta.IDataRetentionSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DataRetentionSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DataRetentionSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.admin.v1beta.DataRetentionSettings; + + /** + * Decodes a DataRetentionSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DataRetentionSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.admin.v1beta.DataRetentionSettings; + + /** + * Verifies a DataRetentionSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DataRetentionSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DataRetentionSettings + */ + public static fromObject(object: { [k: string]: any }): google.analytics.admin.v1beta.DataRetentionSettings; + + /** + * Creates a plain object from a DataRetentionSettings message. Also converts values to other types if specified. + * @param message DataRetentionSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.analytics.admin.v1beta.DataRetentionSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DataRetentionSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DataRetentionSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace DataRetentionSettings { + + /** RetentionDuration enum. */ + enum RetentionDuration { + RETENTION_DURATION_UNSPECIFIED = 0, + TWO_MONTHS = 1, + FOURTEEN_MONTHS = 3, + TWENTY_SIX_MONTHS = 4, + THIRTY_EIGHT_MONTHS = 5, + FIFTY_MONTHS = 6 + } + } + } + } + } + + /** 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 + } + + /** 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; + } + } + + /** Namespace protobuf. */ + namespace protobuf { + + /** Properties of a FileDescriptorSet. */ + interface IFileDescriptorSet { + + /** FileDescriptorSet file */ + file?: (google.protobuf.IFileDescriptorProto[]|null); + } + + /** Represents a FileDescriptorSet. */ + class FileDescriptorSet implements IFileDescriptorSet { + + /** + * Constructs a new FileDescriptorSet. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFileDescriptorSet); + + /** FileDescriptorSet file. */ + public file: google.protobuf.IFileDescriptorProto[]; + + /** + * Creates a new FileDescriptorSet instance using the specified properties. + * @param [properties] Properties to set + * @returns FileDescriptorSet instance + */ + public static create(properties?: google.protobuf.IFileDescriptorSet): google.protobuf.FileDescriptorSet; + + /** + * Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @param message FileDescriptorSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFileDescriptorSet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FileDescriptorSet message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @param message FileDescriptorSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFileDescriptorSet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileDescriptorSet; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileDescriptorSet; + + /** + * Verifies a FileDescriptorSet message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FileDescriptorSet message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FileDescriptorSet + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorSet; + + /** + * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified. + * @param message FileDescriptorSet + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FileDescriptorSet, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FileDescriptorSet to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FileDescriptorSet + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FileDescriptorProto. */ + interface IFileDescriptorProto { + + /** FileDescriptorProto name */ + name?: (string|null); + + /** FileDescriptorProto package */ + "package"?: (string|null); + + /** FileDescriptorProto dependency */ + dependency?: (string[]|null); + + /** FileDescriptorProto publicDependency */ + publicDependency?: (number[]|null); + + /** FileDescriptorProto weakDependency */ + weakDependency?: (number[]|null); + + /** FileDescriptorProto messageType */ + messageType?: (google.protobuf.IDescriptorProto[]|null); + + /** FileDescriptorProto enumType */ + enumType?: (google.protobuf.IEnumDescriptorProto[]|null); + + /** FileDescriptorProto service */ + service?: (google.protobuf.IServiceDescriptorProto[]|null); + + /** FileDescriptorProto extension */ + extension?: (google.protobuf.IFieldDescriptorProto[]|null); + + /** FileDescriptorProto options */ + options?: (google.protobuf.IFileOptions|null); + + /** FileDescriptorProto sourceCodeInfo */ + sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null); + + /** FileDescriptorProto syntax */ + syntax?: (string|null); + + /** FileDescriptorProto edition */ + edition?: (string|null); + } + + /** Represents a FileDescriptorProto. */ + class FileDescriptorProto implements IFileDescriptorProto { + + /** + * Constructs a new FileDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFileDescriptorProto); + + /** FileDescriptorProto name. */ + public name: string; + + /** FileDescriptorProto package. */ + public package: string; + + /** FileDescriptorProto dependency. */ + public dependency: string[]; + + /** FileDescriptorProto publicDependency. */ + public publicDependency: number[]; + + /** FileDescriptorProto weakDependency. */ + public weakDependency: number[]; + + /** FileDescriptorProto messageType. */ + public messageType: google.protobuf.IDescriptorProto[]; + + /** FileDescriptorProto enumType. */ + public enumType: google.protobuf.IEnumDescriptorProto[]; + + /** FileDescriptorProto service. */ + public service: google.protobuf.IServiceDescriptorProto[]; + + /** FileDescriptorProto extension. */ + public extension: google.protobuf.IFieldDescriptorProto[]; + + /** FileDescriptorProto options. */ + public options?: (google.protobuf.IFileOptions|null); + + /** FileDescriptorProto sourceCodeInfo. */ + public sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null); + + /** FileDescriptorProto syntax. */ + public syntax: string; + + /** FileDescriptorProto edition. */ + public edition: string; + + /** + * Creates a new FileDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns FileDescriptorProto instance + */ + public static create(properties?: google.protobuf.IFileDescriptorProto): google.protobuf.FileDescriptorProto; + + /** + * Encodes the specified FileDescriptorProto message. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @param message FileDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFileDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FileDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @param message FileDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFileDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FileDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileDescriptorProto; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FileDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileDescriptorProto; + + /** + * Verifies a FileDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FileDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FileDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorProto; + + /** + * Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified. + * @param message FileDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FileDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FileDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FileDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DescriptorProto. */ + interface IDescriptorProto { + + /** DescriptorProto name */ + name?: (string|null); + + /** DescriptorProto field */ + field?: (google.protobuf.IFieldDescriptorProto[]|null); + + /** DescriptorProto extension */ + extension?: (google.protobuf.IFieldDescriptorProto[]|null); + + /** DescriptorProto nestedType */ + nestedType?: (google.protobuf.IDescriptorProto[]|null); + + /** DescriptorProto enumType */ + enumType?: (google.protobuf.IEnumDescriptorProto[]|null); + + /** DescriptorProto extensionRange */ + extensionRange?: (google.protobuf.DescriptorProto.IExtensionRange[]|null); + + /** DescriptorProto oneofDecl */ + oneofDecl?: (google.protobuf.IOneofDescriptorProto[]|null); + + /** DescriptorProto options */ + options?: (google.protobuf.IMessageOptions|null); + + /** DescriptorProto reservedRange */ + reservedRange?: (google.protobuf.DescriptorProto.IReservedRange[]|null); + + /** DescriptorProto reservedName */ + reservedName?: (string[]|null); + } + + /** Represents a DescriptorProto. */ + class DescriptorProto implements IDescriptorProto { + + /** + * Constructs a new DescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IDescriptorProto); + + /** DescriptorProto name. */ + public name: string; + + /** DescriptorProto field. */ + public field: google.protobuf.IFieldDescriptorProto[]; + + /** DescriptorProto extension. */ + public extension: google.protobuf.IFieldDescriptorProto[]; + + /** DescriptorProto nestedType. */ + public nestedType: google.protobuf.IDescriptorProto[]; + + /** DescriptorProto enumType. */ + public enumType: google.protobuf.IEnumDescriptorProto[]; + + /** DescriptorProto extensionRange. */ + public extensionRange: google.protobuf.DescriptorProto.IExtensionRange[]; + + /** DescriptorProto oneofDecl. */ + public oneofDecl: google.protobuf.IOneofDescriptorProto[]; + + /** DescriptorProto options. */ + public options?: (google.protobuf.IMessageOptions|null); + + /** DescriptorProto reservedRange. */ + public reservedRange: google.protobuf.DescriptorProto.IReservedRange[]; + + /** DescriptorProto reservedName. */ + public reservedName: string[]; + + /** + * Creates a new DescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns DescriptorProto instance + */ + public static create(properties?: google.protobuf.IDescriptorProto): google.protobuf.DescriptorProto; + + /** + * Encodes the specified DescriptorProto message. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @param message DescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @param message DescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto; + + /** + * Verifies a DescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto; + + /** + * Creates a plain object from a DescriptorProto message. Also converts values to other types if specified. + * @param message DescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace DescriptorProto { + + /** Properties of an ExtensionRange. */ + interface IExtensionRange { + + /** ExtensionRange start */ + start?: (number|null); + + /** ExtensionRange end */ + end?: (number|null); + + /** ExtensionRange options */ + options?: (google.protobuf.IExtensionRangeOptions|null); + } + + /** Represents an ExtensionRange. */ + class ExtensionRange implements IExtensionRange { + + /** + * Constructs a new ExtensionRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.DescriptorProto.IExtensionRange); + + /** ExtensionRange start. */ + public start: number; + + /** ExtensionRange end. */ + public end: number; + + /** ExtensionRange options. */ + public options?: (google.protobuf.IExtensionRangeOptions|null); + + /** + * Creates a new ExtensionRange instance using the specified properties. + * @param [properties] Properties to set + * @returns ExtensionRange instance + */ + public static create(properties?: google.protobuf.DescriptorProto.IExtensionRange): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Encodes the specified ExtensionRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @param message ExtensionRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.DescriptorProto.IExtensionRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExtensionRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @param message ExtensionRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.DescriptorProto.IExtensionRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Verifies an ExtensionRange message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ExtensionRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExtensionRange + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Creates a plain object from an ExtensionRange message. Also converts values to other types if specified. + * @param message ExtensionRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DescriptorProto.ExtensionRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExtensionRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExtensionRange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ReservedRange. */ + interface IReservedRange { + + /** ReservedRange start */ + start?: (number|null); + + /** ReservedRange end */ + end?: (number|null); + } + + /** Represents a ReservedRange. */ + class ReservedRange implements IReservedRange { + + /** + * Constructs a new ReservedRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.DescriptorProto.IReservedRange); + + /** ReservedRange start. */ + public start: number; + + /** ReservedRange end. */ + public end: number; + + /** + * Creates a new ReservedRange instance using the specified properties. + * @param [properties] Properties to set + * @returns ReservedRange instance + */ + public static create(properties?: google.protobuf.DescriptorProto.IReservedRange): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Encodes the specified ReservedRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @param message ReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.DescriptorProto.IReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ReservedRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @param message ReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.DescriptorProto.IReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ReservedRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Decodes a ReservedRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Verifies a ReservedRange message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ReservedRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ReservedRange + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Creates a plain object from a ReservedRange message. Also converts values to other types if specified. + * @param message ReservedRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DescriptorProto.ReservedRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ReservedRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ReservedRange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of an ExtensionRangeOptions. */ + interface IExtensionRangeOptions { + + /** ExtensionRangeOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents an ExtensionRangeOptions. */ + class ExtensionRangeOptions implements IExtensionRangeOptions { + + /** + * Constructs a new ExtensionRangeOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IExtensionRangeOptions); + + /** ExtensionRangeOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new ExtensionRangeOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns ExtensionRangeOptions instance + */ + public static create(properties?: google.protobuf.IExtensionRangeOptions): google.protobuf.ExtensionRangeOptions; + + /** + * Encodes the specified ExtensionRangeOptions message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @param message ExtensionRangeOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IExtensionRangeOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExtensionRangeOptions message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @param message ExtensionRangeOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IExtensionRangeOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExtensionRangeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.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; + } + + /** 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_REQUIRED = 2, + LABEL_REPEATED = 3 + } + } + + /** 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 phpGenericServices */ + phpGenericServices?: (boolean|null); + + /** FileOptions deprecated */ + deprecated?: (boolean|null); + + /** FileOptions ccEnableArenas */ + ccEnableArenas?: (boolean|null); + + /** FileOptions objcClassPrefix */ + objcClassPrefix?: (string|null); + + /** FileOptions csharpNamespace */ + csharpNamespace?: (string|null); + + /** FileOptions swiftPrefix */ + swiftPrefix?: (string|null); + + /** FileOptions phpClassPrefix */ + phpClassPrefix?: (string|null); + + /** FileOptions phpNamespace */ + phpNamespace?: (string|null); + + /** FileOptions phpMetadataNamespace */ + phpMetadataNamespace?: (string|null); + + /** FileOptions rubyPackage */ + rubyPackage?: (string|null); + + /** FileOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** FileOptions .google.api.resourceDefinition */ + ".google.api.resourceDefinition"?: (google.api.IResourceDescriptor[]|null); + } + + /** Represents a FileOptions. */ + class FileOptions implements IFileOptions { + + /** + * Constructs a new FileOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFileOptions); + + /** FileOptions javaPackage. */ + public javaPackage: string; + + /** FileOptions javaOuterClassname. */ + public javaOuterClassname: string; + + /** FileOptions javaMultipleFiles. */ + public javaMultipleFiles: boolean; + + /** 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 phpGenericServices. */ + public phpGenericServices: 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 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 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 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 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 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 + } + } + + /** Properties of an OneofOptions. */ + interface IOneofOptions { + + /** 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 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 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 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 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 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 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); + } + + /** Represents a ServiceOptions. */ + class ServiceOptions implements IServiceOptions { + + /** + * Constructs a new ServiceOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IServiceOptions); + + /** 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 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 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|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|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 SourceCodeInfo. */ + interface ISourceCodeInfo { + + /** SourceCodeInfo location */ + location?: (google.protobuf.SourceCodeInfo.ILocation[]|null); + } + + /** Represents a SourceCodeInfo. */ + class SourceCodeInfo implements ISourceCodeInfo { + + /** + * Constructs a new SourceCodeInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.ISourceCodeInfo); + + /** SourceCodeInfo location. */ + public location: google.protobuf.SourceCodeInfo.ILocation[]; + + /** + * Creates a new SourceCodeInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns SourceCodeInfo instance + */ + public static create(properties?: google.protobuf.ISourceCodeInfo): google.protobuf.SourceCodeInfo; + + /** + * Encodes the specified SourceCodeInfo message. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @param message SourceCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.ISourceCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SourceCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @param message SourceCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.ISourceCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SourceCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.SourceCodeInfo; + + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SourceCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.SourceCodeInfo; + + /** + * Verifies a SourceCodeInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SourceCodeInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SourceCodeInfo + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.SourceCodeInfo; + + /** + * Creates a plain object from a SourceCodeInfo message. Also converts values to other types if specified. + * @param message SourceCodeInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.SourceCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SourceCodeInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SourceCodeInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace SourceCodeInfo { + + /** Properties of a Location. */ + interface ILocation { + + /** Location path */ + path?: (number[]|null); + + /** Location span */ + span?: (number[]|null); + + /** Location leadingComments */ + leadingComments?: (string|null); + + /** Location trailingComments */ + trailingComments?: (string|null); + + /** Location leadingDetachedComments */ + leadingDetachedComments?: (string[]|null); + } + + /** Represents a Location. */ + class Location implements ILocation { + + /** + * Constructs a new Location. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.SourceCodeInfo.ILocation); + + /** Location path. */ + public path: number[]; + + /** Location span. */ + public span: number[]; + + /** Location leadingComments. */ + public leadingComments: string; + + /** Location trailingComments. */ + public trailingComments: string; + + /** Location leadingDetachedComments. */ + public leadingDetachedComments: string[]; + + /** + * Creates a new Location instance using the specified properties. + * @param [properties] Properties to set + * @returns Location instance + */ + public static create(properties?: google.protobuf.SourceCodeInfo.ILocation): google.protobuf.SourceCodeInfo.Location; + + /** + * Encodes the specified Location message. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @param message Location message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.SourceCodeInfo.ILocation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Location message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @param message Location message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.SourceCodeInfo.ILocation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Location message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.SourceCodeInfo.Location; + + /** + * Decodes a Location message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.SourceCodeInfo.Location; + + /** + * Verifies a Location message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Location message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Location + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.SourceCodeInfo.Location; + + /** + * Creates a plain object from a Location message. Also converts values to other types if specified. + * @param message Location + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.SourceCodeInfo.Location, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Location to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Location + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a GeneratedCodeInfo. */ + interface IGeneratedCodeInfo { + + /** GeneratedCodeInfo annotation */ + annotation?: (google.protobuf.GeneratedCodeInfo.IAnnotation[]|null); + } + + /** Represents a GeneratedCodeInfo. */ + class GeneratedCodeInfo implements IGeneratedCodeInfo { + + /** + * Constructs a new GeneratedCodeInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IGeneratedCodeInfo); + + /** GeneratedCodeInfo annotation. */ + public annotation: google.protobuf.GeneratedCodeInfo.IAnnotation[]; + + /** + * Creates a new GeneratedCodeInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns GeneratedCodeInfo instance + */ + public static create(properties?: google.protobuf.IGeneratedCodeInfo): google.protobuf.GeneratedCodeInfo; + + /** + * Encodes the specified GeneratedCodeInfo message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @param message GeneratedCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IGeneratedCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GeneratedCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @param message GeneratedCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IGeneratedCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GeneratedCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.GeneratedCodeInfo; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GeneratedCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.GeneratedCodeInfo; + + /** + * Verifies a GeneratedCodeInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GeneratedCodeInfo + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo; + + /** + * Creates a plain object from a GeneratedCodeInfo message. Also converts values to other types if specified. + * @param message GeneratedCodeInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.GeneratedCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GeneratedCodeInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GeneratedCodeInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace GeneratedCodeInfo { + + /** Properties of an Annotation. */ + interface IAnnotation { + + /** Annotation path */ + path?: (number[]|null); + + /** Annotation sourceFile */ + sourceFile?: (string|null); + + /** Annotation begin */ + begin?: (number|null); + + /** Annotation end */ + end?: (number|null); + + /** Annotation semantic */ + semantic?: (google.protobuf.GeneratedCodeInfo.Annotation.Semantic|keyof typeof google.protobuf.GeneratedCodeInfo.Annotation.Semantic|null); + } + + /** Represents an Annotation. */ + class Annotation implements IAnnotation { + + /** + * Constructs a new Annotation. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.GeneratedCodeInfo.IAnnotation); + + /** Annotation path. */ + public path: number[]; + + /** Annotation sourceFile. */ + public sourceFile: string; + + /** Annotation begin. */ + public begin: number; + + /** Annotation end. */ + public end: number; + + /** Annotation semantic. */ + public semantic: (google.protobuf.GeneratedCodeInfo.Annotation.Semantic|keyof typeof google.protobuf.GeneratedCodeInfo.Annotation.Semantic); + + /** + * Creates a new Annotation instance using the specified properties. + * @param [properties] Properties to set + * @returns Annotation instance + */ + public static create(properties?: google.protobuf.GeneratedCodeInfo.IAnnotation): google.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Encodes the specified Annotation message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @param message Annotation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.GeneratedCodeInfo.IAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Annotation message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @param message Annotation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.GeneratedCodeInfo.IAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Annotation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Annotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Decodes an Annotation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Annotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Verifies an Annotation message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Annotation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Annotation + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Creates a plain object from an Annotation message. Also converts values to other types if specified. + * @param message Annotation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.GeneratedCodeInfo.Annotation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Annotation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Annotation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Annotation { + + /** Semantic enum. */ + enum Semantic { + NONE = 0, + SET = 1, + ALIAS = 2 + } + } + } + + /** Properties of a Duration. */ + interface IDuration { + + /** Duration seconds */ + seconds?: (number|Long|string|null); + + /** Duration nanos */ + nanos?: (number|null); + } + + /** Represents a Duration. */ + class Duration implements IDuration { + + /** + * Constructs a new Duration. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IDuration); + + /** Duration seconds. */ + public seconds: (number|Long|string); + + /** Duration nanos. */ + public nanos: number; + + /** + * Creates a new Duration instance using the specified properties. + * @param [properties] Properties to set + * @returns Duration instance + */ + public static create(properties?: google.protobuf.IDuration): google.protobuf.Duration; + + /** + * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @param message Duration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @param message Duration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Duration message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Duration; + + /** + * Decodes a Duration message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Duration; + + /** + * Verifies a Duration message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Duration message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Duration + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Duration; + + /** + * Creates a plain object from a Duration message. Also converts values to other types if specified. + * @param message Duration + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Duration, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Duration to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Duration + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of 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 DoubleValue. */ + interface IDoubleValue { + + /** DoubleValue value */ + value?: (number|null); + } + + /** Represents a DoubleValue. */ + class DoubleValue implements IDoubleValue { + + /** + * Constructs a new DoubleValue. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IDoubleValue); + + /** DoubleValue value. */ + public value: number; + + /** + * Creates a new DoubleValue instance using the specified properties. + * @param [properties] Properties to set + * @returns DoubleValue instance + */ + public static create(properties?: google.protobuf.IDoubleValue): google.protobuf.DoubleValue; + + /** + * Encodes the specified DoubleValue message. Does not implicitly {@link google.protobuf.DoubleValue.verify|verify} messages. + * @param message DoubleValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IDoubleValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DoubleValue message, length delimited. Does not implicitly {@link google.protobuf.DoubleValue.verify|verify} messages. + * @param message DoubleValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IDoubleValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DoubleValue message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DoubleValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DoubleValue; + + /** + * Decodes a DoubleValue message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DoubleValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DoubleValue; + + /** + * Verifies a DoubleValue message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DoubleValue message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DoubleValue + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DoubleValue; + + /** + * Creates a plain object from a DoubleValue message. Also converts values to other types if specified. + * @param message DoubleValue + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DoubleValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DoubleValue to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DoubleValue + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FloatValue. */ + interface IFloatValue { + + /** FloatValue value */ + value?: (number|null); + } + + /** Represents a FloatValue. */ + class FloatValue implements IFloatValue { + + /** + * Constructs a new FloatValue. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFloatValue); + + /** FloatValue value. */ + public value: number; + + /** + * Creates a new FloatValue instance using the specified properties. + * @param [properties] Properties to set + * @returns FloatValue instance + */ + public static create(properties?: google.protobuf.IFloatValue): google.protobuf.FloatValue; + + /** + * Encodes the specified FloatValue message. Does not implicitly {@link google.protobuf.FloatValue.verify|verify} messages. + * @param message FloatValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFloatValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FloatValue message, length delimited. Does not implicitly {@link google.protobuf.FloatValue.verify|verify} messages. + * @param message FloatValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFloatValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FloatValue message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FloatValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FloatValue; + + /** + * Decodes a FloatValue message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FloatValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FloatValue; + + /** + * Verifies a FloatValue message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FloatValue message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FloatValue + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FloatValue; + + /** + * Creates a plain object from a FloatValue message. Also converts values to other types if specified. + * @param message FloatValue + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FloatValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FloatValue to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FloatValue + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an Int64Value. */ + interface IInt64Value { + + /** Int64Value value */ + value?: (number|Long|string|null); + } + + /** Represents an Int64Value. */ + class Int64Value implements IInt64Value { + + /** + * Constructs a new Int64Value. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IInt64Value); + + /** Int64Value value. */ + public value: (number|Long|string); + + /** + * Creates a new Int64Value instance using the specified properties. + * @param [properties] Properties to set + * @returns Int64Value instance + */ + public static create(properties?: google.protobuf.IInt64Value): google.protobuf.Int64Value; + + /** + * Encodes the specified Int64Value message. Does not implicitly {@link google.protobuf.Int64Value.verify|verify} messages. + * @param message Int64Value message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IInt64Value, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Int64Value message, length delimited. Does not implicitly {@link google.protobuf.Int64Value.verify|verify} messages. + * @param message Int64Value message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IInt64Value, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Int64Value message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Int64Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Int64Value; + + /** + * Decodes an Int64Value message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Int64Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Int64Value; + + /** + * Verifies an Int64Value message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Int64Value message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Int64Value + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Int64Value; + + /** + * Creates a plain object from an Int64Value message. Also converts values to other types if specified. + * @param message Int64Value + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Int64Value, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Int64Value to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Int64Value + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a UInt64Value. */ + interface IUInt64Value { + + /** UInt64Value value */ + value?: (number|Long|string|null); + } + + /** Represents a UInt64Value. */ + class UInt64Value implements IUInt64Value { + + /** + * Constructs a new UInt64Value. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IUInt64Value); + + /** UInt64Value value. */ + public value: (number|Long|string); + + /** + * Creates a new UInt64Value instance using the specified properties. + * @param [properties] Properties to set + * @returns UInt64Value instance + */ + public static create(properties?: google.protobuf.IUInt64Value): google.protobuf.UInt64Value; + + /** + * Encodes the specified UInt64Value message. Does not implicitly {@link google.protobuf.UInt64Value.verify|verify} messages. + * @param message UInt64Value message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IUInt64Value, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UInt64Value message, length delimited. Does not implicitly {@link google.protobuf.UInt64Value.verify|verify} messages. + * @param message UInt64Value message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IUInt64Value, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a UInt64Value message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UInt64Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.UInt64Value; + + /** + * Decodes a UInt64Value message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UInt64Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.UInt64Value; + + /** + * Verifies a UInt64Value message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a UInt64Value message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UInt64Value + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.UInt64Value; + + /** + * Creates a plain object from a UInt64Value message. Also converts values to other types if specified. + * @param message UInt64Value + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.UInt64Value, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UInt64Value to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UInt64Value + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an Int32Value. */ + interface IInt32Value { + + /** Int32Value value */ + value?: (number|null); + } + + /** Represents an Int32Value. */ + class Int32Value implements IInt32Value { + + /** + * Constructs a new Int32Value. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IInt32Value); + + /** Int32Value value. */ + public value: number; + + /** + * Creates a new Int32Value instance using the specified properties. + * @param [properties] Properties to set + * @returns Int32Value instance + */ + public static create(properties?: google.protobuf.IInt32Value): google.protobuf.Int32Value; + + /** + * Encodes the specified Int32Value message. Does not implicitly {@link google.protobuf.Int32Value.verify|verify} messages. + * @param message Int32Value message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IInt32Value, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Int32Value message, length delimited. Does not implicitly {@link google.protobuf.Int32Value.verify|verify} messages. + * @param message Int32Value message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IInt32Value, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Int32Value message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Int32Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Int32Value; + + /** + * Decodes an Int32Value message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Int32Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Int32Value; + + /** + * Verifies an Int32Value message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Int32Value message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Int32Value + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Int32Value; + + /** + * Creates a plain object from an Int32Value message. Also converts values to other types if specified. + * @param message Int32Value + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Int32Value, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Int32Value to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Int32Value + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a UInt32Value. */ + interface IUInt32Value { + + /** UInt32Value value */ + value?: (number|null); + } + + /** Represents a UInt32Value. */ + class UInt32Value implements IUInt32Value { + + /** + * Constructs a new UInt32Value. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IUInt32Value); + + /** UInt32Value value. */ + public value: number; + + /** + * Creates a new UInt32Value instance using the specified properties. + * @param [properties] Properties to set + * @returns UInt32Value instance + */ + public static create(properties?: google.protobuf.IUInt32Value): google.protobuf.UInt32Value; + + /** + * Encodes the specified UInt32Value message. Does not implicitly {@link google.protobuf.UInt32Value.verify|verify} messages. + * @param message UInt32Value message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IUInt32Value, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UInt32Value message, length delimited. Does not implicitly {@link google.protobuf.UInt32Value.verify|verify} messages. + * @param message UInt32Value message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IUInt32Value, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a UInt32Value message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UInt32Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.UInt32Value; + + /** + * Decodes a UInt32Value message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UInt32Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.UInt32Value; + + /** + * Verifies a UInt32Value message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a UInt32Value message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UInt32Value + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.UInt32Value; + + /** + * Creates a plain object from a UInt32Value message. Also converts values to other types if specified. + * @param message UInt32Value + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.UInt32Value, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UInt32Value to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UInt32Value + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a BoolValue. */ + interface IBoolValue { + + /** BoolValue value */ + value?: (boolean|null); + } + + /** Represents a BoolValue. */ + class BoolValue implements IBoolValue { + + /** + * Constructs a new BoolValue. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IBoolValue); + + /** BoolValue value. */ + public value: boolean; + + /** + * Creates a new BoolValue instance using the specified properties. + * @param [properties] Properties to set + * @returns BoolValue instance + */ + public static create(properties?: google.protobuf.IBoolValue): google.protobuf.BoolValue; + + /** + * Encodes the specified BoolValue message. Does not implicitly {@link google.protobuf.BoolValue.verify|verify} messages. + * @param message BoolValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IBoolValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BoolValue message, length delimited. Does not implicitly {@link google.protobuf.BoolValue.verify|verify} messages. + * @param message BoolValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IBoolValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BoolValue message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BoolValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.BoolValue; + + /** + * Decodes a BoolValue message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BoolValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.BoolValue; + + /** + * Verifies a BoolValue message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BoolValue message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BoolValue + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.BoolValue; + + /** + * Creates a plain object from a BoolValue message. Also converts values to other types if specified. + * @param message BoolValue + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.BoolValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BoolValue to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BoolValue + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a StringValue. */ + interface IStringValue { + + /** StringValue value */ + value?: (string|null); + } + + /** Represents a StringValue. */ + class StringValue implements IStringValue { + + /** + * Constructs a new StringValue. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IStringValue); + + /** StringValue value. */ + public value: string; + + /** + * Creates a new StringValue instance using the specified properties. + * @param [properties] Properties to set + * @returns StringValue instance + */ + public static create(properties?: google.protobuf.IStringValue): google.protobuf.StringValue; + + /** + * Encodes the specified StringValue message. Does not implicitly {@link google.protobuf.StringValue.verify|verify} messages. + * @param message StringValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IStringValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified StringValue message, length delimited. Does not implicitly {@link google.protobuf.StringValue.verify|verify} messages. + * @param message StringValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IStringValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a StringValue message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns StringValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.StringValue; + + /** + * Decodes a StringValue message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns StringValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.StringValue; + + /** + * Verifies a StringValue message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a StringValue message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns StringValue + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.StringValue; + + /** + * Creates a plain object from a StringValue message. Also converts values to other types if specified. + * @param message StringValue + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.StringValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this StringValue to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for StringValue + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a BytesValue. */ + interface IBytesValue { + + /** BytesValue value */ + value?: (Uint8Array|string|null); + } + + /** Represents a BytesValue. */ + class BytesValue implements IBytesValue { + + /** + * Constructs a new BytesValue. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IBytesValue); + + /** BytesValue value. */ + public value: (Uint8Array|string); + + /** + * Creates a new BytesValue instance using the specified properties. + * @param [properties] Properties to set + * @returns BytesValue instance + */ + public static create(properties?: google.protobuf.IBytesValue): google.protobuf.BytesValue; + + /** + * Encodes the specified BytesValue message. Does not implicitly {@link google.protobuf.BytesValue.verify|verify} messages. + * @param message BytesValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IBytesValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BytesValue message, length delimited. Does not implicitly {@link google.protobuf.BytesValue.verify|verify} messages. + * @param message BytesValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IBytesValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BytesValue message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BytesValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.BytesValue; + + /** + * Decodes a BytesValue message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BytesValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.BytesValue; + + /** + * Verifies a BytesValue message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BytesValue message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BytesValue + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.BytesValue; + + /** + * Creates a plain object from a BytesValue message. Also converts values to other types if specified. + * @param message BytesValue + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.BytesValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BytesValue to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BytesValue + * @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/packages/google-analytics-admin/protos/protos.js b/packages/google-analytics-admin/protos/protos.js new file mode 100644 index 00000000000..d8ccad45b75 --- /dev/null +++ b/packages/google-analytics-admin/protos/protos.js @@ -0,0 +1,82473 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +/*eslint-disable block-scoped-var, id-length, no-control-regex, no-magic-numbers, no-prototype-builtins, no-redeclare, no-shadow, no-var, sort-vars*/ +(function(global, factory) { /* global define, require, module */ + + /* AMD */ if (typeof define === 'function' && define.amd) + define(["protobufjs/minimal"], factory); + + /* CommonJS */ else if (typeof require === 'function' && typeof module === 'object' && module && module.exports) + module.exports = factory(require("google-gax/build/src/protobuf").protobufMinimal); + +})(this, function($protobuf) { + "use strict"; + + // Common aliases + var $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util; + + // Exported root namespace + var $root = $protobuf.roots._google_analytics_admin_protos || ($protobuf.roots._google_analytics_admin_protos = {}); + + $root.google = (function() { + + /** + * Namespace google. + * @exports google + * @namespace + */ + var google = {}; + + google.analytics = (function() { + + /** + * Namespace analytics. + * @memberof google + * @namespace + */ + var analytics = {}; + + analytics.admin = (function() { + + /** + * Namespace admin. + * @memberof google.analytics + * @namespace + */ + var admin = {}; + + admin.v1alpha = (function() { + + /** + * Namespace v1alpha. + * @memberof google.analytics.admin + * @namespace + */ + var v1alpha = {}; + + v1alpha.AccessDimension = (function() { + + /** + * Properties of an AccessDimension. + * @memberof google.analytics.admin.v1alpha + * @interface IAccessDimension + * @property {string|null} [dimensionName] AccessDimension dimensionName + */ + + /** + * Constructs a new AccessDimension. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents an AccessDimension. + * @implements IAccessDimension + * @constructor + * @param {google.analytics.admin.v1alpha.IAccessDimension=} [properties] Properties to set + */ + function AccessDimension(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AccessDimension dimensionName. + * @member {string} dimensionName + * @memberof google.analytics.admin.v1alpha.AccessDimension + * @instance + */ + AccessDimension.prototype.dimensionName = ""; + + /** + * Creates a new AccessDimension instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.AccessDimension + * @static + * @param {google.analytics.admin.v1alpha.IAccessDimension=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.AccessDimension} AccessDimension instance + */ + AccessDimension.create = function create(properties) { + return new AccessDimension(properties); + }; + + /** + * Encodes the specified AccessDimension message. Does not implicitly {@link google.analytics.admin.v1alpha.AccessDimension.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.AccessDimension + * @static + * @param {google.analytics.admin.v1alpha.IAccessDimension} message AccessDimension message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AccessDimension.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dimensionName != null && Object.hasOwnProperty.call(message, "dimensionName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.dimensionName); + return writer; + }; + + /** + * Encodes the specified AccessDimension message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AccessDimension.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.AccessDimension + * @static + * @param {google.analytics.admin.v1alpha.IAccessDimension} message AccessDimension message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AccessDimension.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AccessDimension message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.AccessDimension + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.AccessDimension} AccessDimension + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AccessDimension.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.AccessDimension(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.dimensionName = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AccessDimension message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.AccessDimension + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.AccessDimension} AccessDimension + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AccessDimension.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AccessDimension message. + * @function verify + * @memberof google.analytics.admin.v1alpha.AccessDimension + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AccessDimension.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dimensionName != null && message.hasOwnProperty("dimensionName")) + if (!$util.isString(message.dimensionName)) + return "dimensionName: string expected"; + return null; + }; + + /** + * Creates an AccessDimension message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.AccessDimension + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.AccessDimension} AccessDimension + */ + AccessDimension.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.AccessDimension) + return object; + var message = new $root.google.analytics.admin.v1alpha.AccessDimension(); + if (object.dimensionName != null) + message.dimensionName = String(object.dimensionName); + return message; + }; + + /** + * Creates a plain object from an AccessDimension message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.AccessDimension + * @static + * @param {google.analytics.admin.v1alpha.AccessDimension} message AccessDimension + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AccessDimension.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.dimensionName = ""; + if (message.dimensionName != null && message.hasOwnProperty("dimensionName")) + object.dimensionName = message.dimensionName; + return object; + }; + + /** + * Converts this AccessDimension to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.AccessDimension + * @instance + * @returns {Object.} JSON object + */ + AccessDimension.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AccessDimension + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.AccessDimension + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AccessDimension.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.AccessDimension"; + }; + + return AccessDimension; + })(); + + v1alpha.AccessMetric = (function() { + + /** + * Properties of an AccessMetric. + * @memberof google.analytics.admin.v1alpha + * @interface IAccessMetric + * @property {string|null} [metricName] AccessMetric metricName + */ + + /** + * Constructs a new AccessMetric. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents an AccessMetric. + * @implements IAccessMetric + * @constructor + * @param {google.analytics.admin.v1alpha.IAccessMetric=} [properties] Properties to set + */ + function AccessMetric(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AccessMetric metricName. + * @member {string} metricName + * @memberof google.analytics.admin.v1alpha.AccessMetric + * @instance + */ + AccessMetric.prototype.metricName = ""; + + /** + * Creates a new AccessMetric instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.AccessMetric + * @static + * @param {google.analytics.admin.v1alpha.IAccessMetric=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.AccessMetric} AccessMetric instance + */ + AccessMetric.create = function create(properties) { + return new AccessMetric(properties); + }; + + /** + * Encodes the specified AccessMetric message. Does not implicitly {@link google.analytics.admin.v1alpha.AccessMetric.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.AccessMetric + * @static + * @param {google.analytics.admin.v1alpha.IAccessMetric} message AccessMetric message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AccessMetric.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.metricName != null && Object.hasOwnProperty.call(message, "metricName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.metricName); + return writer; + }; + + /** + * Encodes the specified AccessMetric message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AccessMetric.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.AccessMetric + * @static + * @param {google.analytics.admin.v1alpha.IAccessMetric} message AccessMetric message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AccessMetric.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AccessMetric message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.AccessMetric + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.AccessMetric} AccessMetric + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AccessMetric.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.AccessMetric(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.metricName = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AccessMetric message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.AccessMetric + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.AccessMetric} AccessMetric + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AccessMetric.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AccessMetric message. + * @function verify + * @memberof google.analytics.admin.v1alpha.AccessMetric + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AccessMetric.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.metricName != null && message.hasOwnProperty("metricName")) + if (!$util.isString(message.metricName)) + return "metricName: string expected"; + return null; + }; + + /** + * Creates an AccessMetric message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.AccessMetric + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.AccessMetric} AccessMetric + */ + AccessMetric.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.AccessMetric) + return object; + var message = new $root.google.analytics.admin.v1alpha.AccessMetric(); + if (object.metricName != null) + message.metricName = String(object.metricName); + return message; + }; + + /** + * Creates a plain object from an AccessMetric message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.AccessMetric + * @static + * @param {google.analytics.admin.v1alpha.AccessMetric} message AccessMetric + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AccessMetric.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.metricName = ""; + if (message.metricName != null && message.hasOwnProperty("metricName")) + object.metricName = message.metricName; + return object; + }; + + /** + * Converts this AccessMetric to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.AccessMetric + * @instance + * @returns {Object.} JSON object + */ + AccessMetric.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AccessMetric + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.AccessMetric + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AccessMetric.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.AccessMetric"; + }; + + return AccessMetric; + })(); + + v1alpha.AccessDateRange = (function() { + + /** + * Properties of an AccessDateRange. + * @memberof google.analytics.admin.v1alpha + * @interface IAccessDateRange + * @property {string|null} [startDate] AccessDateRange startDate + * @property {string|null} [endDate] AccessDateRange endDate + */ + + /** + * Constructs a new AccessDateRange. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents an AccessDateRange. + * @implements IAccessDateRange + * @constructor + * @param {google.analytics.admin.v1alpha.IAccessDateRange=} [properties] Properties to set + */ + function AccessDateRange(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AccessDateRange startDate. + * @member {string} startDate + * @memberof google.analytics.admin.v1alpha.AccessDateRange + * @instance + */ + AccessDateRange.prototype.startDate = ""; + + /** + * AccessDateRange endDate. + * @member {string} endDate + * @memberof google.analytics.admin.v1alpha.AccessDateRange + * @instance + */ + AccessDateRange.prototype.endDate = ""; + + /** + * Creates a new AccessDateRange instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.AccessDateRange + * @static + * @param {google.analytics.admin.v1alpha.IAccessDateRange=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.AccessDateRange} AccessDateRange instance + */ + AccessDateRange.create = function create(properties) { + return new AccessDateRange(properties); + }; + + /** + * Encodes the specified AccessDateRange message. Does not implicitly {@link google.analytics.admin.v1alpha.AccessDateRange.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.AccessDateRange + * @static + * @param {google.analytics.admin.v1alpha.IAccessDateRange} message AccessDateRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AccessDateRange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.startDate != null && Object.hasOwnProperty.call(message, "startDate")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.startDate); + if (message.endDate != null && Object.hasOwnProperty.call(message, "endDate")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.endDate); + return writer; + }; + + /** + * Encodes the specified AccessDateRange message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AccessDateRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.AccessDateRange + * @static + * @param {google.analytics.admin.v1alpha.IAccessDateRange} message AccessDateRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AccessDateRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AccessDateRange message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.AccessDateRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.AccessDateRange} AccessDateRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AccessDateRange.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.AccessDateRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.startDate = reader.string(); + break; + } + case 2: { + message.endDate = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AccessDateRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.AccessDateRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.AccessDateRange} AccessDateRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AccessDateRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AccessDateRange message. + * @function verify + * @memberof google.analytics.admin.v1alpha.AccessDateRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AccessDateRange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.startDate != null && message.hasOwnProperty("startDate")) + if (!$util.isString(message.startDate)) + return "startDate: string expected"; + if (message.endDate != null && message.hasOwnProperty("endDate")) + if (!$util.isString(message.endDate)) + return "endDate: string expected"; + return null; + }; + + /** + * Creates an AccessDateRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.AccessDateRange + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.AccessDateRange} AccessDateRange + */ + AccessDateRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.AccessDateRange) + return object; + var message = new $root.google.analytics.admin.v1alpha.AccessDateRange(); + if (object.startDate != null) + message.startDate = String(object.startDate); + if (object.endDate != null) + message.endDate = String(object.endDate); + return message; + }; + + /** + * Creates a plain object from an AccessDateRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.AccessDateRange + * @static + * @param {google.analytics.admin.v1alpha.AccessDateRange} message AccessDateRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AccessDateRange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.startDate = ""; + object.endDate = ""; + } + if (message.startDate != null && message.hasOwnProperty("startDate")) + object.startDate = message.startDate; + if (message.endDate != null && message.hasOwnProperty("endDate")) + object.endDate = message.endDate; + return object; + }; + + /** + * Converts this AccessDateRange to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.AccessDateRange + * @instance + * @returns {Object.} JSON object + */ + AccessDateRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AccessDateRange + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.AccessDateRange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AccessDateRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.AccessDateRange"; + }; + + return AccessDateRange; + })(); + + v1alpha.AccessFilterExpression = (function() { + + /** + * Properties of an AccessFilterExpression. + * @memberof google.analytics.admin.v1alpha + * @interface IAccessFilterExpression + * @property {google.analytics.admin.v1alpha.IAccessFilterExpressionList|null} [andGroup] AccessFilterExpression andGroup + * @property {google.analytics.admin.v1alpha.IAccessFilterExpressionList|null} [orGroup] AccessFilterExpression orGroup + * @property {google.analytics.admin.v1alpha.IAccessFilterExpression|null} [notExpression] AccessFilterExpression notExpression + * @property {google.analytics.admin.v1alpha.IAccessFilter|null} [accessFilter] AccessFilterExpression accessFilter + */ + + /** + * Constructs a new AccessFilterExpression. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents an AccessFilterExpression. + * @implements IAccessFilterExpression + * @constructor + * @param {google.analytics.admin.v1alpha.IAccessFilterExpression=} [properties] Properties to set + */ + function AccessFilterExpression(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AccessFilterExpression andGroup. + * @member {google.analytics.admin.v1alpha.IAccessFilterExpressionList|null|undefined} andGroup + * @memberof google.analytics.admin.v1alpha.AccessFilterExpression + * @instance + */ + AccessFilterExpression.prototype.andGroup = null; + + /** + * AccessFilterExpression orGroup. + * @member {google.analytics.admin.v1alpha.IAccessFilterExpressionList|null|undefined} orGroup + * @memberof google.analytics.admin.v1alpha.AccessFilterExpression + * @instance + */ + AccessFilterExpression.prototype.orGroup = null; + + /** + * AccessFilterExpression notExpression. + * @member {google.analytics.admin.v1alpha.IAccessFilterExpression|null|undefined} notExpression + * @memberof google.analytics.admin.v1alpha.AccessFilterExpression + * @instance + */ + AccessFilterExpression.prototype.notExpression = null; + + /** + * AccessFilterExpression accessFilter. + * @member {google.analytics.admin.v1alpha.IAccessFilter|null|undefined} accessFilter + * @memberof google.analytics.admin.v1alpha.AccessFilterExpression + * @instance + */ + AccessFilterExpression.prototype.accessFilter = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * AccessFilterExpression oneExpression. + * @member {"andGroup"|"orGroup"|"notExpression"|"accessFilter"|undefined} oneExpression + * @memberof google.analytics.admin.v1alpha.AccessFilterExpression + * @instance + */ + Object.defineProperty(AccessFilterExpression.prototype, "oneExpression", { + get: $util.oneOfGetter($oneOfFields = ["andGroup", "orGroup", "notExpression", "accessFilter"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new AccessFilterExpression instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.AccessFilterExpression + * @static + * @param {google.analytics.admin.v1alpha.IAccessFilterExpression=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.AccessFilterExpression} AccessFilterExpression instance + */ + AccessFilterExpression.create = function create(properties) { + return new AccessFilterExpression(properties); + }; + + /** + * Encodes the specified AccessFilterExpression message. Does not implicitly {@link google.analytics.admin.v1alpha.AccessFilterExpression.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.AccessFilterExpression + * @static + * @param {google.analytics.admin.v1alpha.IAccessFilterExpression} message AccessFilterExpression message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AccessFilterExpression.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.andGroup != null && Object.hasOwnProperty.call(message, "andGroup")) + $root.google.analytics.admin.v1alpha.AccessFilterExpressionList.encode(message.andGroup, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.orGroup != null && Object.hasOwnProperty.call(message, "orGroup")) + $root.google.analytics.admin.v1alpha.AccessFilterExpressionList.encode(message.orGroup, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.notExpression != null && Object.hasOwnProperty.call(message, "notExpression")) + $root.google.analytics.admin.v1alpha.AccessFilterExpression.encode(message.notExpression, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.accessFilter != null && Object.hasOwnProperty.call(message, "accessFilter")) + $root.google.analytics.admin.v1alpha.AccessFilter.encode(message.accessFilter, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified AccessFilterExpression message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AccessFilterExpression.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.AccessFilterExpression + * @static + * @param {google.analytics.admin.v1alpha.IAccessFilterExpression} message AccessFilterExpression message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AccessFilterExpression.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AccessFilterExpression message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.AccessFilterExpression + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.AccessFilterExpression} AccessFilterExpression + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AccessFilterExpression.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.AccessFilterExpression(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.andGroup = $root.google.analytics.admin.v1alpha.AccessFilterExpressionList.decode(reader, reader.uint32()); + break; + } + case 2: { + message.orGroup = $root.google.analytics.admin.v1alpha.AccessFilterExpressionList.decode(reader, reader.uint32()); + break; + } + case 3: { + message.notExpression = $root.google.analytics.admin.v1alpha.AccessFilterExpression.decode(reader, reader.uint32()); + break; + } + case 4: { + message.accessFilter = $root.google.analytics.admin.v1alpha.AccessFilter.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AccessFilterExpression message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.AccessFilterExpression + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.AccessFilterExpression} AccessFilterExpression + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AccessFilterExpression.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AccessFilterExpression message. + * @function verify + * @memberof google.analytics.admin.v1alpha.AccessFilterExpression + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AccessFilterExpression.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.andGroup != null && message.hasOwnProperty("andGroup")) { + properties.oneExpression = 1; + { + var error = $root.google.analytics.admin.v1alpha.AccessFilterExpressionList.verify(message.andGroup); + if (error) + return "andGroup." + error; + } + } + if (message.orGroup != null && message.hasOwnProperty("orGroup")) { + if (properties.oneExpression === 1) + return "oneExpression: multiple values"; + properties.oneExpression = 1; + { + var error = $root.google.analytics.admin.v1alpha.AccessFilterExpressionList.verify(message.orGroup); + if (error) + return "orGroup." + error; + } + } + if (message.notExpression != null && message.hasOwnProperty("notExpression")) { + if (properties.oneExpression === 1) + return "oneExpression: multiple values"; + properties.oneExpression = 1; + { + var error = $root.google.analytics.admin.v1alpha.AccessFilterExpression.verify(message.notExpression); + if (error) + return "notExpression." + error; + } + } + if (message.accessFilter != null && message.hasOwnProperty("accessFilter")) { + if (properties.oneExpression === 1) + return "oneExpression: multiple values"; + properties.oneExpression = 1; + { + var error = $root.google.analytics.admin.v1alpha.AccessFilter.verify(message.accessFilter); + if (error) + return "accessFilter." + error; + } + } + return null; + }; + + /** + * Creates an AccessFilterExpression message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.AccessFilterExpression + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.AccessFilterExpression} AccessFilterExpression + */ + AccessFilterExpression.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.AccessFilterExpression) + return object; + var message = new $root.google.analytics.admin.v1alpha.AccessFilterExpression(); + if (object.andGroup != null) { + if (typeof object.andGroup !== "object") + throw TypeError(".google.analytics.admin.v1alpha.AccessFilterExpression.andGroup: object expected"); + message.andGroup = $root.google.analytics.admin.v1alpha.AccessFilterExpressionList.fromObject(object.andGroup); + } + if (object.orGroup != null) { + if (typeof object.orGroup !== "object") + throw TypeError(".google.analytics.admin.v1alpha.AccessFilterExpression.orGroup: object expected"); + message.orGroup = $root.google.analytics.admin.v1alpha.AccessFilterExpressionList.fromObject(object.orGroup); + } + if (object.notExpression != null) { + if (typeof object.notExpression !== "object") + throw TypeError(".google.analytics.admin.v1alpha.AccessFilterExpression.notExpression: object expected"); + message.notExpression = $root.google.analytics.admin.v1alpha.AccessFilterExpression.fromObject(object.notExpression); + } + if (object.accessFilter != null) { + if (typeof object.accessFilter !== "object") + throw TypeError(".google.analytics.admin.v1alpha.AccessFilterExpression.accessFilter: object expected"); + message.accessFilter = $root.google.analytics.admin.v1alpha.AccessFilter.fromObject(object.accessFilter); + } + return message; + }; + + /** + * Creates a plain object from an AccessFilterExpression message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.AccessFilterExpression + * @static + * @param {google.analytics.admin.v1alpha.AccessFilterExpression} message AccessFilterExpression + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AccessFilterExpression.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.andGroup != null && message.hasOwnProperty("andGroup")) { + object.andGroup = $root.google.analytics.admin.v1alpha.AccessFilterExpressionList.toObject(message.andGroup, options); + if (options.oneofs) + object.oneExpression = "andGroup"; + } + if (message.orGroup != null && message.hasOwnProperty("orGroup")) { + object.orGroup = $root.google.analytics.admin.v1alpha.AccessFilterExpressionList.toObject(message.orGroup, options); + if (options.oneofs) + object.oneExpression = "orGroup"; + } + if (message.notExpression != null && message.hasOwnProperty("notExpression")) { + object.notExpression = $root.google.analytics.admin.v1alpha.AccessFilterExpression.toObject(message.notExpression, options); + if (options.oneofs) + object.oneExpression = "notExpression"; + } + if (message.accessFilter != null && message.hasOwnProperty("accessFilter")) { + object.accessFilter = $root.google.analytics.admin.v1alpha.AccessFilter.toObject(message.accessFilter, options); + if (options.oneofs) + object.oneExpression = "accessFilter"; + } + return object; + }; + + /** + * Converts this AccessFilterExpression to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.AccessFilterExpression + * @instance + * @returns {Object.} JSON object + */ + AccessFilterExpression.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AccessFilterExpression + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.AccessFilterExpression + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AccessFilterExpression.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.AccessFilterExpression"; + }; + + return AccessFilterExpression; + })(); + + v1alpha.AccessFilterExpressionList = (function() { + + /** + * Properties of an AccessFilterExpressionList. + * @memberof google.analytics.admin.v1alpha + * @interface IAccessFilterExpressionList + * @property {Array.|null} [expressions] AccessFilterExpressionList expressions + */ + + /** + * Constructs a new AccessFilterExpressionList. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents an AccessFilterExpressionList. + * @implements IAccessFilterExpressionList + * @constructor + * @param {google.analytics.admin.v1alpha.IAccessFilterExpressionList=} [properties] Properties to set + */ + function AccessFilterExpressionList(properties) { + this.expressions = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AccessFilterExpressionList expressions. + * @member {Array.} expressions + * @memberof google.analytics.admin.v1alpha.AccessFilterExpressionList + * @instance + */ + AccessFilterExpressionList.prototype.expressions = $util.emptyArray; + + /** + * Creates a new AccessFilterExpressionList instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.AccessFilterExpressionList + * @static + * @param {google.analytics.admin.v1alpha.IAccessFilterExpressionList=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.AccessFilterExpressionList} AccessFilterExpressionList instance + */ + AccessFilterExpressionList.create = function create(properties) { + return new AccessFilterExpressionList(properties); + }; + + /** + * Encodes the specified AccessFilterExpressionList message. Does not implicitly {@link google.analytics.admin.v1alpha.AccessFilterExpressionList.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.AccessFilterExpressionList + * @static + * @param {google.analytics.admin.v1alpha.IAccessFilterExpressionList} message AccessFilterExpressionList message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AccessFilterExpressionList.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.expressions != null && message.expressions.length) + for (var i = 0; i < message.expressions.length; ++i) + $root.google.analytics.admin.v1alpha.AccessFilterExpression.encode(message.expressions[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified AccessFilterExpressionList message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AccessFilterExpressionList.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.AccessFilterExpressionList + * @static + * @param {google.analytics.admin.v1alpha.IAccessFilterExpressionList} message AccessFilterExpressionList message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AccessFilterExpressionList.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AccessFilterExpressionList message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.AccessFilterExpressionList + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.AccessFilterExpressionList} AccessFilterExpressionList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AccessFilterExpressionList.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.AccessFilterExpressionList(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.expressions && message.expressions.length)) + message.expressions = []; + message.expressions.push($root.google.analytics.admin.v1alpha.AccessFilterExpression.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AccessFilterExpressionList message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.AccessFilterExpressionList + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.AccessFilterExpressionList} AccessFilterExpressionList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AccessFilterExpressionList.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AccessFilterExpressionList message. + * @function verify + * @memberof google.analytics.admin.v1alpha.AccessFilterExpressionList + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AccessFilterExpressionList.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.expressions != null && message.hasOwnProperty("expressions")) { + if (!Array.isArray(message.expressions)) + return "expressions: array expected"; + for (var i = 0; i < message.expressions.length; ++i) { + var error = $root.google.analytics.admin.v1alpha.AccessFilterExpression.verify(message.expressions[i]); + if (error) + return "expressions." + error; + } + } + return null; + }; + + /** + * Creates an AccessFilterExpressionList message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.AccessFilterExpressionList + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.AccessFilterExpressionList} AccessFilterExpressionList + */ + AccessFilterExpressionList.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.AccessFilterExpressionList) + return object; + var message = new $root.google.analytics.admin.v1alpha.AccessFilterExpressionList(); + if (object.expressions) { + if (!Array.isArray(object.expressions)) + throw TypeError(".google.analytics.admin.v1alpha.AccessFilterExpressionList.expressions: array expected"); + message.expressions = []; + for (var i = 0; i < object.expressions.length; ++i) { + if (typeof object.expressions[i] !== "object") + throw TypeError(".google.analytics.admin.v1alpha.AccessFilterExpressionList.expressions: object expected"); + message.expressions[i] = $root.google.analytics.admin.v1alpha.AccessFilterExpression.fromObject(object.expressions[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an AccessFilterExpressionList message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.AccessFilterExpressionList + * @static + * @param {google.analytics.admin.v1alpha.AccessFilterExpressionList} message AccessFilterExpressionList + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AccessFilterExpressionList.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.expressions = []; + if (message.expressions && message.expressions.length) { + object.expressions = []; + for (var j = 0; j < message.expressions.length; ++j) + object.expressions[j] = $root.google.analytics.admin.v1alpha.AccessFilterExpression.toObject(message.expressions[j], options); + } + return object; + }; + + /** + * Converts this AccessFilterExpressionList to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.AccessFilterExpressionList + * @instance + * @returns {Object.} JSON object + */ + AccessFilterExpressionList.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AccessFilterExpressionList + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.AccessFilterExpressionList + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AccessFilterExpressionList.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.AccessFilterExpressionList"; + }; + + return AccessFilterExpressionList; + })(); + + v1alpha.AccessFilter = (function() { + + /** + * Properties of an AccessFilter. + * @memberof google.analytics.admin.v1alpha + * @interface IAccessFilter + * @property {google.analytics.admin.v1alpha.IAccessStringFilter|null} [stringFilter] AccessFilter stringFilter + * @property {google.analytics.admin.v1alpha.IAccessInListFilter|null} [inListFilter] AccessFilter inListFilter + * @property {google.analytics.admin.v1alpha.IAccessNumericFilter|null} [numericFilter] AccessFilter numericFilter + * @property {google.analytics.admin.v1alpha.IAccessBetweenFilter|null} [betweenFilter] AccessFilter betweenFilter + * @property {string|null} [fieldName] AccessFilter fieldName + */ + + /** + * Constructs a new AccessFilter. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents an AccessFilter. + * @implements IAccessFilter + * @constructor + * @param {google.analytics.admin.v1alpha.IAccessFilter=} [properties] Properties to set + */ + function AccessFilter(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AccessFilter stringFilter. + * @member {google.analytics.admin.v1alpha.IAccessStringFilter|null|undefined} stringFilter + * @memberof google.analytics.admin.v1alpha.AccessFilter + * @instance + */ + AccessFilter.prototype.stringFilter = null; + + /** + * AccessFilter inListFilter. + * @member {google.analytics.admin.v1alpha.IAccessInListFilter|null|undefined} inListFilter + * @memberof google.analytics.admin.v1alpha.AccessFilter + * @instance + */ + AccessFilter.prototype.inListFilter = null; + + /** + * AccessFilter numericFilter. + * @member {google.analytics.admin.v1alpha.IAccessNumericFilter|null|undefined} numericFilter + * @memberof google.analytics.admin.v1alpha.AccessFilter + * @instance + */ + AccessFilter.prototype.numericFilter = null; + + /** + * AccessFilter betweenFilter. + * @member {google.analytics.admin.v1alpha.IAccessBetweenFilter|null|undefined} betweenFilter + * @memberof google.analytics.admin.v1alpha.AccessFilter + * @instance + */ + AccessFilter.prototype.betweenFilter = null; + + /** + * AccessFilter fieldName. + * @member {string} fieldName + * @memberof google.analytics.admin.v1alpha.AccessFilter + * @instance + */ + AccessFilter.prototype.fieldName = ""; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * AccessFilter oneFilter. + * @member {"stringFilter"|"inListFilter"|"numericFilter"|"betweenFilter"|undefined} oneFilter + * @memberof google.analytics.admin.v1alpha.AccessFilter + * @instance + */ + Object.defineProperty(AccessFilter.prototype, "oneFilter", { + get: $util.oneOfGetter($oneOfFields = ["stringFilter", "inListFilter", "numericFilter", "betweenFilter"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new AccessFilter instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.AccessFilter + * @static + * @param {google.analytics.admin.v1alpha.IAccessFilter=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.AccessFilter} AccessFilter instance + */ + AccessFilter.create = function create(properties) { + return new AccessFilter(properties); + }; + + /** + * Encodes the specified AccessFilter message. Does not implicitly {@link google.analytics.admin.v1alpha.AccessFilter.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.AccessFilter + * @static + * @param {google.analytics.admin.v1alpha.IAccessFilter} message AccessFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AccessFilter.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.fieldName != null && Object.hasOwnProperty.call(message, "fieldName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.fieldName); + if (message.stringFilter != null && Object.hasOwnProperty.call(message, "stringFilter")) + $root.google.analytics.admin.v1alpha.AccessStringFilter.encode(message.stringFilter, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.inListFilter != null && Object.hasOwnProperty.call(message, "inListFilter")) + $root.google.analytics.admin.v1alpha.AccessInListFilter.encode(message.inListFilter, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.numericFilter != null && Object.hasOwnProperty.call(message, "numericFilter")) + $root.google.analytics.admin.v1alpha.AccessNumericFilter.encode(message.numericFilter, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.betweenFilter != null && Object.hasOwnProperty.call(message, "betweenFilter")) + $root.google.analytics.admin.v1alpha.AccessBetweenFilter.encode(message.betweenFilter, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified AccessFilter message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AccessFilter.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.AccessFilter + * @static + * @param {google.analytics.admin.v1alpha.IAccessFilter} message AccessFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AccessFilter.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AccessFilter message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.AccessFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.AccessFilter} AccessFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AccessFilter.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.AccessFilter(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: { + message.stringFilter = $root.google.analytics.admin.v1alpha.AccessStringFilter.decode(reader, reader.uint32()); + break; + } + case 3: { + message.inListFilter = $root.google.analytics.admin.v1alpha.AccessInListFilter.decode(reader, reader.uint32()); + break; + } + case 4: { + message.numericFilter = $root.google.analytics.admin.v1alpha.AccessNumericFilter.decode(reader, reader.uint32()); + break; + } + case 5: { + message.betweenFilter = $root.google.analytics.admin.v1alpha.AccessBetweenFilter.decode(reader, reader.uint32()); + break; + } + case 1: { + message.fieldName = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AccessFilter message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.AccessFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.AccessFilter} AccessFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AccessFilter.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AccessFilter message. + * @function verify + * @memberof google.analytics.admin.v1alpha.AccessFilter + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AccessFilter.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.stringFilter != null && message.hasOwnProperty("stringFilter")) { + properties.oneFilter = 1; + { + var error = $root.google.analytics.admin.v1alpha.AccessStringFilter.verify(message.stringFilter); + if (error) + return "stringFilter." + error; + } + } + if (message.inListFilter != null && message.hasOwnProperty("inListFilter")) { + if (properties.oneFilter === 1) + return "oneFilter: multiple values"; + properties.oneFilter = 1; + { + var error = $root.google.analytics.admin.v1alpha.AccessInListFilter.verify(message.inListFilter); + if (error) + return "inListFilter." + error; + } + } + if (message.numericFilter != null && message.hasOwnProperty("numericFilter")) { + if (properties.oneFilter === 1) + return "oneFilter: multiple values"; + properties.oneFilter = 1; + { + var error = $root.google.analytics.admin.v1alpha.AccessNumericFilter.verify(message.numericFilter); + if (error) + return "numericFilter." + error; + } + } + if (message.betweenFilter != null && message.hasOwnProperty("betweenFilter")) { + if (properties.oneFilter === 1) + return "oneFilter: multiple values"; + properties.oneFilter = 1; + { + var error = $root.google.analytics.admin.v1alpha.AccessBetweenFilter.verify(message.betweenFilter); + if (error) + return "betweenFilter." + error; + } + } + if (message.fieldName != null && message.hasOwnProperty("fieldName")) + if (!$util.isString(message.fieldName)) + return "fieldName: string expected"; + return null; + }; + + /** + * Creates an AccessFilter message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.AccessFilter + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.AccessFilter} AccessFilter + */ + AccessFilter.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.AccessFilter) + return object; + var message = new $root.google.analytics.admin.v1alpha.AccessFilter(); + if (object.stringFilter != null) { + if (typeof object.stringFilter !== "object") + throw TypeError(".google.analytics.admin.v1alpha.AccessFilter.stringFilter: object expected"); + message.stringFilter = $root.google.analytics.admin.v1alpha.AccessStringFilter.fromObject(object.stringFilter); + } + if (object.inListFilter != null) { + if (typeof object.inListFilter !== "object") + throw TypeError(".google.analytics.admin.v1alpha.AccessFilter.inListFilter: object expected"); + message.inListFilter = $root.google.analytics.admin.v1alpha.AccessInListFilter.fromObject(object.inListFilter); + } + if (object.numericFilter != null) { + if (typeof object.numericFilter !== "object") + throw TypeError(".google.analytics.admin.v1alpha.AccessFilter.numericFilter: object expected"); + message.numericFilter = $root.google.analytics.admin.v1alpha.AccessNumericFilter.fromObject(object.numericFilter); + } + if (object.betweenFilter != null) { + if (typeof object.betweenFilter !== "object") + throw TypeError(".google.analytics.admin.v1alpha.AccessFilter.betweenFilter: object expected"); + message.betweenFilter = $root.google.analytics.admin.v1alpha.AccessBetweenFilter.fromObject(object.betweenFilter); + } + if (object.fieldName != null) + message.fieldName = String(object.fieldName); + return message; + }; + + /** + * Creates a plain object from an AccessFilter message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.AccessFilter + * @static + * @param {google.analytics.admin.v1alpha.AccessFilter} message AccessFilter + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AccessFilter.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.fieldName = ""; + if (message.fieldName != null && message.hasOwnProperty("fieldName")) + object.fieldName = message.fieldName; + if (message.stringFilter != null && message.hasOwnProperty("stringFilter")) { + object.stringFilter = $root.google.analytics.admin.v1alpha.AccessStringFilter.toObject(message.stringFilter, options); + if (options.oneofs) + object.oneFilter = "stringFilter"; + } + if (message.inListFilter != null && message.hasOwnProperty("inListFilter")) { + object.inListFilter = $root.google.analytics.admin.v1alpha.AccessInListFilter.toObject(message.inListFilter, options); + if (options.oneofs) + object.oneFilter = "inListFilter"; + } + if (message.numericFilter != null && message.hasOwnProperty("numericFilter")) { + object.numericFilter = $root.google.analytics.admin.v1alpha.AccessNumericFilter.toObject(message.numericFilter, options); + if (options.oneofs) + object.oneFilter = "numericFilter"; + } + if (message.betweenFilter != null && message.hasOwnProperty("betweenFilter")) { + object.betweenFilter = $root.google.analytics.admin.v1alpha.AccessBetweenFilter.toObject(message.betweenFilter, options); + if (options.oneofs) + object.oneFilter = "betweenFilter"; + } + return object; + }; + + /** + * Converts this AccessFilter to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.AccessFilter + * @instance + * @returns {Object.} JSON object + */ + AccessFilter.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AccessFilter + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.AccessFilter + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AccessFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.AccessFilter"; + }; + + return AccessFilter; + })(); + + v1alpha.AccessStringFilter = (function() { + + /** + * Properties of an AccessStringFilter. + * @memberof google.analytics.admin.v1alpha + * @interface IAccessStringFilter + * @property {google.analytics.admin.v1alpha.AccessStringFilter.MatchType|null} [matchType] AccessStringFilter matchType + * @property {string|null} [value] AccessStringFilter value + * @property {boolean|null} [caseSensitive] AccessStringFilter caseSensitive + */ + + /** + * Constructs a new AccessStringFilter. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents an AccessStringFilter. + * @implements IAccessStringFilter + * @constructor + * @param {google.analytics.admin.v1alpha.IAccessStringFilter=} [properties] Properties to set + */ + function AccessStringFilter(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AccessStringFilter matchType. + * @member {google.analytics.admin.v1alpha.AccessStringFilter.MatchType} matchType + * @memberof google.analytics.admin.v1alpha.AccessStringFilter + * @instance + */ + AccessStringFilter.prototype.matchType = 0; + + /** + * AccessStringFilter value. + * @member {string} value + * @memberof google.analytics.admin.v1alpha.AccessStringFilter + * @instance + */ + AccessStringFilter.prototype.value = ""; + + /** + * AccessStringFilter caseSensitive. + * @member {boolean} caseSensitive + * @memberof google.analytics.admin.v1alpha.AccessStringFilter + * @instance + */ + AccessStringFilter.prototype.caseSensitive = false; + + /** + * Creates a new AccessStringFilter instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.AccessStringFilter + * @static + * @param {google.analytics.admin.v1alpha.IAccessStringFilter=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.AccessStringFilter} AccessStringFilter instance + */ + AccessStringFilter.create = function create(properties) { + return new AccessStringFilter(properties); + }; + + /** + * Encodes the specified AccessStringFilter message. Does not implicitly {@link google.analytics.admin.v1alpha.AccessStringFilter.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.AccessStringFilter + * @static + * @param {google.analytics.admin.v1alpha.IAccessStringFilter} message AccessStringFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AccessStringFilter.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.matchType != null && Object.hasOwnProperty.call(message, "matchType")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.matchType); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.value); + if (message.caseSensitive != null && Object.hasOwnProperty.call(message, "caseSensitive")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.caseSensitive); + return writer; + }; + + /** + * Encodes the specified AccessStringFilter message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AccessStringFilter.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.AccessStringFilter + * @static + * @param {google.analytics.admin.v1alpha.IAccessStringFilter} message AccessStringFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AccessStringFilter.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AccessStringFilter message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.AccessStringFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.AccessStringFilter} AccessStringFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AccessStringFilter.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.AccessStringFilter(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.matchType = reader.int32(); + break; + } + case 2: { + message.value = reader.string(); + break; + } + case 3: { + message.caseSensitive = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AccessStringFilter message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.AccessStringFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.AccessStringFilter} AccessStringFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AccessStringFilter.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AccessStringFilter message. + * @function verify + * @memberof google.analytics.admin.v1alpha.AccessStringFilter + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AccessStringFilter.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.matchType != null && message.hasOwnProperty("matchType")) + switch (message.matchType) { + default: + return "matchType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + break; + } + if (message.value != null && message.hasOwnProperty("value")) + if (!$util.isString(message.value)) + return "value: string expected"; + if (message.caseSensitive != null && message.hasOwnProperty("caseSensitive")) + if (typeof message.caseSensitive !== "boolean") + return "caseSensitive: boolean expected"; + return null; + }; + + /** + * Creates an AccessStringFilter message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.AccessStringFilter + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.AccessStringFilter} AccessStringFilter + */ + AccessStringFilter.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.AccessStringFilter) + return object; + var message = new $root.google.analytics.admin.v1alpha.AccessStringFilter(); + switch (object.matchType) { + default: + if (typeof object.matchType === "number") { + message.matchType = object.matchType; + break; + } + break; + case "MATCH_TYPE_UNSPECIFIED": + case 0: + message.matchType = 0; + break; + case "EXACT": + case 1: + message.matchType = 1; + break; + case "BEGINS_WITH": + case 2: + message.matchType = 2; + break; + case "ENDS_WITH": + case 3: + message.matchType = 3; + break; + case "CONTAINS": + case 4: + message.matchType = 4; + break; + case "FULL_REGEXP": + case 5: + message.matchType = 5; + break; + case "PARTIAL_REGEXP": + case 6: + message.matchType = 6; + break; + } + if (object.value != null) + message.value = String(object.value); + if (object.caseSensitive != null) + message.caseSensitive = Boolean(object.caseSensitive); + return message; + }; + + /** + * Creates a plain object from an AccessStringFilter message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.AccessStringFilter + * @static + * @param {google.analytics.admin.v1alpha.AccessStringFilter} message AccessStringFilter + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AccessStringFilter.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.matchType = options.enums === String ? "MATCH_TYPE_UNSPECIFIED" : 0; + object.value = ""; + object.caseSensitive = false; + } + if (message.matchType != null && message.hasOwnProperty("matchType")) + object.matchType = options.enums === String ? $root.google.analytics.admin.v1alpha.AccessStringFilter.MatchType[message.matchType] === undefined ? message.matchType : $root.google.analytics.admin.v1alpha.AccessStringFilter.MatchType[message.matchType] : message.matchType; + if (message.value != null && message.hasOwnProperty("value")) + object.value = message.value; + if (message.caseSensitive != null && message.hasOwnProperty("caseSensitive")) + object.caseSensitive = message.caseSensitive; + return object; + }; + + /** + * Converts this AccessStringFilter to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.AccessStringFilter + * @instance + * @returns {Object.} JSON object + */ + AccessStringFilter.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AccessStringFilter + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.AccessStringFilter + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AccessStringFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.AccessStringFilter"; + }; + + /** + * MatchType enum. + * @name google.analytics.admin.v1alpha.AccessStringFilter.MatchType + * @enum {number} + * @property {number} MATCH_TYPE_UNSPECIFIED=0 MATCH_TYPE_UNSPECIFIED value + * @property {number} EXACT=1 EXACT value + * @property {number} BEGINS_WITH=2 BEGINS_WITH value + * @property {number} ENDS_WITH=3 ENDS_WITH value + * @property {number} CONTAINS=4 CONTAINS value + * @property {number} FULL_REGEXP=5 FULL_REGEXP value + * @property {number} PARTIAL_REGEXP=6 PARTIAL_REGEXP value + */ + AccessStringFilter.MatchType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "MATCH_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "EXACT"] = 1; + values[valuesById[2] = "BEGINS_WITH"] = 2; + values[valuesById[3] = "ENDS_WITH"] = 3; + values[valuesById[4] = "CONTAINS"] = 4; + values[valuesById[5] = "FULL_REGEXP"] = 5; + values[valuesById[6] = "PARTIAL_REGEXP"] = 6; + return values; + })(); + + return AccessStringFilter; + })(); + + v1alpha.AccessInListFilter = (function() { + + /** + * Properties of an AccessInListFilter. + * @memberof google.analytics.admin.v1alpha + * @interface IAccessInListFilter + * @property {Array.|null} [values] AccessInListFilter values + * @property {boolean|null} [caseSensitive] AccessInListFilter caseSensitive + */ + + /** + * Constructs a new AccessInListFilter. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents an AccessInListFilter. + * @implements IAccessInListFilter + * @constructor + * @param {google.analytics.admin.v1alpha.IAccessInListFilter=} [properties] Properties to set + */ + function AccessInListFilter(properties) { + this.values = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AccessInListFilter values. + * @member {Array.} values + * @memberof google.analytics.admin.v1alpha.AccessInListFilter + * @instance + */ + AccessInListFilter.prototype.values = $util.emptyArray; + + /** + * AccessInListFilter caseSensitive. + * @member {boolean} caseSensitive + * @memberof google.analytics.admin.v1alpha.AccessInListFilter + * @instance + */ + AccessInListFilter.prototype.caseSensitive = false; + + /** + * Creates a new AccessInListFilter instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.AccessInListFilter + * @static + * @param {google.analytics.admin.v1alpha.IAccessInListFilter=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.AccessInListFilter} AccessInListFilter instance + */ + AccessInListFilter.create = function create(properties) { + return new AccessInListFilter(properties); + }; + + /** + * Encodes the specified AccessInListFilter message. Does not implicitly {@link google.analytics.admin.v1alpha.AccessInListFilter.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.AccessInListFilter + * @static + * @param {google.analytics.admin.v1alpha.IAccessInListFilter} message AccessInListFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AccessInListFilter.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.values != null && message.values.length) + for (var i = 0; i < message.values.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.values[i]); + if (message.caseSensitive != null && Object.hasOwnProperty.call(message, "caseSensitive")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.caseSensitive); + return writer; + }; + + /** + * Encodes the specified AccessInListFilter message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AccessInListFilter.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.AccessInListFilter + * @static + * @param {google.analytics.admin.v1alpha.IAccessInListFilter} message AccessInListFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AccessInListFilter.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AccessInListFilter message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.AccessInListFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.AccessInListFilter} AccessInListFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AccessInListFilter.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.AccessInListFilter(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.values && message.values.length)) + message.values = []; + message.values.push(reader.string()); + break; + } + case 2: { + message.caseSensitive = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AccessInListFilter message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.AccessInListFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.AccessInListFilter} AccessInListFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AccessInListFilter.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AccessInListFilter message. + * @function verify + * @memberof google.analytics.admin.v1alpha.AccessInListFilter + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AccessInListFilter.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.values != null && message.hasOwnProperty("values")) { + if (!Array.isArray(message.values)) + return "values: array expected"; + for (var i = 0; i < message.values.length; ++i) + if (!$util.isString(message.values[i])) + return "values: string[] expected"; + } + if (message.caseSensitive != null && message.hasOwnProperty("caseSensitive")) + if (typeof message.caseSensitive !== "boolean") + return "caseSensitive: boolean expected"; + return null; + }; + + /** + * Creates an AccessInListFilter message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.AccessInListFilter + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.AccessInListFilter} AccessInListFilter + */ + AccessInListFilter.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.AccessInListFilter) + return object; + var message = new $root.google.analytics.admin.v1alpha.AccessInListFilter(); + if (object.values) { + if (!Array.isArray(object.values)) + throw TypeError(".google.analytics.admin.v1alpha.AccessInListFilter.values: array expected"); + message.values = []; + for (var i = 0; i < object.values.length; ++i) + message.values[i] = String(object.values[i]); + } + if (object.caseSensitive != null) + message.caseSensitive = Boolean(object.caseSensitive); + return message; + }; + + /** + * Creates a plain object from an AccessInListFilter message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.AccessInListFilter + * @static + * @param {google.analytics.admin.v1alpha.AccessInListFilter} message AccessInListFilter + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AccessInListFilter.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.values = []; + if (options.defaults) + object.caseSensitive = false; + if (message.values && message.values.length) { + object.values = []; + for (var j = 0; j < message.values.length; ++j) + object.values[j] = message.values[j]; + } + if (message.caseSensitive != null && message.hasOwnProperty("caseSensitive")) + object.caseSensitive = message.caseSensitive; + return object; + }; + + /** + * Converts this AccessInListFilter to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.AccessInListFilter + * @instance + * @returns {Object.} JSON object + */ + AccessInListFilter.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AccessInListFilter + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.AccessInListFilter + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AccessInListFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.AccessInListFilter"; + }; + + return AccessInListFilter; + })(); + + v1alpha.AccessNumericFilter = (function() { + + /** + * Properties of an AccessNumericFilter. + * @memberof google.analytics.admin.v1alpha + * @interface IAccessNumericFilter + * @property {google.analytics.admin.v1alpha.AccessNumericFilter.Operation|null} [operation] AccessNumericFilter operation + * @property {google.analytics.admin.v1alpha.INumericValue|null} [value] AccessNumericFilter value + */ + + /** + * Constructs a new AccessNumericFilter. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents an AccessNumericFilter. + * @implements IAccessNumericFilter + * @constructor + * @param {google.analytics.admin.v1alpha.IAccessNumericFilter=} [properties] Properties to set + */ + function AccessNumericFilter(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AccessNumericFilter operation. + * @member {google.analytics.admin.v1alpha.AccessNumericFilter.Operation} operation + * @memberof google.analytics.admin.v1alpha.AccessNumericFilter + * @instance + */ + AccessNumericFilter.prototype.operation = 0; + + /** + * AccessNumericFilter value. + * @member {google.analytics.admin.v1alpha.INumericValue|null|undefined} value + * @memberof google.analytics.admin.v1alpha.AccessNumericFilter + * @instance + */ + AccessNumericFilter.prototype.value = null; + + /** + * Creates a new AccessNumericFilter instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.AccessNumericFilter + * @static + * @param {google.analytics.admin.v1alpha.IAccessNumericFilter=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.AccessNumericFilter} AccessNumericFilter instance + */ + AccessNumericFilter.create = function create(properties) { + return new AccessNumericFilter(properties); + }; + + /** + * Encodes the specified AccessNumericFilter message. Does not implicitly {@link google.analytics.admin.v1alpha.AccessNumericFilter.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.AccessNumericFilter + * @static + * @param {google.analytics.admin.v1alpha.IAccessNumericFilter} message AccessNumericFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AccessNumericFilter.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.operation != null && Object.hasOwnProperty.call(message, "operation")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.operation); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + $root.google.analytics.admin.v1alpha.NumericValue.encode(message.value, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified AccessNumericFilter message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AccessNumericFilter.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.AccessNumericFilter + * @static + * @param {google.analytics.admin.v1alpha.IAccessNumericFilter} message AccessNumericFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AccessNumericFilter.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AccessNumericFilter message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.AccessNumericFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.AccessNumericFilter} AccessNumericFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AccessNumericFilter.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.AccessNumericFilter(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.operation = reader.int32(); + break; + } + case 2: { + message.value = $root.google.analytics.admin.v1alpha.NumericValue.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AccessNumericFilter message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.AccessNumericFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.AccessNumericFilter} AccessNumericFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AccessNumericFilter.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AccessNumericFilter message. + * @function verify + * @memberof google.analytics.admin.v1alpha.AccessNumericFilter + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AccessNumericFilter.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.operation != null && message.hasOwnProperty("operation")) + switch (message.operation) { + default: + return "operation: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + if (message.value != null && message.hasOwnProperty("value")) { + var error = $root.google.analytics.admin.v1alpha.NumericValue.verify(message.value); + if (error) + return "value." + error; + } + return null; + }; + + /** + * Creates an AccessNumericFilter message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.AccessNumericFilter + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.AccessNumericFilter} AccessNumericFilter + */ + AccessNumericFilter.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.AccessNumericFilter) + return object; + var message = new $root.google.analytics.admin.v1alpha.AccessNumericFilter(); + switch (object.operation) { + default: + if (typeof object.operation === "number") { + message.operation = object.operation; + break; + } + break; + case "OPERATION_UNSPECIFIED": + case 0: + message.operation = 0; + break; + case "EQUAL": + case 1: + message.operation = 1; + break; + case "LESS_THAN": + case 2: + message.operation = 2; + break; + case "LESS_THAN_OR_EQUAL": + case 3: + message.operation = 3; + break; + case "GREATER_THAN": + case 4: + message.operation = 4; + break; + case "GREATER_THAN_OR_EQUAL": + case 5: + message.operation = 5; + break; + } + if (object.value != null) { + if (typeof object.value !== "object") + throw TypeError(".google.analytics.admin.v1alpha.AccessNumericFilter.value: object expected"); + message.value = $root.google.analytics.admin.v1alpha.NumericValue.fromObject(object.value); + } + return message; + }; + + /** + * Creates a plain object from an AccessNumericFilter message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.AccessNumericFilter + * @static + * @param {google.analytics.admin.v1alpha.AccessNumericFilter} message AccessNumericFilter + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AccessNumericFilter.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.operation = options.enums === String ? "OPERATION_UNSPECIFIED" : 0; + object.value = null; + } + if (message.operation != null && message.hasOwnProperty("operation")) + object.operation = options.enums === String ? $root.google.analytics.admin.v1alpha.AccessNumericFilter.Operation[message.operation] === undefined ? message.operation : $root.google.analytics.admin.v1alpha.AccessNumericFilter.Operation[message.operation] : message.operation; + if (message.value != null && message.hasOwnProperty("value")) + object.value = $root.google.analytics.admin.v1alpha.NumericValue.toObject(message.value, options); + return object; + }; + + /** + * Converts this AccessNumericFilter to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.AccessNumericFilter + * @instance + * @returns {Object.} JSON object + */ + AccessNumericFilter.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AccessNumericFilter + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.AccessNumericFilter + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AccessNumericFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.AccessNumericFilter"; + }; + + /** + * Operation enum. + * @name google.analytics.admin.v1alpha.AccessNumericFilter.Operation + * @enum {number} + * @property {number} OPERATION_UNSPECIFIED=0 OPERATION_UNSPECIFIED value + * @property {number} EQUAL=1 EQUAL value + * @property {number} LESS_THAN=2 LESS_THAN value + * @property {number} LESS_THAN_OR_EQUAL=3 LESS_THAN_OR_EQUAL value + * @property {number} GREATER_THAN=4 GREATER_THAN value + * @property {number} GREATER_THAN_OR_EQUAL=5 GREATER_THAN_OR_EQUAL value + */ + AccessNumericFilter.Operation = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "OPERATION_UNSPECIFIED"] = 0; + values[valuesById[1] = "EQUAL"] = 1; + values[valuesById[2] = "LESS_THAN"] = 2; + values[valuesById[3] = "LESS_THAN_OR_EQUAL"] = 3; + values[valuesById[4] = "GREATER_THAN"] = 4; + values[valuesById[5] = "GREATER_THAN_OR_EQUAL"] = 5; + return values; + })(); + + return AccessNumericFilter; + })(); + + v1alpha.AccessBetweenFilter = (function() { + + /** + * Properties of an AccessBetweenFilter. + * @memberof google.analytics.admin.v1alpha + * @interface IAccessBetweenFilter + * @property {google.analytics.admin.v1alpha.INumericValue|null} [fromValue] AccessBetweenFilter fromValue + * @property {google.analytics.admin.v1alpha.INumericValue|null} [toValue] AccessBetweenFilter toValue + */ + + /** + * Constructs a new AccessBetweenFilter. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents an AccessBetweenFilter. + * @implements IAccessBetweenFilter + * @constructor + * @param {google.analytics.admin.v1alpha.IAccessBetweenFilter=} [properties] Properties to set + */ + function AccessBetweenFilter(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AccessBetweenFilter fromValue. + * @member {google.analytics.admin.v1alpha.INumericValue|null|undefined} fromValue + * @memberof google.analytics.admin.v1alpha.AccessBetweenFilter + * @instance + */ + AccessBetweenFilter.prototype.fromValue = null; + + /** + * AccessBetweenFilter toValue. + * @member {google.analytics.admin.v1alpha.INumericValue|null|undefined} toValue + * @memberof google.analytics.admin.v1alpha.AccessBetweenFilter + * @instance + */ + AccessBetweenFilter.prototype.toValue = null; + + /** + * Creates a new AccessBetweenFilter instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.AccessBetweenFilter + * @static + * @param {google.analytics.admin.v1alpha.IAccessBetweenFilter=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.AccessBetweenFilter} AccessBetweenFilter instance + */ + AccessBetweenFilter.create = function create(properties) { + return new AccessBetweenFilter(properties); + }; + + /** + * Encodes the specified AccessBetweenFilter message. Does not implicitly {@link google.analytics.admin.v1alpha.AccessBetweenFilter.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.AccessBetweenFilter + * @static + * @param {google.analytics.admin.v1alpha.IAccessBetweenFilter} message AccessBetweenFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AccessBetweenFilter.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.fromValue != null && Object.hasOwnProperty.call(message, "fromValue")) + $root.google.analytics.admin.v1alpha.NumericValue.encode(message.fromValue, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.toValue != null && Object.hasOwnProperty.call(message, "toValue")) + $root.google.analytics.admin.v1alpha.NumericValue.encode(message.toValue, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified AccessBetweenFilter message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AccessBetweenFilter.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.AccessBetweenFilter + * @static + * @param {google.analytics.admin.v1alpha.IAccessBetweenFilter} message AccessBetweenFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AccessBetweenFilter.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AccessBetweenFilter message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.AccessBetweenFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.AccessBetweenFilter} AccessBetweenFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AccessBetweenFilter.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.AccessBetweenFilter(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.fromValue = $root.google.analytics.admin.v1alpha.NumericValue.decode(reader, reader.uint32()); + break; + } + case 2: { + message.toValue = $root.google.analytics.admin.v1alpha.NumericValue.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AccessBetweenFilter message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.AccessBetweenFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.AccessBetweenFilter} AccessBetweenFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AccessBetweenFilter.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AccessBetweenFilter message. + * @function verify + * @memberof google.analytics.admin.v1alpha.AccessBetweenFilter + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AccessBetweenFilter.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.fromValue != null && message.hasOwnProperty("fromValue")) { + var error = $root.google.analytics.admin.v1alpha.NumericValue.verify(message.fromValue); + if (error) + return "fromValue." + error; + } + if (message.toValue != null && message.hasOwnProperty("toValue")) { + var error = $root.google.analytics.admin.v1alpha.NumericValue.verify(message.toValue); + if (error) + return "toValue." + error; + } + return null; + }; + + /** + * Creates an AccessBetweenFilter message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.AccessBetweenFilter + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.AccessBetweenFilter} AccessBetweenFilter + */ + AccessBetweenFilter.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.AccessBetweenFilter) + return object; + var message = new $root.google.analytics.admin.v1alpha.AccessBetweenFilter(); + if (object.fromValue != null) { + if (typeof object.fromValue !== "object") + throw TypeError(".google.analytics.admin.v1alpha.AccessBetweenFilter.fromValue: object expected"); + message.fromValue = $root.google.analytics.admin.v1alpha.NumericValue.fromObject(object.fromValue); + } + if (object.toValue != null) { + if (typeof object.toValue !== "object") + throw TypeError(".google.analytics.admin.v1alpha.AccessBetweenFilter.toValue: object expected"); + message.toValue = $root.google.analytics.admin.v1alpha.NumericValue.fromObject(object.toValue); + } + return message; + }; + + /** + * Creates a plain object from an AccessBetweenFilter message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.AccessBetweenFilter + * @static + * @param {google.analytics.admin.v1alpha.AccessBetweenFilter} message AccessBetweenFilter + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AccessBetweenFilter.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.fromValue = null; + object.toValue = null; + } + if (message.fromValue != null && message.hasOwnProperty("fromValue")) + object.fromValue = $root.google.analytics.admin.v1alpha.NumericValue.toObject(message.fromValue, options); + if (message.toValue != null && message.hasOwnProperty("toValue")) + object.toValue = $root.google.analytics.admin.v1alpha.NumericValue.toObject(message.toValue, options); + return object; + }; + + /** + * Converts this AccessBetweenFilter to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.AccessBetweenFilter + * @instance + * @returns {Object.} JSON object + */ + AccessBetweenFilter.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AccessBetweenFilter + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.AccessBetweenFilter + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AccessBetweenFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.AccessBetweenFilter"; + }; + + return AccessBetweenFilter; + })(); + + v1alpha.NumericValue = (function() { + + /** + * Properties of a NumericValue. + * @memberof google.analytics.admin.v1alpha + * @interface INumericValue + * @property {number|Long|null} [int64Value] NumericValue int64Value + * @property {number|null} [doubleValue] NumericValue doubleValue + */ + + /** + * Constructs a new NumericValue. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents a NumericValue. + * @implements INumericValue + * @constructor + * @param {google.analytics.admin.v1alpha.INumericValue=} [properties] Properties to set + */ + function NumericValue(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * NumericValue int64Value. + * @member {number|Long|null|undefined} int64Value + * @memberof google.analytics.admin.v1alpha.NumericValue + * @instance + */ + NumericValue.prototype.int64Value = null; + + /** + * NumericValue doubleValue. + * @member {number|null|undefined} doubleValue + * @memberof google.analytics.admin.v1alpha.NumericValue + * @instance + */ + NumericValue.prototype.doubleValue = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * NumericValue oneValue. + * @member {"int64Value"|"doubleValue"|undefined} oneValue + * @memberof google.analytics.admin.v1alpha.NumericValue + * @instance + */ + Object.defineProperty(NumericValue.prototype, "oneValue", { + get: $util.oneOfGetter($oneOfFields = ["int64Value", "doubleValue"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new NumericValue instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.NumericValue + * @static + * @param {google.analytics.admin.v1alpha.INumericValue=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.NumericValue} NumericValue instance + */ + NumericValue.create = function create(properties) { + return new NumericValue(properties); + }; + + /** + * Encodes the specified NumericValue message. Does not implicitly {@link google.analytics.admin.v1alpha.NumericValue.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.NumericValue + * @static + * @param {google.analytics.admin.v1alpha.INumericValue} message NumericValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NumericValue.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.int64Value != null && Object.hasOwnProperty.call(message, "int64Value")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.int64Value); + if (message.doubleValue != null && Object.hasOwnProperty.call(message, "doubleValue")) + writer.uint32(/* id 2, wireType 1 =*/17).double(message.doubleValue); + return writer; + }; + + /** + * Encodes the specified NumericValue message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.NumericValue.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.NumericValue + * @static + * @param {google.analytics.admin.v1alpha.INumericValue} message NumericValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NumericValue.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NumericValue message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.NumericValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.NumericValue} NumericValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NumericValue.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.NumericValue(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.int64Value = reader.int64(); + break; + } + case 2: { + message.doubleValue = reader.double(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a NumericValue message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.NumericValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.NumericValue} NumericValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NumericValue.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NumericValue message. + * @function verify + * @memberof google.analytics.admin.v1alpha.NumericValue + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NumericValue.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.int64Value != null && message.hasOwnProperty("int64Value")) { + properties.oneValue = 1; + if (!$util.isInteger(message.int64Value) && !(message.int64Value && $util.isInteger(message.int64Value.low) && $util.isInteger(message.int64Value.high))) + return "int64Value: integer|Long expected"; + } + if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) { + if (properties.oneValue === 1) + return "oneValue: multiple values"; + properties.oneValue = 1; + if (typeof message.doubleValue !== "number") + return "doubleValue: number expected"; + } + return null; + }; + + /** + * Creates a NumericValue message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.NumericValue + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.NumericValue} NumericValue + */ + NumericValue.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.NumericValue) + return object; + var message = new $root.google.analytics.admin.v1alpha.NumericValue(); + if (object.int64Value != null) + if ($util.Long) + (message.int64Value = $util.Long.fromValue(object.int64Value)).unsigned = false; + else if (typeof object.int64Value === "string") + message.int64Value = parseInt(object.int64Value, 10); + else if (typeof object.int64Value === "number") + message.int64Value = object.int64Value; + else if (typeof object.int64Value === "object") + message.int64Value = new $util.LongBits(object.int64Value.low >>> 0, object.int64Value.high >>> 0).toNumber(); + if (object.doubleValue != null) + message.doubleValue = Number(object.doubleValue); + return message; + }; + + /** + * Creates a plain object from a NumericValue message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.NumericValue + * @static + * @param {google.analytics.admin.v1alpha.NumericValue} message NumericValue + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NumericValue.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.int64Value != null && message.hasOwnProperty("int64Value")) { + if (typeof message.int64Value === "number") + object.int64Value = options.longs === String ? String(message.int64Value) : message.int64Value; + else + object.int64Value = options.longs === String ? $util.Long.prototype.toString.call(message.int64Value) : options.longs === Number ? new $util.LongBits(message.int64Value.low >>> 0, message.int64Value.high >>> 0).toNumber() : message.int64Value; + if (options.oneofs) + object.oneValue = "int64Value"; + } + if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) { + object.doubleValue = options.json && !isFinite(message.doubleValue) ? String(message.doubleValue) : message.doubleValue; + if (options.oneofs) + object.oneValue = "doubleValue"; + } + return object; + }; + + /** + * Converts this NumericValue to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.NumericValue + * @instance + * @returns {Object.} JSON object + */ + NumericValue.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for NumericValue + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.NumericValue + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NumericValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.NumericValue"; + }; + + return NumericValue; + })(); + + v1alpha.AccessOrderBy = (function() { + + /** + * Properties of an AccessOrderBy. + * @memberof google.analytics.admin.v1alpha + * @interface IAccessOrderBy + * @property {google.analytics.admin.v1alpha.AccessOrderBy.IMetricOrderBy|null} [metric] AccessOrderBy metric + * @property {google.analytics.admin.v1alpha.AccessOrderBy.IDimensionOrderBy|null} [dimension] AccessOrderBy dimension + * @property {boolean|null} [desc] AccessOrderBy desc + */ + + /** + * Constructs a new AccessOrderBy. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents an AccessOrderBy. + * @implements IAccessOrderBy + * @constructor + * @param {google.analytics.admin.v1alpha.IAccessOrderBy=} [properties] Properties to set + */ + function AccessOrderBy(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AccessOrderBy metric. + * @member {google.analytics.admin.v1alpha.AccessOrderBy.IMetricOrderBy|null|undefined} metric + * @memberof google.analytics.admin.v1alpha.AccessOrderBy + * @instance + */ + AccessOrderBy.prototype.metric = null; + + /** + * AccessOrderBy dimension. + * @member {google.analytics.admin.v1alpha.AccessOrderBy.IDimensionOrderBy|null|undefined} dimension + * @memberof google.analytics.admin.v1alpha.AccessOrderBy + * @instance + */ + AccessOrderBy.prototype.dimension = null; + + /** + * AccessOrderBy desc. + * @member {boolean} desc + * @memberof google.analytics.admin.v1alpha.AccessOrderBy + * @instance + */ + AccessOrderBy.prototype.desc = false; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * AccessOrderBy oneOrderBy. + * @member {"metric"|"dimension"|undefined} oneOrderBy + * @memberof google.analytics.admin.v1alpha.AccessOrderBy + * @instance + */ + Object.defineProperty(AccessOrderBy.prototype, "oneOrderBy", { + get: $util.oneOfGetter($oneOfFields = ["metric", "dimension"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new AccessOrderBy instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.AccessOrderBy + * @static + * @param {google.analytics.admin.v1alpha.IAccessOrderBy=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.AccessOrderBy} AccessOrderBy instance + */ + AccessOrderBy.create = function create(properties) { + return new AccessOrderBy(properties); + }; + + /** + * Encodes the specified AccessOrderBy message. Does not implicitly {@link google.analytics.admin.v1alpha.AccessOrderBy.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.AccessOrderBy + * @static + * @param {google.analytics.admin.v1alpha.IAccessOrderBy} message AccessOrderBy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AccessOrderBy.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.metric != null && Object.hasOwnProperty.call(message, "metric")) + $root.google.analytics.admin.v1alpha.AccessOrderBy.MetricOrderBy.encode(message.metric, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.dimension != null && Object.hasOwnProperty.call(message, "dimension")) + $root.google.analytics.admin.v1alpha.AccessOrderBy.DimensionOrderBy.encode(message.dimension, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.desc != null && Object.hasOwnProperty.call(message, "desc")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.desc); + return writer; + }; + + /** + * Encodes the specified AccessOrderBy message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AccessOrderBy.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.AccessOrderBy + * @static + * @param {google.analytics.admin.v1alpha.IAccessOrderBy} message AccessOrderBy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AccessOrderBy.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AccessOrderBy message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.AccessOrderBy + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.AccessOrderBy} AccessOrderBy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AccessOrderBy.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.AccessOrderBy(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.metric = $root.google.analytics.admin.v1alpha.AccessOrderBy.MetricOrderBy.decode(reader, reader.uint32()); + break; + } + case 2: { + message.dimension = $root.google.analytics.admin.v1alpha.AccessOrderBy.DimensionOrderBy.decode(reader, reader.uint32()); + break; + } + case 3: { + message.desc = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AccessOrderBy message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.AccessOrderBy + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.AccessOrderBy} AccessOrderBy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AccessOrderBy.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AccessOrderBy message. + * @function verify + * @memberof google.analytics.admin.v1alpha.AccessOrderBy + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AccessOrderBy.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.metric != null && message.hasOwnProperty("metric")) { + properties.oneOrderBy = 1; + { + var error = $root.google.analytics.admin.v1alpha.AccessOrderBy.MetricOrderBy.verify(message.metric); + if (error) + return "metric." + error; + } + } + if (message.dimension != null && message.hasOwnProperty("dimension")) { + if (properties.oneOrderBy === 1) + return "oneOrderBy: multiple values"; + properties.oneOrderBy = 1; + { + var error = $root.google.analytics.admin.v1alpha.AccessOrderBy.DimensionOrderBy.verify(message.dimension); + if (error) + return "dimension." + error; + } + } + if (message.desc != null && message.hasOwnProperty("desc")) + if (typeof message.desc !== "boolean") + return "desc: boolean expected"; + return null; + }; + + /** + * Creates an AccessOrderBy message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.AccessOrderBy + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.AccessOrderBy} AccessOrderBy + */ + AccessOrderBy.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.AccessOrderBy) + return object; + var message = new $root.google.analytics.admin.v1alpha.AccessOrderBy(); + if (object.metric != null) { + if (typeof object.metric !== "object") + throw TypeError(".google.analytics.admin.v1alpha.AccessOrderBy.metric: object expected"); + message.metric = $root.google.analytics.admin.v1alpha.AccessOrderBy.MetricOrderBy.fromObject(object.metric); + } + if (object.dimension != null) { + if (typeof object.dimension !== "object") + throw TypeError(".google.analytics.admin.v1alpha.AccessOrderBy.dimension: object expected"); + message.dimension = $root.google.analytics.admin.v1alpha.AccessOrderBy.DimensionOrderBy.fromObject(object.dimension); + } + if (object.desc != null) + message.desc = Boolean(object.desc); + return message; + }; + + /** + * Creates a plain object from an AccessOrderBy message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.AccessOrderBy + * @static + * @param {google.analytics.admin.v1alpha.AccessOrderBy} message AccessOrderBy + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AccessOrderBy.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.desc = false; + if (message.metric != null && message.hasOwnProperty("metric")) { + object.metric = $root.google.analytics.admin.v1alpha.AccessOrderBy.MetricOrderBy.toObject(message.metric, options); + if (options.oneofs) + object.oneOrderBy = "metric"; + } + if (message.dimension != null && message.hasOwnProperty("dimension")) { + object.dimension = $root.google.analytics.admin.v1alpha.AccessOrderBy.DimensionOrderBy.toObject(message.dimension, options); + if (options.oneofs) + object.oneOrderBy = "dimension"; + } + if (message.desc != null && message.hasOwnProperty("desc")) + object.desc = message.desc; + return object; + }; + + /** + * Converts this AccessOrderBy to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.AccessOrderBy + * @instance + * @returns {Object.} JSON object + */ + AccessOrderBy.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AccessOrderBy + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.AccessOrderBy + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AccessOrderBy.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.AccessOrderBy"; + }; + + AccessOrderBy.MetricOrderBy = (function() { + + /** + * Properties of a MetricOrderBy. + * @memberof google.analytics.admin.v1alpha.AccessOrderBy + * @interface IMetricOrderBy + * @property {string|null} [metricName] MetricOrderBy metricName + */ + + /** + * Constructs a new MetricOrderBy. + * @memberof google.analytics.admin.v1alpha.AccessOrderBy + * @classdesc Represents a MetricOrderBy. + * @implements IMetricOrderBy + * @constructor + * @param {google.analytics.admin.v1alpha.AccessOrderBy.IMetricOrderBy=} [properties] Properties to set + */ + function MetricOrderBy(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MetricOrderBy metricName. + * @member {string} metricName + * @memberof google.analytics.admin.v1alpha.AccessOrderBy.MetricOrderBy + * @instance + */ + MetricOrderBy.prototype.metricName = ""; + + /** + * Creates a new MetricOrderBy instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.AccessOrderBy.MetricOrderBy + * @static + * @param {google.analytics.admin.v1alpha.AccessOrderBy.IMetricOrderBy=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.AccessOrderBy.MetricOrderBy} MetricOrderBy instance + */ + MetricOrderBy.create = function create(properties) { + return new MetricOrderBy(properties); + }; + + /** + * Encodes the specified MetricOrderBy message. Does not implicitly {@link google.analytics.admin.v1alpha.AccessOrderBy.MetricOrderBy.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.AccessOrderBy.MetricOrderBy + * @static + * @param {google.analytics.admin.v1alpha.AccessOrderBy.IMetricOrderBy} message MetricOrderBy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MetricOrderBy.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.metricName != null && Object.hasOwnProperty.call(message, "metricName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.metricName); + return writer; + }; + + /** + * Encodes the specified MetricOrderBy message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AccessOrderBy.MetricOrderBy.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.AccessOrderBy.MetricOrderBy + * @static + * @param {google.analytics.admin.v1alpha.AccessOrderBy.IMetricOrderBy} message MetricOrderBy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MetricOrderBy.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MetricOrderBy message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.AccessOrderBy.MetricOrderBy + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.AccessOrderBy.MetricOrderBy} MetricOrderBy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MetricOrderBy.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.AccessOrderBy.MetricOrderBy(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.metricName = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MetricOrderBy message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.AccessOrderBy.MetricOrderBy + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.AccessOrderBy.MetricOrderBy} MetricOrderBy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MetricOrderBy.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MetricOrderBy message. + * @function verify + * @memberof google.analytics.admin.v1alpha.AccessOrderBy.MetricOrderBy + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MetricOrderBy.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.metricName != null && message.hasOwnProperty("metricName")) + if (!$util.isString(message.metricName)) + return "metricName: string expected"; + return null; + }; + + /** + * Creates a MetricOrderBy message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.AccessOrderBy.MetricOrderBy + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.AccessOrderBy.MetricOrderBy} MetricOrderBy + */ + MetricOrderBy.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.AccessOrderBy.MetricOrderBy) + return object; + var message = new $root.google.analytics.admin.v1alpha.AccessOrderBy.MetricOrderBy(); + if (object.metricName != null) + message.metricName = String(object.metricName); + return message; + }; + + /** + * Creates a plain object from a MetricOrderBy message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.AccessOrderBy.MetricOrderBy + * @static + * @param {google.analytics.admin.v1alpha.AccessOrderBy.MetricOrderBy} message MetricOrderBy + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MetricOrderBy.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.metricName = ""; + if (message.metricName != null && message.hasOwnProperty("metricName")) + object.metricName = message.metricName; + return object; + }; + + /** + * Converts this MetricOrderBy to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.AccessOrderBy.MetricOrderBy + * @instance + * @returns {Object.} JSON object + */ + MetricOrderBy.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MetricOrderBy + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.AccessOrderBy.MetricOrderBy + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MetricOrderBy.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.AccessOrderBy.MetricOrderBy"; + }; + + return MetricOrderBy; + })(); + + AccessOrderBy.DimensionOrderBy = (function() { + + /** + * Properties of a DimensionOrderBy. + * @memberof google.analytics.admin.v1alpha.AccessOrderBy + * @interface IDimensionOrderBy + * @property {string|null} [dimensionName] DimensionOrderBy dimensionName + * @property {google.analytics.admin.v1alpha.AccessOrderBy.DimensionOrderBy.OrderType|null} [orderType] DimensionOrderBy orderType + */ + + /** + * Constructs a new DimensionOrderBy. + * @memberof google.analytics.admin.v1alpha.AccessOrderBy + * @classdesc Represents a DimensionOrderBy. + * @implements IDimensionOrderBy + * @constructor + * @param {google.analytics.admin.v1alpha.AccessOrderBy.IDimensionOrderBy=} [properties] Properties to set + */ + function DimensionOrderBy(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DimensionOrderBy dimensionName. + * @member {string} dimensionName + * @memberof google.analytics.admin.v1alpha.AccessOrderBy.DimensionOrderBy + * @instance + */ + DimensionOrderBy.prototype.dimensionName = ""; + + /** + * DimensionOrderBy orderType. + * @member {google.analytics.admin.v1alpha.AccessOrderBy.DimensionOrderBy.OrderType} orderType + * @memberof google.analytics.admin.v1alpha.AccessOrderBy.DimensionOrderBy + * @instance + */ + DimensionOrderBy.prototype.orderType = 0; + + /** + * Creates a new DimensionOrderBy instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.AccessOrderBy.DimensionOrderBy + * @static + * @param {google.analytics.admin.v1alpha.AccessOrderBy.IDimensionOrderBy=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.AccessOrderBy.DimensionOrderBy} DimensionOrderBy instance + */ + DimensionOrderBy.create = function create(properties) { + return new DimensionOrderBy(properties); + }; + + /** + * Encodes the specified DimensionOrderBy message. Does not implicitly {@link google.analytics.admin.v1alpha.AccessOrderBy.DimensionOrderBy.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.AccessOrderBy.DimensionOrderBy + * @static + * @param {google.analytics.admin.v1alpha.AccessOrderBy.IDimensionOrderBy} message DimensionOrderBy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DimensionOrderBy.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dimensionName != null && Object.hasOwnProperty.call(message, "dimensionName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.dimensionName); + if (message.orderType != null && Object.hasOwnProperty.call(message, "orderType")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.orderType); + return writer; + }; + + /** + * Encodes the specified DimensionOrderBy message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AccessOrderBy.DimensionOrderBy.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.AccessOrderBy.DimensionOrderBy + * @static + * @param {google.analytics.admin.v1alpha.AccessOrderBy.IDimensionOrderBy} message DimensionOrderBy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DimensionOrderBy.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DimensionOrderBy message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.AccessOrderBy.DimensionOrderBy + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.AccessOrderBy.DimensionOrderBy} DimensionOrderBy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DimensionOrderBy.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.AccessOrderBy.DimensionOrderBy(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.dimensionName = reader.string(); + break; + } + case 2: { + message.orderType = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DimensionOrderBy message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.AccessOrderBy.DimensionOrderBy + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.AccessOrderBy.DimensionOrderBy} DimensionOrderBy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DimensionOrderBy.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DimensionOrderBy message. + * @function verify + * @memberof google.analytics.admin.v1alpha.AccessOrderBy.DimensionOrderBy + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DimensionOrderBy.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dimensionName != null && message.hasOwnProperty("dimensionName")) + if (!$util.isString(message.dimensionName)) + return "dimensionName: string expected"; + if (message.orderType != null && message.hasOwnProperty("orderType")) + switch (message.orderType) { + default: + return "orderType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + return null; + }; + + /** + * Creates a DimensionOrderBy message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.AccessOrderBy.DimensionOrderBy + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.AccessOrderBy.DimensionOrderBy} DimensionOrderBy + */ + DimensionOrderBy.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.AccessOrderBy.DimensionOrderBy) + return object; + var message = new $root.google.analytics.admin.v1alpha.AccessOrderBy.DimensionOrderBy(); + if (object.dimensionName != null) + message.dimensionName = String(object.dimensionName); + switch (object.orderType) { + default: + if (typeof object.orderType === "number") { + message.orderType = object.orderType; + break; + } + break; + case "ORDER_TYPE_UNSPECIFIED": + case 0: + message.orderType = 0; + break; + case "ALPHANUMERIC": + case 1: + message.orderType = 1; + break; + case "CASE_INSENSITIVE_ALPHANUMERIC": + case 2: + message.orderType = 2; + break; + case "NUMERIC": + case 3: + message.orderType = 3; + break; + } + return message; + }; + + /** + * Creates a plain object from a DimensionOrderBy message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.AccessOrderBy.DimensionOrderBy + * @static + * @param {google.analytics.admin.v1alpha.AccessOrderBy.DimensionOrderBy} message DimensionOrderBy + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DimensionOrderBy.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.dimensionName = ""; + object.orderType = options.enums === String ? "ORDER_TYPE_UNSPECIFIED" : 0; + } + if (message.dimensionName != null && message.hasOwnProperty("dimensionName")) + object.dimensionName = message.dimensionName; + if (message.orderType != null && message.hasOwnProperty("orderType")) + object.orderType = options.enums === String ? $root.google.analytics.admin.v1alpha.AccessOrderBy.DimensionOrderBy.OrderType[message.orderType] === undefined ? message.orderType : $root.google.analytics.admin.v1alpha.AccessOrderBy.DimensionOrderBy.OrderType[message.orderType] : message.orderType; + return object; + }; + + /** + * Converts this DimensionOrderBy to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.AccessOrderBy.DimensionOrderBy + * @instance + * @returns {Object.} JSON object + */ + DimensionOrderBy.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DimensionOrderBy + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.AccessOrderBy.DimensionOrderBy + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DimensionOrderBy.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.AccessOrderBy.DimensionOrderBy"; + }; + + /** + * OrderType enum. + * @name google.analytics.admin.v1alpha.AccessOrderBy.DimensionOrderBy.OrderType + * @enum {number} + * @property {number} ORDER_TYPE_UNSPECIFIED=0 ORDER_TYPE_UNSPECIFIED value + * @property {number} ALPHANUMERIC=1 ALPHANUMERIC value + * @property {number} CASE_INSENSITIVE_ALPHANUMERIC=2 CASE_INSENSITIVE_ALPHANUMERIC value + * @property {number} NUMERIC=3 NUMERIC value + */ + DimensionOrderBy.OrderType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ORDER_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "ALPHANUMERIC"] = 1; + values[valuesById[2] = "CASE_INSENSITIVE_ALPHANUMERIC"] = 2; + values[valuesById[3] = "NUMERIC"] = 3; + return values; + })(); + + return DimensionOrderBy; + })(); + + return AccessOrderBy; + })(); + + v1alpha.AccessDimensionHeader = (function() { + + /** + * Properties of an AccessDimensionHeader. + * @memberof google.analytics.admin.v1alpha + * @interface IAccessDimensionHeader + * @property {string|null} [dimensionName] AccessDimensionHeader dimensionName + */ + + /** + * Constructs a new AccessDimensionHeader. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents an AccessDimensionHeader. + * @implements IAccessDimensionHeader + * @constructor + * @param {google.analytics.admin.v1alpha.IAccessDimensionHeader=} [properties] Properties to set + */ + function AccessDimensionHeader(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AccessDimensionHeader dimensionName. + * @member {string} dimensionName + * @memberof google.analytics.admin.v1alpha.AccessDimensionHeader + * @instance + */ + AccessDimensionHeader.prototype.dimensionName = ""; + + /** + * Creates a new AccessDimensionHeader instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.AccessDimensionHeader + * @static + * @param {google.analytics.admin.v1alpha.IAccessDimensionHeader=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.AccessDimensionHeader} AccessDimensionHeader instance + */ + AccessDimensionHeader.create = function create(properties) { + return new AccessDimensionHeader(properties); + }; + + /** + * Encodes the specified AccessDimensionHeader message. Does not implicitly {@link google.analytics.admin.v1alpha.AccessDimensionHeader.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.AccessDimensionHeader + * @static + * @param {google.analytics.admin.v1alpha.IAccessDimensionHeader} message AccessDimensionHeader message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AccessDimensionHeader.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dimensionName != null && Object.hasOwnProperty.call(message, "dimensionName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.dimensionName); + return writer; + }; + + /** + * Encodes the specified AccessDimensionHeader message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AccessDimensionHeader.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.AccessDimensionHeader + * @static + * @param {google.analytics.admin.v1alpha.IAccessDimensionHeader} message AccessDimensionHeader message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AccessDimensionHeader.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AccessDimensionHeader message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.AccessDimensionHeader + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.AccessDimensionHeader} AccessDimensionHeader + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AccessDimensionHeader.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.AccessDimensionHeader(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.dimensionName = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AccessDimensionHeader message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.AccessDimensionHeader + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.AccessDimensionHeader} AccessDimensionHeader + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AccessDimensionHeader.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AccessDimensionHeader message. + * @function verify + * @memberof google.analytics.admin.v1alpha.AccessDimensionHeader + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AccessDimensionHeader.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dimensionName != null && message.hasOwnProperty("dimensionName")) + if (!$util.isString(message.dimensionName)) + return "dimensionName: string expected"; + return null; + }; + + /** + * Creates an AccessDimensionHeader message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.AccessDimensionHeader + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.AccessDimensionHeader} AccessDimensionHeader + */ + AccessDimensionHeader.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.AccessDimensionHeader) + return object; + var message = new $root.google.analytics.admin.v1alpha.AccessDimensionHeader(); + if (object.dimensionName != null) + message.dimensionName = String(object.dimensionName); + return message; + }; + + /** + * Creates a plain object from an AccessDimensionHeader message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.AccessDimensionHeader + * @static + * @param {google.analytics.admin.v1alpha.AccessDimensionHeader} message AccessDimensionHeader + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AccessDimensionHeader.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.dimensionName = ""; + if (message.dimensionName != null && message.hasOwnProperty("dimensionName")) + object.dimensionName = message.dimensionName; + return object; + }; + + /** + * Converts this AccessDimensionHeader to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.AccessDimensionHeader + * @instance + * @returns {Object.} JSON object + */ + AccessDimensionHeader.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AccessDimensionHeader + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.AccessDimensionHeader + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AccessDimensionHeader.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.AccessDimensionHeader"; + }; + + return AccessDimensionHeader; + })(); + + v1alpha.AccessMetricHeader = (function() { + + /** + * Properties of an AccessMetricHeader. + * @memberof google.analytics.admin.v1alpha + * @interface IAccessMetricHeader + * @property {string|null} [metricName] AccessMetricHeader metricName + */ + + /** + * Constructs a new AccessMetricHeader. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents an AccessMetricHeader. + * @implements IAccessMetricHeader + * @constructor + * @param {google.analytics.admin.v1alpha.IAccessMetricHeader=} [properties] Properties to set + */ + function AccessMetricHeader(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AccessMetricHeader metricName. + * @member {string} metricName + * @memberof google.analytics.admin.v1alpha.AccessMetricHeader + * @instance + */ + AccessMetricHeader.prototype.metricName = ""; + + /** + * Creates a new AccessMetricHeader instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.AccessMetricHeader + * @static + * @param {google.analytics.admin.v1alpha.IAccessMetricHeader=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.AccessMetricHeader} AccessMetricHeader instance + */ + AccessMetricHeader.create = function create(properties) { + return new AccessMetricHeader(properties); + }; + + /** + * Encodes the specified AccessMetricHeader message. Does not implicitly {@link google.analytics.admin.v1alpha.AccessMetricHeader.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.AccessMetricHeader + * @static + * @param {google.analytics.admin.v1alpha.IAccessMetricHeader} message AccessMetricHeader message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AccessMetricHeader.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.metricName != null && Object.hasOwnProperty.call(message, "metricName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.metricName); + return writer; + }; + + /** + * Encodes the specified AccessMetricHeader message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AccessMetricHeader.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.AccessMetricHeader + * @static + * @param {google.analytics.admin.v1alpha.IAccessMetricHeader} message AccessMetricHeader message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AccessMetricHeader.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AccessMetricHeader message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.AccessMetricHeader + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.AccessMetricHeader} AccessMetricHeader + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AccessMetricHeader.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.AccessMetricHeader(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.metricName = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AccessMetricHeader message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.AccessMetricHeader + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.AccessMetricHeader} AccessMetricHeader + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AccessMetricHeader.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AccessMetricHeader message. + * @function verify + * @memberof google.analytics.admin.v1alpha.AccessMetricHeader + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AccessMetricHeader.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.metricName != null && message.hasOwnProperty("metricName")) + if (!$util.isString(message.metricName)) + return "metricName: string expected"; + return null; + }; + + /** + * Creates an AccessMetricHeader message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.AccessMetricHeader + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.AccessMetricHeader} AccessMetricHeader + */ + AccessMetricHeader.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.AccessMetricHeader) + return object; + var message = new $root.google.analytics.admin.v1alpha.AccessMetricHeader(); + if (object.metricName != null) + message.metricName = String(object.metricName); + return message; + }; + + /** + * Creates a plain object from an AccessMetricHeader message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.AccessMetricHeader + * @static + * @param {google.analytics.admin.v1alpha.AccessMetricHeader} message AccessMetricHeader + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AccessMetricHeader.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.metricName = ""; + if (message.metricName != null && message.hasOwnProperty("metricName")) + object.metricName = message.metricName; + return object; + }; + + /** + * Converts this AccessMetricHeader to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.AccessMetricHeader + * @instance + * @returns {Object.} JSON object + */ + AccessMetricHeader.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AccessMetricHeader + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.AccessMetricHeader + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AccessMetricHeader.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.AccessMetricHeader"; + }; + + return AccessMetricHeader; + })(); + + v1alpha.AccessRow = (function() { + + /** + * Properties of an AccessRow. + * @memberof google.analytics.admin.v1alpha + * @interface IAccessRow + * @property {Array.|null} [dimensionValues] AccessRow dimensionValues + * @property {Array.|null} [metricValues] AccessRow metricValues + */ + + /** + * Constructs a new AccessRow. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents an AccessRow. + * @implements IAccessRow + * @constructor + * @param {google.analytics.admin.v1alpha.IAccessRow=} [properties] Properties to set + */ + function AccessRow(properties) { + this.dimensionValues = []; + this.metricValues = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AccessRow dimensionValues. + * @member {Array.} dimensionValues + * @memberof google.analytics.admin.v1alpha.AccessRow + * @instance + */ + AccessRow.prototype.dimensionValues = $util.emptyArray; + + /** + * AccessRow metricValues. + * @member {Array.} metricValues + * @memberof google.analytics.admin.v1alpha.AccessRow + * @instance + */ + AccessRow.prototype.metricValues = $util.emptyArray; + + /** + * Creates a new AccessRow instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.AccessRow + * @static + * @param {google.analytics.admin.v1alpha.IAccessRow=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.AccessRow} AccessRow instance + */ + AccessRow.create = function create(properties) { + return new AccessRow(properties); + }; + + /** + * Encodes the specified AccessRow message. Does not implicitly {@link google.analytics.admin.v1alpha.AccessRow.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.AccessRow + * @static + * @param {google.analytics.admin.v1alpha.IAccessRow} message AccessRow message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AccessRow.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dimensionValues != null && message.dimensionValues.length) + for (var i = 0; i < message.dimensionValues.length; ++i) + $root.google.analytics.admin.v1alpha.AccessDimensionValue.encode(message.dimensionValues[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.metricValues != null && message.metricValues.length) + for (var i = 0; i < message.metricValues.length; ++i) + $root.google.analytics.admin.v1alpha.AccessMetricValue.encode(message.metricValues[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified AccessRow message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AccessRow.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.AccessRow + * @static + * @param {google.analytics.admin.v1alpha.IAccessRow} message AccessRow message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AccessRow.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AccessRow message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.AccessRow + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.AccessRow} AccessRow + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AccessRow.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.AccessRow(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.dimensionValues && message.dimensionValues.length)) + message.dimensionValues = []; + message.dimensionValues.push($root.google.analytics.admin.v1alpha.AccessDimensionValue.decode(reader, reader.uint32())); + break; + } + case 2: { + if (!(message.metricValues && message.metricValues.length)) + message.metricValues = []; + message.metricValues.push($root.google.analytics.admin.v1alpha.AccessMetricValue.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AccessRow message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.AccessRow + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.AccessRow} AccessRow + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AccessRow.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AccessRow message. + * @function verify + * @memberof google.analytics.admin.v1alpha.AccessRow + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AccessRow.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dimensionValues != null && message.hasOwnProperty("dimensionValues")) { + if (!Array.isArray(message.dimensionValues)) + return "dimensionValues: array expected"; + for (var i = 0; i < message.dimensionValues.length; ++i) { + var error = $root.google.analytics.admin.v1alpha.AccessDimensionValue.verify(message.dimensionValues[i]); + if (error) + return "dimensionValues." + error; + } + } + if (message.metricValues != null && message.hasOwnProperty("metricValues")) { + if (!Array.isArray(message.metricValues)) + return "metricValues: array expected"; + for (var i = 0; i < message.metricValues.length; ++i) { + var error = $root.google.analytics.admin.v1alpha.AccessMetricValue.verify(message.metricValues[i]); + if (error) + return "metricValues." + error; + } + } + return null; + }; + + /** + * Creates an AccessRow message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.AccessRow + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.AccessRow} AccessRow + */ + AccessRow.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.AccessRow) + return object; + var message = new $root.google.analytics.admin.v1alpha.AccessRow(); + if (object.dimensionValues) { + if (!Array.isArray(object.dimensionValues)) + throw TypeError(".google.analytics.admin.v1alpha.AccessRow.dimensionValues: array expected"); + message.dimensionValues = []; + for (var i = 0; i < object.dimensionValues.length; ++i) { + if (typeof object.dimensionValues[i] !== "object") + throw TypeError(".google.analytics.admin.v1alpha.AccessRow.dimensionValues: object expected"); + message.dimensionValues[i] = $root.google.analytics.admin.v1alpha.AccessDimensionValue.fromObject(object.dimensionValues[i]); + } + } + if (object.metricValues) { + if (!Array.isArray(object.metricValues)) + throw TypeError(".google.analytics.admin.v1alpha.AccessRow.metricValues: array expected"); + message.metricValues = []; + for (var i = 0; i < object.metricValues.length; ++i) { + if (typeof object.metricValues[i] !== "object") + throw TypeError(".google.analytics.admin.v1alpha.AccessRow.metricValues: object expected"); + message.metricValues[i] = $root.google.analytics.admin.v1alpha.AccessMetricValue.fromObject(object.metricValues[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an AccessRow message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.AccessRow + * @static + * @param {google.analytics.admin.v1alpha.AccessRow} message AccessRow + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AccessRow.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.dimensionValues = []; + object.metricValues = []; + } + if (message.dimensionValues && message.dimensionValues.length) { + object.dimensionValues = []; + for (var j = 0; j < message.dimensionValues.length; ++j) + object.dimensionValues[j] = $root.google.analytics.admin.v1alpha.AccessDimensionValue.toObject(message.dimensionValues[j], options); + } + if (message.metricValues && message.metricValues.length) { + object.metricValues = []; + for (var j = 0; j < message.metricValues.length; ++j) + object.metricValues[j] = $root.google.analytics.admin.v1alpha.AccessMetricValue.toObject(message.metricValues[j], options); + } + return object; + }; + + /** + * Converts this AccessRow to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.AccessRow + * @instance + * @returns {Object.} JSON object + */ + AccessRow.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AccessRow + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.AccessRow + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AccessRow.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.AccessRow"; + }; + + return AccessRow; + })(); + + v1alpha.AccessDimensionValue = (function() { + + /** + * Properties of an AccessDimensionValue. + * @memberof google.analytics.admin.v1alpha + * @interface IAccessDimensionValue + * @property {string|null} [value] AccessDimensionValue value + */ + + /** + * Constructs a new AccessDimensionValue. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents an AccessDimensionValue. + * @implements IAccessDimensionValue + * @constructor + * @param {google.analytics.admin.v1alpha.IAccessDimensionValue=} [properties] Properties to set + */ + function AccessDimensionValue(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AccessDimensionValue value. + * @member {string} value + * @memberof google.analytics.admin.v1alpha.AccessDimensionValue + * @instance + */ + AccessDimensionValue.prototype.value = ""; + + /** + * Creates a new AccessDimensionValue instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.AccessDimensionValue + * @static + * @param {google.analytics.admin.v1alpha.IAccessDimensionValue=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.AccessDimensionValue} AccessDimensionValue instance + */ + AccessDimensionValue.create = function create(properties) { + return new AccessDimensionValue(properties); + }; + + /** + * Encodes the specified AccessDimensionValue message. Does not implicitly {@link google.analytics.admin.v1alpha.AccessDimensionValue.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.AccessDimensionValue + * @static + * @param {google.analytics.admin.v1alpha.IAccessDimensionValue} message AccessDimensionValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AccessDimensionValue.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.value); + return writer; + }; + + /** + * Encodes the specified AccessDimensionValue message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AccessDimensionValue.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.AccessDimensionValue + * @static + * @param {google.analytics.admin.v1alpha.IAccessDimensionValue} message AccessDimensionValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AccessDimensionValue.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AccessDimensionValue message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.AccessDimensionValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.AccessDimensionValue} AccessDimensionValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AccessDimensionValue.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.AccessDimensionValue(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.value = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AccessDimensionValue message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.AccessDimensionValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.AccessDimensionValue} AccessDimensionValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AccessDimensionValue.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AccessDimensionValue message. + * @function verify + * @memberof google.analytics.admin.v1alpha.AccessDimensionValue + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AccessDimensionValue.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (!$util.isString(message.value)) + return "value: string expected"; + return null; + }; + + /** + * Creates an AccessDimensionValue message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.AccessDimensionValue + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.AccessDimensionValue} AccessDimensionValue + */ + AccessDimensionValue.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.AccessDimensionValue) + return object; + var message = new $root.google.analytics.admin.v1alpha.AccessDimensionValue(); + if (object.value != null) + message.value = String(object.value); + return message; + }; + + /** + * Creates a plain object from an AccessDimensionValue message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.AccessDimensionValue + * @static + * @param {google.analytics.admin.v1alpha.AccessDimensionValue} message AccessDimensionValue + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AccessDimensionValue.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.value = ""; + if (message.value != null && message.hasOwnProperty("value")) + object.value = message.value; + return object; + }; + + /** + * Converts this AccessDimensionValue to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.AccessDimensionValue + * @instance + * @returns {Object.} JSON object + */ + AccessDimensionValue.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AccessDimensionValue + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.AccessDimensionValue + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AccessDimensionValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.AccessDimensionValue"; + }; + + return AccessDimensionValue; + })(); + + v1alpha.AccessMetricValue = (function() { + + /** + * Properties of an AccessMetricValue. + * @memberof google.analytics.admin.v1alpha + * @interface IAccessMetricValue + * @property {string|null} [value] AccessMetricValue value + */ + + /** + * Constructs a new AccessMetricValue. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents an AccessMetricValue. + * @implements IAccessMetricValue + * @constructor + * @param {google.analytics.admin.v1alpha.IAccessMetricValue=} [properties] Properties to set + */ + function AccessMetricValue(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AccessMetricValue value. + * @member {string} value + * @memberof google.analytics.admin.v1alpha.AccessMetricValue + * @instance + */ + AccessMetricValue.prototype.value = ""; + + /** + * Creates a new AccessMetricValue instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.AccessMetricValue + * @static + * @param {google.analytics.admin.v1alpha.IAccessMetricValue=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.AccessMetricValue} AccessMetricValue instance + */ + AccessMetricValue.create = function create(properties) { + return new AccessMetricValue(properties); + }; + + /** + * Encodes the specified AccessMetricValue message. Does not implicitly {@link google.analytics.admin.v1alpha.AccessMetricValue.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.AccessMetricValue + * @static + * @param {google.analytics.admin.v1alpha.IAccessMetricValue} message AccessMetricValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AccessMetricValue.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.value); + return writer; + }; + + /** + * Encodes the specified AccessMetricValue message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AccessMetricValue.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.AccessMetricValue + * @static + * @param {google.analytics.admin.v1alpha.IAccessMetricValue} message AccessMetricValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AccessMetricValue.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AccessMetricValue message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.AccessMetricValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.AccessMetricValue} AccessMetricValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AccessMetricValue.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.AccessMetricValue(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.value = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AccessMetricValue message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.AccessMetricValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.AccessMetricValue} AccessMetricValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AccessMetricValue.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AccessMetricValue message. + * @function verify + * @memberof google.analytics.admin.v1alpha.AccessMetricValue + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AccessMetricValue.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (!$util.isString(message.value)) + return "value: string expected"; + return null; + }; + + /** + * Creates an AccessMetricValue message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.AccessMetricValue + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.AccessMetricValue} AccessMetricValue + */ + AccessMetricValue.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.AccessMetricValue) + return object; + var message = new $root.google.analytics.admin.v1alpha.AccessMetricValue(); + if (object.value != null) + message.value = String(object.value); + return message; + }; + + /** + * Creates a plain object from an AccessMetricValue message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.AccessMetricValue + * @static + * @param {google.analytics.admin.v1alpha.AccessMetricValue} message AccessMetricValue + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AccessMetricValue.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.value = ""; + if (message.value != null && message.hasOwnProperty("value")) + object.value = message.value; + return object; + }; + + /** + * Converts this AccessMetricValue to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.AccessMetricValue + * @instance + * @returns {Object.} JSON object + */ + AccessMetricValue.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AccessMetricValue + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.AccessMetricValue + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AccessMetricValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.AccessMetricValue"; + }; + + return AccessMetricValue; + })(); + + v1alpha.AccessQuota = (function() { + + /** + * Properties of an AccessQuota. + * @memberof google.analytics.admin.v1alpha + * @interface IAccessQuota + * @property {google.analytics.admin.v1alpha.IAccessQuotaStatus|null} [tokensPerDay] AccessQuota tokensPerDay + * @property {google.analytics.admin.v1alpha.IAccessQuotaStatus|null} [tokensPerHour] AccessQuota tokensPerHour + * @property {google.analytics.admin.v1alpha.IAccessQuotaStatus|null} [concurrentRequests] AccessQuota concurrentRequests + * @property {google.analytics.admin.v1alpha.IAccessQuotaStatus|null} [serverErrorsPerProjectPerHour] AccessQuota serverErrorsPerProjectPerHour + */ + + /** + * Constructs a new AccessQuota. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents an AccessQuota. + * @implements IAccessQuota + * @constructor + * @param {google.analytics.admin.v1alpha.IAccessQuota=} [properties] Properties to set + */ + function AccessQuota(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AccessQuota tokensPerDay. + * @member {google.analytics.admin.v1alpha.IAccessQuotaStatus|null|undefined} tokensPerDay + * @memberof google.analytics.admin.v1alpha.AccessQuota + * @instance + */ + AccessQuota.prototype.tokensPerDay = null; + + /** + * AccessQuota tokensPerHour. + * @member {google.analytics.admin.v1alpha.IAccessQuotaStatus|null|undefined} tokensPerHour + * @memberof google.analytics.admin.v1alpha.AccessQuota + * @instance + */ + AccessQuota.prototype.tokensPerHour = null; + + /** + * AccessQuota concurrentRequests. + * @member {google.analytics.admin.v1alpha.IAccessQuotaStatus|null|undefined} concurrentRequests + * @memberof google.analytics.admin.v1alpha.AccessQuota + * @instance + */ + AccessQuota.prototype.concurrentRequests = null; + + /** + * AccessQuota serverErrorsPerProjectPerHour. + * @member {google.analytics.admin.v1alpha.IAccessQuotaStatus|null|undefined} serverErrorsPerProjectPerHour + * @memberof google.analytics.admin.v1alpha.AccessQuota + * @instance + */ + AccessQuota.prototype.serverErrorsPerProjectPerHour = null; + + /** + * Creates a new AccessQuota instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.AccessQuota + * @static + * @param {google.analytics.admin.v1alpha.IAccessQuota=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.AccessQuota} AccessQuota instance + */ + AccessQuota.create = function create(properties) { + return new AccessQuota(properties); + }; + + /** + * Encodes the specified AccessQuota message. Does not implicitly {@link google.analytics.admin.v1alpha.AccessQuota.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.AccessQuota + * @static + * @param {google.analytics.admin.v1alpha.IAccessQuota} message AccessQuota message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AccessQuota.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.tokensPerDay != null && Object.hasOwnProperty.call(message, "tokensPerDay")) + $root.google.analytics.admin.v1alpha.AccessQuotaStatus.encode(message.tokensPerDay, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.tokensPerHour != null && Object.hasOwnProperty.call(message, "tokensPerHour")) + $root.google.analytics.admin.v1alpha.AccessQuotaStatus.encode(message.tokensPerHour, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.concurrentRequests != null && Object.hasOwnProperty.call(message, "concurrentRequests")) + $root.google.analytics.admin.v1alpha.AccessQuotaStatus.encode(message.concurrentRequests, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.serverErrorsPerProjectPerHour != null && Object.hasOwnProperty.call(message, "serverErrorsPerProjectPerHour")) + $root.google.analytics.admin.v1alpha.AccessQuotaStatus.encode(message.serverErrorsPerProjectPerHour, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified AccessQuota message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AccessQuota.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.AccessQuota + * @static + * @param {google.analytics.admin.v1alpha.IAccessQuota} message AccessQuota message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AccessQuota.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AccessQuota message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.AccessQuota + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.AccessQuota} AccessQuota + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AccessQuota.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.AccessQuota(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.tokensPerDay = $root.google.analytics.admin.v1alpha.AccessQuotaStatus.decode(reader, reader.uint32()); + break; + } + case 2: { + message.tokensPerHour = $root.google.analytics.admin.v1alpha.AccessQuotaStatus.decode(reader, reader.uint32()); + break; + } + case 3: { + message.concurrentRequests = $root.google.analytics.admin.v1alpha.AccessQuotaStatus.decode(reader, reader.uint32()); + break; + } + case 4: { + message.serverErrorsPerProjectPerHour = $root.google.analytics.admin.v1alpha.AccessQuotaStatus.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AccessQuota message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.AccessQuota + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.AccessQuota} AccessQuota + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AccessQuota.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AccessQuota message. + * @function verify + * @memberof google.analytics.admin.v1alpha.AccessQuota + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AccessQuota.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.tokensPerDay != null && message.hasOwnProperty("tokensPerDay")) { + var error = $root.google.analytics.admin.v1alpha.AccessQuotaStatus.verify(message.tokensPerDay); + if (error) + return "tokensPerDay." + error; + } + if (message.tokensPerHour != null && message.hasOwnProperty("tokensPerHour")) { + var error = $root.google.analytics.admin.v1alpha.AccessQuotaStatus.verify(message.tokensPerHour); + if (error) + return "tokensPerHour." + error; + } + if (message.concurrentRequests != null && message.hasOwnProperty("concurrentRequests")) { + var error = $root.google.analytics.admin.v1alpha.AccessQuotaStatus.verify(message.concurrentRequests); + if (error) + return "concurrentRequests." + error; + } + if (message.serverErrorsPerProjectPerHour != null && message.hasOwnProperty("serverErrorsPerProjectPerHour")) { + var error = $root.google.analytics.admin.v1alpha.AccessQuotaStatus.verify(message.serverErrorsPerProjectPerHour); + if (error) + return "serverErrorsPerProjectPerHour." + error; + } + return null; + }; + + /** + * Creates an AccessQuota message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.AccessQuota + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.AccessQuota} AccessQuota + */ + AccessQuota.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.AccessQuota) + return object; + var message = new $root.google.analytics.admin.v1alpha.AccessQuota(); + if (object.tokensPerDay != null) { + if (typeof object.tokensPerDay !== "object") + throw TypeError(".google.analytics.admin.v1alpha.AccessQuota.tokensPerDay: object expected"); + message.tokensPerDay = $root.google.analytics.admin.v1alpha.AccessQuotaStatus.fromObject(object.tokensPerDay); + } + if (object.tokensPerHour != null) { + if (typeof object.tokensPerHour !== "object") + throw TypeError(".google.analytics.admin.v1alpha.AccessQuota.tokensPerHour: object expected"); + message.tokensPerHour = $root.google.analytics.admin.v1alpha.AccessQuotaStatus.fromObject(object.tokensPerHour); + } + if (object.concurrentRequests != null) { + if (typeof object.concurrentRequests !== "object") + throw TypeError(".google.analytics.admin.v1alpha.AccessQuota.concurrentRequests: object expected"); + message.concurrentRequests = $root.google.analytics.admin.v1alpha.AccessQuotaStatus.fromObject(object.concurrentRequests); + } + if (object.serverErrorsPerProjectPerHour != null) { + if (typeof object.serverErrorsPerProjectPerHour !== "object") + throw TypeError(".google.analytics.admin.v1alpha.AccessQuota.serverErrorsPerProjectPerHour: object expected"); + message.serverErrorsPerProjectPerHour = $root.google.analytics.admin.v1alpha.AccessQuotaStatus.fromObject(object.serverErrorsPerProjectPerHour); + } + return message; + }; + + /** + * Creates a plain object from an AccessQuota message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.AccessQuota + * @static + * @param {google.analytics.admin.v1alpha.AccessQuota} message AccessQuota + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AccessQuota.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.tokensPerDay = null; + object.tokensPerHour = null; + object.concurrentRequests = null; + object.serverErrorsPerProjectPerHour = null; + } + if (message.tokensPerDay != null && message.hasOwnProperty("tokensPerDay")) + object.tokensPerDay = $root.google.analytics.admin.v1alpha.AccessQuotaStatus.toObject(message.tokensPerDay, options); + if (message.tokensPerHour != null && message.hasOwnProperty("tokensPerHour")) + object.tokensPerHour = $root.google.analytics.admin.v1alpha.AccessQuotaStatus.toObject(message.tokensPerHour, options); + if (message.concurrentRequests != null && message.hasOwnProperty("concurrentRequests")) + object.concurrentRequests = $root.google.analytics.admin.v1alpha.AccessQuotaStatus.toObject(message.concurrentRequests, options); + if (message.serverErrorsPerProjectPerHour != null && message.hasOwnProperty("serverErrorsPerProjectPerHour")) + object.serverErrorsPerProjectPerHour = $root.google.analytics.admin.v1alpha.AccessQuotaStatus.toObject(message.serverErrorsPerProjectPerHour, options); + return object; + }; + + /** + * Converts this AccessQuota to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.AccessQuota + * @instance + * @returns {Object.} JSON object + */ + AccessQuota.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AccessQuota + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.AccessQuota + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AccessQuota.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.AccessQuota"; + }; + + return AccessQuota; + })(); + + v1alpha.AccessQuotaStatus = (function() { + + /** + * Properties of an AccessQuotaStatus. + * @memberof google.analytics.admin.v1alpha + * @interface IAccessQuotaStatus + * @property {number|null} [consumed] AccessQuotaStatus consumed + * @property {number|null} [remaining] AccessQuotaStatus remaining + */ + + /** + * Constructs a new AccessQuotaStatus. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents an AccessQuotaStatus. + * @implements IAccessQuotaStatus + * @constructor + * @param {google.analytics.admin.v1alpha.IAccessQuotaStatus=} [properties] Properties to set + */ + function AccessQuotaStatus(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AccessQuotaStatus consumed. + * @member {number} consumed + * @memberof google.analytics.admin.v1alpha.AccessQuotaStatus + * @instance + */ + AccessQuotaStatus.prototype.consumed = 0; + + /** + * AccessQuotaStatus remaining. + * @member {number} remaining + * @memberof google.analytics.admin.v1alpha.AccessQuotaStatus + * @instance + */ + AccessQuotaStatus.prototype.remaining = 0; + + /** + * Creates a new AccessQuotaStatus instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.AccessQuotaStatus + * @static + * @param {google.analytics.admin.v1alpha.IAccessQuotaStatus=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.AccessQuotaStatus} AccessQuotaStatus instance + */ + AccessQuotaStatus.create = function create(properties) { + return new AccessQuotaStatus(properties); + }; + + /** + * Encodes the specified AccessQuotaStatus message. Does not implicitly {@link google.analytics.admin.v1alpha.AccessQuotaStatus.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.AccessQuotaStatus + * @static + * @param {google.analytics.admin.v1alpha.IAccessQuotaStatus} message AccessQuotaStatus message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AccessQuotaStatus.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.consumed != null && Object.hasOwnProperty.call(message, "consumed")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.consumed); + if (message.remaining != null && Object.hasOwnProperty.call(message, "remaining")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.remaining); + return writer; + }; + + /** + * Encodes the specified AccessQuotaStatus message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AccessQuotaStatus.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.AccessQuotaStatus + * @static + * @param {google.analytics.admin.v1alpha.IAccessQuotaStatus} message AccessQuotaStatus message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AccessQuotaStatus.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AccessQuotaStatus message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.AccessQuotaStatus + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.AccessQuotaStatus} AccessQuotaStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AccessQuotaStatus.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.AccessQuotaStatus(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.consumed = reader.int32(); + break; + } + case 2: { + message.remaining = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AccessQuotaStatus message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.AccessQuotaStatus + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.AccessQuotaStatus} AccessQuotaStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AccessQuotaStatus.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AccessQuotaStatus message. + * @function verify + * @memberof google.analytics.admin.v1alpha.AccessQuotaStatus + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AccessQuotaStatus.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.consumed != null && message.hasOwnProperty("consumed")) + if (!$util.isInteger(message.consumed)) + return "consumed: integer expected"; + if (message.remaining != null && message.hasOwnProperty("remaining")) + if (!$util.isInteger(message.remaining)) + return "remaining: integer expected"; + return null; + }; + + /** + * Creates an AccessQuotaStatus message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.AccessQuotaStatus + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.AccessQuotaStatus} AccessQuotaStatus + */ + AccessQuotaStatus.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.AccessQuotaStatus) + return object; + var message = new $root.google.analytics.admin.v1alpha.AccessQuotaStatus(); + if (object.consumed != null) + message.consumed = object.consumed | 0; + if (object.remaining != null) + message.remaining = object.remaining | 0; + return message; + }; + + /** + * Creates a plain object from an AccessQuotaStatus message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.AccessQuotaStatus + * @static + * @param {google.analytics.admin.v1alpha.AccessQuotaStatus} message AccessQuotaStatus + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AccessQuotaStatus.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.consumed = 0; + object.remaining = 0; + } + if (message.consumed != null && message.hasOwnProperty("consumed")) + object.consumed = message.consumed; + if (message.remaining != null && message.hasOwnProperty("remaining")) + object.remaining = message.remaining; + return object; + }; + + /** + * Converts this AccessQuotaStatus to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.AccessQuotaStatus + * @instance + * @returns {Object.} JSON object + */ + AccessQuotaStatus.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AccessQuotaStatus + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.AccessQuotaStatus + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AccessQuotaStatus.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.AccessQuotaStatus"; + }; + + return AccessQuotaStatus; + })(); + + v1alpha.AnalyticsAdminService = (function() { + + /** + * Constructs a new AnalyticsAdminService service. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents an AnalyticsAdminService + * @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 AnalyticsAdminService(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (AnalyticsAdminService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = AnalyticsAdminService; + + /** + * Creates new AnalyticsAdminService service using the specified rpc implementation. + * @function create + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @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 {AnalyticsAdminService} RPC service. Useful where requests and/or responses are streamed. + */ + AnalyticsAdminService.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|getAccount}. + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @typedef GetAccountCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.admin.v1alpha.Account} [response] Account + */ + + /** + * Calls GetAccount. + * @function getAccount + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.IGetAccountRequest} request GetAccountRequest message or plain object + * @param {google.analytics.admin.v1alpha.AnalyticsAdminService.GetAccountCallback} callback Node-style callback called with the error, if any, and Account + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.getAccount = function getAccount(request, callback) { + return this.rpcCall(getAccount, $root.google.analytics.admin.v1alpha.GetAccountRequest, $root.google.analytics.admin.v1alpha.Account, request, callback); + }, "name", { value: "GetAccount" }); + + /** + * Calls GetAccount. + * @function getAccount + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.IGetAccountRequest} request GetAccountRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|listAccounts}. + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @typedef ListAccountsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.admin.v1alpha.ListAccountsResponse} [response] ListAccountsResponse + */ + + /** + * Calls ListAccounts. + * @function listAccounts + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.IListAccountsRequest} request ListAccountsRequest message or plain object + * @param {google.analytics.admin.v1alpha.AnalyticsAdminService.ListAccountsCallback} callback Node-style callback called with the error, if any, and ListAccountsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.listAccounts = function listAccounts(request, callback) { + return this.rpcCall(listAccounts, $root.google.analytics.admin.v1alpha.ListAccountsRequest, $root.google.analytics.admin.v1alpha.ListAccountsResponse, request, callback); + }, "name", { value: "ListAccounts" }); + + /** + * Calls ListAccounts. + * @function listAccounts + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.IListAccountsRequest} request ListAccountsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|deleteAccount}. + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @typedef DeleteAccountCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteAccount. + * @function deleteAccount + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.IDeleteAccountRequest} request DeleteAccountRequest message or plain object + * @param {google.analytics.admin.v1alpha.AnalyticsAdminService.DeleteAccountCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.deleteAccount = function deleteAccount(request, callback) { + return this.rpcCall(deleteAccount, $root.google.analytics.admin.v1alpha.DeleteAccountRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteAccount" }); + + /** + * Calls DeleteAccount. + * @function deleteAccount + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.IDeleteAccountRequest} request DeleteAccountRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|updateAccount}. + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @typedef UpdateAccountCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.admin.v1alpha.Account} [response] Account + */ + + /** + * Calls UpdateAccount. + * @function updateAccount + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.IUpdateAccountRequest} request UpdateAccountRequest message or plain object + * @param {google.analytics.admin.v1alpha.AnalyticsAdminService.UpdateAccountCallback} callback Node-style callback called with the error, if any, and Account + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.updateAccount = function updateAccount(request, callback) { + return this.rpcCall(updateAccount, $root.google.analytics.admin.v1alpha.UpdateAccountRequest, $root.google.analytics.admin.v1alpha.Account, request, callback); + }, "name", { value: "UpdateAccount" }); + + /** + * Calls UpdateAccount. + * @function updateAccount + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.IUpdateAccountRequest} request UpdateAccountRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|provisionAccountTicket}. + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @typedef ProvisionAccountTicketCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.admin.v1alpha.ProvisionAccountTicketResponse} [response] ProvisionAccountTicketResponse + */ + + /** + * Calls ProvisionAccountTicket. + * @function provisionAccountTicket + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.IProvisionAccountTicketRequest} request ProvisionAccountTicketRequest message or plain object + * @param {google.analytics.admin.v1alpha.AnalyticsAdminService.ProvisionAccountTicketCallback} callback Node-style callback called with the error, if any, and ProvisionAccountTicketResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.provisionAccountTicket = function provisionAccountTicket(request, callback) { + return this.rpcCall(provisionAccountTicket, $root.google.analytics.admin.v1alpha.ProvisionAccountTicketRequest, $root.google.analytics.admin.v1alpha.ProvisionAccountTicketResponse, request, callback); + }, "name", { value: "ProvisionAccountTicket" }); + + /** + * Calls ProvisionAccountTicket. + * @function provisionAccountTicket + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.IProvisionAccountTicketRequest} request ProvisionAccountTicketRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|listAccountSummaries}. + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @typedef ListAccountSummariesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.admin.v1alpha.ListAccountSummariesResponse} [response] ListAccountSummariesResponse + */ + + /** + * Calls ListAccountSummaries. + * @function listAccountSummaries + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.IListAccountSummariesRequest} request ListAccountSummariesRequest message or plain object + * @param {google.analytics.admin.v1alpha.AnalyticsAdminService.ListAccountSummariesCallback} callback Node-style callback called with the error, if any, and ListAccountSummariesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.listAccountSummaries = function listAccountSummaries(request, callback) { + return this.rpcCall(listAccountSummaries, $root.google.analytics.admin.v1alpha.ListAccountSummariesRequest, $root.google.analytics.admin.v1alpha.ListAccountSummariesResponse, request, callback); + }, "name", { value: "ListAccountSummaries" }); + + /** + * Calls ListAccountSummaries. + * @function listAccountSummaries + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.IListAccountSummariesRequest} request ListAccountSummariesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|getProperty}. + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @typedef GetPropertyCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.admin.v1alpha.Property} [response] Property + */ + + /** + * Calls GetProperty. + * @function getProperty + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.IGetPropertyRequest} request GetPropertyRequest message or plain object + * @param {google.analytics.admin.v1alpha.AnalyticsAdminService.GetPropertyCallback} callback Node-style callback called with the error, if any, and Property + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.getProperty = function getProperty(request, callback) { + return this.rpcCall(getProperty, $root.google.analytics.admin.v1alpha.GetPropertyRequest, $root.google.analytics.admin.v1alpha.Property, request, callback); + }, "name", { value: "GetProperty" }); + + /** + * Calls GetProperty. + * @function getProperty + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.IGetPropertyRequest} request GetPropertyRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|listProperties}. + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @typedef ListPropertiesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.admin.v1alpha.ListPropertiesResponse} [response] ListPropertiesResponse + */ + + /** + * Calls ListProperties. + * @function listProperties + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.IListPropertiesRequest} request ListPropertiesRequest message or plain object + * @param {google.analytics.admin.v1alpha.AnalyticsAdminService.ListPropertiesCallback} callback Node-style callback called with the error, if any, and ListPropertiesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.listProperties = function listProperties(request, callback) { + return this.rpcCall(listProperties, $root.google.analytics.admin.v1alpha.ListPropertiesRequest, $root.google.analytics.admin.v1alpha.ListPropertiesResponse, request, callback); + }, "name", { value: "ListProperties" }); + + /** + * Calls ListProperties. + * @function listProperties + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.IListPropertiesRequest} request ListPropertiesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|createProperty}. + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @typedef CreatePropertyCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.admin.v1alpha.Property} [response] Property + */ + + /** + * Calls CreateProperty. + * @function createProperty + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.ICreatePropertyRequest} request CreatePropertyRequest message or plain object + * @param {google.analytics.admin.v1alpha.AnalyticsAdminService.CreatePropertyCallback} callback Node-style callback called with the error, if any, and Property + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.createProperty = function createProperty(request, callback) { + return this.rpcCall(createProperty, $root.google.analytics.admin.v1alpha.CreatePropertyRequest, $root.google.analytics.admin.v1alpha.Property, request, callback); + }, "name", { value: "CreateProperty" }); + + /** + * Calls CreateProperty. + * @function createProperty + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.ICreatePropertyRequest} request CreatePropertyRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|deleteProperty}. + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @typedef DeletePropertyCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.admin.v1alpha.Property} [response] Property + */ + + /** + * Calls DeleteProperty. + * @function deleteProperty + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.IDeletePropertyRequest} request DeletePropertyRequest message or plain object + * @param {google.analytics.admin.v1alpha.AnalyticsAdminService.DeletePropertyCallback} callback Node-style callback called with the error, if any, and Property + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.deleteProperty = function deleteProperty(request, callback) { + return this.rpcCall(deleteProperty, $root.google.analytics.admin.v1alpha.DeletePropertyRequest, $root.google.analytics.admin.v1alpha.Property, request, callback); + }, "name", { value: "DeleteProperty" }); + + /** + * Calls DeleteProperty. + * @function deleteProperty + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.IDeletePropertyRequest} request DeletePropertyRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|updateProperty}. + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @typedef UpdatePropertyCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.admin.v1alpha.Property} [response] Property + */ + + /** + * Calls UpdateProperty. + * @function updateProperty + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.IUpdatePropertyRequest} request UpdatePropertyRequest message or plain object + * @param {google.analytics.admin.v1alpha.AnalyticsAdminService.UpdatePropertyCallback} callback Node-style callback called with the error, if any, and Property + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.updateProperty = function updateProperty(request, callback) { + return this.rpcCall(updateProperty, $root.google.analytics.admin.v1alpha.UpdatePropertyRequest, $root.google.analytics.admin.v1alpha.Property, request, callback); + }, "name", { value: "UpdateProperty" }); + + /** + * Calls UpdateProperty. + * @function updateProperty + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.IUpdatePropertyRequest} request UpdatePropertyRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|getUserLink}. + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @typedef GetUserLinkCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.admin.v1alpha.UserLink} [response] UserLink + */ + + /** + * Calls GetUserLink. + * @function getUserLink + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.IGetUserLinkRequest} request GetUserLinkRequest message or plain object + * @param {google.analytics.admin.v1alpha.AnalyticsAdminService.GetUserLinkCallback} callback Node-style callback called with the error, if any, and UserLink + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.getUserLink = function getUserLink(request, callback) { + return this.rpcCall(getUserLink, $root.google.analytics.admin.v1alpha.GetUserLinkRequest, $root.google.analytics.admin.v1alpha.UserLink, request, callback); + }, "name", { value: "GetUserLink" }); + + /** + * Calls GetUserLink. + * @function getUserLink + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.IGetUserLinkRequest} request GetUserLinkRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|batchGetUserLinks}. + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @typedef BatchGetUserLinksCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.admin.v1alpha.BatchGetUserLinksResponse} [response] BatchGetUserLinksResponse + */ + + /** + * Calls BatchGetUserLinks. + * @function batchGetUserLinks + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.IBatchGetUserLinksRequest} request BatchGetUserLinksRequest message or plain object + * @param {google.analytics.admin.v1alpha.AnalyticsAdminService.BatchGetUserLinksCallback} callback Node-style callback called with the error, if any, and BatchGetUserLinksResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.batchGetUserLinks = function batchGetUserLinks(request, callback) { + return this.rpcCall(batchGetUserLinks, $root.google.analytics.admin.v1alpha.BatchGetUserLinksRequest, $root.google.analytics.admin.v1alpha.BatchGetUserLinksResponse, request, callback); + }, "name", { value: "BatchGetUserLinks" }); + + /** + * Calls BatchGetUserLinks. + * @function batchGetUserLinks + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.IBatchGetUserLinksRequest} request BatchGetUserLinksRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|listUserLinks}. + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @typedef ListUserLinksCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.admin.v1alpha.ListUserLinksResponse} [response] ListUserLinksResponse + */ + + /** + * Calls ListUserLinks. + * @function listUserLinks + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.IListUserLinksRequest} request ListUserLinksRequest message or plain object + * @param {google.analytics.admin.v1alpha.AnalyticsAdminService.ListUserLinksCallback} callback Node-style callback called with the error, if any, and ListUserLinksResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.listUserLinks = function listUserLinks(request, callback) { + return this.rpcCall(listUserLinks, $root.google.analytics.admin.v1alpha.ListUserLinksRequest, $root.google.analytics.admin.v1alpha.ListUserLinksResponse, request, callback); + }, "name", { value: "ListUserLinks" }); + + /** + * Calls ListUserLinks. + * @function listUserLinks + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.IListUserLinksRequest} request ListUserLinksRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|auditUserLinks}. + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @typedef AuditUserLinksCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.admin.v1alpha.AuditUserLinksResponse} [response] AuditUserLinksResponse + */ + + /** + * Calls AuditUserLinks. + * @function auditUserLinks + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.IAuditUserLinksRequest} request AuditUserLinksRequest message or plain object + * @param {google.analytics.admin.v1alpha.AnalyticsAdminService.AuditUserLinksCallback} callback Node-style callback called with the error, if any, and AuditUserLinksResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.auditUserLinks = function auditUserLinks(request, callback) { + return this.rpcCall(auditUserLinks, $root.google.analytics.admin.v1alpha.AuditUserLinksRequest, $root.google.analytics.admin.v1alpha.AuditUserLinksResponse, request, callback); + }, "name", { value: "AuditUserLinks" }); + + /** + * Calls AuditUserLinks. + * @function auditUserLinks + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.IAuditUserLinksRequest} request AuditUserLinksRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|createUserLink}. + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @typedef CreateUserLinkCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.admin.v1alpha.UserLink} [response] UserLink + */ + + /** + * Calls CreateUserLink. + * @function createUserLink + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.ICreateUserLinkRequest} request CreateUserLinkRequest message or plain object + * @param {google.analytics.admin.v1alpha.AnalyticsAdminService.CreateUserLinkCallback} callback Node-style callback called with the error, if any, and UserLink + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.createUserLink = function createUserLink(request, callback) { + return this.rpcCall(createUserLink, $root.google.analytics.admin.v1alpha.CreateUserLinkRequest, $root.google.analytics.admin.v1alpha.UserLink, request, callback); + }, "name", { value: "CreateUserLink" }); + + /** + * Calls CreateUserLink. + * @function createUserLink + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.ICreateUserLinkRequest} request CreateUserLinkRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|batchCreateUserLinks}. + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @typedef BatchCreateUserLinksCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.admin.v1alpha.BatchCreateUserLinksResponse} [response] BatchCreateUserLinksResponse + */ + + /** + * Calls BatchCreateUserLinks. + * @function batchCreateUserLinks + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.IBatchCreateUserLinksRequest} request BatchCreateUserLinksRequest message or plain object + * @param {google.analytics.admin.v1alpha.AnalyticsAdminService.BatchCreateUserLinksCallback} callback Node-style callback called with the error, if any, and BatchCreateUserLinksResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.batchCreateUserLinks = function batchCreateUserLinks(request, callback) { + return this.rpcCall(batchCreateUserLinks, $root.google.analytics.admin.v1alpha.BatchCreateUserLinksRequest, $root.google.analytics.admin.v1alpha.BatchCreateUserLinksResponse, request, callback); + }, "name", { value: "BatchCreateUserLinks" }); + + /** + * Calls BatchCreateUserLinks. + * @function batchCreateUserLinks + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.IBatchCreateUserLinksRequest} request BatchCreateUserLinksRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|updateUserLink}. + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @typedef UpdateUserLinkCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.admin.v1alpha.UserLink} [response] UserLink + */ + + /** + * Calls UpdateUserLink. + * @function updateUserLink + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.IUpdateUserLinkRequest} request UpdateUserLinkRequest message or plain object + * @param {google.analytics.admin.v1alpha.AnalyticsAdminService.UpdateUserLinkCallback} callback Node-style callback called with the error, if any, and UserLink + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.updateUserLink = function updateUserLink(request, callback) { + return this.rpcCall(updateUserLink, $root.google.analytics.admin.v1alpha.UpdateUserLinkRequest, $root.google.analytics.admin.v1alpha.UserLink, request, callback); + }, "name", { value: "UpdateUserLink" }); + + /** + * Calls UpdateUserLink. + * @function updateUserLink + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.IUpdateUserLinkRequest} request UpdateUserLinkRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|batchUpdateUserLinks}. + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @typedef BatchUpdateUserLinksCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.admin.v1alpha.BatchUpdateUserLinksResponse} [response] BatchUpdateUserLinksResponse + */ + + /** + * Calls BatchUpdateUserLinks. + * @function batchUpdateUserLinks + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.IBatchUpdateUserLinksRequest} request BatchUpdateUserLinksRequest message or plain object + * @param {google.analytics.admin.v1alpha.AnalyticsAdminService.BatchUpdateUserLinksCallback} callback Node-style callback called with the error, if any, and BatchUpdateUserLinksResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.batchUpdateUserLinks = function batchUpdateUserLinks(request, callback) { + return this.rpcCall(batchUpdateUserLinks, $root.google.analytics.admin.v1alpha.BatchUpdateUserLinksRequest, $root.google.analytics.admin.v1alpha.BatchUpdateUserLinksResponse, request, callback); + }, "name", { value: "BatchUpdateUserLinks" }); + + /** + * Calls BatchUpdateUserLinks. + * @function batchUpdateUserLinks + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.IBatchUpdateUserLinksRequest} request BatchUpdateUserLinksRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|deleteUserLink}. + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @typedef DeleteUserLinkCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteUserLink. + * @function deleteUserLink + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.IDeleteUserLinkRequest} request DeleteUserLinkRequest message or plain object + * @param {google.analytics.admin.v1alpha.AnalyticsAdminService.DeleteUserLinkCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.deleteUserLink = function deleteUserLink(request, callback) { + return this.rpcCall(deleteUserLink, $root.google.analytics.admin.v1alpha.DeleteUserLinkRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteUserLink" }); + + /** + * Calls DeleteUserLink. + * @function deleteUserLink + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.IDeleteUserLinkRequest} request DeleteUserLinkRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|batchDeleteUserLinks}. + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @typedef BatchDeleteUserLinksCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls BatchDeleteUserLinks. + * @function batchDeleteUserLinks + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.IBatchDeleteUserLinksRequest} request BatchDeleteUserLinksRequest message or plain object + * @param {google.analytics.admin.v1alpha.AnalyticsAdminService.BatchDeleteUserLinksCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.batchDeleteUserLinks = function batchDeleteUserLinks(request, callback) { + return this.rpcCall(batchDeleteUserLinks, $root.google.analytics.admin.v1alpha.BatchDeleteUserLinksRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "BatchDeleteUserLinks" }); + + /** + * Calls BatchDeleteUserLinks. + * @function batchDeleteUserLinks + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.IBatchDeleteUserLinksRequest} request BatchDeleteUserLinksRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|createFirebaseLink}. + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @typedef CreateFirebaseLinkCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.admin.v1alpha.FirebaseLink} [response] FirebaseLink + */ + + /** + * Calls CreateFirebaseLink. + * @function createFirebaseLink + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.ICreateFirebaseLinkRequest} request CreateFirebaseLinkRequest message or plain object + * @param {google.analytics.admin.v1alpha.AnalyticsAdminService.CreateFirebaseLinkCallback} callback Node-style callback called with the error, if any, and FirebaseLink + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.createFirebaseLink = function createFirebaseLink(request, callback) { + return this.rpcCall(createFirebaseLink, $root.google.analytics.admin.v1alpha.CreateFirebaseLinkRequest, $root.google.analytics.admin.v1alpha.FirebaseLink, request, callback); + }, "name", { value: "CreateFirebaseLink" }); + + /** + * Calls CreateFirebaseLink. + * @function createFirebaseLink + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.ICreateFirebaseLinkRequest} request CreateFirebaseLinkRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|deleteFirebaseLink}. + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @typedef DeleteFirebaseLinkCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteFirebaseLink. + * @function deleteFirebaseLink + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.IDeleteFirebaseLinkRequest} request DeleteFirebaseLinkRequest message or plain object + * @param {google.analytics.admin.v1alpha.AnalyticsAdminService.DeleteFirebaseLinkCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.deleteFirebaseLink = function deleteFirebaseLink(request, callback) { + return this.rpcCall(deleteFirebaseLink, $root.google.analytics.admin.v1alpha.DeleteFirebaseLinkRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteFirebaseLink" }); + + /** + * Calls DeleteFirebaseLink. + * @function deleteFirebaseLink + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.IDeleteFirebaseLinkRequest} request DeleteFirebaseLinkRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|listFirebaseLinks}. + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @typedef ListFirebaseLinksCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.admin.v1alpha.ListFirebaseLinksResponse} [response] ListFirebaseLinksResponse + */ + + /** + * Calls ListFirebaseLinks. + * @function listFirebaseLinks + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.IListFirebaseLinksRequest} request ListFirebaseLinksRequest message or plain object + * @param {google.analytics.admin.v1alpha.AnalyticsAdminService.ListFirebaseLinksCallback} callback Node-style callback called with the error, if any, and ListFirebaseLinksResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.listFirebaseLinks = function listFirebaseLinks(request, callback) { + return this.rpcCall(listFirebaseLinks, $root.google.analytics.admin.v1alpha.ListFirebaseLinksRequest, $root.google.analytics.admin.v1alpha.ListFirebaseLinksResponse, request, callback); + }, "name", { value: "ListFirebaseLinks" }); + + /** + * Calls ListFirebaseLinks. + * @function listFirebaseLinks + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.IListFirebaseLinksRequest} request ListFirebaseLinksRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|getGlobalSiteTag}. + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @typedef GetGlobalSiteTagCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.admin.v1alpha.GlobalSiteTag} [response] GlobalSiteTag + */ + + /** + * Calls GetGlobalSiteTag. + * @function getGlobalSiteTag + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.IGetGlobalSiteTagRequest} request GetGlobalSiteTagRequest message or plain object + * @param {google.analytics.admin.v1alpha.AnalyticsAdminService.GetGlobalSiteTagCallback} callback Node-style callback called with the error, if any, and GlobalSiteTag + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.getGlobalSiteTag = function getGlobalSiteTag(request, callback) { + return this.rpcCall(getGlobalSiteTag, $root.google.analytics.admin.v1alpha.GetGlobalSiteTagRequest, $root.google.analytics.admin.v1alpha.GlobalSiteTag, request, callback); + }, "name", { value: "GetGlobalSiteTag" }); + + /** + * Calls GetGlobalSiteTag. + * @function getGlobalSiteTag + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.IGetGlobalSiteTagRequest} request GetGlobalSiteTagRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|createGoogleAdsLink}. + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @typedef CreateGoogleAdsLinkCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.admin.v1alpha.GoogleAdsLink} [response] GoogleAdsLink + */ + + /** + * Calls CreateGoogleAdsLink. + * @function createGoogleAdsLink + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.ICreateGoogleAdsLinkRequest} request CreateGoogleAdsLinkRequest message or plain object + * @param {google.analytics.admin.v1alpha.AnalyticsAdminService.CreateGoogleAdsLinkCallback} callback Node-style callback called with the error, if any, and GoogleAdsLink + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.createGoogleAdsLink = function createGoogleAdsLink(request, callback) { + return this.rpcCall(createGoogleAdsLink, $root.google.analytics.admin.v1alpha.CreateGoogleAdsLinkRequest, $root.google.analytics.admin.v1alpha.GoogleAdsLink, request, callback); + }, "name", { value: "CreateGoogleAdsLink" }); + + /** + * Calls CreateGoogleAdsLink. + * @function createGoogleAdsLink + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.ICreateGoogleAdsLinkRequest} request CreateGoogleAdsLinkRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|updateGoogleAdsLink}. + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @typedef UpdateGoogleAdsLinkCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.admin.v1alpha.GoogleAdsLink} [response] GoogleAdsLink + */ + + /** + * Calls UpdateGoogleAdsLink. + * @function updateGoogleAdsLink + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.IUpdateGoogleAdsLinkRequest} request UpdateGoogleAdsLinkRequest message or plain object + * @param {google.analytics.admin.v1alpha.AnalyticsAdminService.UpdateGoogleAdsLinkCallback} callback Node-style callback called with the error, if any, and GoogleAdsLink + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.updateGoogleAdsLink = function updateGoogleAdsLink(request, callback) { + return this.rpcCall(updateGoogleAdsLink, $root.google.analytics.admin.v1alpha.UpdateGoogleAdsLinkRequest, $root.google.analytics.admin.v1alpha.GoogleAdsLink, request, callback); + }, "name", { value: "UpdateGoogleAdsLink" }); + + /** + * Calls UpdateGoogleAdsLink. + * @function updateGoogleAdsLink + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.IUpdateGoogleAdsLinkRequest} request UpdateGoogleAdsLinkRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|deleteGoogleAdsLink}. + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @typedef DeleteGoogleAdsLinkCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteGoogleAdsLink. + * @function deleteGoogleAdsLink + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.IDeleteGoogleAdsLinkRequest} request DeleteGoogleAdsLinkRequest message or plain object + * @param {google.analytics.admin.v1alpha.AnalyticsAdminService.DeleteGoogleAdsLinkCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.deleteGoogleAdsLink = function deleteGoogleAdsLink(request, callback) { + return this.rpcCall(deleteGoogleAdsLink, $root.google.analytics.admin.v1alpha.DeleteGoogleAdsLinkRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteGoogleAdsLink" }); + + /** + * Calls DeleteGoogleAdsLink. + * @function deleteGoogleAdsLink + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.IDeleteGoogleAdsLinkRequest} request DeleteGoogleAdsLinkRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|listGoogleAdsLinks}. + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @typedef ListGoogleAdsLinksCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.admin.v1alpha.ListGoogleAdsLinksResponse} [response] ListGoogleAdsLinksResponse + */ + + /** + * Calls ListGoogleAdsLinks. + * @function listGoogleAdsLinks + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.IListGoogleAdsLinksRequest} request ListGoogleAdsLinksRequest message or plain object + * @param {google.analytics.admin.v1alpha.AnalyticsAdminService.ListGoogleAdsLinksCallback} callback Node-style callback called with the error, if any, and ListGoogleAdsLinksResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.listGoogleAdsLinks = function listGoogleAdsLinks(request, callback) { + return this.rpcCall(listGoogleAdsLinks, $root.google.analytics.admin.v1alpha.ListGoogleAdsLinksRequest, $root.google.analytics.admin.v1alpha.ListGoogleAdsLinksResponse, request, callback); + }, "name", { value: "ListGoogleAdsLinks" }); + + /** + * Calls ListGoogleAdsLinks. + * @function listGoogleAdsLinks + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.IListGoogleAdsLinksRequest} request ListGoogleAdsLinksRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|getDataSharingSettings}. + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @typedef GetDataSharingSettingsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.admin.v1alpha.DataSharingSettings} [response] DataSharingSettings + */ + + /** + * Calls GetDataSharingSettings. + * @function getDataSharingSettings + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.IGetDataSharingSettingsRequest} request GetDataSharingSettingsRequest message or plain object + * @param {google.analytics.admin.v1alpha.AnalyticsAdminService.GetDataSharingSettingsCallback} callback Node-style callback called with the error, if any, and DataSharingSettings + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.getDataSharingSettings = function getDataSharingSettings(request, callback) { + return this.rpcCall(getDataSharingSettings, $root.google.analytics.admin.v1alpha.GetDataSharingSettingsRequest, $root.google.analytics.admin.v1alpha.DataSharingSettings, request, callback); + }, "name", { value: "GetDataSharingSettings" }); + + /** + * Calls GetDataSharingSettings. + * @function getDataSharingSettings + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.IGetDataSharingSettingsRequest} request GetDataSharingSettingsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|getMeasurementProtocolSecret}. + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @typedef GetMeasurementProtocolSecretCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.admin.v1alpha.MeasurementProtocolSecret} [response] MeasurementProtocolSecret + */ + + /** + * Calls GetMeasurementProtocolSecret. + * @function getMeasurementProtocolSecret + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.IGetMeasurementProtocolSecretRequest} request GetMeasurementProtocolSecretRequest message or plain object + * @param {google.analytics.admin.v1alpha.AnalyticsAdminService.GetMeasurementProtocolSecretCallback} callback Node-style callback called with the error, if any, and MeasurementProtocolSecret + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.getMeasurementProtocolSecret = function getMeasurementProtocolSecret(request, callback) { + return this.rpcCall(getMeasurementProtocolSecret, $root.google.analytics.admin.v1alpha.GetMeasurementProtocolSecretRequest, $root.google.analytics.admin.v1alpha.MeasurementProtocolSecret, request, callback); + }, "name", { value: "GetMeasurementProtocolSecret" }); + + /** + * Calls GetMeasurementProtocolSecret. + * @function getMeasurementProtocolSecret + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.IGetMeasurementProtocolSecretRequest} request GetMeasurementProtocolSecretRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|listMeasurementProtocolSecrets}. + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @typedef ListMeasurementProtocolSecretsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.admin.v1alpha.ListMeasurementProtocolSecretsResponse} [response] ListMeasurementProtocolSecretsResponse + */ + + /** + * Calls ListMeasurementProtocolSecrets. + * @function listMeasurementProtocolSecrets + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.IListMeasurementProtocolSecretsRequest} request ListMeasurementProtocolSecretsRequest message or plain object + * @param {google.analytics.admin.v1alpha.AnalyticsAdminService.ListMeasurementProtocolSecretsCallback} callback Node-style callback called with the error, if any, and ListMeasurementProtocolSecretsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.listMeasurementProtocolSecrets = function listMeasurementProtocolSecrets(request, callback) { + return this.rpcCall(listMeasurementProtocolSecrets, $root.google.analytics.admin.v1alpha.ListMeasurementProtocolSecretsRequest, $root.google.analytics.admin.v1alpha.ListMeasurementProtocolSecretsResponse, request, callback); + }, "name", { value: "ListMeasurementProtocolSecrets" }); + + /** + * Calls ListMeasurementProtocolSecrets. + * @function listMeasurementProtocolSecrets + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.IListMeasurementProtocolSecretsRequest} request ListMeasurementProtocolSecretsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|createMeasurementProtocolSecret}. + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @typedef CreateMeasurementProtocolSecretCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.admin.v1alpha.MeasurementProtocolSecret} [response] MeasurementProtocolSecret + */ + + /** + * Calls CreateMeasurementProtocolSecret. + * @function createMeasurementProtocolSecret + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.ICreateMeasurementProtocolSecretRequest} request CreateMeasurementProtocolSecretRequest message or plain object + * @param {google.analytics.admin.v1alpha.AnalyticsAdminService.CreateMeasurementProtocolSecretCallback} callback Node-style callback called with the error, if any, and MeasurementProtocolSecret + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.createMeasurementProtocolSecret = function createMeasurementProtocolSecret(request, callback) { + return this.rpcCall(createMeasurementProtocolSecret, $root.google.analytics.admin.v1alpha.CreateMeasurementProtocolSecretRequest, $root.google.analytics.admin.v1alpha.MeasurementProtocolSecret, request, callback); + }, "name", { value: "CreateMeasurementProtocolSecret" }); + + /** + * Calls CreateMeasurementProtocolSecret. + * @function createMeasurementProtocolSecret + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.ICreateMeasurementProtocolSecretRequest} request CreateMeasurementProtocolSecretRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|deleteMeasurementProtocolSecret}. + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @typedef DeleteMeasurementProtocolSecretCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteMeasurementProtocolSecret. + * @function deleteMeasurementProtocolSecret + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.IDeleteMeasurementProtocolSecretRequest} request DeleteMeasurementProtocolSecretRequest message or plain object + * @param {google.analytics.admin.v1alpha.AnalyticsAdminService.DeleteMeasurementProtocolSecretCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.deleteMeasurementProtocolSecret = function deleteMeasurementProtocolSecret(request, callback) { + return this.rpcCall(deleteMeasurementProtocolSecret, $root.google.analytics.admin.v1alpha.DeleteMeasurementProtocolSecretRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteMeasurementProtocolSecret" }); + + /** + * Calls DeleteMeasurementProtocolSecret. + * @function deleteMeasurementProtocolSecret + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.IDeleteMeasurementProtocolSecretRequest} request DeleteMeasurementProtocolSecretRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|updateMeasurementProtocolSecret}. + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @typedef UpdateMeasurementProtocolSecretCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.admin.v1alpha.MeasurementProtocolSecret} [response] MeasurementProtocolSecret + */ + + /** + * Calls UpdateMeasurementProtocolSecret. + * @function updateMeasurementProtocolSecret + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.IUpdateMeasurementProtocolSecretRequest} request UpdateMeasurementProtocolSecretRequest message or plain object + * @param {google.analytics.admin.v1alpha.AnalyticsAdminService.UpdateMeasurementProtocolSecretCallback} callback Node-style callback called with the error, if any, and MeasurementProtocolSecret + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.updateMeasurementProtocolSecret = function updateMeasurementProtocolSecret(request, callback) { + return this.rpcCall(updateMeasurementProtocolSecret, $root.google.analytics.admin.v1alpha.UpdateMeasurementProtocolSecretRequest, $root.google.analytics.admin.v1alpha.MeasurementProtocolSecret, request, callback); + }, "name", { value: "UpdateMeasurementProtocolSecret" }); + + /** + * Calls UpdateMeasurementProtocolSecret. + * @function updateMeasurementProtocolSecret + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.IUpdateMeasurementProtocolSecretRequest} request UpdateMeasurementProtocolSecretRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|acknowledgeUserDataCollection}. + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @typedef AcknowledgeUserDataCollectionCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.admin.v1alpha.AcknowledgeUserDataCollectionResponse} [response] AcknowledgeUserDataCollectionResponse + */ + + /** + * Calls AcknowledgeUserDataCollection. + * @function acknowledgeUserDataCollection + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.IAcknowledgeUserDataCollectionRequest} request AcknowledgeUserDataCollectionRequest message or plain object + * @param {google.analytics.admin.v1alpha.AnalyticsAdminService.AcknowledgeUserDataCollectionCallback} callback Node-style callback called with the error, if any, and AcknowledgeUserDataCollectionResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.acknowledgeUserDataCollection = function acknowledgeUserDataCollection(request, callback) { + return this.rpcCall(acknowledgeUserDataCollection, $root.google.analytics.admin.v1alpha.AcknowledgeUserDataCollectionRequest, $root.google.analytics.admin.v1alpha.AcknowledgeUserDataCollectionResponse, request, callback); + }, "name", { value: "AcknowledgeUserDataCollection" }); + + /** + * Calls AcknowledgeUserDataCollection. + * @function acknowledgeUserDataCollection + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.IAcknowledgeUserDataCollectionRequest} request AcknowledgeUserDataCollectionRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|searchChangeHistoryEvents}. + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @typedef SearchChangeHistoryEventsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.admin.v1alpha.SearchChangeHistoryEventsResponse} [response] SearchChangeHistoryEventsResponse + */ + + /** + * Calls SearchChangeHistoryEvents. + * @function searchChangeHistoryEvents + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.ISearchChangeHistoryEventsRequest} request SearchChangeHistoryEventsRequest message or plain object + * @param {google.analytics.admin.v1alpha.AnalyticsAdminService.SearchChangeHistoryEventsCallback} callback Node-style callback called with the error, if any, and SearchChangeHistoryEventsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.searchChangeHistoryEvents = function searchChangeHistoryEvents(request, callback) { + return this.rpcCall(searchChangeHistoryEvents, $root.google.analytics.admin.v1alpha.SearchChangeHistoryEventsRequest, $root.google.analytics.admin.v1alpha.SearchChangeHistoryEventsResponse, request, callback); + }, "name", { value: "SearchChangeHistoryEvents" }); + + /** + * Calls SearchChangeHistoryEvents. + * @function searchChangeHistoryEvents + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.ISearchChangeHistoryEventsRequest} request SearchChangeHistoryEventsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|getGoogleSignalsSettings}. + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @typedef GetGoogleSignalsSettingsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.admin.v1alpha.GoogleSignalsSettings} [response] GoogleSignalsSettings + */ + + /** + * Calls GetGoogleSignalsSettings. + * @function getGoogleSignalsSettings + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.IGetGoogleSignalsSettingsRequest} request GetGoogleSignalsSettingsRequest message or plain object + * @param {google.analytics.admin.v1alpha.AnalyticsAdminService.GetGoogleSignalsSettingsCallback} callback Node-style callback called with the error, if any, and GoogleSignalsSettings + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.getGoogleSignalsSettings = function getGoogleSignalsSettings(request, callback) { + return this.rpcCall(getGoogleSignalsSettings, $root.google.analytics.admin.v1alpha.GetGoogleSignalsSettingsRequest, $root.google.analytics.admin.v1alpha.GoogleSignalsSettings, request, callback); + }, "name", { value: "GetGoogleSignalsSettings" }); + + /** + * Calls GetGoogleSignalsSettings. + * @function getGoogleSignalsSettings + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.IGetGoogleSignalsSettingsRequest} request GetGoogleSignalsSettingsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|updateGoogleSignalsSettings}. + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @typedef UpdateGoogleSignalsSettingsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.admin.v1alpha.GoogleSignalsSettings} [response] GoogleSignalsSettings + */ + + /** + * Calls UpdateGoogleSignalsSettings. + * @function updateGoogleSignalsSettings + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.IUpdateGoogleSignalsSettingsRequest} request UpdateGoogleSignalsSettingsRequest message or plain object + * @param {google.analytics.admin.v1alpha.AnalyticsAdminService.UpdateGoogleSignalsSettingsCallback} callback Node-style callback called with the error, if any, and GoogleSignalsSettings + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.updateGoogleSignalsSettings = function updateGoogleSignalsSettings(request, callback) { + return this.rpcCall(updateGoogleSignalsSettings, $root.google.analytics.admin.v1alpha.UpdateGoogleSignalsSettingsRequest, $root.google.analytics.admin.v1alpha.GoogleSignalsSettings, request, callback); + }, "name", { value: "UpdateGoogleSignalsSettings" }); + + /** + * Calls UpdateGoogleSignalsSettings. + * @function updateGoogleSignalsSettings + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.IUpdateGoogleSignalsSettingsRequest} request UpdateGoogleSignalsSettingsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|createConversionEvent}. + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @typedef CreateConversionEventCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.admin.v1alpha.ConversionEvent} [response] ConversionEvent + */ + + /** + * Calls CreateConversionEvent. + * @function createConversionEvent + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.ICreateConversionEventRequest} request CreateConversionEventRequest message or plain object + * @param {google.analytics.admin.v1alpha.AnalyticsAdminService.CreateConversionEventCallback} callback Node-style callback called with the error, if any, and ConversionEvent + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.createConversionEvent = function createConversionEvent(request, callback) { + return this.rpcCall(createConversionEvent, $root.google.analytics.admin.v1alpha.CreateConversionEventRequest, $root.google.analytics.admin.v1alpha.ConversionEvent, request, callback); + }, "name", { value: "CreateConversionEvent" }); + + /** + * Calls CreateConversionEvent. + * @function createConversionEvent + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.ICreateConversionEventRequest} request CreateConversionEventRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|getConversionEvent}. + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @typedef GetConversionEventCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.admin.v1alpha.ConversionEvent} [response] ConversionEvent + */ + + /** + * Calls GetConversionEvent. + * @function getConversionEvent + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.IGetConversionEventRequest} request GetConversionEventRequest message or plain object + * @param {google.analytics.admin.v1alpha.AnalyticsAdminService.GetConversionEventCallback} callback Node-style callback called with the error, if any, and ConversionEvent + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.getConversionEvent = function getConversionEvent(request, callback) { + return this.rpcCall(getConversionEvent, $root.google.analytics.admin.v1alpha.GetConversionEventRequest, $root.google.analytics.admin.v1alpha.ConversionEvent, request, callback); + }, "name", { value: "GetConversionEvent" }); + + /** + * Calls GetConversionEvent. + * @function getConversionEvent + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.IGetConversionEventRequest} request GetConversionEventRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|deleteConversionEvent}. + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @typedef DeleteConversionEventCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteConversionEvent. + * @function deleteConversionEvent + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.IDeleteConversionEventRequest} request DeleteConversionEventRequest message or plain object + * @param {google.analytics.admin.v1alpha.AnalyticsAdminService.DeleteConversionEventCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.deleteConversionEvent = function deleteConversionEvent(request, callback) { + return this.rpcCall(deleteConversionEvent, $root.google.analytics.admin.v1alpha.DeleteConversionEventRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteConversionEvent" }); + + /** + * Calls DeleteConversionEvent. + * @function deleteConversionEvent + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.IDeleteConversionEventRequest} request DeleteConversionEventRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|listConversionEvents}. + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @typedef ListConversionEventsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.admin.v1alpha.ListConversionEventsResponse} [response] ListConversionEventsResponse + */ + + /** + * Calls ListConversionEvents. + * @function listConversionEvents + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.IListConversionEventsRequest} request ListConversionEventsRequest message or plain object + * @param {google.analytics.admin.v1alpha.AnalyticsAdminService.ListConversionEventsCallback} callback Node-style callback called with the error, if any, and ListConversionEventsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.listConversionEvents = function listConversionEvents(request, callback) { + return this.rpcCall(listConversionEvents, $root.google.analytics.admin.v1alpha.ListConversionEventsRequest, $root.google.analytics.admin.v1alpha.ListConversionEventsResponse, request, callback); + }, "name", { value: "ListConversionEvents" }); + + /** + * Calls ListConversionEvents. + * @function listConversionEvents + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.IListConversionEventsRequest} request ListConversionEventsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|getDisplayVideo360AdvertiserLink}. + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @typedef GetDisplayVideo360AdvertiserLinkCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink} [response] DisplayVideo360AdvertiserLink + */ + + /** + * Calls GetDisplayVideo360AdvertiserLink. + * @function getDisplayVideo360AdvertiserLink + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.IGetDisplayVideo360AdvertiserLinkRequest} request GetDisplayVideo360AdvertiserLinkRequest message or plain object + * @param {google.analytics.admin.v1alpha.AnalyticsAdminService.GetDisplayVideo360AdvertiserLinkCallback} callback Node-style callback called with the error, if any, and DisplayVideo360AdvertiserLink + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.getDisplayVideo360AdvertiserLink = function getDisplayVideo360AdvertiserLink(request, callback) { + return this.rpcCall(getDisplayVideo360AdvertiserLink, $root.google.analytics.admin.v1alpha.GetDisplayVideo360AdvertiserLinkRequest, $root.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink, request, callback); + }, "name", { value: "GetDisplayVideo360AdvertiserLink" }); + + /** + * Calls GetDisplayVideo360AdvertiserLink. + * @function getDisplayVideo360AdvertiserLink + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.IGetDisplayVideo360AdvertiserLinkRequest} request GetDisplayVideo360AdvertiserLinkRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|listDisplayVideo360AdvertiserLinks}. + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @typedef ListDisplayVideo360AdvertiserLinksCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinksResponse} [response] ListDisplayVideo360AdvertiserLinksResponse + */ + + /** + * Calls ListDisplayVideo360AdvertiserLinks. + * @function listDisplayVideo360AdvertiserLinks + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinksRequest} request ListDisplayVideo360AdvertiserLinksRequest message or plain object + * @param {google.analytics.admin.v1alpha.AnalyticsAdminService.ListDisplayVideo360AdvertiserLinksCallback} callback Node-style callback called with the error, if any, and ListDisplayVideo360AdvertiserLinksResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.listDisplayVideo360AdvertiserLinks = function listDisplayVideo360AdvertiserLinks(request, callback) { + return this.rpcCall(listDisplayVideo360AdvertiserLinks, $root.google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinksRequest, $root.google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinksResponse, request, callback); + }, "name", { value: "ListDisplayVideo360AdvertiserLinks" }); + + /** + * Calls ListDisplayVideo360AdvertiserLinks. + * @function listDisplayVideo360AdvertiserLinks + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinksRequest} request ListDisplayVideo360AdvertiserLinksRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|createDisplayVideo360AdvertiserLink}. + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @typedef CreateDisplayVideo360AdvertiserLinkCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink} [response] DisplayVideo360AdvertiserLink + */ + + /** + * Calls CreateDisplayVideo360AdvertiserLink. + * @function createDisplayVideo360AdvertiserLink + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.ICreateDisplayVideo360AdvertiserLinkRequest} request CreateDisplayVideo360AdvertiserLinkRequest message or plain object + * @param {google.analytics.admin.v1alpha.AnalyticsAdminService.CreateDisplayVideo360AdvertiserLinkCallback} callback Node-style callback called with the error, if any, and DisplayVideo360AdvertiserLink + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.createDisplayVideo360AdvertiserLink = function createDisplayVideo360AdvertiserLink(request, callback) { + return this.rpcCall(createDisplayVideo360AdvertiserLink, $root.google.analytics.admin.v1alpha.CreateDisplayVideo360AdvertiserLinkRequest, $root.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink, request, callback); + }, "name", { value: "CreateDisplayVideo360AdvertiserLink" }); + + /** + * Calls CreateDisplayVideo360AdvertiserLink. + * @function createDisplayVideo360AdvertiserLink + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.ICreateDisplayVideo360AdvertiserLinkRequest} request CreateDisplayVideo360AdvertiserLinkRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|deleteDisplayVideo360AdvertiserLink}. + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @typedef DeleteDisplayVideo360AdvertiserLinkCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteDisplayVideo360AdvertiserLink. + * @function deleteDisplayVideo360AdvertiserLink + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.IDeleteDisplayVideo360AdvertiserLinkRequest} request DeleteDisplayVideo360AdvertiserLinkRequest message or plain object + * @param {google.analytics.admin.v1alpha.AnalyticsAdminService.DeleteDisplayVideo360AdvertiserLinkCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.deleteDisplayVideo360AdvertiserLink = function deleteDisplayVideo360AdvertiserLink(request, callback) { + return this.rpcCall(deleteDisplayVideo360AdvertiserLink, $root.google.analytics.admin.v1alpha.DeleteDisplayVideo360AdvertiserLinkRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteDisplayVideo360AdvertiserLink" }); + + /** + * Calls DeleteDisplayVideo360AdvertiserLink. + * @function deleteDisplayVideo360AdvertiserLink + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.IDeleteDisplayVideo360AdvertiserLinkRequest} request DeleteDisplayVideo360AdvertiserLinkRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|updateDisplayVideo360AdvertiserLink}. + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @typedef UpdateDisplayVideo360AdvertiserLinkCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink} [response] DisplayVideo360AdvertiserLink + */ + + /** + * Calls UpdateDisplayVideo360AdvertiserLink. + * @function updateDisplayVideo360AdvertiserLink + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.IUpdateDisplayVideo360AdvertiserLinkRequest} request UpdateDisplayVideo360AdvertiserLinkRequest message or plain object + * @param {google.analytics.admin.v1alpha.AnalyticsAdminService.UpdateDisplayVideo360AdvertiserLinkCallback} callback Node-style callback called with the error, if any, and DisplayVideo360AdvertiserLink + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.updateDisplayVideo360AdvertiserLink = function updateDisplayVideo360AdvertiserLink(request, callback) { + return this.rpcCall(updateDisplayVideo360AdvertiserLink, $root.google.analytics.admin.v1alpha.UpdateDisplayVideo360AdvertiserLinkRequest, $root.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink, request, callback); + }, "name", { value: "UpdateDisplayVideo360AdvertiserLink" }); + + /** + * Calls UpdateDisplayVideo360AdvertiserLink. + * @function updateDisplayVideo360AdvertiserLink + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.IUpdateDisplayVideo360AdvertiserLinkRequest} request UpdateDisplayVideo360AdvertiserLinkRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|getDisplayVideo360AdvertiserLinkProposal}. + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @typedef GetDisplayVideo360AdvertiserLinkProposalCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal} [response] DisplayVideo360AdvertiserLinkProposal + */ + + /** + * Calls GetDisplayVideo360AdvertiserLinkProposal. + * @function getDisplayVideo360AdvertiserLinkProposal + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.IGetDisplayVideo360AdvertiserLinkProposalRequest} request GetDisplayVideo360AdvertiserLinkProposalRequest message or plain object + * @param {google.analytics.admin.v1alpha.AnalyticsAdminService.GetDisplayVideo360AdvertiserLinkProposalCallback} callback Node-style callback called with the error, if any, and DisplayVideo360AdvertiserLinkProposal + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.getDisplayVideo360AdvertiserLinkProposal = function getDisplayVideo360AdvertiserLinkProposal(request, callback) { + return this.rpcCall(getDisplayVideo360AdvertiserLinkProposal, $root.google.analytics.admin.v1alpha.GetDisplayVideo360AdvertiserLinkProposalRequest, $root.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal, request, callback); + }, "name", { value: "GetDisplayVideo360AdvertiserLinkProposal" }); + + /** + * Calls GetDisplayVideo360AdvertiserLinkProposal. + * @function getDisplayVideo360AdvertiserLinkProposal + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.IGetDisplayVideo360AdvertiserLinkProposalRequest} request GetDisplayVideo360AdvertiserLinkProposalRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|listDisplayVideo360AdvertiserLinkProposals}. + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @typedef ListDisplayVideo360AdvertiserLinkProposalsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinkProposalsResponse} [response] ListDisplayVideo360AdvertiserLinkProposalsResponse + */ + + /** + * Calls ListDisplayVideo360AdvertiserLinkProposals. + * @function listDisplayVideo360AdvertiserLinkProposals + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinkProposalsRequest} request ListDisplayVideo360AdvertiserLinkProposalsRequest message or plain object + * @param {google.analytics.admin.v1alpha.AnalyticsAdminService.ListDisplayVideo360AdvertiserLinkProposalsCallback} callback Node-style callback called with the error, if any, and ListDisplayVideo360AdvertiserLinkProposalsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.listDisplayVideo360AdvertiserLinkProposals = function listDisplayVideo360AdvertiserLinkProposals(request, callback) { + return this.rpcCall(listDisplayVideo360AdvertiserLinkProposals, $root.google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinkProposalsRequest, $root.google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinkProposalsResponse, request, callback); + }, "name", { value: "ListDisplayVideo360AdvertiserLinkProposals" }); + + /** + * Calls ListDisplayVideo360AdvertiserLinkProposals. + * @function listDisplayVideo360AdvertiserLinkProposals + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinkProposalsRequest} request ListDisplayVideo360AdvertiserLinkProposalsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|createDisplayVideo360AdvertiserLinkProposal}. + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @typedef CreateDisplayVideo360AdvertiserLinkProposalCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal} [response] DisplayVideo360AdvertiserLinkProposal + */ + + /** + * Calls CreateDisplayVideo360AdvertiserLinkProposal. + * @function createDisplayVideo360AdvertiserLinkProposal + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.ICreateDisplayVideo360AdvertiserLinkProposalRequest} request CreateDisplayVideo360AdvertiserLinkProposalRequest message or plain object + * @param {google.analytics.admin.v1alpha.AnalyticsAdminService.CreateDisplayVideo360AdvertiserLinkProposalCallback} callback Node-style callback called with the error, if any, and DisplayVideo360AdvertiserLinkProposal + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.createDisplayVideo360AdvertiserLinkProposal = function createDisplayVideo360AdvertiserLinkProposal(request, callback) { + return this.rpcCall(createDisplayVideo360AdvertiserLinkProposal, $root.google.analytics.admin.v1alpha.CreateDisplayVideo360AdvertiserLinkProposalRequest, $root.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal, request, callback); + }, "name", { value: "CreateDisplayVideo360AdvertiserLinkProposal" }); + + /** + * Calls CreateDisplayVideo360AdvertiserLinkProposal. + * @function createDisplayVideo360AdvertiserLinkProposal + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.ICreateDisplayVideo360AdvertiserLinkProposalRequest} request CreateDisplayVideo360AdvertiserLinkProposalRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|deleteDisplayVideo360AdvertiserLinkProposal}. + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @typedef DeleteDisplayVideo360AdvertiserLinkProposalCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteDisplayVideo360AdvertiserLinkProposal. + * @function deleteDisplayVideo360AdvertiserLinkProposal + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.IDeleteDisplayVideo360AdvertiserLinkProposalRequest} request DeleteDisplayVideo360AdvertiserLinkProposalRequest message or plain object + * @param {google.analytics.admin.v1alpha.AnalyticsAdminService.DeleteDisplayVideo360AdvertiserLinkProposalCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.deleteDisplayVideo360AdvertiserLinkProposal = function deleteDisplayVideo360AdvertiserLinkProposal(request, callback) { + return this.rpcCall(deleteDisplayVideo360AdvertiserLinkProposal, $root.google.analytics.admin.v1alpha.DeleteDisplayVideo360AdvertiserLinkProposalRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteDisplayVideo360AdvertiserLinkProposal" }); + + /** + * Calls DeleteDisplayVideo360AdvertiserLinkProposal. + * @function deleteDisplayVideo360AdvertiserLinkProposal + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.IDeleteDisplayVideo360AdvertiserLinkProposalRequest} request DeleteDisplayVideo360AdvertiserLinkProposalRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|approveDisplayVideo360AdvertiserLinkProposal}. + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @typedef ApproveDisplayVideo360AdvertiserLinkProposalCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.admin.v1alpha.ApproveDisplayVideo360AdvertiserLinkProposalResponse} [response] ApproveDisplayVideo360AdvertiserLinkProposalResponse + */ + + /** + * Calls ApproveDisplayVideo360AdvertiserLinkProposal. + * @function approveDisplayVideo360AdvertiserLinkProposal + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.IApproveDisplayVideo360AdvertiserLinkProposalRequest} request ApproveDisplayVideo360AdvertiserLinkProposalRequest message or plain object + * @param {google.analytics.admin.v1alpha.AnalyticsAdminService.ApproveDisplayVideo360AdvertiserLinkProposalCallback} callback Node-style callback called with the error, if any, and ApproveDisplayVideo360AdvertiserLinkProposalResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.approveDisplayVideo360AdvertiserLinkProposal = function approveDisplayVideo360AdvertiserLinkProposal(request, callback) { + return this.rpcCall(approveDisplayVideo360AdvertiserLinkProposal, $root.google.analytics.admin.v1alpha.ApproveDisplayVideo360AdvertiserLinkProposalRequest, $root.google.analytics.admin.v1alpha.ApproveDisplayVideo360AdvertiserLinkProposalResponse, request, callback); + }, "name", { value: "ApproveDisplayVideo360AdvertiserLinkProposal" }); + + /** + * Calls ApproveDisplayVideo360AdvertiserLinkProposal. + * @function approveDisplayVideo360AdvertiserLinkProposal + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.IApproveDisplayVideo360AdvertiserLinkProposalRequest} request ApproveDisplayVideo360AdvertiserLinkProposalRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|cancelDisplayVideo360AdvertiserLinkProposal}. + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @typedef CancelDisplayVideo360AdvertiserLinkProposalCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal} [response] DisplayVideo360AdvertiserLinkProposal + */ + + /** + * Calls CancelDisplayVideo360AdvertiserLinkProposal. + * @function cancelDisplayVideo360AdvertiserLinkProposal + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.ICancelDisplayVideo360AdvertiserLinkProposalRequest} request CancelDisplayVideo360AdvertiserLinkProposalRequest message or plain object + * @param {google.analytics.admin.v1alpha.AnalyticsAdminService.CancelDisplayVideo360AdvertiserLinkProposalCallback} callback Node-style callback called with the error, if any, and DisplayVideo360AdvertiserLinkProposal + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.cancelDisplayVideo360AdvertiserLinkProposal = function cancelDisplayVideo360AdvertiserLinkProposal(request, callback) { + return this.rpcCall(cancelDisplayVideo360AdvertiserLinkProposal, $root.google.analytics.admin.v1alpha.CancelDisplayVideo360AdvertiserLinkProposalRequest, $root.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal, request, callback); + }, "name", { value: "CancelDisplayVideo360AdvertiserLinkProposal" }); + + /** + * Calls CancelDisplayVideo360AdvertiserLinkProposal. + * @function cancelDisplayVideo360AdvertiserLinkProposal + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.ICancelDisplayVideo360AdvertiserLinkProposalRequest} request CancelDisplayVideo360AdvertiserLinkProposalRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|createCustomDimension}. + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @typedef CreateCustomDimensionCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.admin.v1alpha.CustomDimension} [response] CustomDimension + */ + + /** + * Calls CreateCustomDimension. + * @function createCustomDimension + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.ICreateCustomDimensionRequest} request CreateCustomDimensionRequest message or plain object + * @param {google.analytics.admin.v1alpha.AnalyticsAdminService.CreateCustomDimensionCallback} callback Node-style callback called with the error, if any, and CustomDimension + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.createCustomDimension = function createCustomDimension(request, callback) { + return this.rpcCall(createCustomDimension, $root.google.analytics.admin.v1alpha.CreateCustomDimensionRequest, $root.google.analytics.admin.v1alpha.CustomDimension, request, callback); + }, "name", { value: "CreateCustomDimension" }); + + /** + * Calls CreateCustomDimension. + * @function createCustomDimension + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.ICreateCustomDimensionRequest} request CreateCustomDimensionRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|updateCustomDimension}. + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @typedef UpdateCustomDimensionCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.admin.v1alpha.CustomDimension} [response] CustomDimension + */ + + /** + * Calls UpdateCustomDimension. + * @function updateCustomDimension + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.IUpdateCustomDimensionRequest} request UpdateCustomDimensionRequest message or plain object + * @param {google.analytics.admin.v1alpha.AnalyticsAdminService.UpdateCustomDimensionCallback} callback Node-style callback called with the error, if any, and CustomDimension + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.updateCustomDimension = function updateCustomDimension(request, callback) { + return this.rpcCall(updateCustomDimension, $root.google.analytics.admin.v1alpha.UpdateCustomDimensionRequest, $root.google.analytics.admin.v1alpha.CustomDimension, request, callback); + }, "name", { value: "UpdateCustomDimension" }); + + /** + * Calls UpdateCustomDimension. + * @function updateCustomDimension + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.IUpdateCustomDimensionRequest} request UpdateCustomDimensionRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|listCustomDimensions}. + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @typedef ListCustomDimensionsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.admin.v1alpha.ListCustomDimensionsResponse} [response] ListCustomDimensionsResponse + */ + + /** + * Calls ListCustomDimensions. + * @function listCustomDimensions + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.IListCustomDimensionsRequest} request ListCustomDimensionsRequest message or plain object + * @param {google.analytics.admin.v1alpha.AnalyticsAdminService.ListCustomDimensionsCallback} callback Node-style callback called with the error, if any, and ListCustomDimensionsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.listCustomDimensions = function listCustomDimensions(request, callback) { + return this.rpcCall(listCustomDimensions, $root.google.analytics.admin.v1alpha.ListCustomDimensionsRequest, $root.google.analytics.admin.v1alpha.ListCustomDimensionsResponse, request, callback); + }, "name", { value: "ListCustomDimensions" }); + + /** + * Calls ListCustomDimensions. + * @function listCustomDimensions + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.IListCustomDimensionsRequest} request ListCustomDimensionsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|archiveCustomDimension}. + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @typedef ArchiveCustomDimensionCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls ArchiveCustomDimension. + * @function archiveCustomDimension + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.IArchiveCustomDimensionRequest} request ArchiveCustomDimensionRequest message or plain object + * @param {google.analytics.admin.v1alpha.AnalyticsAdminService.ArchiveCustomDimensionCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.archiveCustomDimension = function archiveCustomDimension(request, callback) { + return this.rpcCall(archiveCustomDimension, $root.google.analytics.admin.v1alpha.ArchiveCustomDimensionRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "ArchiveCustomDimension" }); + + /** + * Calls ArchiveCustomDimension. + * @function archiveCustomDimension + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.IArchiveCustomDimensionRequest} request ArchiveCustomDimensionRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|getCustomDimension}. + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @typedef GetCustomDimensionCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.admin.v1alpha.CustomDimension} [response] CustomDimension + */ + + /** + * Calls GetCustomDimension. + * @function getCustomDimension + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.IGetCustomDimensionRequest} request GetCustomDimensionRequest message or plain object + * @param {google.analytics.admin.v1alpha.AnalyticsAdminService.GetCustomDimensionCallback} callback Node-style callback called with the error, if any, and CustomDimension + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.getCustomDimension = function getCustomDimension(request, callback) { + return this.rpcCall(getCustomDimension, $root.google.analytics.admin.v1alpha.GetCustomDimensionRequest, $root.google.analytics.admin.v1alpha.CustomDimension, request, callback); + }, "name", { value: "GetCustomDimension" }); + + /** + * Calls GetCustomDimension. + * @function getCustomDimension + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.IGetCustomDimensionRequest} request GetCustomDimensionRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|createCustomMetric}. + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @typedef CreateCustomMetricCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.admin.v1alpha.CustomMetric} [response] CustomMetric + */ + + /** + * Calls CreateCustomMetric. + * @function createCustomMetric + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.ICreateCustomMetricRequest} request CreateCustomMetricRequest message or plain object + * @param {google.analytics.admin.v1alpha.AnalyticsAdminService.CreateCustomMetricCallback} callback Node-style callback called with the error, if any, and CustomMetric + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.createCustomMetric = function createCustomMetric(request, callback) { + return this.rpcCall(createCustomMetric, $root.google.analytics.admin.v1alpha.CreateCustomMetricRequest, $root.google.analytics.admin.v1alpha.CustomMetric, request, callback); + }, "name", { value: "CreateCustomMetric" }); + + /** + * Calls CreateCustomMetric. + * @function createCustomMetric + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.ICreateCustomMetricRequest} request CreateCustomMetricRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|updateCustomMetric}. + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @typedef UpdateCustomMetricCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.admin.v1alpha.CustomMetric} [response] CustomMetric + */ + + /** + * Calls UpdateCustomMetric. + * @function updateCustomMetric + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.IUpdateCustomMetricRequest} request UpdateCustomMetricRequest message or plain object + * @param {google.analytics.admin.v1alpha.AnalyticsAdminService.UpdateCustomMetricCallback} callback Node-style callback called with the error, if any, and CustomMetric + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.updateCustomMetric = function updateCustomMetric(request, callback) { + return this.rpcCall(updateCustomMetric, $root.google.analytics.admin.v1alpha.UpdateCustomMetricRequest, $root.google.analytics.admin.v1alpha.CustomMetric, request, callback); + }, "name", { value: "UpdateCustomMetric" }); + + /** + * Calls UpdateCustomMetric. + * @function updateCustomMetric + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.IUpdateCustomMetricRequest} request UpdateCustomMetricRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|listCustomMetrics}. + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @typedef ListCustomMetricsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.admin.v1alpha.ListCustomMetricsResponse} [response] ListCustomMetricsResponse + */ + + /** + * Calls ListCustomMetrics. + * @function listCustomMetrics + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.IListCustomMetricsRequest} request ListCustomMetricsRequest message or plain object + * @param {google.analytics.admin.v1alpha.AnalyticsAdminService.ListCustomMetricsCallback} callback Node-style callback called with the error, if any, and ListCustomMetricsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.listCustomMetrics = function listCustomMetrics(request, callback) { + return this.rpcCall(listCustomMetrics, $root.google.analytics.admin.v1alpha.ListCustomMetricsRequest, $root.google.analytics.admin.v1alpha.ListCustomMetricsResponse, request, callback); + }, "name", { value: "ListCustomMetrics" }); + + /** + * Calls ListCustomMetrics. + * @function listCustomMetrics + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.IListCustomMetricsRequest} request ListCustomMetricsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|archiveCustomMetric}. + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @typedef ArchiveCustomMetricCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls ArchiveCustomMetric. + * @function archiveCustomMetric + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.IArchiveCustomMetricRequest} request ArchiveCustomMetricRequest message or plain object + * @param {google.analytics.admin.v1alpha.AnalyticsAdminService.ArchiveCustomMetricCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.archiveCustomMetric = function archiveCustomMetric(request, callback) { + return this.rpcCall(archiveCustomMetric, $root.google.analytics.admin.v1alpha.ArchiveCustomMetricRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "ArchiveCustomMetric" }); + + /** + * Calls ArchiveCustomMetric. + * @function archiveCustomMetric + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.IArchiveCustomMetricRequest} request ArchiveCustomMetricRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|getCustomMetric}. + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @typedef GetCustomMetricCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.admin.v1alpha.CustomMetric} [response] CustomMetric + */ + + /** + * Calls GetCustomMetric. + * @function getCustomMetric + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.IGetCustomMetricRequest} request GetCustomMetricRequest message or plain object + * @param {google.analytics.admin.v1alpha.AnalyticsAdminService.GetCustomMetricCallback} callback Node-style callback called with the error, if any, and CustomMetric + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.getCustomMetric = function getCustomMetric(request, callback) { + return this.rpcCall(getCustomMetric, $root.google.analytics.admin.v1alpha.GetCustomMetricRequest, $root.google.analytics.admin.v1alpha.CustomMetric, request, callback); + }, "name", { value: "GetCustomMetric" }); + + /** + * Calls GetCustomMetric. + * @function getCustomMetric + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.IGetCustomMetricRequest} request GetCustomMetricRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|getDataRetentionSettings}. + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @typedef GetDataRetentionSettingsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.admin.v1alpha.DataRetentionSettings} [response] DataRetentionSettings + */ + + /** + * Calls GetDataRetentionSettings. + * @function getDataRetentionSettings + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.IGetDataRetentionSettingsRequest} request GetDataRetentionSettingsRequest message or plain object + * @param {google.analytics.admin.v1alpha.AnalyticsAdminService.GetDataRetentionSettingsCallback} callback Node-style callback called with the error, if any, and DataRetentionSettings + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.getDataRetentionSettings = function getDataRetentionSettings(request, callback) { + return this.rpcCall(getDataRetentionSettings, $root.google.analytics.admin.v1alpha.GetDataRetentionSettingsRequest, $root.google.analytics.admin.v1alpha.DataRetentionSettings, request, callback); + }, "name", { value: "GetDataRetentionSettings" }); + + /** + * Calls GetDataRetentionSettings. + * @function getDataRetentionSettings + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.IGetDataRetentionSettingsRequest} request GetDataRetentionSettingsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|updateDataRetentionSettings}. + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @typedef UpdateDataRetentionSettingsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.admin.v1alpha.DataRetentionSettings} [response] DataRetentionSettings + */ + + /** + * Calls UpdateDataRetentionSettings. + * @function updateDataRetentionSettings + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.IUpdateDataRetentionSettingsRequest} request UpdateDataRetentionSettingsRequest message or plain object + * @param {google.analytics.admin.v1alpha.AnalyticsAdminService.UpdateDataRetentionSettingsCallback} callback Node-style callback called with the error, if any, and DataRetentionSettings + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.updateDataRetentionSettings = function updateDataRetentionSettings(request, callback) { + return this.rpcCall(updateDataRetentionSettings, $root.google.analytics.admin.v1alpha.UpdateDataRetentionSettingsRequest, $root.google.analytics.admin.v1alpha.DataRetentionSettings, request, callback); + }, "name", { value: "UpdateDataRetentionSettings" }); + + /** + * Calls UpdateDataRetentionSettings. + * @function updateDataRetentionSettings + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.IUpdateDataRetentionSettingsRequest} request UpdateDataRetentionSettingsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|createDataStream}. + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @typedef CreateDataStreamCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.admin.v1alpha.DataStream} [response] DataStream + */ + + /** + * Calls CreateDataStream. + * @function createDataStream + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.ICreateDataStreamRequest} request CreateDataStreamRequest message or plain object + * @param {google.analytics.admin.v1alpha.AnalyticsAdminService.CreateDataStreamCallback} callback Node-style callback called with the error, if any, and DataStream + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.createDataStream = function createDataStream(request, callback) { + return this.rpcCall(createDataStream, $root.google.analytics.admin.v1alpha.CreateDataStreamRequest, $root.google.analytics.admin.v1alpha.DataStream, request, callback); + }, "name", { value: "CreateDataStream" }); + + /** + * Calls CreateDataStream. + * @function createDataStream + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.ICreateDataStreamRequest} request CreateDataStreamRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|deleteDataStream}. + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @typedef DeleteDataStreamCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteDataStream. + * @function deleteDataStream + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.IDeleteDataStreamRequest} request DeleteDataStreamRequest message or plain object + * @param {google.analytics.admin.v1alpha.AnalyticsAdminService.DeleteDataStreamCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.deleteDataStream = function deleteDataStream(request, callback) { + return this.rpcCall(deleteDataStream, $root.google.analytics.admin.v1alpha.DeleteDataStreamRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteDataStream" }); + + /** + * Calls DeleteDataStream. + * @function deleteDataStream + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.IDeleteDataStreamRequest} request DeleteDataStreamRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|updateDataStream}. + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @typedef UpdateDataStreamCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.admin.v1alpha.DataStream} [response] DataStream + */ + + /** + * Calls UpdateDataStream. + * @function updateDataStream + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.IUpdateDataStreamRequest} request UpdateDataStreamRequest message or plain object + * @param {google.analytics.admin.v1alpha.AnalyticsAdminService.UpdateDataStreamCallback} callback Node-style callback called with the error, if any, and DataStream + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.updateDataStream = function updateDataStream(request, callback) { + return this.rpcCall(updateDataStream, $root.google.analytics.admin.v1alpha.UpdateDataStreamRequest, $root.google.analytics.admin.v1alpha.DataStream, request, callback); + }, "name", { value: "UpdateDataStream" }); + + /** + * Calls UpdateDataStream. + * @function updateDataStream + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.IUpdateDataStreamRequest} request UpdateDataStreamRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|listDataStreams}. + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @typedef ListDataStreamsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.admin.v1alpha.ListDataStreamsResponse} [response] ListDataStreamsResponse + */ + + /** + * Calls ListDataStreams. + * @function listDataStreams + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.IListDataStreamsRequest} request ListDataStreamsRequest message or plain object + * @param {google.analytics.admin.v1alpha.AnalyticsAdminService.ListDataStreamsCallback} callback Node-style callback called with the error, if any, and ListDataStreamsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.listDataStreams = function listDataStreams(request, callback) { + return this.rpcCall(listDataStreams, $root.google.analytics.admin.v1alpha.ListDataStreamsRequest, $root.google.analytics.admin.v1alpha.ListDataStreamsResponse, request, callback); + }, "name", { value: "ListDataStreams" }); + + /** + * Calls ListDataStreams. + * @function listDataStreams + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.IListDataStreamsRequest} request ListDataStreamsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|getDataStream}. + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @typedef GetDataStreamCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.admin.v1alpha.DataStream} [response] DataStream + */ + + /** + * Calls GetDataStream. + * @function getDataStream + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.IGetDataStreamRequest} request GetDataStreamRequest message or plain object + * @param {google.analytics.admin.v1alpha.AnalyticsAdminService.GetDataStreamCallback} callback Node-style callback called with the error, if any, and DataStream + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.getDataStream = function getDataStream(request, callback) { + return this.rpcCall(getDataStream, $root.google.analytics.admin.v1alpha.GetDataStreamRequest, $root.google.analytics.admin.v1alpha.DataStream, request, callback); + }, "name", { value: "GetDataStream" }); + + /** + * Calls GetDataStream. + * @function getDataStream + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.IGetDataStreamRequest} request GetDataStreamRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|getAudience}. + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @typedef GetAudienceCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.admin.v1alpha.Audience} [response] Audience + */ + + /** + * Calls GetAudience. + * @function getAudience + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.IGetAudienceRequest} request GetAudienceRequest message or plain object + * @param {google.analytics.admin.v1alpha.AnalyticsAdminService.GetAudienceCallback} callback Node-style callback called with the error, if any, and Audience + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.getAudience = function getAudience(request, callback) { + return this.rpcCall(getAudience, $root.google.analytics.admin.v1alpha.GetAudienceRequest, $root.google.analytics.admin.v1alpha.Audience, request, callback); + }, "name", { value: "GetAudience" }); + + /** + * Calls GetAudience. + * @function getAudience + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.IGetAudienceRequest} request GetAudienceRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|listAudiences}. + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @typedef ListAudiencesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.admin.v1alpha.ListAudiencesResponse} [response] ListAudiencesResponse + */ + + /** + * Calls ListAudiences. + * @function listAudiences + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.IListAudiencesRequest} request ListAudiencesRequest message or plain object + * @param {google.analytics.admin.v1alpha.AnalyticsAdminService.ListAudiencesCallback} callback Node-style callback called with the error, if any, and ListAudiencesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.listAudiences = function listAudiences(request, callback) { + return this.rpcCall(listAudiences, $root.google.analytics.admin.v1alpha.ListAudiencesRequest, $root.google.analytics.admin.v1alpha.ListAudiencesResponse, request, callback); + }, "name", { value: "ListAudiences" }); + + /** + * Calls ListAudiences. + * @function listAudiences + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.IListAudiencesRequest} request ListAudiencesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|createAudience}. + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @typedef CreateAudienceCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.admin.v1alpha.Audience} [response] Audience + */ + + /** + * Calls CreateAudience. + * @function createAudience + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.ICreateAudienceRequest} request CreateAudienceRequest message or plain object + * @param {google.analytics.admin.v1alpha.AnalyticsAdminService.CreateAudienceCallback} callback Node-style callback called with the error, if any, and Audience + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.createAudience = function createAudience(request, callback) { + return this.rpcCall(createAudience, $root.google.analytics.admin.v1alpha.CreateAudienceRequest, $root.google.analytics.admin.v1alpha.Audience, request, callback); + }, "name", { value: "CreateAudience" }); + + /** + * Calls CreateAudience. + * @function createAudience + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.ICreateAudienceRequest} request CreateAudienceRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|updateAudience}. + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @typedef UpdateAudienceCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.admin.v1alpha.Audience} [response] Audience + */ + + /** + * Calls UpdateAudience. + * @function updateAudience + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.IUpdateAudienceRequest} request UpdateAudienceRequest message or plain object + * @param {google.analytics.admin.v1alpha.AnalyticsAdminService.UpdateAudienceCallback} callback Node-style callback called with the error, if any, and Audience + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.updateAudience = function updateAudience(request, callback) { + return this.rpcCall(updateAudience, $root.google.analytics.admin.v1alpha.UpdateAudienceRequest, $root.google.analytics.admin.v1alpha.Audience, request, callback); + }, "name", { value: "UpdateAudience" }); + + /** + * Calls UpdateAudience. + * @function updateAudience + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.IUpdateAudienceRequest} request UpdateAudienceRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|archiveAudience}. + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @typedef ArchiveAudienceCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls ArchiveAudience. + * @function archiveAudience + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.IArchiveAudienceRequest} request ArchiveAudienceRequest message or plain object + * @param {google.analytics.admin.v1alpha.AnalyticsAdminService.ArchiveAudienceCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.archiveAudience = function archiveAudience(request, callback) { + return this.rpcCall(archiveAudience, $root.google.analytics.admin.v1alpha.ArchiveAudienceRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "ArchiveAudience" }); + + /** + * Calls ArchiveAudience. + * @function archiveAudience + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.IArchiveAudienceRequest} request ArchiveAudienceRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|getAttributionSettings}. + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @typedef GetAttributionSettingsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.admin.v1alpha.AttributionSettings} [response] AttributionSettings + */ + + /** + * Calls GetAttributionSettings. + * @function getAttributionSettings + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.IGetAttributionSettingsRequest} request GetAttributionSettingsRequest message or plain object + * @param {google.analytics.admin.v1alpha.AnalyticsAdminService.GetAttributionSettingsCallback} callback Node-style callback called with the error, if any, and AttributionSettings + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.getAttributionSettings = function getAttributionSettings(request, callback) { + return this.rpcCall(getAttributionSettings, $root.google.analytics.admin.v1alpha.GetAttributionSettingsRequest, $root.google.analytics.admin.v1alpha.AttributionSettings, request, callback); + }, "name", { value: "GetAttributionSettings" }); + + /** + * Calls GetAttributionSettings. + * @function getAttributionSettings + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.IGetAttributionSettingsRequest} request GetAttributionSettingsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|updateAttributionSettings}. + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @typedef UpdateAttributionSettingsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.admin.v1alpha.AttributionSettings} [response] AttributionSettings + */ + + /** + * Calls UpdateAttributionSettings. + * @function updateAttributionSettings + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.IUpdateAttributionSettingsRequest} request UpdateAttributionSettingsRequest message or plain object + * @param {google.analytics.admin.v1alpha.AnalyticsAdminService.UpdateAttributionSettingsCallback} callback Node-style callback called with the error, if any, and AttributionSettings + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.updateAttributionSettings = function updateAttributionSettings(request, callback) { + return this.rpcCall(updateAttributionSettings, $root.google.analytics.admin.v1alpha.UpdateAttributionSettingsRequest, $root.google.analytics.admin.v1alpha.AttributionSettings, request, callback); + }, "name", { value: "UpdateAttributionSettings" }); + + /** + * Calls UpdateAttributionSettings. + * @function updateAttributionSettings + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.IUpdateAttributionSettingsRequest} request UpdateAttributionSettingsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1alpha.AnalyticsAdminService|runAccessReport}. + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @typedef RunAccessReportCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.admin.v1alpha.RunAccessReportResponse} [response] RunAccessReportResponse + */ + + /** + * Calls RunAccessReport. + * @function runAccessReport + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.IRunAccessReportRequest} request RunAccessReportRequest message or plain object + * @param {google.analytics.admin.v1alpha.AnalyticsAdminService.RunAccessReportCallback} callback Node-style callback called with the error, if any, and RunAccessReportResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.runAccessReport = function runAccessReport(request, callback) { + return this.rpcCall(runAccessReport, $root.google.analytics.admin.v1alpha.RunAccessReportRequest, $root.google.analytics.admin.v1alpha.RunAccessReportResponse, request, callback); + }, "name", { value: "RunAccessReport" }); + + /** + * Calls RunAccessReport. + * @function runAccessReport + * @memberof google.analytics.admin.v1alpha.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1alpha.IRunAccessReportRequest} request RunAccessReportRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return AnalyticsAdminService; + })(); + + v1alpha.RunAccessReportRequest = (function() { + + /** + * Properties of a RunAccessReportRequest. + * @memberof google.analytics.admin.v1alpha + * @interface IRunAccessReportRequest + * @property {string|null} [entity] RunAccessReportRequest entity + * @property {Array.|null} [dimensions] RunAccessReportRequest dimensions + * @property {Array.|null} [metrics] RunAccessReportRequest metrics + * @property {Array.|null} [dateRanges] RunAccessReportRequest dateRanges + * @property {google.analytics.admin.v1alpha.IAccessFilterExpression|null} [dimensionFilter] RunAccessReportRequest dimensionFilter + * @property {google.analytics.admin.v1alpha.IAccessFilterExpression|null} [metricFilter] RunAccessReportRequest metricFilter + * @property {number|Long|null} [offset] RunAccessReportRequest offset + * @property {number|Long|null} [limit] RunAccessReportRequest limit + * @property {string|null} [timeZone] RunAccessReportRequest timeZone + * @property {Array.|null} [orderBys] RunAccessReportRequest orderBys + * @property {boolean|null} [returnEntityQuota] RunAccessReportRequest returnEntityQuota + */ + + /** + * Constructs a new RunAccessReportRequest. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents a RunAccessReportRequest. + * @implements IRunAccessReportRequest + * @constructor + * @param {google.analytics.admin.v1alpha.IRunAccessReportRequest=} [properties] Properties to set + */ + function RunAccessReportRequest(properties) { + this.dimensions = []; + this.metrics = []; + this.dateRanges = []; + this.orderBys = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RunAccessReportRequest entity. + * @member {string} entity + * @memberof google.analytics.admin.v1alpha.RunAccessReportRequest + * @instance + */ + RunAccessReportRequest.prototype.entity = ""; + + /** + * RunAccessReportRequest dimensions. + * @member {Array.} dimensions + * @memberof google.analytics.admin.v1alpha.RunAccessReportRequest + * @instance + */ + RunAccessReportRequest.prototype.dimensions = $util.emptyArray; + + /** + * RunAccessReportRequest metrics. + * @member {Array.} metrics + * @memberof google.analytics.admin.v1alpha.RunAccessReportRequest + * @instance + */ + RunAccessReportRequest.prototype.metrics = $util.emptyArray; + + /** + * RunAccessReportRequest dateRanges. + * @member {Array.} dateRanges + * @memberof google.analytics.admin.v1alpha.RunAccessReportRequest + * @instance + */ + RunAccessReportRequest.prototype.dateRanges = $util.emptyArray; + + /** + * RunAccessReportRequest dimensionFilter. + * @member {google.analytics.admin.v1alpha.IAccessFilterExpression|null|undefined} dimensionFilter + * @memberof google.analytics.admin.v1alpha.RunAccessReportRequest + * @instance + */ + RunAccessReportRequest.prototype.dimensionFilter = null; + + /** + * RunAccessReportRequest metricFilter. + * @member {google.analytics.admin.v1alpha.IAccessFilterExpression|null|undefined} metricFilter + * @memberof google.analytics.admin.v1alpha.RunAccessReportRequest + * @instance + */ + RunAccessReportRequest.prototype.metricFilter = null; + + /** + * RunAccessReportRequest offset. + * @member {number|Long} offset + * @memberof google.analytics.admin.v1alpha.RunAccessReportRequest + * @instance + */ + RunAccessReportRequest.prototype.offset = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * RunAccessReportRequest limit. + * @member {number|Long} limit + * @memberof google.analytics.admin.v1alpha.RunAccessReportRequest + * @instance + */ + RunAccessReportRequest.prototype.limit = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * RunAccessReportRequest timeZone. + * @member {string} timeZone + * @memberof google.analytics.admin.v1alpha.RunAccessReportRequest + * @instance + */ + RunAccessReportRequest.prototype.timeZone = ""; + + /** + * RunAccessReportRequest orderBys. + * @member {Array.} orderBys + * @memberof google.analytics.admin.v1alpha.RunAccessReportRequest + * @instance + */ + RunAccessReportRequest.prototype.orderBys = $util.emptyArray; + + /** + * RunAccessReportRequest returnEntityQuota. + * @member {boolean} returnEntityQuota + * @memberof google.analytics.admin.v1alpha.RunAccessReportRequest + * @instance + */ + RunAccessReportRequest.prototype.returnEntityQuota = false; + + /** + * Creates a new RunAccessReportRequest instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.RunAccessReportRequest + * @static + * @param {google.analytics.admin.v1alpha.IRunAccessReportRequest=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.RunAccessReportRequest} RunAccessReportRequest instance + */ + RunAccessReportRequest.create = function create(properties) { + return new RunAccessReportRequest(properties); + }; + + /** + * Encodes the specified RunAccessReportRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.RunAccessReportRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.RunAccessReportRequest + * @static + * @param {google.analytics.admin.v1alpha.IRunAccessReportRequest} message RunAccessReportRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RunAccessReportRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.entity != null && Object.hasOwnProperty.call(message, "entity")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.entity); + if (message.dimensions != null && message.dimensions.length) + for (var i = 0; i < message.dimensions.length; ++i) + $root.google.analytics.admin.v1alpha.AccessDimension.encode(message.dimensions[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.metrics != null && message.metrics.length) + for (var i = 0; i < message.metrics.length; ++i) + $root.google.analytics.admin.v1alpha.AccessMetric.encode(message.metrics[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.dateRanges != null && message.dateRanges.length) + for (var i = 0; i < message.dateRanges.length; ++i) + $root.google.analytics.admin.v1alpha.AccessDateRange.encode(message.dateRanges[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.dimensionFilter != null && Object.hasOwnProperty.call(message, "dimensionFilter")) + $root.google.analytics.admin.v1alpha.AccessFilterExpression.encode(message.dimensionFilter, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.metricFilter != null && Object.hasOwnProperty.call(message, "metricFilter")) + $root.google.analytics.admin.v1alpha.AccessFilterExpression.encode(message.metricFilter, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.offset != null && Object.hasOwnProperty.call(message, "offset")) + writer.uint32(/* id 7, wireType 0 =*/56).int64(message.offset); + if (message.limit != null && Object.hasOwnProperty.call(message, "limit")) + writer.uint32(/* id 8, wireType 0 =*/64).int64(message.limit); + if (message.timeZone != null && Object.hasOwnProperty.call(message, "timeZone")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.timeZone); + if (message.orderBys != null && message.orderBys.length) + for (var i = 0; i < message.orderBys.length; ++i) + $root.google.analytics.admin.v1alpha.AccessOrderBy.encode(message.orderBys[i], writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.returnEntityQuota != null && Object.hasOwnProperty.call(message, "returnEntityQuota")) + writer.uint32(/* id 11, wireType 0 =*/88).bool(message.returnEntityQuota); + return writer; + }; + + /** + * Encodes the specified RunAccessReportRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.RunAccessReportRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.RunAccessReportRequest + * @static + * @param {google.analytics.admin.v1alpha.IRunAccessReportRequest} message RunAccessReportRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RunAccessReportRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RunAccessReportRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.RunAccessReportRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.RunAccessReportRequest} RunAccessReportRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RunAccessReportRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.RunAccessReportRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.entity = reader.string(); + break; + } + case 2: { + if (!(message.dimensions && message.dimensions.length)) + message.dimensions = []; + message.dimensions.push($root.google.analytics.admin.v1alpha.AccessDimension.decode(reader, reader.uint32())); + break; + } + case 3: { + if (!(message.metrics && message.metrics.length)) + message.metrics = []; + message.metrics.push($root.google.analytics.admin.v1alpha.AccessMetric.decode(reader, reader.uint32())); + break; + } + case 4: { + if (!(message.dateRanges && message.dateRanges.length)) + message.dateRanges = []; + message.dateRanges.push($root.google.analytics.admin.v1alpha.AccessDateRange.decode(reader, reader.uint32())); + break; + } + case 5: { + message.dimensionFilter = $root.google.analytics.admin.v1alpha.AccessFilterExpression.decode(reader, reader.uint32()); + break; + } + case 6: { + message.metricFilter = $root.google.analytics.admin.v1alpha.AccessFilterExpression.decode(reader, reader.uint32()); + break; + } + case 7: { + message.offset = reader.int64(); + break; + } + case 8: { + message.limit = reader.int64(); + break; + } + case 9: { + message.timeZone = reader.string(); + break; + } + case 10: { + if (!(message.orderBys && message.orderBys.length)) + message.orderBys = []; + message.orderBys.push($root.google.analytics.admin.v1alpha.AccessOrderBy.decode(reader, reader.uint32())); + break; + } + case 11: { + message.returnEntityQuota = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RunAccessReportRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.RunAccessReportRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.RunAccessReportRequest} RunAccessReportRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RunAccessReportRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RunAccessReportRequest message. + * @function verify + * @memberof google.analytics.admin.v1alpha.RunAccessReportRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RunAccessReportRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.entity != null && message.hasOwnProperty("entity")) + if (!$util.isString(message.entity)) + return "entity: string expected"; + if (message.dimensions != null && message.hasOwnProperty("dimensions")) { + if (!Array.isArray(message.dimensions)) + return "dimensions: array expected"; + for (var i = 0; i < message.dimensions.length; ++i) { + var error = $root.google.analytics.admin.v1alpha.AccessDimension.verify(message.dimensions[i]); + if (error) + return "dimensions." + error; + } + } + if (message.metrics != null && message.hasOwnProperty("metrics")) { + if (!Array.isArray(message.metrics)) + return "metrics: array expected"; + for (var i = 0; i < message.metrics.length; ++i) { + var error = $root.google.analytics.admin.v1alpha.AccessMetric.verify(message.metrics[i]); + if (error) + return "metrics." + error; + } + } + if (message.dateRanges != null && message.hasOwnProperty("dateRanges")) { + if (!Array.isArray(message.dateRanges)) + return "dateRanges: array expected"; + for (var i = 0; i < message.dateRanges.length; ++i) { + var error = $root.google.analytics.admin.v1alpha.AccessDateRange.verify(message.dateRanges[i]); + if (error) + return "dateRanges." + error; + } + } + if (message.dimensionFilter != null && message.hasOwnProperty("dimensionFilter")) { + var error = $root.google.analytics.admin.v1alpha.AccessFilterExpression.verify(message.dimensionFilter); + if (error) + return "dimensionFilter." + error; + } + if (message.metricFilter != null && message.hasOwnProperty("metricFilter")) { + var error = $root.google.analytics.admin.v1alpha.AccessFilterExpression.verify(message.metricFilter); + if (error) + return "metricFilter." + error; + } + if (message.offset != null && message.hasOwnProperty("offset")) + if (!$util.isInteger(message.offset) && !(message.offset && $util.isInteger(message.offset.low) && $util.isInteger(message.offset.high))) + return "offset: integer|Long expected"; + if (message.limit != null && message.hasOwnProperty("limit")) + if (!$util.isInteger(message.limit) && !(message.limit && $util.isInteger(message.limit.low) && $util.isInteger(message.limit.high))) + return "limit: integer|Long expected"; + if (message.timeZone != null && message.hasOwnProperty("timeZone")) + if (!$util.isString(message.timeZone)) + return "timeZone: string expected"; + if (message.orderBys != null && message.hasOwnProperty("orderBys")) { + if (!Array.isArray(message.orderBys)) + return "orderBys: array expected"; + for (var i = 0; i < message.orderBys.length; ++i) { + var error = $root.google.analytics.admin.v1alpha.AccessOrderBy.verify(message.orderBys[i]); + if (error) + return "orderBys." + error; + } + } + if (message.returnEntityQuota != null && message.hasOwnProperty("returnEntityQuota")) + if (typeof message.returnEntityQuota !== "boolean") + return "returnEntityQuota: boolean expected"; + return null; + }; + + /** + * Creates a RunAccessReportRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.RunAccessReportRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.RunAccessReportRequest} RunAccessReportRequest + */ + RunAccessReportRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.RunAccessReportRequest) + return object; + var message = new $root.google.analytics.admin.v1alpha.RunAccessReportRequest(); + if (object.entity != null) + message.entity = String(object.entity); + if (object.dimensions) { + if (!Array.isArray(object.dimensions)) + throw TypeError(".google.analytics.admin.v1alpha.RunAccessReportRequest.dimensions: array expected"); + message.dimensions = []; + for (var i = 0; i < object.dimensions.length; ++i) { + if (typeof object.dimensions[i] !== "object") + throw TypeError(".google.analytics.admin.v1alpha.RunAccessReportRequest.dimensions: object expected"); + message.dimensions[i] = $root.google.analytics.admin.v1alpha.AccessDimension.fromObject(object.dimensions[i]); + } + } + if (object.metrics) { + if (!Array.isArray(object.metrics)) + throw TypeError(".google.analytics.admin.v1alpha.RunAccessReportRequest.metrics: array expected"); + message.metrics = []; + for (var i = 0; i < object.metrics.length; ++i) { + if (typeof object.metrics[i] !== "object") + throw TypeError(".google.analytics.admin.v1alpha.RunAccessReportRequest.metrics: object expected"); + message.metrics[i] = $root.google.analytics.admin.v1alpha.AccessMetric.fromObject(object.metrics[i]); + } + } + if (object.dateRanges) { + if (!Array.isArray(object.dateRanges)) + throw TypeError(".google.analytics.admin.v1alpha.RunAccessReportRequest.dateRanges: array expected"); + message.dateRanges = []; + for (var i = 0; i < object.dateRanges.length; ++i) { + if (typeof object.dateRanges[i] !== "object") + throw TypeError(".google.analytics.admin.v1alpha.RunAccessReportRequest.dateRanges: object expected"); + message.dateRanges[i] = $root.google.analytics.admin.v1alpha.AccessDateRange.fromObject(object.dateRanges[i]); + } + } + if (object.dimensionFilter != null) { + if (typeof object.dimensionFilter !== "object") + throw TypeError(".google.analytics.admin.v1alpha.RunAccessReportRequest.dimensionFilter: object expected"); + message.dimensionFilter = $root.google.analytics.admin.v1alpha.AccessFilterExpression.fromObject(object.dimensionFilter); + } + if (object.metricFilter != null) { + if (typeof object.metricFilter !== "object") + throw TypeError(".google.analytics.admin.v1alpha.RunAccessReportRequest.metricFilter: object expected"); + message.metricFilter = $root.google.analytics.admin.v1alpha.AccessFilterExpression.fromObject(object.metricFilter); + } + if (object.offset != null) + if ($util.Long) + (message.offset = $util.Long.fromValue(object.offset)).unsigned = false; + else if (typeof object.offset === "string") + message.offset = parseInt(object.offset, 10); + else if (typeof object.offset === "number") + message.offset = object.offset; + else if (typeof object.offset === "object") + message.offset = new $util.LongBits(object.offset.low >>> 0, object.offset.high >>> 0).toNumber(); + if (object.limit != null) + if ($util.Long) + (message.limit = $util.Long.fromValue(object.limit)).unsigned = false; + else if (typeof object.limit === "string") + message.limit = parseInt(object.limit, 10); + else if (typeof object.limit === "number") + message.limit = object.limit; + else if (typeof object.limit === "object") + message.limit = new $util.LongBits(object.limit.low >>> 0, object.limit.high >>> 0).toNumber(); + if (object.timeZone != null) + message.timeZone = String(object.timeZone); + if (object.orderBys) { + if (!Array.isArray(object.orderBys)) + throw TypeError(".google.analytics.admin.v1alpha.RunAccessReportRequest.orderBys: array expected"); + message.orderBys = []; + for (var i = 0; i < object.orderBys.length; ++i) { + if (typeof object.orderBys[i] !== "object") + throw TypeError(".google.analytics.admin.v1alpha.RunAccessReportRequest.orderBys: object expected"); + message.orderBys[i] = $root.google.analytics.admin.v1alpha.AccessOrderBy.fromObject(object.orderBys[i]); + } + } + if (object.returnEntityQuota != null) + message.returnEntityQuota = Boolean(object.returnEntityQuota); + return message; + }; + + /** + * Creates a plain object from a RunAccessReportRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.RunAccessReportRequest + * @static + * @param {google.analytics.admin.v1alpha.RunAccessReportRequest} message RunAccessReportRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RunAccessReportRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.dimensions = []; + object.metrics = []; + object.dateRanges = []; + object.orderBys = []; + } + if (options.defaults) { + object.entity = ""; + object.dimensionFilter = null; + object.metricFilter = null; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.offset = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.offset = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.limit = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.limit = options.longs === String ? "0" : 0; + object.timeZone = ""; + object.returnEntityQuota = false; + } + if (message.entity != null && message.hasOwnProperty("entity")) + object.entity = message.entity; + if (message.dimensions && message.dimensions.length) { + object.dimensions = []; + for (var j = 0; j < message.dimensions.length; ++j) + object.dimensions[j] = $root.google.analytics.admin.v1alpha.AccessDimension.toObject(message.dimensions[j], options); + } + if (message.metrics && message.metrics.length) { + object.metrics = []; + for (var j = 0; j < message.metrics.length; ++j) + object.metrics[j] = $root.google.analytics.admin.v1alpha.AccessMetric.toObject(message.metrics[j], options); + } + if (message.dateRanges && message.dateRanges.length) { + object.dateRanges = []; + for (var j = 0; j < message.dateRanges.length; ++j) + object.dateRanges[j] = $root.google.analytics.admin.v1alpha.AccessDateRange.toObject(message.dateRanges[j], options); + } + if (message.dimensionFilter != null && message.hasOwnProperty("dimensionFilter")) + object.dimensionFilter = $root.google.analytics.admin.v1alpha.AccessFilterExpression.toObject(message.dimensionFilter, options); + if (message.metricFilter != null && message.hasOwnProperty("metricFilter")) + object.metricFilter = $root.google.analytics.admin.v1alpha.AccessFilterExpression.toObject(message.metricFilter, options); + if (message.offset != null && message.hasOwnProperty("offset")) + if (typeof message.offset === "number") + object.offset = options.longs === String ? String(message.offset) : message.offset; + else + object.offset = options.longs === String ? $util.Long.prototype.toString.call(message.offset) : options.longs === Number ? new $util.LongBits(message.offset.low >>> 0, message.offset.high >>> 0).toNumber() : message.offset; + if (message.limit != null && message.hasOwnProperty("limit")) + if (typeof message.limit === "number") + object.limit = options.longs === String ? String(message.limit) : message.limit; + else + object.limit = options.longs === String ? $util.Long.prototype.toString.call(message.limit) : options.longs === Number ? new $util.LongBits(message.limit.low >>> 0, message.limit.high >>> 0).toNumber() : message.limit; + if (message.timeZone != null && message.hasOwnProperty("timeZone")) + object.timeZone = message.timeZone; + if (message.orderBys && message.orderBys.length) { + object.orderBys = []; + for (var j = 0; j < message.orderBys.length; ++j) + object.orderBys[j] = $root.google.analytics.admin.v1alpha.AccessOrderBy.toObject(message.orderBys[j], options); + } + if (message.returnEntityQuota != null && message.hasOwnProperty("returnEntityQuota")) + object.returnEntityQuota = message.returnEntityQuota; + return object; + }; + + /** + * Converts this RunAccessReportRequest to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.RunAccessReportRequest + * @instance + * @returns {Object.} JSON object + */ + RunAccessReportRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RunAccessReportRequest + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.RunAccessReportRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RunAccessReportRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.RunAccessReportRequest"; + }; + + return RunAccessReportRequest; + })(); + + v1alpha.RunAccessReportResponse = (function() { + + /** + * Properties of a RunAccessReportResponse. + * @memberof google.analytics.admin.v1alpha + * @interface IRunAccessReportResponse + * @property {Array.|null} [dimensionHeaders] RunAccessReportResponse dimensionHeaders + * @property {Array.|null} [metricHeaders] RunAccessReportResponse metricHeaders + * @property {Array.|null} [rows] RunAccessReportResponse rows + * @property {number|null} [rowCount] RunAccessReportResponse rowCount + * @property {google.analytics.admin.v1alpha.IAccessQuota|null} [quota] RunAccessReportResponse quota + */ + + /** + * Constructs a new RunAccessReportResponse. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents a RunAccessReportResponse. + * @implements IRunAccessReportResponse + * @constructor + * @param {google.analytics.admin.v1alpha.IRunAccessReportResponse=} [properties] Properties to set + */ + function RunAccessReportResponse(properties) { + this.dimensionHeaders = []; + this.metricHeaders = []; + this.rows = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RunAccessReportResponse dimensionHeaders. + * @member {Array.} dimensionHeaders + * @memberof google.analytics.admin.v1alpha.RunAccessReportResponse + * @instance + */ + RunAccessReportResponse.prototype.dimensionHeaders = $util.emptyArray; + + /** + * RunAccessReportResponse metricHeaders. + * @member {Array.} metricHeaders + * @memberof google.analytics.admin.v1alpha.RunAccessReportResponse + * @instance + */ + RunAccessReportResponse.prototype.metricHeaders = $util.emptyArray; + + /** + * RunAccessReportResponse rows. + * @member {Array.} rows + * @memberof google.analytics.admin.v1alpha.RunAccessReportResponse + * @instance + */ + RunAccessReportResponse.prototype.rows = $util.emptyArray; + + /** + * RunAccessReportResponse rowCount. + * @member {number} rowCount + * @memberof google.analytics.admin.v1alpha.RunAccessReportResponse + * @instance + */ + RunAccessReportResponse.prototype.rowCount = 0; + + /** + * RunAccessReportResponse quota. + * @member {google.analytics.admin.v1alpha.IAccessQuota|null|undefined} quota + * @memberof google.analytics.admin.v1alpha.RunAccessReportResponse + * @instance + */ + RunAccessReportResponse.prototype.quota = null; + + /** + * Creates a new RunAccessReportResponse instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.RunAccessReportResponse + * @static + * @param {google.analytics.admin.v1alpha.IRunAccessReportResponse=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.RunAccessReportResponse} RunAccessReportResponse instance + */ + RunAccessReportResponse.create = function create(properties) { + return new RunAccessReportResponse(properties); + }; + + /** + * Encodes the specified RunAccessReportResponse message. Does not implicitly {@link google.analytics.admin.v1alpha.RunAccessReportResponse.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.RunAccessReportResponse + * @static + * @param {google.analytics.admin.v1alpha.IRunAccessReportResponse} message RunAccessReportResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RunAccessReportResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dimensionHeaders != null && message.dimensionHeaders.length) + for (var i = 0; i < message.dimensionHeaders.length; ++i) + $root.google.analytics.admin.v1alpha.AccessDimensionHeader.encode(message.dimensionHeaders[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.metricHeaders != null && message.metricHeaders.length) + for (var i = 0; i < message.metricHeaders.length; ++i) + $root.google.analytics.admin.v1alpha.AccessMetricHeader.encode(message.metricHeaders[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.rows != null && message.rows.length) + for (var i = 0; i < message.rows.length; ++i) + $root.google.analytics.admin.v1alpha.AccessRow.encode(message.rows[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.rowCount != null && Object.hasOwnProperty.call(message, "rowCount")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.rowCount); + if (message.quota != null && Object.hasOwnProperty.call(message, "quota")) + $root.google.analytics.admin.v1alpha.AccessQuota.encode(message.quota, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified RunAccessReportResponse message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.RunAccessReportResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.RunAccessReportResponse + * @static + * @param {google.analytics.admin.v1alpha.IRunAccessReportResponse} message RunAccessReportResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RunAccessReportResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RunAccessReportResponse message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.RunAccessReportResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.RunAccessReportResponse} RunAccessReportResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RunAccessReportResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.RunAccessReportResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.dimensionHeaders && message.dimensionHeaders.length)) + message.dimensionHeaders = []; + message.dimensionHeaders.push($root.google.analytics.admin.v1alpha.AccessDimensionHeader.decode(reader, reader.uint32())); + break; + } + case 2: { + if (!(message.metricHeaders && message.metricHeaders.length)) + message.metricHeaders = []; + message.metricHeaders.push($root.google.analytics.admin.v1alpha.AccessMetricHeader.decode(reader, reader.uint32())); + break; + } + case 3: { + if (!(message.rows && message.rows.length)) + message.rows = []; + message.rows.push($root.google.analytics.admin.v1alpha.AccessRow.decode(reader, reader.uint32())); + break; + } + case 4: { + message.rowCount = reader.int32(); + break; + } + case 5: { + message.quota = $root.google.analytics.admin.v1alpha.AccessQuota.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RunAccessReportResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.RunAccessReportResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.RunAccessReportResponse} RunAccessReportResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RunAccessReportResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RunAccessReportResponse message. + * @function verify + * @memberof google.analytics.admin.v1alpha.RunAccessReportResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RunAccessReportResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dimensionHeaders != null && message.hasOwnProperty("dimensionHeaders")) { + if (!Array.isArray(message.dimensionHeaders)) + return "dimensionHeaders: array expected"; + for (var i = 0; i < message.dimensionHeaders.length; ++i) { + var error = $root.google.analytics.admin.v1alpha.AccessDimensionHeader.verify(message.dimensionHeaders[i]); + if (error) + return "dimensionHeaders." + error; + } + } + if (message.metricHeaders != null && message.hasOwnProperty("metricHeaders")) { + if (!Array.isArray(message.metricHeaders)) + return "metricHeaders: array expected"; + for (var i = 0; i < message.metricHeaders.length; ++i) { + var error = $root.google.analytics.admin.v1alpha.AccessMetricHeader.verify(message.metricHeaders[i]); + if (error) + return "metricHeaders." + error; + } + } + if (message.rows != null && message.hasOwnProperty("rows")) { + if (!Array.isArray(message.rows)) + return "rows: array expected"; + for (var i = 0; i < message.rows.length; ++i) { + var error = $root.google.analytics.admin.v1alpha.AccessRow.verify(message.rows[i]); + if (error) + return "rows." + error; + } + } + if (message.rowCount != null && message.hasOwnProperty("rowCount")) + if (!$util.isInteger(message.rowCount)) + return "rowCount: integer expected"; + if (message.quota != null && message.hasOwnProperty("quota")) { + var error = $root.google.analytics.admin.v1alpha.AccessQuota.verify(message.quota); + if (error) + return "quota." + error; + } + return null; + }; + + /** + * Creates a RunAccessReportResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.RunAccessReportResponse + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.RunAccessReportResponse} RunAccessReportResponse + */ + RunAccessReportResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.RunAccessReportResponse) + return object; + var message = new $root.google.analytics.admin.v1alpha.RunAccessReportResponse(); + if (object.dimensionHeaders) { + if (!Array.isArray(object.dimensionHeaders)) + throw TypeError(".google.analytics.admin.v1alpha.RunAccessReportResponse.dimensionHeaders: array expected"); + message.dimensionHeaders = []; + for (var i = 0; i < object.dimensionHeaders.length; ++i) { + if (typeof object.dimensionHeaders[i] !== "object") + throw TypeError(".google.analytics.admin.v1alpha.RunAccessReportResponse.dimensionHeaders: object expected"); + message.dimensionHeaders[i] = $root.google.analytics.admin.v1alpha.AccessDimensionHeader.fromObject(object.dimensionHeaders[i]); + } + } + if (object.metricHeaders) { + if (!Array.isArray(object.metricHeaders)) + throw TypeError(".google.analytics.admin.v1alpha.RunAccessReportResponse.metricHeaders: array expected"); + message.metricHeaders = []; + for (var i = 0; i < object.metricHeaders.length; ++i) { + if (typeof object.metricHeaders[i] !== "object") + throw TypeError(".google.analytics.admin.v1alpha.RunAccessReportResponse.metricHeaders: object expected"); + message.metricHeaders[i] = $root.google.analytics.admin.v1alpha.AccessMetricHeader.fromObject(object.metricHeaders[i]); + } + } + if (object.rows) { + if (!Array.isArray(object.rows)) + throw TypeError(".google.analytics.admin.v1alpha.RunAccessReportResponse.rows: array expected"); + message.rows = []; + for (var i = 0; i < object.rows.length; ++i) { + if (typeof object.rows[i] !== "object") + throw TypeError(".google.analytics.admin.v1alpha.RunAccessReportResponse.rows: object expected"); + message.rows[i] = $root.google.analytics.admin.v1alpha.AccessRow.fromObject(object.rows[i]); + } + } + if (object.rowCount != null) + message.rowCount = object.rowCount | 0; + if (object.quota != null) { + if (typeof object.quota !== "object") + throw TypeError(".google.analytics.admin.v1alpha.RunAccessReportResponse.quota: object expected"); + message.quota = $root.google.analytics.admin.v1alpha.AccessQuota.fromObject(object.quota); + } + return message; + }; + + /** + * Creates a plain object from a RunAccessReportResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.RunAccessReportResponse + * @static + * @param {google.analytics.admin.v1alpha.RunAccessReportResponse} message RunAccessReportResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RunAccessReportResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.dimensionHeaders = []; + object.metricHeaders = []; + object.rows = []; + } + if (options.defaults) { + object.rowCount = 0; + object.quota = null; + } + if (message.dimensionHeaders && message.dimensionHeaders.length) { + object.dimensionHeaders = []; + for (var j = 0; j < message.dimensionHeaders.length; ++j) + object.dimensionHeaders[j] = $root.google.analytics.admin.v1alpha.AccessDimensionHeader.toObject(message.dimensionHeaders[j], options); + } + if (message.metricHeaders && message.metricHeaders.length) { + object.metricHeaders = []; + for (var j = 0; j < message.metricHeaders.length; ++j) + object.metricHeaders[j] = $root.google.analytics.admin.v1alpha.AccessMetricHeader.toObject(message.metricHeaders[j], options); + } + if (message.rows && message.rows.length) { + object.rows = []; + for (var j = 0; j < message.rows.length; ++j) + object.rows[j] = $root.google.analytics.admin.v1alpha.AccessRow.toObject(message.rows[j], options); + } + if (message.rowCount != null && message.hasOwnProperty("rowCount")) + object.rowCount = message.rowCount; + if (message.quota != null && message.hasOwnProperty("quota")) + object.quota = $root.google.analytics.admin.v1alpha.AccessQuota.toObject(message.quota, options); + return object; + }; + + /** + * Converts this RunAccessReportResponse to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.RunAccessReportResponse + * @instance + * @returns {Object.} JSON object + */ + RunAccessReportResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RunAccessReportResponse + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.RunAccessReportResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RunAccessReportResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.RunAccessReportResponse"; + }; + + return RunAccessReportResponse; + })(); + + v1alpha.GetAccountRequest = (function() { + + /** + * Properties of a GetAccountRequest. + * @memberof google.analytics.admin.v1alpha + * @interface IGetAccountRequest + * @property {string|null} [name] GetAccountRequest name + */ + + /** + * Constructs a new GetAccountRequest. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents a GetAccountRequest. + * @implements IGetAccountRequest + * @constructor + * @param {google.analytics.admin.v1alpha.IGetAccountRequest=} [properties] Properties to set + */ + function GetAccountRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetAccountRequest name. + * @member {string} name + * @memberof google.analytics.admin.v1alpha.GetAccountRequest + * @instance + */ + GetAccountRequest.prototype.name = ""; + + /** + * Creates a new GetAccountRequest instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.GetAccountRequest + * @static + * @param {google.analytics.admin.v1alpha.IGetAccountRequest=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.GetAccountRequest} GetAccountRequest instance + */ + GetAccountRequest.create = function create(properties) { + return new GetAccountRequest(properties); + }; + + /** + * Encodes the specified GetAccountRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.GetAccountRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.GetAccountRequest + * @static + * @param {google.analytics.admin.v1alpha.IGetAccountRequest} message GetAccountRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetAccountRequest.encode = function encode(message, writer) { + 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 GetAccountRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.GetAccountRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.GetAccountRequest + * @static + * @param {google.analytics.admin.v1alpha.IGetAccountRequest} message GetAccountRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetAccountRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetAccountRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.GetAccountRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.GetAccountRequest} GetAccountRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetAccountRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.GetAccountRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetAccountRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.GetAccountRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.GetAccountRequest} GetAccountRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetAccountRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetAccountRequest message. + * @function verify + * @memberof google.analytics.admin.v1alpha.GetAccountRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetAccountRequest.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 GetAccountRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.GetAccountRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.GetAccountRequest} GetAccountRequest + */ + GetAccountRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.GetAccountRequest) + return object; + var message = new $root.google.analytics.admin.v1alpha.GetAccountRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetAccountRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.GetAccountRequest + * @static + * @param {google.analytics.admin.v1alpha.GetAccountRequest} message GetAccountRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetAccountRequest.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 GetAccountRequest to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.GetAccountRequest + * @instance + * @returns {Object.} JSON object + */ + GetAccountRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetAccountRequest + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.GetAccountRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetAccountRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.GetAccountRequest"; + }; + + return GetAccountRequest; + })(); + + v1alpha.ListAccountsRequest = (function() { + + /** + * Properties of a ListAccountsRequest. + * @memberof google.analytics.admin.v1alpha + * @interface IListAccountsRequest + * @property {number|null} [pageSize] ListAccountsRequest pageSize + * @property {string|null} [pageToken] ListAccountsRequest pageToken + * @property {boolean|null} [showDeleted] ListAccountsRequest showDeleted + */ + + /** + * Constructs a new ListAccountsRequest. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents a ListAccountsRequest. + * @implements IListAccountsRequest + * @constructor + * @param {google.analytics.admin.v1alpha.IListAccountsRequest=} [properties] Properties to set + */ + function ListAccountsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListAccountsRequest pageSize. + * @member {number} pageSize + * @memberof google.analytics.admin.v1alpha.ListAccountsRequest + * @instance + */ + ListAccountsRequest.prototype.pageSize = 0; + + /** + * ListAccountsRequest pageToken. + * @member {string} pageToken + * @memberof google.analytics.admin.v1alpha.ListAccountsRequest + * @instance + */ + ListAccountsRequest.prototype.pageToken = ""; + + /** + * ListAccountsRequest showDeleted. + * @member {boolean} showDeleted + * @memberof google.analytics.admin.v1alpha.ListAccountsRequest + * @instance + */ + ListAccountsRequest.prototype.showDeleted = false; + + /** + * Creates a new ListAccountsRequest instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.ListAccountsRequest + * @static + * @param {google.analytics.admin.v1alpha.IListAccountsRequest=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.ListAccountsRequest} ListAccountsRequest instance + */ + ListAccountsRequest.create = function create(properties) { + return new ListAccountsRequest(properties); + }; + + /** + * Encodes the specified ListAccountsRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.ListAccountsRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.ListAccountsRequest + * @static + * @param {google.analytics.admin.v1alpha.IListAccountsRequest} message ListAccountsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListAccountsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.pageToken); + if (message.showDeleted != null && Object.hasOwnProperty.call(message, "showDeleted")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.showDeleted); + return writer; + }; + + /** + * Encodes the specified ListAccountsRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.ListAccountsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.ListAccountsRequest + * @static + * @param {google.analytics.admin.v1alpha.IListAccountsRequest} message ListAccountsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListAccountsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListAccountsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.ListAccountsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.ListAccountsRequest} ListAccountsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListAccountsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.ListAccountsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.pageSize = reader.int32(); + break; + } + case 2: { + message.pageToken = reader.string(); + break; + } + case 3: { + message.showDeleted = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListAccountsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.ListAccountsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.ListAccountsRequest} ListAccountsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListAccountsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListAccountsRequest message. + * @function verify + * @memberof google.analytics.admin.v1alpha.ListAccountsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListAccountsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object 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.showDeleted != null && message.hasOwnProperty("showDeleted")) + if (typeof message.showDeleted !== "boolean") + return "showDeleted: boolean expected"; + return null; + }; + + /** + * Creates a ListAccountsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.ListAccountsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.ListAccountsRequest} ListAccountsRequest + */ + ListAccountsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.ListAccountsRequest) + return object; + var message = new $root.google.analytics.admin.v1alpha.ListAccountsRequest(); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.showDeleted != null) + message.showDeleted = Boolean(object.showDeleted); + return message; + }; + + /** + * Creates a plain object from a ListAccountsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.ListAccountsRequest + * @static + * @param {google.analytics.admin.v1alpha.ListAccountsRequest} message ListAccountsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListAccountsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.pageSize = 0; + object.pageToken = ""; + object.showDeleted = false; + } + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.showDeleted != null && message.hasOwnProperty("showDeleted")) + object.showDeleted = message.showDeleted; + return object; + }; + + /** + * Converts this ListAccountsRequest to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.ListAccountsRequest + * @instance + * @returns {Object.} JSON object + */ + ListAccountsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListAccountsRequest + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.ListAccountsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListAccountsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.ListAccountsRequest"; + }; + + return ListAccountsRequest; + })(); + + v1alpha.ListAccountsResponse = (function() { + + /** + * Properties of a ListAccountsResponse. + * @memberof google.analytics.admin.v1alpha + * @interface IListAccountsResponse + * @property {Array.|null} [accounts] ListAccountsResponse accounts + * @property {string|null} [nextPageToken] ListAccountsResponse nextPageToken + */ + + /** + * Constructs a new ListAccountsResponse. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents a ListAccountsResponse. + * @implements IListAccountsResponse + * @constructor + * @param {google.analytics.admin.v1alpha.IListAccountsResponse=} [properties] Properties to set + */ + function ListAccountsResponse(properties) { + this.accounts = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListAccountsResponse accounts. + * @member {Array.} accounts + * @memberof google.analytics.admin.v1alpha.ListAccountsResponse + * @instance + */ + ListAccountsResponse.prototype.accounts = $util.emptyArray; + + /** + * ListAccountsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.analytics.admin.v1alpha.ListAccountsResponse + * @instance + */ + ListAccountsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListAccountsResponse instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.ListAccountsResponse + * @static + * @param {google.analytics.admin.v1alpha.IListAccountsResponse=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.ListAccountsResponse} ListAccountsResponse instance + */ + ListAccountsResponse.create = function create(properties) { + return new ListAccountsResponse(properties); + }; + + /** + * Encodes the specified ListAccountsResponse message. Does not implicitly {@link google.analytics.admin.v1alpha.ListAccountsResponse.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.ListAccountsResponse + * @static + * @param {google.analytics.admin.v1alpha.IListAccountsResponse} message ListAccountsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListAccountsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.accounts != null && message.accounts.length) + for (var i = 0; i < message.accounts.length; ++i) + $root.google.analytics.admin.v1alpha.Account.encode(message.accounts[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 ListAccountsResponse message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.ListAccountsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.ListAccountsResponse + * @static + * @param {google.analytics.admin.v1alpha.IListAccountsResponse} message ListAccountsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListAccountsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListAccountsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.ListAccountsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.ListAccountsResponse} ListAccountsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListAccountsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.ListAccountsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.accounts && message.accounts.length)) + message.accounts = []; + message.accounts.push($root.google.analytics.admin.v1alpha.Account.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListAccountsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.ListAccountsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.ListAccountsResponse} ListAccountsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListAccountsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListAccountsResponse message. + * @function verify + * @memberof google.analytics.admin.v1alpha.ListAccountsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListAccountsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.accounts != null && message.hasOwnProperty("accounts")) { + if (!Array.isArray(message.accounts)) + return "accounts: array expected"; + for (var i = 0; i < message.accounts.length; ++i) { + var error = $root.google.analytics.admin.v1alpha.Account.verify(message.accounts[i]); + if (error) + return "accounts." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListAccountsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.ListAccountsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.ListAccountsResponse} ListAccountsResponse + */ + ListAccountsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.ListAccountsResponse) + return object; + var message = new $root.google.analytics.admin.v1alpha.ListAccountsResponse(); + if (object.accounts) { + if (!Array.isArray(object.accounts)) + throw TypeError(".google.analytics.admin.v1alpha.ListAccountsResponse.accounts: array expected"); + message.accounts = []; + for (var i = 0; i < object.accounts.length; ++i) { + if (typeof object.accounts[i] !== "object") + throw TypeError(".google.analytics.admin.v1alpha.ListAccountsResponse.accounts: object expected"); + message.accounts[i] = $root.google.analytics.admin.v1alpha.Account.fromObject(object.accounts[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListAccountsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.ListAccountsResponse + * @static + * @param {google.analytics.admin.v1alpha.ListAccountsResponse} message ListAccountsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListAccountsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.accounts = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.accounts && message.accounts.length) { + object.accounts = []; + for (var j = 0; j < message.accounts.length; ++j) + object.accounts[j] = $root.google.analytics.admin.v1alpha.Account.toObject(message.accounts[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListAccountsResponse to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.ListAccountsResponse + * @instance + * @returns {Object.} JSON object + */ + ListAccountsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListAccountsResponse + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.ListAccountsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListAccountsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.ListAccountsResponse"; + }; + + return ListAccountsResponse; + })(); + + v1alpha.DeleteAccountRequest = (function() { + + /** + * Properties of a DeleteAccountRequest. + * @memberof google.analytics.admin.v1alpha + * @interface IDeleteAccountRequest + * @property {string|null} [name] DeleteAccountRequest name + */ + + /** + * Constructs a new DeleteAccountRequest. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents a DeleteAccountRequest. + * @implements IDeleteAccountRequest + * @constructor + * @param {google.analytics.admin.v1alpha.IDeleteAccountRequest=} [properties] Properties to set + */ + function DeleteAccountRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteAccountRequest name. + * @member {string} name + * @memberof google.analytics.admin.v1alpha.DeleteAccountRequest + * @instance + */ + DeleteAccountRequest.prototype.name = ""; + + /** + * Creates a new DeleteAccountRequest instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.DeleteAccountRequest + * @static + * @param {google.analytics.admin.v1alpha.IDeleteAccountRequest=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.DeleteAccountRequest} DeleteAccountRequest instance + */ + DeleteAccountRequest.create = function create(properties) { + return new DeleteAccountRequest(properties); + }; + + /** + * Encodes the specified DeleteAccountRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.DeleteAccountRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.DeleteAccountRequest + * @static + * @param {google.analytics.admin.v1alpha.IDeleteAccountRequest} message DeleteAccountRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteAccountRequest.encode = function encode(message, writer) { + 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 DeleteAccountRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.DeleteAccountRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.DeleteAccountRequest + * @static + * @param {google.analytics.admin.v1alpha.IDeleteAccountRequest} message DeleteAccountRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteAccountRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteAccountRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.DeleteAccountRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.DeleteAccountRequest} DeleteAccountRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteAccountRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.DeleteAccountRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteAccountRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.DeleteAccountRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.DeleteAccountRequest} DeleteAccountRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteAccountRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteAccountRequest message. + * @function verify + * @memberof google.analytics.admin.v1alpha.DeleteAccountRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteAccountRequest.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 DeleteAccountRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.DeleteAccountRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.DeleteAccountRequest} DeleteAccountRequest + */ + DeleteAccountRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.DeleteAccountRequest) + return object; + var message = new $root.google.analytics.admin.v1alpha.DeleteAccountRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteAccountRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.DeleteAccountRequest + * @static + * @param {google.analytics.admin.v1alpha.DeleteAccountRequest} message DeleteAccountRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteAccountRequest.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 DeleteAccountRequest to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.DeleteAccountRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteAccountRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteAccountRequest + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.DeleteAccountRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteAccountRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.DeleteAccountRequest"; + }; + + return DeleteAccountRequest; + })(); + + v1alpha.UpdateAccountRequest = (function() { + + /** + * Properties of an UpdateAccountRequest. + * @memberof google.analytics.admin.v1alpha + * @interface IUpdateAccountRequest + * @property {google.analytics.admin.v1alpha.IAccount|null} [account] UpdateAccountRequest account + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateAccountRequest updateMask + */ + + /** + * Constructs a new UpdateAccountRequest. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents an UpdateAccountRequest. + * @implements IUpdateAccountRequest + * @constructor + * @param {google.analytics.admin.v1alpha.IUpdateAccountRequest=} [properties] Properties to set + */ + function UpdateAccountRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateAccountRequest account. + * @member {google.analytics.admin.v1alpha.IAccount|null|undefined} account + * @memberof google.analytics.admin.v1alpha.UpdateAccountRequest + * @instance + */ + UpdateAccountRequest.prototype.account = null; + + /** + * UpdateAccountRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.analytics.admin.v1alpha.UpdateAccountRequest + * @instance + */ + UpdateAccountRequest.prototype.updateMask = null; + + /** + * Creates a new UpdateAccountRequest instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.UpdateAccountRequest + * @static + * @param {google.analytics.admin.v1alpha.IUpdateAccountRequest=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.UpdateAccountRequest} UpdateAccountRequest instance + */ + UpdateAccountRequest.create = function create(properties) { + return new UpdateAccountRequest(properties); + }; + + /** + * Encodes the specified UpdateAccountRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.UpdateAccountRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.UpdateAccountRequest + * @static + * @param {google.analytics.admin.v1alpha.IUpdateAccountRequest} message UpdateAccountRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateAccountRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.account != null && Object.hasOwnProperty.call(message, "account")) + $root.google.analytics.admin.v1alpha.Account.encode(message.account, 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 UpdateAccountRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.UpdateAccountRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.UpdateAccountRequest + * @static + * @param {google.analytics.admin.v1alpha.IUpdateAccountRequest} message UpdateAccountRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateAccountRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateAccountRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.UpdateAccountRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.UpdateAccountRequest} UpdateAccountRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateAccountRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.UpdateAccountRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.account = $root.google.analytics.admin.v1alpha.Account.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 UpdateAccountRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.UpdateAccountRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.UpdateAccountRequest} UpdateAccountRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateAccountRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateAccountRequest message. + * @function verify + * @memberof google.analytics.admin.v1alpha.UpdateAccountRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateAccountRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.account != null && message.hasOwnProperty("account")) { + var error = $root.google.analytics.admin.v1alpha.Account.verify(message.account); + if (error) + return "account." + 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 UpdateAccountRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.UpdateAccountRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.UpdateAccountRequest} UpdateAccountRequest + */ + UpdateAccountRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.UpdateAccountRequest) + return object; + var message = new $root.google.analytics.admin.v1alpha.UpdateAccountRequest(); + if (object.account != null) { + if (typeof object.account !== "object") + throw TypeError(".google.analytics.admin.v1alpha.UpdateAccountRequest.account: object expected"); + message.account = $root.google.analytics.admin.v1alpha.Account.fromObject(object.account); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.analytics.admin.v1alpha.UpdateAccountRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + return message; + }; + + /** + * Creates a plain object from an UpdateAccountRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.UpdateAccountRequest + * @static + * @param {google.analytics.admin.v1alpha.UpdateAccountRequest} message UpdateAccountRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateAccountRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.account = null; + object.updateMask = null; + } + if (message.account != null && message.hasOwnProperty("account")) + object.account = $root.google.analytics.admin.v1alpha.Account.toObject(message.account, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + return object; + }; + + /** + * Converts this UpdateAccountRequest to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.UpdateAccountRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateAccountRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateAccountRequest + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.UpdateAccountRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateAccountRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.UpdateAccountRequest"; + }; + + return UpdateAccountRequest; + })(); + + v1alpha.ProvisionAccountTicketRequest = (function() { + + /** + * Properties of a ProvisionAccountTicketRequest. + * @memberof google.analytics.admin.v1alpha + * @interface IProvisionAccountTicketRequest + * @property {google.analytics.admin.v1alpha.IAccount|null} [account] ProvisionAccountTicketRequest account + * @property {string|null} [redirectUri] ProvisionAccountTicketRequest redirectUri + */ + + /** + * Constructs a new ProvisionAccountTicketRequest. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents a ProvisionAccountTicketRequest. + * @implements IProvisionAccountTicketRequest + * @constructor + * @param {google.analytics.admin.v1alpha.IProvisionAccountTicketRequest=} [properties] Properties to set + */ + function ProvisionAccountTicketRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ProvisionAccountTicketRequest account. + * @member {google.analytics.admin.v1alpha.IAccount|null|undefined} account + * @memberof google.analytics.admin.v1alpha.ProvisionAccountTicketRequest + * @instance + */ + ProvisionAccountTicketRequest.prototype.account = null; + + /** + * ProvisionAccountTicketRequest redirectUri. + * @member {string} redirectUri + * @memberof google.analytics.admin.v1alpha.ProvisionAccountTicketRequest + * @instance + */ + ProvisionAccountTicketRequest.prototype.redirectUri = ""; + + /** + * Creates a new ProvisionAccountTicketRequest instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.ProvisionAccountTicketRequest + * @static + * @param {google.analytics.admin.v1alpha.IProvisionAccountTicketRequest=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.ProvisionAccountTicketRequest} ProvisionAccountTicketRequest instance + */ + ProvisionAccountTicketRequest.create = function create(properties) { + return new ProvisionAccountTicketRequest(properties); + }; + + /** + * Encodes the specified ProvisionAccountTicketRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.ProvisionAccountTicketRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.ProvisionAccountTicketRequest + * @static + * @param {google.analytics.admin.v1alpha.IProvisionAccountTicketRequest} message ProvisionAccountTicketRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ProvisionAccountTicketRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.account != null && Object.hasOwnProperty.call(message, "account")) + $root.google.analytics.admin.v1alpha.Account.encode(message.account, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.redirectUri != null && Object.hasOwnProperty.call(message, "redirectUri")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.redirectUri); + return writer; + }; + + /** + * Encodes the specified ProvisionAccountTicketRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.ProvisionAccountTicketRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.ProvisionAccountTicketRequest + * @static + * @param {google.analytics.admin.v1alpha.IProvisionAccountTicketRequest} message ProvisionAccountTicketRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ProvisionAccountTicketRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ProvisionAccountTicketRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.ProvisionAccountTicketRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.ProvisionAccountTicketRequest} ProvisionAccountTicketRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ProvisionAccountTicketRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.ProvisionAccountTicketRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.account = $root.google.analytics.admin.v1alpha.Account.decode(reader, reader.uint32()); + break; + } + case 2: { + message.redirectUri = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ProvisionAccountTicketRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.ProvisionAccountTicketRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.ProvisionAccountTicketRequest} ProvisionAccountTicketRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ProvisionAccountTicketRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ProvisionAccountTicketRequest message. + * @function verify + * @memberof google.analytics.admin.v1alpha.ProvisionAccountTicketRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ProvisionAccountTicketRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.account != null && message.hasOwnProperty("account")) { + var error = $root.google.analytics.admin.v1alpha.Account.verify(message.account); + if (error) + return "account." + error; + } + if (message.redirectUri != null && message.hasOwnProperty("redirectUri")) + if (!$util.isString(message.redirectUri)) + return "redirectUri: string expected"; + return null; + }; + + /** + * Creates a ProvisionAccountTicketRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.ProvisionAccountTicketRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.ProvisionAccountTicketRequest} ProvisionAccountTicketRequest + */ + ProvisionAccountTicketRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.ProvisionAccountTicketRequest) + return object; + var message = new $root.google.analytics.admin.v1alpha.ProvisionAccountTicketRequest(); + if (object.account != null) { + if (typeof object.account !== "object") + throw TypeError(".google.analytics.admin.v1alpha.ProvisionAccountTicketRequest.account: object expected"); + message.account = $root.google.analytics.admin.v1alpha.Account.fromObject(object.account); + } + if (object.redirectUri != null) + message.redirectUri = String(object.redirectUri); + return message; + }; + + /** + * Creates a plain object from a ProvisionAccountTicketRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.ProvisionAccountTicketRequest + * @static + * @param {google.analytics.admin.v1alpha.ProvisionAccountTicketRequest} message ProvisionAccountTicketRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ProvisionAccountTicketRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.account = null; + object.redirectUri = ""; + } + if (message.account != null && message.hasOwnProperty("account")) + object.account = $root.google.analytics.admin.v1alpha.Account.toObject(message.account, options); + if (message.redirectUri != null && message.hasOwnProperty("redirectUri")) + object.redirectUri = message.redirectUri; + return object; + }; + + /** + * Converts this ProvisionAccountTicketRequest to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.ProvisionAccountTicketRequest + * @instance + * @returns {Object.} JSON object + */ + ProvisionAccountTicketRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ProvisionAccountTicketRequest + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.ProvisionAccountTicketRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ProvisionAccountTicketRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.ProvisionAccountTicketRequest"; + }; + + return ProvisionAccountTicketRequest; + })(); + + v1alpha.ProvisionAccountTicketResponse = (function() { + + /** + * Properties of a ProvisionAccountTicketResponse. + * @memberof google.analytics.admin.v1alpha + * @interface IProvisionAccountTicketResponse + * @property {string|null} [accountTicketId] ProvisionAccountTicketResponse accountTicketId + */ + + /** + * Constructs a new ProvisionAccountTicketResponse. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents a ProvisionAccountTicketResponse. + * @implements IProvisionAccountTicketResponse + * @constructor + * @param {google.analytics.admin.v1alpha.IProvisionAccountTicketResponse=} [properties] Properties to set + */ + function ProvisionAccountTicketResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ProvisionAccountTicketResponse accountTicketId. + * @member {string} accountTicketId + * @memberof google.analytics.admin.v1alpha.ProvisionAccountTicketResponse + * @instance + */ + ProvisionAccountTicketResponse.prototype.accountTicketId = ""; + + /** + * Creates a new ProvisionAccountTicketResponse instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.ProvisionAccountTicketResponse + * @static + * @param {google.analytics.admin.v1alpha.IProvisionAccountTicketResponse=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.ProvisionAccountTicketResponse} ProvisionAccountTicketResponse instance + */ + ProvisionAccountTicketResponse.create = function create(properties) { + return new ProvisionAccountTicketResponse(properties); + }; + + /** + * Encodes the specified ProvisionAccountTicketResponse message. Does not implicitly {@link google.analytics.admin.v1alpha.ProvisionAccountTicketResponse.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.ProvisionAccountTicketResponse + * @static + * @param {google.analytics.admin.v1alpha.IProvisionAccountTicketResponse} message ProvisionAccountTicketResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ProvisionAccountTicketResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.accountTicketId != null && Object.hasOwnProperty.call(message, "accountTicketId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.accountTicketId); + return writer; + }; + + /** + * Encodes the specified ProvisionAccountTicketResponse message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.ProvisionAccountTicketResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.ProvisionAccountTicketResponse + * @static + * @param {google.analytics.admin.v1alpha.IProvisionAccountTicketResponse} message ProvisionAccountTicketResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ProvisionAccountTicketResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ProvisionAccountTicketResponse message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.ProvisionAccountTicketResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.ProvisionAccountTicketResponse} ProvisionAccountTicketResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ProvisionAccountTicketResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.ProvisionAccountTicketResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.accountTicketId = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ProvisionAccountTicketResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.ProvisionAccountTicketResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.ProvisionAccountTicketResponse} ProvisionAccountTicketResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ProvisionAccountTicketResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ProvisionAccountTicketResponse message. + * @function verify + * @memberof google.analytics.admin.v1alpha.ProvisionAccountTicketResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ProvisionAccountTicketResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.accountTicketId != null && message.hasOwnProperty("accountTicketId")) + if (!$util.isString(message.accountTicketId)) + return "accountTicketId: string expected"; + return null; + }; + + /** + * Creates a ProvisionAccountTicketResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.ProvisionAccountTicketResponse + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.ProvisionAccountTicketResponse} ProvisionAccountTicketResponse + */ + ProvisionAccountTicketResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.ProvisionAccountTicketResponse) + return object; + var message = new $root.google.analytics.admin.v1alpha.ProvisionAccountTicketResponse(); + if (object.accountTicketId != null) + message.accountTicketId = String(object.accountTicketId); + return message; + }; + + /** + * Creates a plain object from a ProvisionAccountTicketResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.ProvisionAccountTicketResponse + * @static + * @param {google.analytics.admin.v1alpha.ProvisionAccountTicketResponse} message ProvisionAccountTicketResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ProvisionAccountTicketResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.accountTicketId = ""; + if (message.accountTicketId != null && message.hasOwnProperty("accountTicketId")) + object.accountTicketId = message.accountTicketId; + return object; + }; + + /** + * Converts this ProvisionAccountTicketResponse to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.ProvisionAccountTicketResponse + * @instance + * @returns {Object.} JSON object + */ + ProvisionAccountTicketResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ProvisionAccountTicketResponse + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.ProvisionAccountTicketResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ProvisionAccountTicketResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.ProvisionAccountTicketResponse"; + }; + + return ProvisionAccountTicketResponse; + })(); + + v1alpha.GetPropertyRequest = (function() { + + /** + * Properties of a GetPropertyRequest. + * @memberof google.analytics.admin.v1alpha + * @interface IGetPropertyRequest + * @property {string|null} [name] GetPropertyRequest name + */ + + /** + * Constructs a new GetPropertyRequest. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents a GetPropertyRequest. + * @implements IGetPropertyRequest + * @constructor + * @param {google.analytics.admin.v1alpha.IGetPropertyRequest=} [properties] Properties to set + */ + function GetPropertyRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetPropertyRequest name. + * @member {string} name + * @memberof google.analytics.admin.v1alpha.GetPropertyRequest + * @instance + */ + GetPropertyRequest.prototype.name = ""; + + /** + * Creates a new GetPropertyRequest instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.GetPropertyRequest + * @static + * @param {google.analytics.admin.v1alpha.IGetPropertyRequest=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.GetPropertyRequest} GetPropertyRequest instance + */ + GetPropertyRequest.create = function create(properties) { + return new GetPropertyRequest(properties); + }; + + /** + * Encodes the specified GetPropertyRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.GetPropertyRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.GetPropertyRequest + * @static + * @param {google.analytics.admin.v1alpha.IGetPropertyRequest} message GetPropertyRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetPropertyRequest.encode = function encode(message, writer) { + 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 GetPropertyRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.GetPropertyRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.GetPropertyRequest + * @static + * @param {google.analytics.admin.v1alpha.IGetPropertyRequest} message GetPropertyRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetPropertyRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetPropertyRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.GetPropertyRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.GetPropertyRequest} GetPropertyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetPropertyRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.GetPropertyRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetPropertyRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.GetPropertyRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.GetPropertyRequest} GetPropertyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetPropertyRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetPropertyRequest message. + * @function verify + * @memberof google.analytics.admin.v1alpha.GetPropertyRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetPropertyRequest.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 GetPropertyRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.GetPropertyRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.GetPropertyRequest} GetPropertyRequest + */ + GetPropertyRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.GetPropertyRequest) + return object; + var message = new $root.google.analytics.admin.v1alpha.GetPropertyRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetPropertyRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.GetPropertyRequest + * @static + * @param {google.analytics.admin.v1alpha.GetPropertyRequest} message GetPropertyRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetPropertyRequest.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 GetPropertyRequest to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.GetPropertyRequest + * @instance + * @returns {Object.} JSON object + */ + GetPropertyRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetPropertyRequest + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.GetPropertyRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetPropertyRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.GetPropertyRequest"; + }; + + return GetPropertyRequest; + })(); + + v1alpha.ListPropertiesRequest = (function() { + + /** + * Properties of a ListPropertiesRequest. + * @memberof google.analytics.admin.v1alpha + * @interface IListPropertiesRequest + * @property {string|null} [filter] ListPropertiesRequest filter + * @property {number|null} [pageSize] ListPropertiesRequest pageSize + * @property {string|null} [pageToken] ListPropertiesRequest pageToken + * @property {boolean|null} [showDeleted] ListPropertiesRequest showDeleted + */ + + /** + * Constructs a new ListPropertiesRequest. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents a ListPropertiesRequest. + * @implements IListPropertiesRequest + * @constructor + * @param {google.analytics.admin.v1alpha.IListPropertiesRequest=} [properties] Properties to set + */ + function ListPropertiesRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListPropertiesRequest filter. + * @member {string} filter + * @memberof google.analytics.admin.v1alpha.ListPropertiesRequest + * @instance + */ + ListPropertiesRequest.prototype.filter = ""; + + /** + * ListPropertiesRequest pageSize. + * @member {number} pageSize + * @memberof google.analytics.admin.v1alpha.ListPropertiesRequest + * @instance + */ + ListPropertiesRequest.prototype.pageSize = 0; + + /** + * ListPropertiesRequest pageToken. + * @member {string} pageToken + * @memberof google.analytics.admin.v1alpha.ListPropertiesRequest + * @instance + */ + ListPropertiesRequest.prototype.pageToken = ""; + + /** + * ListPropertiesRequest showDeleted. + * @member {boolean} showDeleted + * @memberof google.analytics.admin.v1alpha.ListPropertiesRequest + * @instance + */ + ListPropertiesRequest.prototype.showDeleted = false; + + /** + * Creates a new ListPropertiesRequest instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.ListPropertiesRequest + * @static + * @param {google.analytics.admin.v1alpha.IListPropertiesRequest=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.ListPropertiesRequest} ListPropertiesRequest instance + */ + ListPropertiesRequest.create = function create(properties) { + return new ListPropertiesRequest(properties); + }; + + /** + * Encodes the specified ListPropertiesRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.ListPropertiesRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.ListPropertiesRequest + * @static + * @param {google.analytics.admin.v1alpha.IListPropertiesRequest} message ListPropertiesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListPropertiesRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.filter); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.showDeleted != null && Object.hasOwnProperty.call(message, "showDeleted")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.showDeleted); + return writer; + }; + + /** + * Encodes the specified ListPropertiesRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.ListPropertiesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.ListPropertiesRequest + * @static + * @param {google.analytics.admin.v1alpha.IListPropertiesRequest} message ListPropertiesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListPropertiesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListPropertiesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.ListPropertiesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.ListPropertiesRequest} ListPropertiesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListPropertiesRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.ListPropertiesRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.filter = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + case 4: { + message.showDeleted = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListPropertiesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.ListPropertiesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.ListPropertiesRequest} ListPropertiesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListPropertiesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListPropertiesRequest message. + * @function verify + * @memberof google.analytics.admin.v1alpha.ListPropertiesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListPropertiesRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.showDeleted != null && message.hasOwnProperty("showDeleted")) + if (typeof message.showDeleted !== "boolean") + return "showDeleted: boolean expected"; + return null; + }; + + /** + * Creates a ListPropertiesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.ListPropertiesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.ListPropertiesRequest} ListPropertiesRequest + */ + ListPropertiesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.ListPropertiesRequest) + return object; + var message = new $root.google.analytics.admin.v1alpha.ListPropertiesRequest(); + if (object.filter != null) + message.filter = String(object.filter); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.showDeleted != null) + message.showDeleted = Boolean(object.showDeleted); + return message; + }; + + /** + * Creates a plain object from a ListPropertiesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.ListPropertiesRequest + * @static + * @param {google.analytics.admin.v1alpha.ListPropertiesRequest} message ListPropertiesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListPropertiesRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.filter = ""; + object.pageSize = 0; + object.pageToken = ""; + object.showDeleted = false; + } + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.showDeleted != null && message.hasOwnProperty("showDeleted")) + object.showDeleted = message.showDeleted; + return object; + }; + + /** + * Converts this ListPropertiesRequest to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.ListPropertiesRequest + * @instance + * @returns {Object.} JSON object + */ + ListPropertiesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListPropertiesRequest + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.ListPropertiesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListPropertiesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.ListPropertiesRequest"; + }; + + return ListPropertiesRequest; + })(); + + v1alpha.ListPropertiesResponse = (function() { + + /** + * Properties of a ListPropertiesResponse. + * @memberof google.analytics.admin.v1alpha + * @interface IListPropertiesResponse + * @property {Array.|null} [properties] ListPropertiesResponse properties + * @property {string|null} [nextPageToken] ListPropertiesResponse nextPageToken + */ + + /** + * Constructs a new ListPropertiesResponse. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents a ListPropertiesResponse. + * @implements IListPropertiesResponse + * @constructor + * @param {google.analytics.admin.v1alpha.IListPropertiesResponse=} [properties] Properties to set + */ + function ListPropertiesResponse(properties) { + this.properties = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListPropertiesResponse properties. + * @member {Array.} properties + * @memberof google.analytics.admin.v1alpha.ListPropertiesResponse + * @instance + */ + ListPropertiesResponse.prototype.properties = $util.emptyArray; + + /** + * ListPropertiesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.analytics.admin.v1alpha.ListPropertiesResponse + * @instance + */ + ListPropertiesResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListPropertiesResponse instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.ListPropertiesResponse + * @static + * @param {google.analytics.admin.v1alpha.IListPropertiesResponse=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.ListPropertiesResponse} ListPropertiesResponse instance + */ + ListPropertiesResponse.create = function create(properties) { + return new ListPropertiesResponse(properties); + }; + + /** + * Encodes the specified ListPropertiesResponse message. Does not implicitly {@link google.analytics.admin.v1alpha.ListPropertiesResponse.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.ListPropertiesResponse + * @static + * @param {google.analytics.admin.v1alpha.IListPropertiesResponse} message ListPropertiesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListPropertiesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.properties != null && message.properties.length) + for (var i = 0; i < message.properties.length; ++i) + $root.google.analytics.admin.v1alpha.Property.encode(message.properties[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 ListPropertiesResponse message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.ListPropertiesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.ListPropertiesResponse + * @static + * @param {google.analytics.admin.v1alpha.IListPropertiesResponse} message ListPropertiesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListPropertiesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListPropertiesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.ListPropertiesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.ListPropertiesResponse} ListPropertiesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListPropertiesResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.ListPropertiesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.properties && message.properties.length)) + message.properties = []; + message.properties.push($root.google.analytics.admin.v1alpha.Property.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListPropertiesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.ListPropertiesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.ListPropertiesResponse} ListPropertiesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListPropertiesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListPropertiesResponse message. + * @function verify + * @memberof google.analytics.admin.v1alpha.ListPropertiesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListPropertiesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.properties != null && message.hasOwnProperty("properties")) { + if (!Array.isArray(message.properties)) + return "properties: array expected"; + for (var i = 0; i < message.properties.length; ++i) { + var error = $root.google.analytics.admin.v1alpha.Property.verify(message.properties[i]); + if (error) + return "properties." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListPropertiesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.ListPropertiesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.ListPropertiesResponse} ListPropertiesResponse + */ + ListPropertiesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.ListPropertiesResponse) + return object; + var message = new $root.google.analytics.admin.v1alpha.ListPropertiesResponse(); + if (object.properties) { + if (!Array.isArray(object.properties)) + throw TypeError(".google.analytics.admin.v1alpha.ListPropertiesResponse.properties: array expected"); + message.properties = []; + for (var i = 0; i < object.properties.length; ++i) { + if (typeof object.properties[i] !== "object") + throw TypeError(".google.analytics.admin.v1alpha.ListPropertiesResponse.properties: object expected"); + message.properties[i] = $root.google.analytics.admin.v1alpha.Property.fromObject(object.properties[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListPropertiesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.ListPropertiesResponse + * @static + * @param {google.analytics.admin.v1alpha.ListPropertiesResponse} message ListPropertiesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListPropertiesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.properties = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.properties && message.properties.length) { + object.properties = []; + for (var j = 0; j < message.properties.length; ++j) + object.properties[j] = $root.google.analytics.admin.v1alpha.Property.toObject(message.properties[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListPropertiesResponse to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.ListPropertiesResponse + * @instance + * @returns {Object.} JSON object + */ + ListPropertiesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListPropertiesResponse + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.ListPropertiesResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListPropertiesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.ListPropertiesResponse"; + }; + + return ListPropertiesResponse; + })(); + + v1alpha.UpdatePropertyRequest = (function() { + + /** + * Properties of an UpdatePropertyRequest. + * @memberof google.analytics.admin.v1alpha + * @interface IUpdatePropertyRequest + * @property {google.analytics.admin.v1alpha.IProperty|null} [property] UpdatePropertyRequest property + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdatePropertyRequest updateMask + */ + + /** + * Constructs a new UpdatePropertyRequest. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents an UpdatePropertyRequest. + * @implements IUpdatePropertyRequest + * @constructor + * @param {google.analytics.admin.v1alpha.IUpdatePropertyRequest=} [properties] Properties to set + */ + function UpdatePropertyRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdatePropertyRequest property. + * @member {google.analytics.admin.v1alpha.IProperty|null|undefined} property + * @memberof google.analytics.admin.v1alpha.UpdatePropertyRequest + * @instance + */ + UpdatePropertyRequest.prototype.property = null; + + /** + * UpdatePropertyRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.analytics.admin.v1alpha.UpdatePropertyRequest + * @instance + */ + UpdatePropertyRequest.prototype.updateMask = null; + + /** + * Creates a new UpdatePropertyRequest instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.UpdatePropertyRequest + * @static + * @param {google.analytics.admin.v1alpha.IUpdatePropertyRequest=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.UpdatePropertyRequest} UpdatePropertyRequest instance + */ + UpdatePropertyRequest.create = function create(properties) { + return new UpdatePropertyRequest(properties); + }; + + /** + * Encodes the specified UpdatePropertyRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.UpdatePropertyRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.UpdatePropertyRequest + * @static + * @param {google.analytics.admin.v1alpha.IUpdatePropertyRequest} message UpdatePropertyRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdatePropertyRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.property != null && Object.hasOwnProperty.call(message, "property")) + $root.google.analytics.admin.v1alpha.Property.encode(message.property, 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 UpdatePropertyRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.UpdatePropertyRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.UpdatePropertyRequest + * @static + * @param {google.analytics.admin.v1alpha.IUpdatePropertyRequest} message UpdatePropertyRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdatePropertyRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdatePropertyRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.UpdatePropertyRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.UpdatePropertyRequest} UpdatePropertyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdatePropertyRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.UpdatePropertyRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.property = $root.google.analytics.admin.v1alpha.Property.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 UpdatePropertyRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.UpdatePropertyRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.UpdatePropertyRequest} UpdatePropertyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdatePropertyRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdatePropertyRequest message. + * @function verify + * @memberof google.analytics.admin.v1alpha.UpdatePropertyRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdatePropertyRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.property != null && message.hasOwnProperty("property")) { + var error = $root.google.analytics.admin.v1alpha.Property.verify(message.property); + if (error) + return "property." + 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 UpdatePropertyRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.UpdatePropertyRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.UpdatePropertyRequest} UpdatePropertyRequest + */ + UpdatePropertyRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.UpdatePropertyRequest) + return object; + var message = new $root.google.analytics.admin.v1alpha.UpdatePropertyRequest(); + if (object.property != null) { + if (typeof object.property !== "object") + throw TypeError(".google.analytics.admin.v1alpha.UpdatePropertyRequest.property: object expected"); + message.property = $root.google.analytics.admin.v1alpha.Property.fromObject(object.property); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.analytics.admin.v1alpha.UpdatePropertyRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + return message; + }; + + /** + * Creates a plain object from an UpdatePropertyRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.UpdatePropertyRequest + * @static + * @param {google.analytics.admin.v1alpha.UpdatePropertyRequest} message UpdatePropertyRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdatePropertyRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.property = null; + object.updateMask = null; + } + if (message.property != null && message.hasOwnProperty("property")) + object.property = $root.google.analytics.admin.v1alpha.Property.toObject(message.property, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + return object; + }; + + /** + * Converts this UpdatePropertyRequest to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.UpdatePropertyRequest + * @instance + * @returns {Object.} JSON object + */ + UpdatePropertyRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdatePropertyRequest + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.UpdatePropertyRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdatePropertyRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.UpdatePropertyRequest"; + }; + + return UpdatePropertyRequest; + })(); + + v1alpha.CreatePropertyRequest = (function() { + + /** + * Properties of a CreatePropertyRequest. + * @memberof google.analytics.admin.v1alpha + * @interface ICreatePropertyRequest + * @property {google.analytics.admin.v1alpha.IProperty|null} [property] CreatePropertyRequest property + */ + + /** + * Constructs a new CreatePropertyRequest. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents a CreatePropertyRequest. + * @implements ICreatePropertyRequest + * @constructor + * @param {google.analytics.admin.v1alpha.ICreatePropertyRequest=} [properties] Properties to set + */ + function CreatePropertyRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreatePropertyRequest property. + * @member {google.analytics.admin.v1alpha.IProperty|null|undefined} property + * @memberof google.analytics.admin.v1alpha.CreatePropertyRequest + * @instance + */ + CreatePropertyRequest.prototype.property = null; + + /** + * Creates a new CreatePropertyRequest instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.CreatePropertyRequest + * @static + * @param {google.analytics.admin.v1alpha.ICreatePropertyRequest=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.CreatePropertyRequest} CreatePropertyRequest instance + */ + CreatePropertyRequest.create = function create(properties) { + return new CreatePropertyRequest(properties); + }; + + /** + * Encodes the specified CreatePropertyRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.CreatePropertyRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.CreatePropertyRequest + * @static + * @param {google.analytics.admin.v1alpha.ICreatePropertyRequest} message CreatePropertyRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreatePropertyRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.property != null && Object.hasOwnProperty.call(message, "property")) + $root.google.analytics.admin.v1alpha.Property.encode(message.property, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CreatePropertyRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.CreatePropertyRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.CreatePropertyRequest + * @static + * @param {google.analytics.admin.v1alpha.ICreatePropertyRequest} message CreatePropertyRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreatePropertyRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreatePropertyRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.CreatePropertyRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.CreatePropertyRequest} CreatePropertyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreatePropertyRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.CreatePropertyRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.property = $root.google.analytics.admin.v1alpha.Property.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreatePropertyRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.CreatePropertyRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.CreatePropertyRequest} CreatePropertyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreatePropertyRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreatePropertyRequest message. + * @function verify + * @memberof google.analytics.admin.v1alpha.CreatePropertyRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreatePropertyRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.property != null && message.hasOwnProperty("property")) { + var error = $root.google.analytics.admin.v1alpha.Property.verify(message.property); + if (error) + return "property." + error; + } + return null; + }; + + /** + * Creates a CreatePropertyRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.CreatePropertyRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.CreatePropertyRequest} CreatePropertyRequest + */ + CreatePropertyRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.CreatePropertyRequest) + return object; + var message = new $root.google.analytics.admin.v1alpha.CreatePropertyRequest(); + if (object.property != null) { + if (typeof object.property !== "object") + throw TypeError(".google.analytics.admin.v1alpha.CreatePropertyRequest.property: object expected"); + message.property = $root.google.analytics.admin.v1alpha.Property.fromObject(object.property); + } + return message; + }; + + /** + * Creates a plain object from a CreatePropertyRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.CreatePropertyRequest + * @static + * @param {google.analytics.admin.v1alpha.CreatePropertyRequest} message CreatePropertyRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreatePropertyRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.property = null; + if (message.property != null && message.hasOwnProperty("property")) + object.property = $root.google.analytics.admin.v1alpha.Property.toObject(message.property, options); + return object; + }; + + /** + * Converts this CreatePropertyRequest to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.CreatePropertyRequest + * @instance + * @returns {Object.} JSON object + */ + CreatePropertyRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreatePropertyRequest + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.CreatePropertyRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreatePropertyRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.CreatePropertyRequest"; + }; + + return CreatePropertyRequest; + })(); + + v1alpha.DeletePropertyRequest = (function() { + + /** + * Properties of a DeletePropertyRequest. + * @memberof google.analytics.admin.v1alpha + * @interface IDeletePropertyRequest + * @property {string|null} [name] DeletePropertyRequest name + */ + + /** + * Constructs a new DeletePropertyRequest. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents a DeletePropertyRequest. + * @implements IDeletePropertyRequest + * @constructor + * @param {google.analytics.admin.v1alpha.IDeletePropertyRequest=} [properties] Properties to set + */ + function DeletePropertyRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeletePropertyRequest name. + * @member {string} name + * @memberof google.analytics.admin.v1alpha.DeletePropertyRequest + * @instance + */ + DeletePropertyRequest.prototype.name = ""; + + /** + * Creates a new DeletePropertyRequest instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.DeletePropertyRequest + * @static + * @param {google.analytics.admin.v1alpha.IDeletePropertyRequest=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.DeletePropertyRequest} DeletePropertyRequest instance + */ + DeletePropertyRequest.create = function create(properties) { + return new DeletePropertyRequest(properties); + }; + + /** + * Encodes the specified DeletePropertyRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.DeletePropertyRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.DeletePropertyRequest + * @static + * @param {google.analytics.admin.v1alpha.IDeletePropertyRequest} message DeletePropertyRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeletePropertyRequest.encode = function encode(message, writer) { + 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 DeletePropertyRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.DeletePropertyRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.DeletePropertyRequest + * @static + * @param {google.analytics.admin.v1alpha.IDeletePropertyRequest} message DeletePropertyRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeletePropertyRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeletePropertyRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.DeletePropertyRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.DeletePropertyRequest} DeletePropertyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeletePropertyRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.DeletePropertyRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeletePropertyRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.DeletePropertyRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.DeletePropertyRequest} DeletePropertyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeletePropertyRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeletePropertyRequest message. + * @function verify + * @memberof google.analytics.admin.v1alpha.DeletePropertyRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeletePropertyRequest.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 DeletePropertyRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.DeletePropertyRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.DeletePropertyRequest} DeletePropertyRequest + */ + DeletePropertyRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.DeletePropertyRequest) + return object; + var message = new $root.google.analytics.admin.v1alpha.DeletePropertyRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeletePropertyRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.DeletePropertyRequest + * @static + * @param {google.analytics.admin.v1alpha.DeletePropertyRequest} message DeletePropertyRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeletePropertyRequest.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 DeletePropertyRequest to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.DeletePropertyRequest + * @instance + * @returns {Object.} JSON object + */ + DeletePropertyRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeletePropertyRequest + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.DeletePropertyRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeletePropertyRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.DeletePropertyRequest"; + }; + + return DeletePropertyRequest; + })(); + + v1alpha.GetUserLinkRequest = (function() { + + /** + * Properties of a GetUserLinkRequest. + * @memberof google.analytics.admin.v1alpha + * @interface IGetUserLinkRequest + * @property {string|null} [name] GetUserLinkRequest name + */ + + /** + * Constructs a new GetUserLinkRequest. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents a GetUserLinkRequest. + * @implements IGetUserLinkRequest + * @constructor + * @param {google.analytics.admin.v1alpha.IGetUserLinkRequest=} [properties] Properties to set + */ + function GetUserLinkRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetUserLinkRequest name. + * @member {string} name + * @memberof google.analytics.admin.v1alpha.GetUserLinkRequest + * @instance + */ + GetUserLinkRequest.prototype.name = ""; + + /** + * Creates a new GetUserLinkRequest instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.GetUserLinkRequest + * @static + * @param {google.analytics.admin.v1alpha.IGetUserLinkRequest=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.GetUserLinkRequest} GetUserLinkRequest instance + */ + GetUserLinkRequest.create = function create(properties) { + return new GetUserLinkRequest(properties); + }; + + /** + * Encodes the specified GetUserLinkRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.GetUserLinkRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.GetUserLinkRequest + * @static + * @param {google.analytics.admin.v1alpha.IGetUserLinkRequest} message GetUserLinkRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetUserLinkRequest.encode = function encode(message, writer) { + 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 GetUserLinkRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.GetUserLinkRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.GetUserLinkRequest + * @static + * @param {google.analytics.admin.v1alpha.IGetUserLinkRequest} message GetUserLinkRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetUserLinkRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetUserLinkRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.GetUserLinkRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.GetUserLinkRequest} GetUserLinkRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetUserLinkRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.GetUserLinkRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetUserLinkRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.GetUserLinkRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.GetUserLinkRequest} GetUserLinkRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetUserLinkRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetUserLinkRequest message. + * @function verify + * @memberof google.analytics.admin.v1alpha.GetUserLinkRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetUserLinkRequest.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 GetUserLinkRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.GetUserLinkRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.GetUserLinkRequest} GetUserLinkRequest + */ + GetUserLinkRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.GetUserLinkRequest) + return object; + var message = new $root.google.analytics.admin.v1alpha.GetUserLinkRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetUserLinkRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.GetUserLinkRequest + * @static + * @param {google.analytics.admin.v1alpha.GetUserLinkRequest} message GetUserLinkRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetUserLinkRequest.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 GetUserLinkRequest to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.GetUserLinkRequest + * @instance + * @returns {Object.} JSON object + */ + GetUserLinkRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetUserLinkRequest + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.GetUserLinkRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetUserLinkRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.GetUserLinkRequest"; + }; + + return GetUserLinkRequest; + })(); + + v1alpha.BatchGetUserLinksRequest = (function() { + + /** + * Properties of a BatchGetUserLinksRequest. + * @memberof google.analytics.admin.v1alpha + * @interface IBatchGetUserLinksRequest + * @property {string|null} [parent] BatchGetUserLinksRequest parent + * @property {Array.|null} [names] BatchGetUserLinksRequest names + */ + + /** + * Constructs a new BatchGetUserLinksRequest. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents a BatchGetUserLinksRequest. + * @implements IBatchGetUserLinksRequest + * @constructor + * @param {google.analytics.admin.v1alpha.IBatchGetUserLinksRequest=} [properties] Properties to set + */ + function BatchGetUserLinksRequest(properties) { + this.names = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BatchGetUserLinksRequest parent. + * @member {string} parent + * @memberof google.analytics.admin.v1alpha.BatchGetUserLinksRequest + * @instance + */ + BatchGetUserLinksRequest.prototype.parent = ""; + + /** + * BatchGetUserLinksRequest names. + * @member {Array.} names + * @memberof google.analytics.admin.v1alpha.BatchGetUserLinksRequest + * @instance + */ + BatchGetUserLinksRequest.prototype.names = $util.emptyArray; + + /** + * Creates a new BatchGetUserLinksRequest instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.BatchGetUserLinksRequest + * @static + * @param {google.analytics.admin.v1alpha.IBatchGetUserLinksRequest=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.BatchGetUserLinksRequest} BatchGetUserLinksRequest instance + */ + BatchGetUserLinksRequest.create = function create(properties) { + return new BatchGetUserLinksRequest(properties); + }; + + /** + * Encodes the specified BatchGetUserLinksRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.BatchGetUserLinksRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.BatchGetUserLinksRequest + * @static + * @param {google.analytics.admin.v1alpha.IBatchGetUserLinksRequest} message BatchGetUserLinksRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BatchGetUserLinksRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.names != null && message.names.length) + for (var i = 0; i < message.names.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.names[i]); + return writer; + }; + + /** + * Encodes the specified BatchGetUserLinksRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.BatchGetUserLinksRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.BatchGetUserLinksRequest + * @static + * @param {google.analytics.admin.v1alpha.IBatchGetUserLinksRequest} message BatchGetUserLinksRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BatchGetUserLinksRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BatchGetUserLinksRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.BatchGetUserLinksRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.BatchGetUserLinksRequest} BatchGetUserLinksRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BatchGetUserLinksRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.BatchGetUserLinksRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + if (!(message.names && message.names.length)) + message.names = []; + message.names.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BatchGetUserLinksRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.BatchGetUserLinksRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.BatchGetUserLinksRequest} BatchGetUserLinksRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BatchGetUserLinksRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BatchGetUserLinksRequest message. + * @function verify + * @memberof google.analytics.admin.v1alpha.BatchGetUserLinksRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BatchGetUserLinksRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.names != null && message.hasOwnProperty("names")) { + if (!Array.isArray(message.names)) + return "names: array expected"; + for (var i = 0; i < message.names.length; ++i) + if (!$util.isString(message.names[i])) + return "names: string[] expected"; + } + return null; + }; + + /** + * Creates a BatchGetUserLinksRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.BatchGetUserLinksRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.BatchGetUserLinksRequest} BatchGetUserLinksRequest + */ + BatchGetUserLinksRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.BatchGetUserLinksRequest) + return object; + var message = new $root.google.analytics.admin.v1alpha.BatchGetUserLinksRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.names) { + if (!Array.isArray(object.names)) + throw TypeError(".google.analytics.admin.v1alpha.BatchGetUserLinksRequest.names: array expected"); + message.names = []; + for (var i = 0; i < object.names.length; ++i) + message.names[i] = String(object.names[i]); + } + return message; + }; + + /** + * Creates a plain object from a BatchGetUserLinksRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.BatchGetUserLinksRequest + * @static + * @param {google.analytics.admin.v1alpha.BatchGetUserLinksRequest} message BatchGetUserLinksRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BatchGetUserLinksRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.names = []; + if (options.defaults) + object.parent = ""; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.names && message.names.length) { + object.names = []; + for (var j = 0; j < message.names.length; ++j) + object.names[j] = message.names[j]; + } + return object; + }; + + /** + * Converts this BatchGetUserLinksRequest to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.BatchGetUserLinksRequest + * @instance + * @returns {Object.} JSON object + */ + BatchGetUserLinksRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BatchGetUserLinksRequest + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.BatchGetUserLinksRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BatchGetUserLinksRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.BatchGetUserLinksRequest"; + }; + + return BatchGetUserLinksRequest; + })(); + + v1alpha.BatchGetUserLinksResponse = (function() { + + /** + * Properties of a BatchGetUserLinksResponse. + * @memberof google.analytics.admin.v1alpha + * @interface IBatchGetUserLinksResponse + * @property {Array.|null} [userLinks] BatchGetUserLinksResponse userLinks + */ + + /** + * Constructs a new BatchGetUserLinksResponse. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents a BatchGetUserLinksResponse. + * @implements IBatchGetUserLinksResponse + * @constructor + * @param {google.analytics.admin.v1alpha.IBatchGetUserLinksResponse=} [properties] Properties to set + */ + function BatchGetUserLinksResponse(properties) { + this.userLinks = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BatchGetUserLinksResponse userLinks. + * @member {Array.} userLinks + * @memberof google.analytics.admin.v1alpha.BatchGetUserLinksResponse + * @instance + */ + BatchGetUserLinksResponse.prototype.userLinks = $util.emptyArray; + + /** + * Creates a new BatchGetUserLinksResponse instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.BatchGetUserLinksResponse + * @static + * @param {google.analytics.admin.v1alpha.IBatchGetUserLinksResponse=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.BatchGetUserLinksResponse} BatchGetUserLinksResponse instance + */ + BatchGetUserLinksResponse.create = function create(properties) { + return new BatchGetUserLinksResponse(properties); + }; + + /** + * Encodes the specified BatchGetUserLinksResponse message. Does not implicitly {@link google.analytics.admin.v1alpha.BatchGetUserLinksResponse.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.BatchGetUserLinksResponse + * @static + * @param {google.analytics.admin.v1alpha.IBatchGetUserLinksResponse} message BatchGetUserLinksResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BatchGetUserLinksResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.userLinks != null && message.userLinks.length) + for (var i = 0; i < message.userLinks.length; ++i) + $root.google.analytics.admin.v1alpha.UserLink.encode(message.userLinks[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified BatchGetUserLinksResponse message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.BatchGetUserLinksResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.BatchGetUserLinksResponse + * @static + * @param {google.analytics.admin.v1alpha.IBatchGetUserLinksResponse} message BatchGetUserLinksResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BatchGetUserLinksResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BatchGetUserLinksResponse message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.BatchGetUserLinksResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.BatchGetUserLinksResponse} BatchGetUserLinksResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BatchGetUserLinksResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.BatchGetUserLinksResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.userLinks && message.userLinks.length)) + message.userLinks = []; + message.userLinks.push($root.google.analytics.admin.v1alpha.UserLink.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BatchGetUserLinksResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.BatchGetUserLinksResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.BatchGetUserLinksResponse} BatchGetUserLinksResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BatchGetUserLinksResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BatchGetUserLinksResponse message. + * @function verify + * @memberof google.analytics.admin.v1alpha.BatchGetUserLinksResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BatchGetUserLinksResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.userLinks != null && message.hasOwnProperty("userLinks")) { + if (!Array.isArray(message.userLinks)) + return "userLinks: array expected"; + for (var i = 0; i < message.userLinks.length; ++i) { + var error = $root.google.analytics.admin.v1alpha.UserLink.verify(message.userLinks[i]); + if (error) + return "userLinks." + error; + } + } + return null; + }; + + /** + * Creates a BatchGetUserLinksResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.BatchGetUserLinksResponse + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.BatchGetUserLinksResponse} BatchGetUserLinksResponse + */ + BatchGetUserLinksResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.BatchGetUserLinksResponse) + return object; + var message = new $root.google.analytics.admin.v1alpha.BatchGetUserLinksResponse(); + if (object.userLinks) { + if (!Array.isArray(object.userLinks)) + throw TypeError(".google.analytics.admin.v1alpha.BatchGetUserLinksResponse.userLinks: array expected"); + message.userLinks = []; + for (var i = 0; i < object.userLinks.length; ++i) { + if (typeof object.userLinks[i] !== "object") + throw TypeError(".google.analytics.admin.v1alpha.BatchGetUserLinksResponse.userLinks: object expected"); + message.userLinks[i] = $root.google.analytics.admin.v1alpha.UserLink.fromObject(object.userLinks[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a BatchGetUserLinksResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.BatchGetUserLinksResponse + * @static + * @param {google.analytics.admin.v1alpha.BatchGetUserLinksResponse} message BatchGetUserLinksResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BatchGetUserLinksResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.userLinks = []; + if (message.userLinks && message.userLinks.length) { + object.userLinks = []; + for (var j = 0; j < message.userLinks.length; ++j) + object.userLinks[j] = $root.google.analytics.admin.v1alpha.UserLink.toObject(message.userLinks[j], options); + } + return object; + }; + + /** + * Converts this BatchGetUserLinksResponse to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.BatchGetUserLinksResponse + * @instance + * @returns {Object.} JSON object + */ + BatchGetUserLinksResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BatchGetUserLinksResponse + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.BatchGetUserLinksResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BatchGetUserLinksResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.BatchGetUserLinksResponse"; + }; + + return BatchGetUserLinksResponse; + })(); + + v1alpha.ListUserLinksRequest = (function() { + + /** + * Properties of a ListUserLinksRequest. + * @memberof google.analytics.admin.v1alpha + * @interface IListUserLinksRequest + * @property {string|null} [parent] ListUserLinksRequest parent + * @property {number|null} [pageSize] ListUserLinksRequest pageSize + * @property {string|null} [pageToken] ListUserLinksRequest pageToken + */ + + /** + * Constructs a new ListUserLinksRequest. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents a ListUserLinksRequest. + * @implements IListUserLinksRequest + * @constructor + * @param {google.analytics.admin.v1alpha.IListUserLinksRequest=} [properties] Properties to set + */ + function ListUserLinksRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListUserLinksRequest parent. + * @member {string} parent + * @memberof google.analytics.admin.v1alpha.ListUserLinksRequest + * @instance + */ + ListUserLinksRequest.prototype.parent = ""; + + /** + * ListUserLinksRequest pageSize. + * @member {number} pageSize + * @memberof google.analytics.admin.v1alpha.ListUserLinksRequest + * @instance + */ + ListUserLinksRequest.prototype.pageSize = 0; + + /** + * ListUserLinksRequest pageToken. + * @member {string} pageToken + * @memberof google.analytics.admin.v1alpha.ListUserLinksRequest + * @instance + */ + ListUserLinksRequest.prototype.pageToken = ""; + + /** + * Creates a new ListUserLinksRequest instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.ListUserLinksRequest + * @static + * @param {google.analytics.admin.v1alpha.IListUserLinksRequest=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.ListUserLinksRequest} ListUserLinksRequest instance + */ + ListUserLinksRequest.create = function create(properties) { + return new ListUserLinksRequest(properties); + }; + + /** + * Encodes the specified ListUserLinksRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.ListUserLinksRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.ListUserLinksRequest + * @static + * @param {google.analytics.admin.v1alpha.IListUserLinksRequest} message ListUserLinksRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListUserLinksRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + return writer; + }; + + /** + * Encodes the specified ListUserLinksRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.ListUserLinksRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.ListUserLinksRequest + * @static + * @param {google.analytics.admin.v1alpha.IListUserLinksRequest} message ListUserLinksRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListUserLinksRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListUserLinksRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.ListUserLinksRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.ListUserLinksRequest} ListUserLinksRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListUserLinksRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.ListUserLinksRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListUserLinksRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.ListUserLinksRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.ListUserLinksRequest} ListUserLinksRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListUserLinksRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListUserLinksRequest message. + * @function verify + * @memberof google.analytics.admin.v1alpha.ListUserLinksRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListUserLinksRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + return null; + }; + + /** + * Creates a ListUserLinksRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.ListUserLinksRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.ListUserLinksRequest} ListUserLinksRequest + */ + ListUserLinksRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.ListUserLinksRequest) + return object; + var message = new $root.google.analytics.admin.v1alpha.ListUserLinksRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + return message; + }; + + /** + * Creates a plain object from a ListUserLinksRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.ListUserLinksRequest + * @static + * @param {google.analytics.admin.v1alpha.ListUserLinksRequest} message ListUserLinksRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListUserLinksRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + return object; + }; + + /** + * Converts this ListUserLinksRequest to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.ListUserLinksRequest + * @instance + * @returns {Object.} JSON object + */ + ListUserLinksRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListUserLinksRequest + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.ListUserLinksRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListUserLinksRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.ListUserLinksRequest"; + }; + + return ListUserLinksRequest; + })(); + + v1alpha.ListUserLinksResponse = (function() { + + /** + * Properties of a ListUserLinksResponse. + * @memberof google.analytics.admin.v1alpha + * @interface IListUserLinksResponse + * @property {Array.|null} [userLinks] ListUserLinksResponse userLinks + * @property {string|null} [nextPageToken] ListUserLinksResponse nextPageToken + */ + + /** + * Constructs a new ListUserLinksResponse. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents a ListUserLinksResponse. + * @implements IListUserLinksResponse + * @constructor + * @param {google.analytics.admin.v1alpha.IListUserLinksResponse=} [properties] Properties to set + */ + function ListUserLinksResponse(properties) { + this.userLinks = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListUserLinksResponse userLinks. + * @member {Array.} userLinks + * @memberof google.analytics.admin.v1alpha.ListUserLinksResponse + * @instance + */ + ListUserLinksResponse.prototype.userLinks = $util.emptyArray; + + /** + * ListUserLinksResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.analytics.admin.v1alpha.ListUserLinksResponse + * @instance + */ + ListUserLinksResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListUserLinksResponse instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.ListUserLinksResponse + * @static + * @param {google.analytics.admin.v1alpha.IListUserLinksResponse=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.ListUserLinksResponse} ListUserLinksResponse instance + */ + ListUserLinksResponse.create = function create(properties) { + return new ListUserLinksResponse(properties); + }; + + /** + * Encodes the specified ListUserLinksResponse message. Does not implicitly {@link google.analytics.admin.v1alpha.ListUserLinksResponse.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.ListUserLinksResponse + * @static + * @param {google.analytics.admin.v1alpha.IListUserLinksResponse} message ListUserLinksResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListUserLinksResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.userLinks != null && message.userLinks.length) + for (var i = 0; i < message.userLinks.length; ++i) + $root.google.analytics.admin.v1alpha.UserLink.encode(message.userLinks[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 ListUserLinksResponse message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.ListUserLinksResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.ListUserLinksResponse + * @static + * @param {google.analytics.admin.v1alpha.IListUserLinksResponse} message ListUserLinksResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListUserLinksResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListUserLinksResponse message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.ListUserLinksResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.ListUserLinksResponse} ListUserLinksResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListUserLinksResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.ListUserLinksResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.userLinks && message.userLinks.length)) + message.userLinks = []; + message.userLinks.push($root.google.analytics.admin.v1alpha.UserLink.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListUserLinksResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.ListUserLinksResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.ListUserLinksResponse} ListUserLinksResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListUserLinksResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListUserLinksResponse message. + * @function verify + * @memberof google.analytics.admin.v1alpha.ListUserLinksResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListUserLinksResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.userLinks != null && message.hasOwnProperty("userLinks")) { + if (!Array.isArray(message.userLinks)) + return "userLinks: array expected"; + for (var i = 0; i < message.userLinks.length; ++i) { + var error = $root.google.analytics.admin.v1alpha.UserLink.verify(message.userLinks[i]); + if (error) + return "userLinks." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListUserLinksResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.ListUserLinksResponse + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.ListUserLinksResponse} ListUserLinksResponse + */ + ListUserLinksResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.ListUserLinksResponse) + return object; + var message = new $root.google.analytics.admin.v1alpha.ListUserLinksResponse(); + if (object.userLinks) { + if (!Array.isArray(object.userLinks)) + throw TypeError(".google.analytics.admin.v1alpha.ListUserLinksResponse.userLinks: array expected"); + message.userLinks = []; + for (var i = 0; i < object.userLinks.length; ++i) { + if (typeof object.userLinks[i] !== "object") + throw TypeError(".google.analytics.admin.v1alpha.ListUserLinksResponse.userLinks: object expected"); + message.userLinks[i] = $root.google.analytics.admin.v1alpha.UserLink.fromObject(object.userLinks[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListUserLinksResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.ListUserLinksResponse + * @static + * @param {google.analytics.admin.v1alpha.ListUserLinksResponse} message ListUserLinksResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListUserLinksResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.userLinks = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.userLinks && message.userLinks.length) { + object.userLinks = []; + for (var j = 0; j < message.userLinks.length; ++j) + object.userLinks[j] = $root.google.analytics.admin.v1alpha.UserLink.toObject(message.userLinks[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListUserLinksResponse to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.ListUserLinksResponse + * @instance + * @returns {Object.} JSON object + */ + ListUserLinksResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListUserLinksResponse + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.ListUserLinksResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListUserLinksResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.ListUserLinksResponse"; + }; + + return ListUserLinksResponse; + })(); + + v1alpha.AuditUserLinksRequest = (function() { + + /** + * Properties of an AuditUserLinksRequest. + * @memberof google.analytics.admin.v1alpha + * @interface IAuditUserLinksRequest + * @property {string|null} [parent] AuditUserLinksRequest parent + * @property {number|null} [pageSize] AuditUserLinksRequest pageSize + * @property {string|null} [pageToken] AuditUserLinksRequest pageToken + */ + + /** + * Constructs a new AuditUserLinksRequest. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents an AuditUserLinksRequest. + * @implements IAuditUserLinksRequest + * @constructor + * @param {google.analytics.admin.v1alpha.IAuditUserLinksRequest=} [properties] Properties to set + */ + function AuditUserLinksRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AuditUserLinksRequest parent. + * @member {string} parent + * @memberof google.analytics.admin.v1alpha.AuditUserLinksRequest + * @instance + */ + AuditUserLinksRequest.prototype.parent = ""; + + /** + * AuditUserLinksRequest pageSize. + * @member {number} pageSize + * @memberof google.analytics.admin.v1alpha.AuditUserLinksRequest + * @instance + */ + AuditUserLinksRequest.prototype.pageSize = 0; + + /** + * AuditUserLinksRequest pageToken. + * @member {string} pageToken + * @memberof google.analytics.admin.v1alpha.AuditUserLinksRequest + * @instance + */ + AuditUserLinksRequest.prototype.pageToken = ""; + + /** + * Creates a new AuditUserLinksRequest instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.AuditUserLinksRequest + * @static + * @param {google.analytics.admin.v1alpha.IAuditUserLinksRequest=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.AuditUserLinksRequest} AuditUserLinksRequest instance + */ + AuditUserLinksRequest.create = function create(properties) { + return new AuditUserLinksRequest(properties); + }; + + /** + * Encodes the specified AuditUserLinksRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.AuditUserLinksRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.AuditUserLinksRequest + * @static + * @param {google.analytics.admin.v1alpha.IAuditUserLinksRequest} message AuditUserLinksRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AuditUserLinksRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + return writer; + }; + + /** + * Encodes the specified AuditUserLinksRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AuditUserLinksRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.AuditUserLinksRequest + * @static + * @param {google.analytics.admin.v1alpha.IAuditUserLinksRequest} message AuditUserLinksRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AuditUserLinksRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AuditUserLinksRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.AuditUserLinksRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.AuditUserLinksRequest} AuditUserLinksRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AuditUserLinksRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.AuditUserLinksRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AuditUserLinksRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.AuditUserLinksRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.AuditUserLinksRequest} AuditUserLinksRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AuditUserLinksRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AuditUserLinksRequest message. + * @function verify + * @memberof google.analytics.admin.v1alpha.AuditUserLinksRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AuditUserLinksRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + return null; + }; + + /** + * Creates an AuditUserLinksRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.AuditUserLinksRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.AuditUserLinksRequest} AuditUserLinksRequest + */ + AuditUserLinksRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.AuditUserLinksRequest) + return object; + var message = new $root.google.analytics.admin.v1alpha.AuditUserLinksRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + return message; + }; + + /** + * Creates a plain object from an AuditUserLinksRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.AuditUserLinksRequest + * @static + * @param {google.analytics.admin.v1alpha.AuditUserLinksRequest} message AuditUserLinksRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AuditUserLinksRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + return object; + }; + + /** + * Converts this AuditUserLinksRequest to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.AuditUserLinksRequest + * @instance + * @returns {Object.} JSON object + */ + AuditUserLinksRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AuditUserLinksRequest + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.AuditUserLinksRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AuditUserLinksRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.AuditUserLinksRequest"; + }; + + return AuditUserLinksRequest; + })(); + + v1alpha.AuditUserLinksResponse = (function() { + + /** + * Properties of an AuditUserLinksResponse. + * @memberof google.analytics.admin.v1alpha + * @interface IAuditUserLinksResponse + * @property {Array.|null} [userLinks] AuditUserLinksResponse userLinks + * @property {string|null} [nextPageToken] AuditUserLinksResponse nextPageToken + */ + + /** + * Constructs a new AuditUserLinksResponse. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents an AuditUserLinksResponse. + * @implements IAuditUserLinksResponse + * @constructor + * @param {google.analytics.admin.v1alpha.IAuditUserLinksResponse=} [properties] Properties to set + */ + function AuditUserLinksResponse(properties) { + this.userLinks = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AuditUserLinksResponse userLinks. + * @member {Array.} userLinks + * @memberof google.analytics.admin.v1alpha.AuditUserLinksResponse + * @instance + */ + AuditUserLinksResponse.prototype.userLinks = $util.emptyArray; + + /** + * AuditUserLinksResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.analytics.admin.v1alpha.AuditUserLinksResponse + * @instance + */ + AuditUserLinksResponse.prototype.nextPageToken = ""; + + /** + * Creates a new AuditUserLinksResponse instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.AuditUserLinksResponse + * @static + * @param {google.analytics.admin.v1alpha.IAuditUserLinksResponse=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.AuditUserLinksResponse} AuditUserLinksResponse instance + */ + AuditUserLinksResponse.create = function create(properties) { + return new AuditUserLinksResponse(properties); + }; + + /** + * Encodes the specified AuditUserLinksResponse message. Does not implicitly {@link google.analytics.admin.v1alpha.AuditUserLinksResponse.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.AuditUserLinksResponse + * @static + * @param {google.analytics.admin.v1alpha.IAuditUserLinksResponse} message AuditUserLinksResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AuditUserLinksResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.userLinks != null && message.userLinks.length) + for (var i = 0; i < message.userLinks.length; ++i) + $root.google.analytics.admin.v1alpha.AuditUserLink.encode(message.userLinks[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 AuditUserLinksResponse message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AuditUserLinksResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.AuditUserLinksResponse + * @static + * @param {google.analytics.admin.v1alpha.IAuditUserLinksResponse} message AuditUserLinksResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AuditUserLinksResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AuditUserLinksResponse message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.AuditUserLinksResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.AuditUserLinksResponse} AuditUserLinksResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AuditUserLinksResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.AuditUserLinksResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.userLinks && message.userLinks.length)) + message.userLinks = []; + message.userLinks.push($root.google.analytics.admin.v1alpha.AuditUserLink.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AuditUserLinksResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.AuditUserLinksResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.AuditUserLinksResponse} AuditUserLinksResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AuditUserLinksResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AuditUserLinksResponse message. + * @function verify + * @memberof google.analytics.admin.v1alpha.AuditUserLinksResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AuditUserLinksResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.userLinks != null && message.hasOwnProperty("userLinks")) { + if (!Array.isArray(message.userLinks)) + return "userLinks: array expected"; + for (var i = 0; i < message.userLinks.length; ++i) { + var error = $root.google.analytics.admin.v1alpha.AuditUserLink.verify(message.userLinks[i]); + if (error) + return "userLinks." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates an AuditUserLinksResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.AuditUserLinksResponse + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.AuditUserLinksResponse} AuditUserLinksResponse + */ + AuditUserLinksResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.AuditUserLinksResponse) + return object; + var message = new $root.google.analytics.admin.v1alpha.AuditUserLinksResponse(); + if (object.userLinks) { + if (!Array.isArray(object.userLinks)) + throw TypeError(".google.analytics.admin.v1alpha.AuditUserLinksResponse.userLinks: array expected"); + message.userLinks = []; + for (var i = 0; i < object.userLinks.length; ++i) { + if (typeof object.userLinks[i] !== "object") + throw TypeError(".google.analytics.admin.v1alpha.AuditUserLinksResponse.userLinks: object expected"); + message.userLinks[i] = $root.google.analytics.admin.v1alpha.AuditUserLink.fromObject(object.userLinks[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from an AuditUserLinksResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.AuditUserLinksResponse + * @static + * @param {google.analytics.admin.v1alpha.AuditUserLinksResponse} message AuditUserLinksResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AuditUserLinksResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.userLinks = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.userLinks && message.userLinks.length) { + object.userLinks = []; + for (var j = 0; j < message.userLinks.length; ++j) + object.userLinks[j] = $root.google.analytics.admin.v1alpha.AuditUserLink.toObject(message.userLinks[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this AuditUserLinksResponse to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.AuditUserLinksResponse + * @instance + * @returns {Object.} JSON object + */ + AuditUserLinksResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AuditUserLinksResponse + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.AuditUserLinksResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AuditUserLinksResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.AuditUserLinksResponse"; + }; + + return AuditUserLinksResponse; + })(); + + v1alpha.CreateUserLinkRequest = (function() { + + /** + * Properties of a CreateUserLinkRequest. + * @memberof google.analytics.admin.v1alpha + * @interface ICreateUserLinkRequest + * @property {string|null} [parent] CreateUserLinkRequest parent + * @property {boolean|null} [notifyNewUser] CreateUserLinkRequest notifyNewUser + * @property {google.analytics.admin.v1alpha.IUserLink|null} [userLink] CreateUserLinkRequest userLink + */ + + /** + * Constructs a new CreateUserLinkRequest. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents a CreateUserLinkRequest. + * @implements ICreateUserLinkRequest + * @constructor + * @param {google.analytics.admin.v1alpha.ICreateUserLinkRequest=} [properties] Properties to set + */ + function CreateUserLinkRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateUserLinkRequest parent. + * @member {string} parent + * @memberof google.analytics.admin.v1alpha.CreateUserLinkRequest + * @instance + */ + CreateUserLinkRequest.prototype.parent = ""; + + /** + * CreateUserLinkRequest notifyNewUser. + * @member {boolean} notifyNewUser + * @memberof google.analytics.admin.v1alpha.CreateUserLinkRequest + * @instance + */ + CreateUserLinkRequest.prototype.notifyNewUser = false; + + /** + * CreateUserLinkRequest userLink. + * @member {google.analytics.admin.v1alpha.IUserLink|null|undefined} userLink + * @memberof google.analytics.admin.v1alpha.CreateUserLinkRequest + * @instance + */ + CreateUserLinkRequest.prototype.userLink = null; + + /** + * Creates a new CreateUserLinkRequest instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.CreateUserLinkRequest + * @static + * @param {google.analytics.admin.v1alpha.ICreateUserLinkRequest=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.CreateUserLinkRequest} CreateUserLinkRequest instance + */ + CreateUserLinkRequest.create = function create(properties) { + return new CreateUserLinkRequest(properties); + }; + + /** + * Encodes the specified CreateUserLinkRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.CreateUserLinkRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.CreateUserLinkRequest + * @static + * @param {google.analytics.admin.v1alpha.ICreateUserLinkRequest} message CreateUserLinkRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateUserLinkRequest.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.notifyNewUser != null && Object.hasOwnProperty.call(message, "notifyNewUser")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.notifyNewUser); + if (message.userLink != null && Object.hasOwnProperty.call(message, "userLink")) + $root.google.analytics.admin.v1alpha.UserLink.encode(message.userLink, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CreateUserLinkRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.CreateUserLinkRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.CreateUserLinkRequest + * @static + * @param {google.analytics.admin.v1alpha.ICreateUserLinkRequest} message CreateUserLinkRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateUserLinkRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateUserLinkRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.CreateUserLinkRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.CreateUserLinkRequest} CreateUserLinkRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateUserLinkRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.CreateUserLinkRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.notifyNewUser = reader.bool(); + break; + } + case 3: { + message.userLink = $root.google.analytics.admin.v1alpha.UserLink.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateUserLinkRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.CreateUserLinkRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.CreateUserLinkRequest} CreateUserLinkRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateUserLinkRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateUserLinkRequest message. + * @function verify + * @memberof google.analytics.admin.v1alpha.CreateUserLinkRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateUserLinkRequest.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.notifyNewUser != null && message.hasOwnProperty("notifyNewUser")) + if (typeof message.notifyNewUser !== "boolean") + return "notifyNewUser: boolean expected"; + if (message.userLink != null && message.hasOwnProperty("userLink")) { + var error = $root.google.analytics.admin.v1alpha.UserLink.verify(message.userLink); + if (error) + return "userLink." + error; + } + return null; + }; + + /** + * Creates a CreateUserLinkRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.CreateUserLinkRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.CreateUserLinkRequest} CreateUserLinkRequest + */ + CreateUserLinkRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.CreateUserLinkRequest) + return object; + var message = new $root.google.analytics.admin.v1alpha.CreateUserLinkRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.notifyNewUser != null) + message.notifyNewUser = Boolean(object.notifyNewUser); + if (object.userLink != null) { + if (typeof object.userLink !== "object") + throw TypeError(".google.analytics.admin.v1alpha.CreateUserLinkRequest.userLink: object expected"); + message.userLink = $root.google.analytics.admin.v1alpha.UserLink.fromObject(object.userLink); + } + return message; + }; + + /** + * Creates a plain object from a CreateUserLinkRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.CreateUserLinkRequest + * @static + * @param {google.analytics.admin.v1alpha.CreateUserLinkRequest} message CreateUserLinkRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateUserLinkRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.notifyNewUser = false; + object.userLink = null; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.notifyNewUser != null && message.hasOwnProperty("notifyNewUser")) + object.notifyNewUser = message.notifyNewUser; + if (message.userLink != null && message.hasOwnProperty("userLink")) + object.userLink = $root.google.analytics.admin.v1alpha.UserLink.toObject(message.userLink, options); + return object; + }; + + /** + * Converts this CreateUserLinkRequest to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.CreateUserLinkRequest + * @instance + * @returns {Object.} JSON object + */ + CreateUserLinkRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateUserLinkRequest + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.CreateUserLinkRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateUserLinkRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.CreateUserLinkRequest"; + }; + + return CreateUserLinkRequest; + })(); + + v1alpha.BatchCreateUserLinksRequest = (function() { + + /** + * Properties of a BatchCreateUserLinksRequest. + * @memberof google.analytics.admin.v1alpha + * @interface IBatchCreateUserLinksRequest + * @property {string|null} [parent] BatchCreateUserLinksRequest parent + * @property {boolean|null} [notifyNewUsers] BatchCreateUserLinksRequest notifyNewUsers + * @property {Array.|null} [requests] BatchCreateUserLinksRequest requests + */ + + /** + * Constructs a new BatchCreateUserLinksRequest. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents a BatchCreateUserLinksRequest. + * @implements IBatchCreateUserLinksRequest + * @constructor + * @param {google.analytics.admin.v1alpha.IBatchCreateUserLinksRequest=} [properties] Properties to set + */ + function BatchCreateUserLinksRequest(properties) { + this.requests = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BatchCreateUserLinksRequest parent. + * @member {string} parent + * @memberof google.analytics.admin.v1alpha.BatchCreateUserLinksRequest + * @instance + */ + BatchCreateUserLinksRequest.prototype.parent = ""; + + /** + * BatchCreateUserLinksRequest notifyNewUsers. + * @member {boolean} notifyNewUsers + * @memberof google.analytics.admin.v1alpha.BatchCreateUserLinksRequest + * @instance + */ + BatchCreateUserLinksRequest.prototype.notifyNewUsers = false; + + /** + * BatchCreateUserLinksRequest requests. + * @member {Array.} requests + * @memberof google.analytics.admin.v1alpha.BatchCreateUserLinksRequest + * @instance + */ + BatchCreateUserLinksRequest.prototype.requests = $util.emptyArray; + + /** + * Creates a new BatchCreateUserLinksRequest instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.BatchCreateUserLinksRequest + * @static + * @param {google.analytics.admin.v1alpha.IBatchCreateUserLinksRequest=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.BatchCreateUserLinksRequest} BatchCreateUserLinksRequest instance + */ + BatchCreateUserLinksRequest.create = function create(properties) { + return new BatchCreateUserLinksRequest(properties); + }; + + /** + * Encodes the specified BatchCreateUserLinksRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.BatchCreateUserLinksRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.BatchCreateUserLinksRequest + * @static + * @param {google.analytics.admin.v1alpha.IBatchCreateUserLinksRequest} message BatchCreateUserLinksRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BatchCreateUserLinksRequest.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.notifyNewUsers != null && Object.hasOwnProperty.call(message, "notifyNewUsers")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.notifyNewUsers); + if (message.requests != null && message.requests.length) + for (var i = 0; i < message.requests.length; ++i) + $root.google.analytics.admin.v1alpha.CreateUserLinkRequest.encode(message.requests[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified BatchCreateUserLinksRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.BatchCreateUserLinksRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.BatchCreateUserLinksRequest + * @static + * @param {google.analytics.admin.v1alpha.IBatchCreateUserLinksRequest} message BatchCreateUserLinksRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BatchCreateUserLinksRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BatchCreateUserLinksRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.BatchCreateUserLinksRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.BatchCreateUserLinksRequest} BatchCreateUserLinksRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BatchCreateUserLinksRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.BatchCreateUserLinksRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.notifyNewUsers = reader.bool(); + break; + } + case 3: { + if (!(message.requests && message.requests.length)) + message.requests = []; + message.requests.push($root.google.analytics.admin.v1alpha.CreateUserLinkRequest.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BatchCreateUserLinksRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.BatchCreateUserLinksRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.BatchCreateUserLinksRequest} BatchCreateUserLinksRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BatchCreateUserLinksRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BatchCreateUserLinksRequest message. + * @function verify + * @memberof google.analytics.admin.v1alpha.BatchCreateUserLinksRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BatchCreateUserLinksRequest.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.notifyNewUsers != null && message.hasOwnProperty("notifyNewUsers")) + if (typeof message.notifyNewUsers !== "boolean") + return "notifyNewUsers: boolean expected"; + if (message.requests != null && message.hasOwnProperty("requests")) { + if (!Array.isArray(message.requests)) + return "requests: array expected"; + for (var i = 0; i < message.requests.length; ++i) { + var error = $root.google.analytics.admin.v1alpha.CreateUserLinkRequest.verify(message.requests[i]); + if (error) + return "requests." + error; + } + } + return null; + }; + + /** + * Creates a BatchCreateUserLinksRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.BatchCreateUserLinksRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.BatchCreateUserLinksRequest} BatchCreateUserLinksRequest + */ + BatchCreateUserLinksRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.BatchCreateUserLinksRequest) + return object; + var message = new $root.google.analytics.admin.v1alpha.BatchCreateUserLinksRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.notifyNewUsers != null) + message.notifyNewUsers = Boolean(object.notifyNewUsers); + if (object.requests) { + if (!Array.isArray(object.requests)) + throw TypeError(".google.analytics.admin.v1alpha.BatchCreateUserLinksRequest.requests: array expected"); + message.requests = []; + for (var i = 0; i < object.requests.length; ++i) { + if (typeof object.requests[i] !== "object") + throw TypeError(".google.analytics.admin.v1alpha.BatchCreateUserLinksRequest.requests: object expected"); + message.requests[i] = $root.google.analytics.admin.v1alpha.CreateUserLinkRequest.fromObject(object.requests[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a BatchCreateUserLinksRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.BatchCreateUserLinksRequest + * @static + * @param {google.analytics.admin.v1alpha.BatchCreateUserLinksRequest} message BatchCreateUserLinksRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BatchCreateUserLinksRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.requests = []; + if (options.defaults) { + object.parent = ""; + object.notifyNewUsers = false; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.notifyNewUsers != null && message.hasOwnProperty("notifyNewUsers")) + object.notifyNewUsers = message.notifyNewUsers; + if (message.requests && message.requests.length) { + object.requests = []; + for (var j = 0; j < message.requests.length; ++j) + object.requests[j] = $root.google.analytics.admin.v1alpha.CreateUserLinkRequest.toObject(message.requests[j], options); + } + return object; + }; + + /** + * Converts this BatchCreateUserLinksRequest to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.BatchCreateUserLinksRequest + * @instance + * @returns {Object.} JSON object + */ + BatchCreateUserLinksRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BatchCreateUserLinksRequest + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.BatchCreateUserLinksRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BatchCreateUserLinksRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.BatchCreateUserLinksRequest"; + }; + + return BatchCreateUserLinksRequest; + })(); + + v1alpha.BatchCreateUserLinksResponse = (function() { + + /** + * Properties of a BatchCreateUserLinksResponse. + * @memberof google.analytics.admin.v1alpha + * @interface IBatchCreateUserLinksResponse + * @property {Array.|null} [userLinks] BatchCreateUserLinksResponse userLinks + */ + + /** + * Constructs a new BatchCreateUserLinksResponse. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents a BatchCreateUserLinksResponse. + * @implements IBatchCreateUserLinksResponse + * @constructor + * @param {google.analytics.admin.v1alpha.IBatchCreateUserLinksResponse=} [properties] Properties to set + */ + function BatchCreateUserLinksResponse(properties) { + this.userLinks = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BatchCreateUserLinksResponse userLinks. + * @member {Array.} userLinks + * @memberof google.analytics.admin.v1alpha.BatchCreateUserLinksResponse + * @instance + */ + BatchCreateUserLinksResponse.prototype.userLinks = $util.emptyArray; + + /** + * Creates a new BatchCreateUserLinksResponse instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.BatchCreateUserLinksResponse + * @static + * @param {google.analytics.admin.v1alpha.IBatchCreateUserLinksResponse=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.BatchCreateUserLinksResponse} BatchCreateUserLinksResponse instance + */ + BatchCreateUserLinksResponse.create = function create(properties) { + return new BatchCreateUserLinksResponse(properties); + }; + + /** + * Encodes the specified BatchCreateUserLinksResponse message. Does not implicitly {@link google.analytics.admin.v1alpha.BatchCreateUserLinksResponse.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.BatchCreateUserLinksResponse + * @static + * @param {google.analytics.admin.v1alpha.IBatchCreateUserLinksResponse} message BatchCreateUserLinksResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BatchCreateUserLinksResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.userLinks != null && message.userLinks.length) + for (var i = 0; i < message.userLinks.length; ++i) + $root.google.analytics.admin.v1alpha.UserLink.encode(message.userLinks[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified BatchCreateUserLinksResponse message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.BatchCreateUserLinksResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.BatchCreateUserLinksResponse + * @static + * @param {google.analytics.admin.v1alpha.IBatchCreateUserLinksResponse} message BatchCreateUserLinksResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BatchCreateUserLinksResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BatchCreateUserLinksResponse message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.BatchCreateUserLinksResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.BatchCreateUserLinksResponse} BatchCreateUserLinksResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BatchCreateUserLinksResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.BatchCreateUserLinksResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.userLinks && message.userLinks.length)) + message.userLinks = []; + message.userLinks.push($root.google.analytics.admin.v1alpha.UserLink.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BatchCreateUserLinksResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.BatchCreateUserLinksResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.BatchCreateUserLinksResponse} BatchCreateUserLinksResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BatchCreateUserLinksResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BatchCreateUserLinksResponse message. + * @function verify + * @memberof google.analytics.admin.v1alpha.BatchCreateUserLinksResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BatchCreateUserLinksResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.userLinks != null && message.hasOwnProperty("userLinks")) { + if (!Array.isArray(message.userLinks)) + return "userLinks: array expected"; + for (var i = 0; i < message.userLinks.length; ++i) { + var error = $root.google.analytics.admin.v1alpha.UserLink.verify(message.userLinks[i]); + if (error) + return "userLinks." + error; + } + } + return null; + }; + + /** + * Creates a BatchCreateUserLinksResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.BatchCreateUserLinksResponse + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.BatchCreateUserLinksResponse} BatchCreateUserLinksResponse + */ + BatchCreateUserLinksResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.BatchCreateUserLinksResponse) + return object; + var message = new $root.google.analytics.admin.v1alpha.BatchCreateUserLinksResponse(); + if (object.userLinks) { + if (!Array.isArray(object.userLinks)) + throw TypeError(".google.analytics.admin.v1alpha.BatchCreateUserLinksResponse.userLinks: array expected"); + message.userLinks = []; + for (var i = 0; i < object.userLinks.length; ++i) { + if (typeof object.userLinks[i] !== "object") + throw TypeError(".google.analytics.admin.v1alpha.BatchCreateUserLinksResponse.userLinks: object expected"); + message.userLinks[i] = $root.google.analytics.admin.v1alpha.UserLink.fromObject(object.userLinks[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a BatchCreateUserLinksResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.BatchCreateUserLinksResponse + * @static + * @param {google.analytics.admin.v1alpha.BatchCreateUserLinksResponse} message BatchCreateUserLinksResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BatchCreateUserLinksResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.userLinks = []; + if (message.userLinks && message.userLinks.length) { + object.userLinks = []; + for (var j = 0; j < message.userLinks.length; ++j) + object.userLinks[j] = $root.google.analytics.admin.v1alpha.UserLink.toObject(message.userLinks[j], options); + } + return object; + }; + + /** + * Converts this BatchCreateUserLinksResponse to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.BatchCreateUserLinksResponse + * @instance + * @returns {Object.} JSON object + */ + BatchCreateUserLinksResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BatchCreateUserLinksResponse + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.BatchCreateUserLinksResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BatchCreateUserLinksResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.BatchCreateUserLinksResponse"; + }; + + return BatchCreateUserLinksResponse; + })(); + + v1alpha.UpdateUserLinkRequest = (function() { + + /** + * Properties of an UpdateUserLinkRequest. + * @memberof google.analytics.admin.v1alpha + * @interface IUpdateUserLinkRequest + * @property {google.analytics.admin.v1alpha.IUserLink|null} [userLink] UpdateUserLinkRequest userLink + */ + + /** + * Constructs a new UpdateUserLinkRequest. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents an UpdateUserLinkRequest. + * @implements IUpdateUserLinkRequest + * @constructor + * @param {google.analytics.admin.v1alpha.IUpdateUserLinkRequest=} [properties] Properties to set + */ + function UpdateUserLinkRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateUserLinkRequest userLink. + * @member {google.analytics.admin.v1alpha.IUserLink|null|undefined} userLink + * @memberof google.analytics.admin.v1alpha.UpdateUserLinkRequest + * @instance + */ + UpdateUserLinkRequest.prototype.userLink = null; + + /** + * Creates a new UpdateUserLinkRequest instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.UpdateUserLinkRequest + * @static + * @param {google.analytics.admin.v1alpha.IUpdateUserLinkRequest=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.UpdateUserLinkRequest} UpdateUserLinkRequest instance + */ + UpdateUserLinkRequest.create = function create(properties) { + return new UpdateUserLinkRequest(properties); + }; + + /** + * Encodes the specified UpdateUserLinkRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.UpdateUserLinkRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.UpdateUserLinkRequest + * @static + * @param {google.analytics.admin.v1alpha.IUpdateUserLinkRequest} message UpdateUserLinkRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateUserLinkRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.userLink != null && Object.hasOwnProperty.call(message, "userLink")) + $root.google.analytics.admin.v1alpha.UserLink.encode(message.userLink, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified UpdateUserLinkRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.UpdateUserLinkRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.UpdateUserLinkRequest + * @static + * @param {google.analytics.admin.v1alpha.IUpdateUserLinkRequest} message UpdateUserLinkRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateUserLinkRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateUserLinkRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.UpdateUserLinkRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.UpdateUserLinkRequest} UpdateUserLinkRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateUserLinkRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.UpdateUserLinkRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.userLink = $root.google.analytics.admin.v1alpha.UserLink.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateUserLinkRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.UpdateUserLinkRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.UpdateUserLinkRequest} UpdateUserLinkRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateUserLinkRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateUserLinkRequest message. + * @function verify + * @memberof google.analytics.admin.v1alpha.UpdateUserLinkRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateUserLinkRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.userLink != null && message.hasOwnProperty("userLink")) { + var error = $root.google.analytics.admin.v1alpha.UserLink.verify(message.userLink); + if (error) + return "userLink." + error; + } + return null; + }; + + /** + * Creates an UpdateUserLinkRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.UpdateUserLinkRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.UpdateUserLinkRequest} UpdateUserLinkRequest + */ + UpdateUserLinkRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.UpdateUserLinkRequest) + return object; + var message = new $root.google.analytics.admin.v1alpha.UpdateUserLinkRequest(); + if (object.userLink != null) { + if (typeof object.userLink !== "object") + throw TypeError(".google.analytics.admin.v1alpha.UpdateUserLinkRequest.userLink: object expected"); + message.userLink = $root.google.analytics.admin.v1alpha.UserLink.fromObject(object.userLink); + } + return message; + }; + + /** + * Creates a plain object from an UpdateUserLinkRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.UpdateUserLinkRequest + * @static + * @param {google.analytics.admin.v1alpha.UpdateUserLinkRequest} message UpdateUserLinkRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateUserLinkRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.userLink = null; + if (message.userLink != null && message.hasOwnProperty("userLink")) + object.userLink = $root.google.analytics.admin.v1alpha.UserLink.toObject(message.userLink, options); + return object; + }; + + /** + * Converts this UpdateUserLinkRequest to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.UpdateUserLinkRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateUserLinkRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateUserLinkRequest + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.UpdateUserLinkRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateUserLinkRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.UpdateUserLinkRequest"; + }; + + return UpdateUserLinkRequest; + })(); + + v1alpha.BatchUpdateUserLinksRequest = (function() { + + /** + * Properties of a BatchUpdateUserLinksRequest. + * @memberof google.analytics.admin.v1alpha + * @interface IBatchUpdateUserLinksRequest + * @property {string|null} [parent] BatchUpdateUserLinksRequest parent + * @property {Array.|null} [requests] BatchUpdateUserLinksRequest requests + */ + + /** + * Constructs a new BatchUpdateUserLinksRequest. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents a BatchUpdateUserLinksRequest. + * @implements IBatchUpdateUserLinksRequest + * @constructor + * @param {google.analytics.admin.v1alpha.IBatchUpdateUserLinksRequest=} [properties] Properties to set + */ + function BatchUpdateUserLinksRequest(properties) { + this.requests = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BatchUpdateUserLinksRequest parent. + * @member {string} parent + * @memberof google.analytics.admin.v1alpha.BatchUpdateUserLinksRequest + * @instance + */ + BatchUpdateUserLinksRequest.prototype.parent = ""; + + /** + * BatchUpdateUserLinksRequest requests. + * @member {Array.} requests + * @memberof google.analytics.admin.v1alpha.BatchUpdateUserLinksRequest + * @instance + */ + BatchUpdateUserLinksRequest.prototype.requests = $util.emptyArray; + + /** + * Creates a new BatchUpdateUserLinksRequest instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.BatchUpdateUserLinksRequest + * @static + * @param {google.analytics.admin.v1alpha.IBatchUpdateUserLinksRequest=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.BatchUpdateUserLinksRequest} BatchUpdateUserLinksRequest instance + */ + BatchUpdateUserLinksRequest.create = function create(properties) { + return new BatchUpdateUserLinksRequest(properties); + }; + + /** + * Encodes the specified BatchUpdateUserLinksRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.BatchUpdateUserLinksRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.BatchUpdateUserLinksRequest + * @static + * @param {google.analytics.admin.v1alpha.IBatchUpdateUserLinksRequest} message BatchUpdateUserLinksRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BatchUpdateUserLinksRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.requests != null && message.requests.length) + for (var i = 0; i < message.requests.length; ++i) + $root.google.analytics.admin.v1alpha.UpdateUserLinkRequest.encode(message.requests[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified BatchUpdateUserLinksRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.BatchUpdateUserLinksRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.BatchUpdateUserLinksRequest + * @static + * @param {google.analytics.admin.v1alpha.IBatchUpdateUserLinksRequest} message BatchUpdateUserLinksRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BatchUpdateUserLinksRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BatchUpdateUserLinksRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.BatchUpdateUserLinksRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.BatchUpdateUserLinksRequest} BatchUpdateUserLinksRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BatchUpdateUserLinksRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.BatchUpdateUserLinksRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + if (!(message.requests && message.requests.length)) + message.requests = []; + message.requests.push($root.google.analytics.admin.v1alpha.UpdateUserLinkRequest.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BatchUpdateUserLinksRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.BatchUpdateUserLinksRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.BatchUpdateUserLinksRequest} BatchUpdateUserLinksRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BatchUpdateUserLinksRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BatchUpdateUserLinksRequest message. + * @function verify + * @memberof google.analytics.admin.v1alpha.BatchUpdateUserLinksRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BatchUpdateUserLinksRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.requests != null && message.hasOwnProperty("requests")) { + if (!Array.isArray(message.requests)) + return "requests: array expected"; + for (var i = 0; i < message.requests.length; ++i) { + var error = $root.google.analytics.admin.v1alpha.UpdateUserLinkRequest.verify(message.requests[i]); + if (error) + return "requests." + error; + } + } + return null; + }; + + /** + * Creates a BatchUpdateUserLinksRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.BatchUpdateUserLinksRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.BatchUpdateUserLinksRequest} BatchUpdateUserLinksRequest + */ + BatchUpdateUserLinksRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.BatchUpdateUserLinksRequest) + return object; + var message = new $root.google.analytics.admin.v1alpha.BatchUpdateUserLinksRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.requests) { + if (!Array.isArray(object.requests)) + throw TypeError(".google.analytics.admin.v1alpha.BatchUpdateUserLinksRequest.requests: array expected"); + message.requests = []; + for (var i = 0; i < object.requests.length; ++i) { + if (typeof object.requests[i] !== "object") + throw TypeError(".google.analytics.admin.v1alpha.BatchUpdateUserLinksRequest.requests: object expected"); + message.requests[i] = $root.google.analytics.admin.v1alpha.UpdateUserLinkRequest.fromObject(object.requests[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a BatchUpdateUserLinksRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.BatchUpdateUserLinksRequest + * @static + * @param {google.analytics.admin.v1alpha.BatchUpdateUserLinksRequest} message BatchUpdateUserLinksRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BatchUpdateUserLinksRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.requests = []; + if (options.defaults) + object.parent = ""; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.requests && message.requests.length) { + object.requests = []; + for (var j = 0; j < message.requests.length; ++j) + object.requests[j] = $root.google.analytics.admin.v1alpha.UpdateUserLinkRequest.toObject(message.requests[j], options); + } + return object; + }; + + /** + * Converts this BatchUpdateUserLinksRequest to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.BatchUpdateUserLinksRequest + * @instance + * @returns {Object.} JSON object + */ + BatchUpdateUserLinksRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BatchUpdateUserLinksRequest + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.BatchUpdateUserLinksRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BatchUpdateUserLinksRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.BatchUpdateUserLinksRequest"; + }; + + return BatchUpdateUserLinksRequest; + })(); + + v1alpha.BatchUpdateUserLinksResponse = (function() { + + /** + * Properties of a BatchUpdateUserLinksResponse. + * @memberof google.analytics.admin.v1alpha + * @interface IBatchUpdateUserLinksResponse + * @property {Array.|null} [userLinks] BatchUpdateUserLinksResponse userLinks + */ + + /** + * Constructs a new BatchUpdateUserLinksResponse. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents a BatchUpdateUserLinksResponse. + * @implements IBatchUpdateUserLinksResponse + * @constructor + * @param {google.analytics.admin.v1alpha.IBatchUpdateUserLinksResponse=} [properties] Properties to set + */ + function BatchUpdateUserLinksResponse(properties) { + this.userLinks = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BatchUpdateUserLinksResponse userLinks. + * @member {Array.} userLinks + * @memberof google.analytics.admin.v1alpha.BatchUpdateUserLinksResponse + * @instance + */ + BatchUpdateUserLinksResponse.prototype.userLinks = $util.emptyArray; + + /** + * Creates a new BatchUpdateUserLinksResponse instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.BatchUpdateUserLinksResponse + * @static + * @param {google.analytics.admin.v1alpha.IBatchUpdateUserLinksResponse=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.BatchUpdateUserLinksResponse} BatchUpdateUserLinksResponse instance + */ + BatchUpdateUserLinksResponse.create = function create(properties) { + return new BatchUpdateUserLinksResponse(properties); + }; + + /** + * Encodes the specified BatchUpdateUserLinksResponse message. Does not implicitly {@link google.analytics.admin.v1alpha.BatchUpdateUserLinksResponse.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.BatchUpdateUserLinksResponse + * @static + * @param {google.analytics.admin.v1alpha.IBatchUpdateUserLinksResponse} message BatchUpdateUserLinksResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BatchUpdateUserLinksResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.userLinks != null && message.userLinks.length) + for (var i = 0; i < message.userLinks.length; ++i) + $root.google.analytics.admin.v1alpha.UserLink.encode(message.userLinks[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified BatchUpdateUserLinksResponse message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.BatchUpdateUserLinksResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.BatchUpdateUserLinksResponse + * @static + * @param {google.analytics.admin.v1alpha.IBatchUpdateUserLinksResponse} message BatchUpdateUserLinksResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BatchUpdateUserLinksResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BatchUpdateUserLinksResponse message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.BatchUpdateUserLinksResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.BatchUpdateUserLinksResponse} BatchUpdateUserLinksResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BatchUpdateUserLinksResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.BatchUpdateUserLinksResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.userLinks && message.userLinks.length)) + message.userLinks = []; + message.userLinks.push($root.google.analytics.admin.v1alpha.UserLink.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BatchUpdateUserLinksResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.BatchUpdateUserLinksResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.BatchUpdateUserLinksResponse} BatchUpdateUserLinksResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BatchUpdateUserLinksResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BatchUpdateUserLinksResponse message. + * @function verify + * @memberof google.analytics.admin.v1alpha.BatchUpdateUserLinksResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BatchUpdateUserLinksResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.userLinks != null && message.hasOwnProperty("userLinks")) { + if (!Array.isArray(message.userLinks)) + return "userLinks: array expected"; + for (var i = 0; i < message.userLinks.length; ++i) { + var error = $root.google.analytics.admin.v1alpha.UserLink.verify(message.userLinks[i]); + if (error) + return "userLinks." + error; + } + } + return null; + }; + + /** + * Creates a BatchUpdateUserLinksResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.BatchUpdateUserLinksResponse + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.BatchUpdateUserLinksResponse} BatchUpdateUserLinksResponse + */ + BatchUpdateUserLinksResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.BatchUpdateUserLinksResponse) + return object; + var message = new $root.google.analytics.admin.v1alpha.BatchUpdateUserLinksResponse(); + if (object.userLinks) { + if (!Array.isArray(object.userLinks)) + throw TypeError(".google.analytics.admin.v1alpha.BatchUpdateUserLinksResponse.userLinks: array expected"); + message.userLinks = []; + for (var i = 0; i < object.userLinks.length; ++i) { + if (typeof object.userLinks[i] !== "object") + throw TypeError(".google.analytics.admin.v1alpha.BatchUpdateUserLinksResponse.userLinks: object expected"); + message.userLinks[i] = $root.google.analytics.admin.v1alpha.UserLink.fromObject(object.userLinks[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a BatchUpdateUserLinksResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.BatchUpdateUserLinksResponse + * @static + * @param {google.analytics.admin.v1alpha.BatchUpdateUserLinksResponse} message BatchUpdateUserLinksResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BatchUpdateUserLinksResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.userLinks = []; + if (message.userLinks && message.userLinks.length) { + object.userLinks = []; + for (var j = 0; j < message.userLinks.length; ++j) + object.userLinks[j] = $root.google.analytics.admin.v1alpha.UserLink.toObject(message.userLinks[j], options); + } + return object; + }; + + /** + * Converts this BatchUpdateUserLinksResponse to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.BatchUpdateUserLinksResponse + * @instance + * @returns {Object.} JSON object + */ + BatchUpdateUserLinksResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BatchUpdateUserLinksResponse + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.BatchUpdateUserLinksResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BatchUpdateUserLinksResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.BatchUpdateUserLinksResponse"; + }; + + return BatchUpdateUserLinksResponse; + })(); + + v1alpha.DeleteUserLinkRequest = (function() { + + /** + * Properties of a DeleteUserLinkRequest. + * @memberof google.analytics.admin.v1alpha + * @interface IDeleteUserLinkRequest + * @property {string|null} [name] DeleteUserLinkRequest name + */ + + /** + * Constructs a new DeleteUserLinkRequest. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents a DeleteUserLinkRequest. + * @implements IDeleteUserLinkRequest + * @constructor + * @param {google.analytics.admin.v1alpha.IDeleteUserLinkRequest=} [properties] Properties to set + */ + function DeleteUserLinkRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteUserLinkRequest name. + * @member {string} name + * @memberof google.analytics.admin.v1alpha.DeleteUserLinkRequest + * @instance + */ + DeleteUserLinkRequest.prototype.name = ""; + + /** + * Creates a new DeleteUserLinkRequest instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.DeleteUserLinkRequest + * @static + * @param {google.analytics.admin.v1alpha.IDeleteUserLinkRequest=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.DeleteUserLinkRequest} DeleteUserLinkRequest instance + */ + DeleteUserLinkRequest.create = function create(properties) { + return new DeleteUserLinkRequest(properties); + }; + + /** + * Encodes the specified DeleteUserLinkRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.DeleteUserLinkRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.DeleteUserLinkRequest + * @static + * @param {google.analytics.admin.v1alpha.IDeleteUserLinkRequest} message DeleteUserLinkRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteUserLinkRequest.encode = function encode(message, writer) { + 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 DeleteUserLinkRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.DeleteUserLinkRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.DeleteUserLinkRequest + * @static + * @param {google.analytics.admin.v1alpha.IDeleteUserLinkRequest} message DeleteUserLinkRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteUserLinkRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteUserLinkRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.DeleteUserLinkRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.DeleteUserLinkRequest} DeleteUserLinkRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteUserLinkRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.DeleteUserLinkRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteUserLinkRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.DeleteUserLinkRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.DeleteUserLinkRequest} DeleteUserLinkRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteUserLinkRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteUserLinkRequest message. + * @function verify + * @memberof google.analytics.admin.v1alpha.DeleteUserLinkRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteUserLinkRequest.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 DeleteUserLinkRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.DeleteUserLinkRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.DeleteUserLinkRequest} DeleteUserLinkRequest + */ + DeleteUserLinkRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.DeleteUserLinkRequest) + return object; + var message = new $root.google.analytics.admin.v1alpha.DeleteUserLinkRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteUserLinkRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.DeleteUserLinkRequest + * @static + * @param {google.analytics.admin.v1alpha.DeleteUserLinkRequest} message DeleteUserLinkRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteUserLinkRequest.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 DeleteUserLinkRequest to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.DeleteUserLinkRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteUserLinkRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteUserLinkRequest + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.DeleteUserLinkRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteUserLinkRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.DeleteUserLinkRequest"; + }; + + return DeleteUserLinkRequest; + })(); + + v1alpha.BatchDeleteUserLinksRequest = (function() { + + /** + * Properties of a BatchDeleteUserLinksRequest. + * @memberof google.analytics.admin.v1alpha + * @interface IBatchDeleteUserLinksRequest + * @property {string|null} [parent] BatchDeleteUserLinksRequest parent + * @property {Array.|null} [requests] BatchDeleteUserLinksRequest requests + */ + + /** + * Constructs a new BatchDeleteUserLinksRequest. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents a BatchDeleteUserLinksRequest. + * @implements IBatchDeleteUserLinksRequest + * @constructor + * @param {google.analytics.admin.v1alpha.IBatchDeleteUserLinksRequest=} [properties] Properties to set + */ + function BatchDeleteUserLinksRequest(properties) { + this.requests = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BatchDeleteUserLinksRequest parent. + * @member {string} parent + * @memberof google.analytics.admin.v1alpha.BatchDeleteUserLinksRequest + * @instance + */ + BatchDeleteUserLinksRequest.prototype.parent = ""; + + /** + * BatchDeleteUserLinksRequest requests. + * @member {Array.} requests + * @memberof google.analytics.admin.v1alpha.BatchDeleteUserLinksRequest + * @instance + */ + BatchDeleteUserLinksRequest.prototype.requests = $util.emptyArray; + + /** + * Creates a new BatchDeleteUserLinksRequest instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.BatchDeleteUserLinksRequest + * @static + * @param {google.analytics.admin.v1alpha.IBatchDeleteUserLinksRequest=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.BatchDeleteUserLinksRequest} BatchDeleteUserLinksRequest instance + */ + BatchDeleteUserLinksRequest.create = function create(properties) { + return new BatchDeleteUserLinksRequest(properties); + }; + + /** + * Encodes the specified BatchDeleteUserLinksRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.BatchDeleteUserLinksRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.BatchDeleteUserLinksRequest + * @static + * @param {google.analytics.admin.v1alpha.IBatchDeleteUserLinksRequest} message BatchDeleteUserLinksRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BatchDeleteUserLinksRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.requests != null && message.requests.length) + for (var i = 0; i < message.requests.length; ++i) + $root.google.analytics.admin.v1alpha.DeleteUserLinkRequest.encode(message.requests[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified BatchDeleteUserLinksRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.BatchDeleteUserLinksRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.BatchDeleteUserLinksRequest + * @static + * @param {google.analytics.admin.v1alpha.IBatchDeleteUserLinksRequest} message BatchDeleteUserLinksRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BatchDeleteUserLinksRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BatchDeleteUserLinksRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.BatchDeleteUserLinksRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.BatchDeleteUserLinksRequest} BatchDeleteUserLinksRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BatchDeleteUserLinksRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.BatchDeleteUserLinksRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + if (!(message.requests && message.requests.length)) + message.requests = []; + message.requests.push($root.google.analytics.admin.v1alpha.DeleteUserLinkRequest.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BatchDeleteUserLinksRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.BatchDeleteUserLinksRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.BatchDeleteUserLinksRequest} BatchDeleteUserLinksRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BatchDeleteUserLinksRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BatchDeleteUserLinksRequest message. + * @function verify + * @memberof google.analytics.admin.v1alpha.BatchDeleteUserLinksRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BatchDeleteUserLinksRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.requests != null && message.hasOwnProperty("requests")) { + if (!Array.isArray(message.requests)) + return "requests: array expected"; + for (var i = 0; i < message.requests.length; ++i) { + var error = $root.google.analytics.admin.v1alpha.DeleteUserLinkRequest.verify(message.requests[i]); + if (error) + return "requests." + error; + } + } + return null; + }; + + /** + * Creates a BatchDeleteUserLinksRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.BatchDeleteUserLinksRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.BatchDeleteUserLinksRequest} BatchDeleteUserLinksRequest + */ + BatchDeleteUserLinksRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.BatchDeleteUserLinksRequest) + return object; + var message = new $root.google.analytics.admin.v1alpha.BatchDeleteUserLinksRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.requests) { + if (!Array.isArray(object.requests)) + throw TypeError(".google.analytics.admin.v1alpha.BatchDeleteUserLinksRequest.requests: array expected"); + message.requests = []; + for (var i = 0; i < object.requests.length; ++i) { + if (typeof object.requests[i] !== "object") + throw TypeError(".google.analytics.admin.v1alpha.BatchDeleteUserLinksRequest.requests: object expected"); + message.requests[i] = $root.google.analytics.admin.v1alpha.DeleteUserLinkRequest.fromObject(object.requests[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a BatchDeleteUserLinksRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.BatchDeleteUserLinksRequest + * @static + * @param {google.analytics.admin.v1alpha.BatchDeleteUserLinksRequest} message BatchDeleteUserLinksRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BatchDeleteUserLinksRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.requests = []; + if (options.defaults) + object.parent = ""; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.requests && message.requests.length) { + object.requests = []; + for (var j = 0; j < message.requests.length; ++j) + object.requests[j] = $root.google.analytics.admin.v1alpha.DeleteUserLinkRequest.toObject(message.requests[j], options); + } + return object; + }; + + /** + * Converts this BatchDeleteUserLinksRequest to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.BatchDeleteUserLinksRequest + * @instance + * @returns {Object.} JSON object + */ + BatchDeleteUserLinksRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BatchDeleteUserLinksRequest + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.BatchDeleteUserLinksRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BatchDeleteUserLinksRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.BatchDeleteUserLinksRequest"; + }; + + return BatchDeleteUserLinksRequest; + })(); + + v1alpha.CreateFirebaseLinkRequest = (function() { + + /** + * Properties of a CreateFirebaseLinkRequest. + * @memberof google.analytics.admin.v1alpha + * @interface ICreateFirebaseLinkRequest + * @property {string|null} [parent] CreateFirebaseLinkRequest parent + * @property {google.analytics.admin.v1alpha.IFirebaseLink|null} [firebaseLink] CreateFirebaseLinkRequest firebaseLink + */ + + /** + * Constructs a new CreateFirebaseLinkRequest. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents a CreateFirebaseLinkRequest. + * @implements ICreateFirebaseLinkRequest + * @constructor + * @param {google.analytics.admin.v1alpha.ICreateFirebaseLinkRequest=} [properties] Properties to set + */ + function CreateFirebaseLinkRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateFirebaseLinkRequest parent. + * @member {string} parent + * @memberof google.analytics.admin.v1alpha.CreateFirebaseLinkRequest + * @instance + */ + CreateFirebaseLinkRequest.prototype.parent = ""; + + /** + * CreateFirebaseLinkRequest firebaseLink. + * @member {google.analytics.admin.v1alpha.IFirebaseLink|null|undefined} firebaseLink + * @memberof google.analytics.admin.v1alpha.CreateFirebaseLinkRequest + * @instance + */ + CreateFirebaseLinkRequest.prototype.firebaseLink = null; + + /** + * Creates a new CreateFirebaseLinkRequest instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.CreateFirebaseLinkRequest + * @static + * @param {google.analytics.admin.v1alpha.ICreateFirebaseLinkRequest=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.CreateFirebaseLinkRequest} CreateFirebaseLinkRequest instance + */ + CreateFirebaseLinkRequest.create = function create(properties) { + return new CreateFirebaseLinkRequest(properties); + }; + + /** + * Encodes the specified CreateFirebaseLinkRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.CreateFirebaseLinkRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.CreateFirebaseLinkRequest + * @static + * @param {google.analytics.admin.v1alpha.ICreateFirebaseLinkRequest} message CreateFirebaseLinkRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateFirebaseLinkRequest.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.firebaseLink != null && Object.hasOwnProperty.call(message, "firebaseLink")) + $root.google.analytics.admin.v1alpha.FirebaseLink.encode(message.firebaseLink, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CreateFirebaseLinkRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.CreateFirebaseLinkRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.CreateFirebaseLinkRequest + * @static + * @param {google.analytics.admin.v1alpha.ICreateFirebaseLinkRequest} message CreateFirebaseLinkRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateFirebaseLinkRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateFirebaseLinkRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.CreateFirebaseLinkRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.CreateFirebaseLinkRequest} CreateFirebaseLinkRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateFirebaseLinkRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.CreateFirebaseLinkRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.firebaseLink = $root.google.analytics.admin.v1alpha.FirebaseLink.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateFirebaseLinkRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.CreateFirebaseLinkRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.CreateFirebaseLinkRequest} CreateFirebaseLinkRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateFirebaseLinkRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateFirebaseLinkRequest message. + * @function verify + * @memberof google.analytics.admin.v1alpha.CreateFirebaseLinkRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateFirebaseLinkRequest.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.firebaseLink != null && message.hasOwnProperty("firebaseLink")) { + var error = $root.google.analytics.admin.v1alpha.FirebaseLink.verify(message.firebaseLink); + if (error) + return "firebaseLink." + error; + } + return null; + }; + + /** + * Creates a CreateFirebaseLinkRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.CreateFirebaseLinkRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.CreateFirebaseLinkRequest} CreateFirebaseLinkRequest + */ + CreateFirebaseLinkRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.CreateFirebaseLinkRequest) + return object; + var message = new $root.google.analytics.admin.v1alpha.CreateFirebaseLinkRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.firebaseLink != null) { + if (typeof object.firebaseLink !== "object") + throw TypeError(".google.analytics.admin.v1alpha.CreateFirebaseLinkRequest.firebaseLink: object expected"); + message.firebaseLink = $root.google.analytics.admin.v1alpha.FirebaseLink.fromObject(object.firebaseLink); + } + return message; + }; + + /** + * Creates a plain object from a CreateFirebaseLinkRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.CreateFirebaseLinkRequest + * @static + * @param {google.analytics.admin.v1alpha.CreateFirebaseLinkRequest} message CreateFirebaseLinkRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateFirebaseLinkRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.firebaseLink = null; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.firebaseLink != null && message.hasOwnProperty("firebaseLink")) + object.firebaseLink = $root.google.analytics.admin.v1alpha.FirebaseLink.toObject(message.firebaseLink, options); + return object; + }; + + /** + * Converts this CreateFirebaseLinkRequest to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.CreateFirebaseLinkRequest + * @instance + * @returns {Object.} JSON object + */ + CreateFirebaseLinkRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateFirebaseLinkRequest + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.CreateFirebaseLinkRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateFirebaseLinkRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.CreateFirebaseLinkRequest"; + }; + + return CreateFirebaseLinkRequest; + })(); + + v1alpha.DeleteFirebaseLinkRequest = (function() { + + /** + * Properties of a DeleteFirebaseLinkRequest. + * @memberof google.analytics.admin.v1alpha + * @interface IDeleteFirebaseLinkRequest + * @property {string|null} [name] DeleteFirebaseLinkRequest name + */ + + /** + * Constructs a new DeleteFirebaseLinkRequest. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents a DeleteFirebaseLinkRequest. + * @implements IDeleteFirebaseLinkRequest + * @constructor + * @param {google.analytics.admin.v1alpha.IDeleteFirebaseLinkRequest=} [properties] Properties to set + */ + function DeleteFirebaseLinkRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteFirebaseLinkRequest name. + * @member {string} name + * @memberof google.analytics.admin.v1alpha.DeleteFirebaseLinkRequest + * @instance + */ + DeleteFirebaseLinkRequest.prototype.name = ""; + + /** + * Creates a new DeleteFirebaseLinkRequest instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.DeleteFirebaseLinkRequest + * @static + * @param {google.analytics.admin.v1alpha.IDeleteFirebaseLinkRequest=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.DeleteFirebaseLinkRequest} DeleteFirebaseLinkRequest instance + */ + DeleteFirebaseLinkRequest.create = function create(properties) { + return new DeleteFirebaseLinkRequest(properties); + }; + + /** + * Encodes the specified DeleteFirebaseLinkRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.DeleteFirebaseLinkRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.DeleteFirebaseLinkRequest + * @static + * @param {google.analytics.admin.v1alpha.IDeleteFirebaseLinkRequest} message DeleteFirebaseLinkRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteFirebaseLinkRequest.encode = function encode(message, writer) { + 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 DeleteFirebaseLinkRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.DeleteFirebaseLinkRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.DeleteFirebaseLinkRequest + * @static + * @param {google.analytics.admin.v1alpha.IDeleteFirebaseLinkRequest} message DeleteFirebaseLinkRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteFirebaseLinkRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteFirebaseLinkRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.DeleteFirebaseLinkRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.DeleteFirebaseLinkRequest} DeleteFirebaseLinkRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteFirebaseLinkRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.DeleteFirebaseLinkRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteFirebaseLinkRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.DeleteFirebaseLinkRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.DeleteFirebaseLinkRequest} DeleteFirebaseLinkRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteFirebaseLinkRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteFirebaseLinkRequest message. + * @function verify + * @memberof google.analytics.admin.v1alpha.DeleteFirebaseLinkRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteFirebaseLinkRequest.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 DeleteFirebaseLinkRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.DeleteFirebaseLinkRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.DeleteFirebaseLinkRequest} DeleteFirebaseLinkRequest + */ + DeleteFirebaseLinkRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.DeleteFirebaseLinkRequest) + return object; + var message = new $root.google.analytics.admin.v1alpha.DeleteFirebaseLinkRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteFirebaseLinkRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.DeleteFirebaseLinkRequest + * @static + * @param {google.analytics.admin.v1alpha.DeleteFirebaseLinkRequest} message DeleteFirebaseLinkRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteFirebaseLinkRequest.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 DeleteFirebaseLinkRequest to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.DeleteFirebaseLinkRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteFirebaseLinkRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteFirebaseLinkRequest + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.DeleteFirebaseLinkRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteFirebaseLinkRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.DeleteFirebaseLinkRequest"; + }; + + return DeleteFirebaseLinkRequest; + })(); + + v1alpha.ListFirebaseLinksRequest = (function() { + + /** + * Properties of a ListFirebaseLinksRequest. + * @memberof google.analytics.admin.v1alpha + * @interface IListFirebaseLinksRequest + * @property {string|null} [parent] ListFirebaseLinksRequest parent + * @property {number|null} [pageSize] ListFirebaseLinksRequest pageSize + * @property {string|null} [pageToken] ListFirebaseLinksRequest pageToken + */ + + /** + * Constructs a new ListFirebaseLinksRequest. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents a ListFirebaseLinksRequest. + * @implements IListFirebaseLinksRequest + * @constructor + * @param {google.analytics.admin.v1alpha.IListFirebaseLinksRequest=} [properties] Properties to set + */ + function ListFirebaseLinksRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListFirebaseLinksRequest parent. + * @member {string} parent + * @memberof google.analytics.admin.v1alpha.ListFirebaseLinksRequest + * @instance + */ + ListFirebaseLinksRequest.prototype.parent = ""; + + /** + * ListFirebaseLinksRequest pageSize. + * @member {number} pageSize + * @memberof google.analytics.admin.v1alpha.ListFirebaseLinksRequest + * @instance + */ + ListFirebaseLinksRequest.prototype.pageSize = 0; + + /** + * ListFirebaseLinksRequest pageToken. + * @member {string} pageToken + * @memberof google.analytics.admin.v1alpha.ListFirebaseLinksRequest + * @instance + */ + ListFirebaseLinksRequest.prototype.pageToken = ""; + + /** + * Creates a new ListFirebaseLinksRequest instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.ListFirebaseLinksRequest + * @static + * @param {google.analytics.admin.v1alpha.IListFirebaseLinksRequest=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.ListFirebaseLinksRequest} ListFirebaseLinksRequest instance + */ + ListFirebaseLinksRequest.create = function create(properties) { + return new ListFirebaseLinksRequest(properties); + }; + + /** + * Encodes the specified ListFirebaseLinksRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.ListFirebaseLinksRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.ListFirebaseLinksRequest + * @static + * @param {google.analytics.admin.v1alpha.IListFirebaseLinksRequest} message ListFirebaseLinksRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListFirebaseLinksRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + return writer; + }; + + /** + * Encodes the specified ListFirebaseLinksRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.ListFirebaseLinksRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.ListFirebaseLinksRequest + * @static + * @param {google.analytics.admin.v1alpha.IListFirebaseLinksRequest} message ListFirebaseLinksRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListFirebaseLinksRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListFirebaseLinksRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.ListFirebaseLinksRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.ListFirebaseLinksRequest} ListFirebaseLinksRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListFirebaseLinksRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.ListFirebaseLinksRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListFirebaseLinksRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.ListFirebaseLinksRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.ListFirebaseLinksRequest} ListFirebaseLinksRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListFirebaseLinksRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListFirebaseLinksRequest message. + * @function verify + * @memberof google.analytics.admin.v1alpha.ListFirebaseLinksRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListFirebaseLinksRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + return null; + }; + + /** + * Creates a ListFirebaseLinksRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.ListFirebaseLinksRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.ListFirebaseLinksRequest} ListFirebaseLinksRequest + */ + ListFirebaseLinksRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.ListFirebaseLinksRequest) + return object; + var message = new $root.google.analytics.admin.v1alpha.ListFirebaseLinksRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + return message; + }; + + /** + * Creates a plain object from a ListFirebaseLinksRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.ListFirebaseLinksRequest + * @static + * @param {google.analytics.admin.v1alpha.ListFirebaseLinksRequest} message ListFirebaseLinksRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListFirebaseLinksRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + return object; + }; + + /** + * Converts this ListFirebaseLinksRequest to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.ListFirebaseLinksRequest + * @instance + * @returns {Object.} JSON object + */ + ListFirebaseLinksRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListFirebaseLinksRequest + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.ListFirebaseLinksRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListFirebaseLinksRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.ListFirebaseLinksRequest"; + }; + + return ListFirebaseLinksRequest; + })(); + + v1alpha.ListFirebaseLinksResponse = (function() { + + /** + * Properties of a ListFirebaseLinksResponse. + * @memberof google.analytics.admin.v1alpha + * @interface IListFirebaseLinksResponse + * @property {Array.|null} [firebaseLinks] ListFirebaseLinksResponse firebaseLinks + * @property {string|null} [nextPageToken] ListFirebaseLinksResponse nextPageToken + */ + + /** + * Constructs a new ListFirebaseLinksResponse. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents a ListFirebaseLinksResponse. + * @implements IListFirebaseLinksResponse + * @constructor + * @param {google.analytics.admin.v1alpha.IListFirebaseLinksResponse=} [properties] Properties to set + */ + function ListFirebaseLinksResponse(properties) { + this.firebaseLinks = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListFirebaseLinksResponse firebaseLinks. + * @member {Array.} firebaseLinks + * @memberof google.analytics.admin.v1alpha.ListFirebaseLinksResponse + * @instance + */ + ListFirebaseLinksResponse.prototype.firebaseLinks = $util.emptyArray; + + /** + * ListFirebaseLinksResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.analytics.admin.v1alpha.ListFirebaseLinksResponse + * @instance + */ + ListFirebaseLinksResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListFirebaseLinksResponse instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.ListFirebaseLinksResponse + * @static + * @param {google.analytics.admin.v1alpha.IListFirebaseLinksResponse=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.ListFirebaseLinksResponse} ListFirebaseLinksResponse instance + */ + ListFirebaseLinksResponse.create = function create(properties) { + return new ListFirebaseLinksResponse(properties); + }; + + /** + * Encodes the specified ListFirebaseLinksResponse message. Does not implicitly {@link google.analytics.admin.v1alpha.ListFirebaseLinksResponse.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.ListFirebaseLinksResponse + * @static + * @param {google.analytics.admin.v1alpha.IListFirebaseLinksResponse} message ListFirebaseLinksResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListFirebaseLinksResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.firebaseLinks != null && message.firebaseLinks.length) + for (var i = 0; i < message.firebaseLinks.length; ++i) + $root.google.analytics.admin.v1alpha.FirebaseLink.encode(message.firebaseLinks[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 ListFirebaseLinksResponse message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.ListFirebaseLinksResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.ListFirebaseLinksResponse + * @static + * @param {google.analytics.admin.v1alpha.IListFirebaseLinksResponse} message ListFirebaseLinksResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListFirebaseLinksResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListFirebaseLinksResponse message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.ListFirebaseLinksResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.ListFirebaseLinksResponse} ListFirebaseLinksResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListFirebaseLinksResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.ListFirebaseLinksResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.firebaseLinks && message.firebaseLinks.length)) + message.firebaseLinks = []; + message.firebaseLinks.push($root.google.analytics.admin.v1alpha.FirebaseLink.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListFirebaseLinksResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.ListFirebaseLinksResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.ListFirebaseLinksResponse} ListFirebaseLinksResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListFirebaseLinksResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListFirebaseLinksResponse message. + * @function verify + * @memberof google.analytics.admin.v1alpha.ListFirebaseLinksResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListFirebaseLinksResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.firebaseLinks != null && message.hasOwnProperty("firebaseLinks")) { + if (!Array.isArray(message.firebaseLinks)) + return "firebaseLinks: array expected"; + for (var i = 0; i < message.firebaseLinks.length; ++i) { + var error = $root.google.analytics.admin.v1alpha.FirebaseLink.verify(message.firebaseLinks[i]); + if (error) + return "firebaseLinks." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListFirebaseLinksResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.ListFirebaseLinksResponse + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.ListFirebaseLinksResponse} ListFirebaseLinksResponse + */ + ListFirebaseLinksResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.ListFirebaseLinksResponse) + return object; + var message = new $root.google.analytics.admin.v1alpha.ListFirebaseLinksResponse(); + if (object.firebaseLinks) { + if (!Array.isArray(object.firebaseLinks)) + throw TypeError(".google.analytics.admin.v1alpha.ListFirebaseLinksResponse.firebaseLinks: array expected"); + message.firebaseLinks = []; + for (var i = 0; i < object.firebaseLinks.length; ++i) { + if (typeof object.firebaseLinks[i] !== "object") + throw TypeError(".google.analytics.admin.v1alpha.ListFirebaseLinksResponse.firebaseLinks: object expected"); + message.firebaseLinks[i] = $root.google.analytics.admin.v1alpha.FirebaseLink.fromObject(object.firebaseLinks[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListFirebaseLinksResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.ListFirebaseLinksResponse + * @static + * @param {google.analytics.admin.v1alpha.ListFirebaseLinksResponse} message ListFirebaseLinksResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListFirebaseLinksResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.firebaseLinks = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.firebaseLinks && message.firebaseLinks.length) { + object.firebaseLinks = []; + for (var j = 0; j < message.firebaseLinks.length; ++j) + object.firebaseLinks[j] = $root.google.analytics.admin.v1alpha.FirebaseLink.toObject(message.firebaseLinks[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListFirebaseLinksResponse to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.ListFirebaseLinksResponse + * @instance + * @returns {Object.} JSON object + */ + ListFirebaseLinksResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListFirebaseLinksResponse + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.ListFirebaseLinksResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListFirebaseLinksResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.ListFirebaseLinksResponse"; + }; + + return ListFirebaseLinksResponse; + })(); + + v1alpha.GetGlobalSiteTagRequest = (function() { + + /** + * Properties of a GetGlobalSiteTagRequest. + * @memberof google.analytics.admin.v1alpha + * @interface IGetGlobalSiteTagRequest + * @property {string|null} [name] GetGlobalSiteTagRequest name + */ + + /** + * Constructs a new GetGlobalSiteTagRequest. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents a GetGlobalSiteTagRequest. + * @implements IGetGlobalSiteTagRequest + * @constructor + * @param {google.analytics.admin.v1alpha.IGetGlobalSiteTagRequest=} [properties] Properties to set + */ + function GetGlobalSiteTagRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetGlobalSiteTagRequest name. + * @member {string} name + * @memberof google.analytics.admin.v1alpha.GetGlobalSiteTagRequest + * @instance + */ + GetGlobalSiteTagRequest.prototype.name = ""; + + /** + * Creates a new GetGlobalSiteTagRequest instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.GetGlobalSiteTagRequest + * @static + * @param {google.analytics.admin.v1alpha.IGetGlobalSiteTagRequest=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.GetGlobalSiteTagRequest} GetGlobalSiteTagRequest instance + */ + GetGlobalSiteTagRequest.create = function create(properties) { + return new GetGlobalSiteTagRequest(properties); + }; + + /** + * Encodes the specified GetGlobalSiteTagRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.GetGlobalSiteTagRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.GetGlobalSiteTagRequest + * @static + * @param {google.analytics.admin.v1alpha.IGetGlobalSiteTagRequest} message GetGlobalSiteTagRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetGlobalSiteTagRequest.encode = function encode(message, writer) { + 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 GetGlobalSiteTagRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.GetGlobalSiteTagRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.GetGlobalSiteTagRequest + * @static + * @param {google.analytics.admin.v1alpha.IGetGlobalSiteTagRequest} message GetGlobalSiteTagRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetGlobalSiteTagRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetGlobalSiteTagRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.GetGlobalSiteTagRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.GetGlobalSiteTagRequest} GetGlobalSiteTagRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetGlobalSiteTagRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.GetGlobalSiteTagRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetGlobalSiteTagRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.GetGlobalSiteTagRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.GetGlobalSiteTagRequest} GetGlobalSiteTagRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetGlobalSiteTagRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetGlobalSiteTagRequest message. + * @function verify + * @memberof google.analytics.admin.v1alpha.GetGlobalSiteTagRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetGlobalSiteTagRequest.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 GetGlobalSiteTagRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.GetGlobalSiteTagRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.GetGlobalSiteTagRequest} GetGlobalSiteTagRequest + */ + GetGlobalSiteTagRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.GetGlobalSiteTagRequest) + return object; + var message = new $root.google.analytics.admin.v1alpha.GetGlobalSiteTagRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetGlobalSiteTagRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.GetGlobalSiteTagRequest + * @static + * @param {google.analytics.admin.v1alpha.GetGlobalSiteTagRequest} message GetGlobalSiteTagRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetGlobalSiteTagRequest.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 GetGlobalSiteTagRequest to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.GetGlobalSiteTagRequest + * @instance + * @returns {Object.} JSON object + */ + GetGlobalSiteTagRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetGlobalSiteTagRequest + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.GetGlobalSiteTagRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetGlobalSiteTagRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.GetGlobalSiteTagRequest"; + }; + + return GetGlobalSiteTagRequest; + })(); + + v1alpha.CreateGoogleAdsLinkRequest = (function() { + + /** + * Properties of a CreateGoogleAdsLinkRequest. + * @memberof google.analytics.admin.v1alpha + * @interface ICreateGoogleAdsLinkRequest + * @property {string|null} [parent] CreateGoogleAdsLinkRequest parent + * @property {google.analytics.admin.v1alpha.IGoogleAdsLink|null} [googleAdsLink] CreateGoogleAdsLinkRequest googleAdsLink + */ + + /** + * Constructs a new CreateGoogleAdsLinkRequest. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents a CreateGoogleAdsLinkRequest. + * @implements ICreateGoogleAdsLinkRequest + * @constructor + * @param {google.analytics.admin.v1alpha.ICreateGoogleAdsLinkRequest=} [properties] Properties to set + */ + function CreateGoogleAdsLinkRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateGoogleAdsLinkRequest parent. + * @member {string} parent + * @memberof google.analytics.admin.v1alpha.CreateGoogleAdsLinkRequest + * @instance + */ + CreateGoogleAdsLinkRequest.prototype.parent = ""; + + /** + * CreateGoogleAdsLinkRequest googleAdsLink. + * @member {google.analytics.admin.v1alpha.IGoogleAdsLink|null|undefined} googleAdsLink + * @memberof google.analytics.admin.v1alpha.CreateGoogleAdsLinkRequest + * @instance + */ + CreateGoogleAdsLinkRequest.prototype.googleAdsLink = null; + + /** + * Creates a new CreateGoogleAdsLinkRequest instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.CreateGoogleAdsLinkRequest + * @static + * @param {google.analytics.admin.v1alpha.ICreateGoogleAdsLinkRequest=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.CreateGoogleAdsLinkRequest} CreateGoogleAdsLinkRequest instance + */ + CreateGoogleAdsLinkRequest.create = function create(properties) { + return new CreateGoogleAdsLinkRequest(properties); + }; + + /** + * Encodes the specified CreateGoogleAdsLinkRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.CreateGoogleAdsLinkRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.CreateGoogleAdsLinkRequest + * @static + * @param {google.analytics.admin.v1alpha.ICreateGoogleAdsLinkRequest} message CreateGoogleAdsLinkRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateGoogleAdsLinkRequest.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.googleAdsLink != null && Object.hasOwnProperty.call(message, "googleAdsLink")) + $root.google.analytics.admin.v1alpha.GoogleAdsLink.encode(message.googleAdsLink, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CreateGoogleAdsLinkRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.CreateGoogleAdsLinkRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.CreateGoogleAdsLinkRequest + * @static + * @param {google.analytics.admin.v1alpha.ICreateGoogleAdsLinkRequest} message CreateGoogleAdsLinkRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateGoogleAdsLinkRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateGoogleAdsLinkRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.CreateGoogleAdsLinkRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.CreateGoogleAdsLinkRequest} CreateGoogleAdsLinkRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateGoogleAdsLinkRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.CreateGoogleAdsLinkRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.googleAdsLink = $root.google.analytics.admin.v1alpha.GoogleAdsLink.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateGoogleAdsLinkRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.CreateGoogleAdsLinkRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.CreateGoogleAdsLinkRequest} CreateGoogleAdsLinkRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateGoogleAdsLinkRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateGoogleAdsLinkRequest message. + * @function verify + * @memberof google.analytics.admin.v1alpha.CreateGoogleAdsLinkRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateGoogleAdsLinkRequest.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.googleAdsLink != null && message.hasOwnProperty("googleAdsLink")) { + var error = $root.google.analytics.admin.v1alpha.GoogleAdsLink.verify(message.googleAdsLink); + if (error) + return "googleAdsLink." + error; + } + return null; + }; + + /** + * Creates a CreateGoogleAdsLinkRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.CreateGoogleAdsLinkRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.CreateGoogleAdsLinkRequest} CreateGoogleAdsLinkRequest + */ + CreateGoogleAdsLinkRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.CreateGoogleAdsLinkRequest) + return object; + var message = new $root.google.analytics.admin.v1alpha.CreateGoogleAdsLinkRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.googleAdsLink != null) { + if (typeof object.googleAdsLink !== "object") + throw TypeError(".google.analytics.admin.v1alpha.CreateGoogleAdsLinkRequest.googleAdsLink: object expected"); + message.googleAdsLink = $root.google.analytics.admin.v1alpha.GoogleAdsLink.fromObject(object.googleAdsLink); + } + return message; + }; + + /** + * Creates a plain object from a CreateGoogleAdsLinkRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.CreateGoogleAdsLinkRequest + * @static + * @param {google.analytics.admin.v1alpha.CreateGoogleAdsLinkRequest} message CreateGoogleAdsLinkRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateGoogleAdsLinkRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.googleAdsLink = null; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.googleAdsLink != null && message.hasOwnProperty("googleAdsLink")) + object.googleAdsLink = $root.google.analytics.admin.v1alpha.GoogleAdsLink.toObject(message.googleAdsLink, options); + return object; + }; + + /** + * Converts this CreateGoogleAdsLinkRequest to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.CreateGoogleAdsLinkRequest + * @instance + * @returns {Object.} JSON object + */ + CreateGoogleAdsLinkRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateGoogleAdsLinkRequest + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.CreateGoogleAdsLinkRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateGoogleAdsLinkRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.CreateGoogleAdsLinkRequest"; + }; + + return CreateGoogleAdsLinkRequest; + })(); + + v1alpha.UpdateGoogleAdsLinkRequest = (function() { + + /** + * Properties of an UpdateGoogleAdsLinkRequest. + * @memberof google.analytics.admin.v1alpha + * @interface IUpdateGoogleAdsLinkRequest + * @property {google.analytics.admin.v1alpha.IGoogleAdsLink|null} [googleAdsLink] UpdateGoogleAdsLinkRequest googleAdsLink + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateGoogleAdsLinkRequest updateMask + */ + + /** + * Constructs a new UpdateGoogleAdsLinkRequest. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents an UpdateGoogleAdsLinkRequest. + * @implements IUpdateGoogleAdsLinkRequest + * @constructor + * @param {google.analytics.admin.v1alpha.IUpdateGoogleAdsLinkRequest=} [properties] Properties to set + */ + function UpdateGoogleAdsLinkRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateGoogleAdsLinkRequest googleAdsLink. + * @member {google.analytics.admin.v1alpha.IGoogleAdsLink|null|undefined} googleAdsLink + * @memberof google.analytics.admin.v1alpha.UpdateGoogleAdsLinkRequest + * @instance + */ + UpdateGoogleAdsLinkRequest.prototype.googleAdsLink = null; + + /** + * UpdateGoogleAdsLinkRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.analytics.admin.v1alpha.UpdateGoogleAdsLinkRequest + * @instance + */ + UpdateGoogleAdsLinkRequest.prototype.updateMask = null; + + /** + * Creates a new UpdateGoogleAdsLinkRequest instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.UpdateGoogleAdsLinkRequest + * @static + * @param {google.analytics.admin.v1alpha.IUpdateGoogleAdsLinkRequest=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.UpdateGoogleAdsLinkRequest} UpdateGoogleAdsLinkRequest instance + */ + UpdateGoogleAdsLinkRequest.create = function create(properties) { + return new UpdateGoogleAdsLinkRequest(properties); + }; + + /** + * Encodes the specified UpdateGoogleAdsLinkRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.UpdateGoogleAdsLinkRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.UpdateGoogleAdsLinkRequest + * @static + * @param {google.analytics.admin.v1alpha.IUpdateGoogleAdsLinkRequest} message UpdateGoogleAdsLinkRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateGoogleAdsLinkRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.googleAdsLink != null && Object.hasOwnProperty.call(message, "googleAdsLink")) + $root.google.analytics.admin.v1alpha.GoogleAdsLink.encode(message.googleAdsLink, 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 UpdateGoogleAdsLinkRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.UpdateGoogleAdsLinkRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.UpdateGoogleAdsLinkRequest + * @static + * @param {google.analytics.admin.v1alpha.IUpdateGoogleAdsLinkRequest} message UpdateGoogleAdsLinkRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateGoogleAdsLinkRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateGoogleAdsLinkRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.UpdateGoogleAdsLinkRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.UpdateGoogleAdsLinkRequest} UpdateGoogleAdsLinkRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateGoogleAdsLinkRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.UpdateGoogleAdsLinkRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.googleAdsLink = $root.google.analytics.admin.v1alpha.GoogleAdsLink.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 UpdateGoogleAdsLinkRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.UpdateGoogleAdsLinkRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.UpdateGoogleAdsLinkRequest} UpdateGoogleAdsLinkRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateGoogleAdsLinkRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateGoogleAdsLinkRequest message. + * @function verify + * @memberof google.analytics.admin.v1alpha.UpdateGoogleAdsLinkRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateGoogleAdsLinkRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.googleAdsLink != null && message.hasOwnProperty("googleAdsLink")) { + var error = $root.google.analytics.admin.v1alpha.GoogleAdsLink.verify(message.googleAdsLink); + if (error) + return "googleAdsLink." + 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 UpdateGoogleAdsLinkRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.UpdateGoogleAdsLinkRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.UpdateGoogleAdsLinkRequest} UpdateGoogleAdsLinkRequest + */ + UpdateGoogleAdsLinkRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.UpdateGoogleAdsLinkRequest) + return object; + var message = new $root.google.analytics.admin.v1alpha.UpdateGoogleAdsLinkRequest(); + if (object.googleAdsLink != null) { + if (typeof object.googleAdsLink !== "object") + throw TypeError(".google.analytics.admin.v1alpha.UpdateGoogleAdsLinkRequest.googleAdsLink: object expected"); + message.googleAdsLink = $root.google.analytics.admin.v1alpha.GoogleAdsLink.fromObject(object.googleAdsLink); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.analytics.admin.v1alpha.UpdateGoogleAdsLinkRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + return message; + }; + + /** + * Creates a plain object from an UpdateGoogleAdsLinkRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.UpdateGoogleAdsLinkRequest + * @static + * @param {google.analytics.admin.v1alpha.UpdateGoogleAdsLinkRequest} message UpdateGoogleAdsLinkRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateGoogleAdsLinkRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.googleAdsLink = null; + object.updateMask = null; + } + if (message.googleAdsLink != null && message.hasOwnProperty("googleAdsLink")) + object.googleAdsLink = $root.google.analytics.admin.v1alpha.GoogleAdsLink.toObject(message.googleAdsLink, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + return object; + }; + + /** + * Converts this UpdateGoogleAdsLinkRequest to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.UpdateGoogleAdsLinkRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateGoogleAdsLinkRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateGoogleAdsLinkRequest + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.UpdateGoogleAdsLinkRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateGoogleAdsLinkRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.UpdateGoogleAdsLinkRequest"; + }; + + return UpdateGoogleAdsLinkRequest; + })(); + + v1alpha.DeleteGoogleAdsLinkRequest = (function() { + + /** + * Properties of a DeleteGoogleAdsLinkRequest. + * @memberof google.analytics.admin.v1alpha + * @interface IDeleteGoogleAdsLinkRequest + * @property {string|null} [name] DeleteGoogleAdsLinkRequest name + */ + + /** + * Constructs a new DeleteGoogleAdsLinkRequest. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents a DeleteGoogleAdsLinkRequest. + * @implements IDeleteGoogleAdsLinkRequest + * @constructor + * @param {google.analytics.admin.v1alpha.IDeleteGoogleAdsLinkRequest=} [properties] Properties to set + */ + function DeleteGoogleAdsLinkRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteGoogleAdsLinkRequest name. + * @member {string} name + * @memberof google.analytics.admin.v1alpha.DeleteGoogleAdsLinkRequest + * @instance + */ + DeleteGoogleAdsLinkRequest.prototype.name = ""; + + /** + * Creates a new DeleteGoogleAdsLinkRequest instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.DeleteGoogleAdsLinkRequest + * @static + * @param {google.analytics.admin.v1alpha.IDeleteGoogleAdsLinkRequest=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.DeleteGoogleAdsLinkRequest} DeleteGoogleAdsLinkRequest instance + */ + DeleteGoogleAdsLinkRequest.create = function create(properties) { + return new DeleteGoogleAdsLinkRequest(properties); + }; + + /** + * Encodes the specified DeleteGoogleAdsLinkRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.DeleteGoogleAdsLinkRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.DeleteGoogleAdsLinkRequest + * @static + * @param {google.analytics.admin.v1alpha.IDeleteGoogleAdsLinkRequest} message DeleteGoogleAdsLinkRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteGoogleAdsLinkRequest.encode = function encode(message, writer) { + 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 DeleteGoogleAdsLinkRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.DeleteGoogleAdsLinkRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.DeleteGoogleAdsLinkRequest + * @static + * @param {google.analytics.admin.v1alpha.IDeleteGoogleAdsLinkRequest} message DeleteGoogleAdsLinkRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteGoogleAdsLinkRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteGoogleAdsLinkRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.DeleteGoogleAdsLinkRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.DeleteGoogleAdsLinkRequest} DeleteGoogleAdsLinkRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteGoogleAdsLinkRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.DeleteGoogleAdsLinkRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteGoogleAdsLinkRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.DeleteGoogleAdsLinkRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.DeleteGoogleAdsLinkRequest} DeleteGoogleAdsLinkRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteGoogleAdsLinkRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteGoogleAdsLinkRequest message. + * @function verify + * @memberof google.analytics.admin.v1alpha.DeleteGoogleAdsLinkRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteGoogleAdsLinkRequest.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 DeleteGoogleAdsLinkRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.DeleteGoogleAdsLinkRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.DeleteGoogleAdsLinkRequest} DeleteGoogleAdsLinkRequest + */ + DeleteGoogleAdsLinkRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.DeleteGoogleAdsLinkRequest) + return object; + var message = new $root.google.analytics.admin.v1alpha.DeleteGoogleAdsLinkRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteGoogleAdsLinkRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.DeleteGoogleAdsLinkRequest + * @static + * @param {google.analytics.admin.v1alpha.DeleteGoogleAdsLinkRequest} message DeleteGoogleAdsLinkRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteGoogleAdsLinkRequest.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 DeleteGoogleAdsLinkRequest to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.DeleteGoogleAdsLinkRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteGoogleAdsLinkRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteGoogleAdsLinkRequest + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.DeleteGoogleAdsLinkRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteGoogleAdsLinkRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.DeleteGoogleAdsLinkRequest"; + }; + + return DeleteGoogleAdsLinkRequest; + })(); + + v1alpha.ListGoogleAdsLinksRequest = (function() { + + /** + * Properties of a ListGoogleAdsLinksRequest. + * @memberof google.analytics.admin.v1alpha + * @interface IListGoogleAdsLinksRequest + * @property {string|null} [parent] ListGoogleAdsLinksRequest parent + * @property {number|null} [pageSize] ListGoogleAdsLinksRequest pageSize + * @property {string|null} [pageToken] ListGoogleAdsLinksRequest pageToken + */ + + /** + * Constructs a new ListGoogleAdsLinksRequest. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents a ListGoogleAdsLinksRequest. + * @implements IListGoogleAdsLinksRequest + * @constructor + * @param {google.analytics.admin.v1alpha.IListGoogleAdsLinksRequest=} [properties] Properties to set + */ + function ListGoogleAdsLinksRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListGoogleAdsLinksRequest parent. + * @member {string} parent + * @memberof google.analytics.admin.v1alpha.ListGoogleAdsLinksRequest + * @instance + */ + ListGoogleAdsLinksRequest.prototype.parent = ""; + + /** + * ListGoogleAdsLinksRequest pageSize. + * @member {number} pageSize + * @memberof google.analytics.admin.v1alpha.ListGoogleAdsLinksRequest + * @instance + */ + ListGoogleAdsLinksRequest.prototype.pageSize = 0; + + /** + * ListGoogleAdsLinksRequest pageToken. + * @member {string} pageToken + * @memberof google.analytics.admin.v1alpha.ListGoogleAdsLinksRequest + * @instance + */ + ListGoogleAdsLinksRequest.prototype.pageToken = ""; + + /** + * Creates a new ListGoogleAdsLinksRequest instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.ListGoogleAdsLinksRequest + * @static + * @param {google.analytics.admin.v1alpha.IListGoogleAdsLinksRequest=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.ListGoogleAdsLinksRequest} ListGoogleAdsLinksRequest instance + */ + ListGoogleAdsLinksRequest.create = function create(properties) { + return new ListGoogleAdsLinksRequest(properties); + }; + + /** + * Encodes the specified ListGoogleAdsLinksRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.ListGoogleAdsLinksRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.ListGoogleAdsLinksRequest + * @static + * @param {google.analytics.admin.v1alpha.IListGoogleAdsLinksRequest} message ListGoogleAdsLinksRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListGoogleAdsLinksRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + return writer; + }; + + /** + * Encodes the specified ListGoogleAdsLinksRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.ListGoogleAdsLinksRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.ListGoogleAdsLinksRequest + * @static + * @param {google.analytics.admin.v1alpha.IListGoogleAdsLinksRequest} message ListGoogleAdsLinksRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListGoogleAdsLinksRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListGoogleAdsLinksRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.ListGoogleAdsLinksRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.ListGoogleAdsLinksRequest} ListGoogleAdsLinksRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListGoogleAdsLinksRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.ListGoogleAdsLinksRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListGoogleAdsLinksRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.ListGoogleAdsLinksRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.ListGoogleAdsLinksRequest} ListGoogleAdsLinksRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListGoogleAdsLinksRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListGoogleAdsLinksRequest message. + * @function verify + * @memberof google.analytics.admin.v1alpha.ListGoogleAdsLinksRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListGoogleAdsLinksRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + return null; + }; + + /** + * Creates a ListGoogleAdsLinksRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.ListGoogleAdsLinksRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.ListGoogleAdsLinksRequest} ListGoogleAdsLinksRequest + */ + ListGoogleAdsLinksRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.ListGoogleAdsLinksRequest) + return object; + var message = new $root.google.analytics.admin.v1alpha.ListGoogleAdsLinksRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + return message; + }; + + /** + * Creates a plain object from a ListGoogleAdsLinksRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.ListGoogleAdsLinksRequest + * @static + * @param {google.analytics.admin.v1alpha.ListGoogleAdsLinksRequest} message ListGoogleAdsLinksRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListGoogleAdsLinksRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + return object; + }; + + /** + * Converts this ListGoogleAdsLinksRequest to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.ListGoogleAdsLinksRequest + * @instance + * @returns {Object.} JSON object + */ + ListGoogleAdsLinksRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListGoogleAdsLinksRequest + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.ListGoogleAdsLinksRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListGoogleAdsLinksRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.ListGoogleAdsLinksRequest"; + }; + + return ListGoogleAdsLinksRequest; + })(); + + v1alpha.ListGoogleAdsLinksResponse = (function() { + + /** + * Properties of a ListGoogleAdsLinksResponse. + * @memberof google.analytics.admin.v1alpha + * @interface IListGoogleAdsLinksResponse + * @property {Array.|null} [googleAdsLinks] ListGoogleAdsLinksResponse googleAdsLinks + * @property {string|null} [nextPageToken] ListGoogleAdsLinksResponse nextPageToken + */ + + /** + * Constructs a new ListGoogleAdsLinksResponse. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents a ListGoogleAdsLinksResponse. + * @implements IListGoogleAdsLinksResponse + * @constructor + * @param {google.analytics.admin.v1alpha.IListGoogleAdsLinksResponse=} [properties] Properties to set + */ + function ListGoogleAdsLinksResponse(properties) { + this.googleAdsLinks = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListGoogleAdsLinksResponse googleAdsLinks. + * @member {Array.} googleAdsLinks + * @memberof google.analytics.admin.v1alpha.ListGoogleAdsLinksResponse + * @instance + */ + ListGoogleAdsLinksResponse.prototype.googleAdsLinks = $util.emptyArray; + + /** + * ListGoogleAdsLinksResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.analytics.admin.v1alpha.ListGoogleAdsLinksResponse + * @instance + */ + ListGoogleAdsLinksResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListGoogleAdsLinksResponse instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.ListGoogleAdsLinksResponse + * @static + * @param {google.analytics.admin.v1alpha.IListGoogleAdsLinksResponse=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.ListGoogleAdsLinksResponse} ListGoogleAdsLinksResponse instance + */ + ListGoogleAdsLinksResponse.create = function create(properties) { + return new ListGoogleAdsLinksResponse(properties); + }; + + /** + * Encodes the specified ListGoogleAdsLinksResponse message. Does not implicitly {@link google.analytics.admin.v1alpha.ListGoogleAdsLinksResponse.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.ListGoogleAdsLinksResponse + * @static + * @param {google.analytics.admin.v1alpha.IListGoogleAdsLinksResponse} message ListGoogleAdsLinksResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListGoogleAdsLinksResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.googleAdsLinks != null && message.googleAdsLinks.length) + for (var i = 0; i < message.googleAdsLinks.length; ++i) + $root.google.analytics.admin.v1alpha.GoogleAdsLink.encode(message.googleAdsLinks[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 ListGoogleAdsLinksResponse message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.ListGoogleAdsLinksResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.ListGoogleAdsLinksResponse + * @static + * @param {google.analytics.admin.v1alpha.IListGoogleAdsLinksResponse} message ListGoogleAdsLinksResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListGoogleAdsLinksResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListGoogleAdsLinksResponse message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.ListGoogleAdsLinksResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.ListGoogleAdsLinksResponse} ListGoogleAdsLinksResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListGoogleAdsLinksResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.ListGoogleAdsLinksResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.googleAdsLinks && message.googleAdsLinks.length)) + message.googleAdsLinks = []; + message.googleAdsLinks.push($root.google.analytics.admin.v1alpha.GoogleAdsLink.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListGoogleAdsLinksResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.ListGoogleAdsLinksResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.ListGoogleAdsLinksResponse} ListGoogleAdsLinksResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListGoogleAdsLinksResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListGoogleAdsLinksResponse message. + * @function verify + * @memberof google.analytics.admin.v1alpha.ListGoogleAdsLinksResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListGoogleAdsLinksResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.googleAdsLinks != null && message.hasOwnProperty("googleAdsLinks")) { + if (!Array.isArray(message.googleAdsLinks)) + return "googleAdsLinks: array expected"; + for (var i = 0; i < message.googleAdsLinks.length; ++i) { + var error = $root.google.analytics.admin.v1alpha.GoogleAdsLink.verify(message.googleAdsLinks[i]); + if (error) + return "googleAdsLinks." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListGoogleAdsLinksResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.ListGoogleAdsLinksResponse + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.ListGoogleAdsLinksResponse} ListGoogleAdsLinksResponse + */ + ListGoogleAdsLinksResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.ListGoogleAdsLinksResponse) + return object; + var message = new $root.google.analytics.admin.v1alpha.ListGoogleAdsLinksResponse(); + if (object.googleAdsLinks) { + if (!Array.isArray(object.googleAdsLinks)) + throw TypeError(".google.analytics.admin.v1alpha.ListGoogleAdsLinksResponse.googleAdsLinks: array expected"); + message.googleAdsLinks = []; + for (var i = 0; i < object.googleAdsLinks.length; ++i) { + if (typeof object.googleAdsLinks[i] !== "object") + throw TypeError(".google.analytics.admin.v1alpha.ListGoogleAdsLinksResponse.googleAdsLinks: object expected"); + message.googleAdsLinks[i] = $root.google.analytics.admin.v1alpha.GoogleAdsLink.fromObject(object.googleAdsLinks[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListGoogleAdsLinksResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.ListGoogleAdsLinksResponse + * @static + * @param {google.analytics.admin.v1alpha.ListGoogleAdsLinksResponse} message ListGoogleAdsLinksResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListGoogleAdsLinksResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.googleAdsLinks = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.googleAdsLinks && message.googleAdsLinks.length) { + object.googleAdsLinks = []; + for (var j = 0; j < message.googleAdsLinks.length; ++j) + object.googleAdsLinks[j] = $root.google.analytics.admin.v1alpha.GoogleAdsLink.toObject(message.googleAdsLinks[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListGoogleAdsLinksResponse to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.ListGoogleAdsLinksResponse + * @instance + * @returns {Object.} JSON object + */ + ListGoogleAdsLinksResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListGoogleAdsLinksResponse + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.ListGoogleAdsLinksResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListGoogleAdsLinksResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.ListGoogleAdsLinksResponse"; + }; + + return ListGoogleAdsLinksResponse; + })(); + + v1alpha.GetDataSharingSettingsRequest = (function() { + + /** + * Properties of a GetDataSharingSettingsRequest. + * @memberof google.analytics.admin.v1alpha + * @interface IGetDataSharingSettingsRequest + * @property {string|null} [name] GetDataSharingSettingsRequest name + */ + + /** + * Constructs a new GetDataSharingSettingsRequest. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents a GetDataSharingSettingsRequest. + * @implements IGetDataSharingSettingsRequest + * @constructor + * @param {google.analytics.admin.v1alpha.IGetDataSharingSettingsRequest=} [properties] Properties to set + */ + function GetDataSharingSettingsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetDataSharingSettingsRequest name. + * @member {string} name + * @memberof google.analytics.admin.v1alpha.GetDataSharingSettingsRequest + * @instance + */ + GetDataSharingSettingsRequest.prototype.name = ""; + + /** + * Creates a new GetDataSharingSettingsRequest instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.GetDataSharingSettingsRequest + * @static + * @param {google.analytics.admin.v1alpha.IGetDataSharingSettingsRequest=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.GetDataSharingSettingsRequest} GetDataSharingSettingsRequest instance + */ + GetDataSharingSettingsRequest.create = function create(properties) { + return new GetDataSharingSettingsRequest(properties); + }; + + /** + * Encodes the specified GetDataSharingSettingsRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.GetDataSharingSettingsRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.GetDataSharingSettingsRequest + * @static + * @param {google.analytics.admin.v1alpha.IGetDataSharingSettingsRequest} message GetDataSharingSettingsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetDataSharingSettingsRequest.encode = function encode(message, writer) { + 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 GetDataSharingSettingsRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.GetDataSharingSettingsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.GetDataSharingSettingsRequest + * @static + * @param {google.analytics.admin.v1alpha.IGetDataSharingSettingsRequest} message GetDataSharingSettingsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetDataSharingSettingsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetDataSharingSettingsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.GetDataSharingSettingsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.GetDataSharingSettingsRequest} GetDataSharingSettingsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetDataSharingSettingsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.GetDataSharingSettingsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetDataSharingSettingsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.GetDataSharingSettingsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.GetDataSharingSettingsRequest} GetDataSharingSettingsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetDataSharingSettingsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetDataSharingSettingsRequest message. + * @function verify + * @memberof google.analytics.admin.v1alpha.GetDataSharingSettingsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetDataSharingSettingsRequest.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 GetDataSharingSettingsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.GetDataSharingSettingsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.GetDataSharingSettingsRequest} GetDataSharingSettingsRequest + */ + GetDataSharingSettingsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.GetDataSharingSettingsRequest) + return object; + var message = new $root.google.analytics.admin.v1alpha.GetDataSharingSettingsRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetDataSharingSettingsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.GetDataSharingSettingsRequest + * @static + * @param {google.analytics.admin.v1alpha.GetDataSharingSettingsRequest} message GetDataSharingSettingsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetDataSharingSettingsRequest.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 GetDataSharingSettingsRequest to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.GetDataSharingSettingsRequest + * @instance + * @returns {Object.} JSON object + */ + GetDataSharingSettingsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetDataSharingSettingsRequest + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.GetDataSharingSettingsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetDataSharingSettingsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.GetDataSharingSettingsRequest"; + }; + + return GetDataSharingSettingsRequest; + })(); + + v1alpha.ListAccountSummariesRequest = (function() { + + /** + * Properties of a ListAccountSummariesRequest. + * @memberof google.analytics.admin.v1alpha + * @interface IListAccountSummariesRequest + * @property {number|null} [pageSize] ListAccountSummariesRequest pageSize + * @property {string|null} [pageToken] ListAccountSummariesRequest pageToken + */ + + /** + * Constructs a new ListAccountSummariesRequest. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents a ListAccountSummariesRequest. + * @implements IListAccountSummariesRequest + * @constructor + * @param {google.analytics.admin.v1alpha.IListAccountSummariesRequest=} [properties] Properties to set + */ + function ListAccountSummariesRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListAccountSummariesRequest pageSize. + * @member {number} pageSize + * @memberof google.analytics.admin.v1alpha.ListAccountSummariesRequest + * @instance + */ + ListAccountSummariesRequest.prototype.pageSize = 0; + + /** + * ListAccountSummariesRequest pageToken. + * @member {string} pageToken + * @memberof google.analytics.admin.v1alpha.ListAccountSummariesRequest + * @instance + */ + ListAccountSummariesRequest.prototype.pageToken = ""; + + /** + * Creates a new ListAccountSummariesRequest instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.ListAccountSummariesRequest + * @static + * @param {google.analytics.admin.v1alpha.IListAccountSummariesRequest=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.ListAccountSummariesRequest} ListAccountSummariesRequest instance + */ + ListAccountSummariesRequest.create = function create(properties) { + return new ListAccountSummariesRequest(properties); + }; + + /** + * Encodes the specified ListAccountSummariesRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.ListAccountSummariesRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.ListAccountSummariesRequest + * @static + * @param {google.analytics.admin.v1alpha.IListAccountSummariesRequest} message ListAccountSummariesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListAccountSummariesRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.pageToken); + return writer; + }; + + /** + * Encodes the specified ListAccountSummariesRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.ListAccountSummariesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.ListAccountSummariesRequest + * @static + * @param {google.analytics.admin.v1alpha.IListAccountSummariesRequest} message ListAccountSummariesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListAccountSummariesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListAccountSummariesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.ListAccountSummariesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.ListAccountSummariesRequest} ListAccountSummariesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListAccountSummariesRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.ListAccountSummariesRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.pageSize = reader.int32(); + break; + } + case 2: { + message.pageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListAccountSummariesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.ListAccountSummariesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.ListAccountSummariesRequest} ListAccountSummariesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListAccountSummariesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListAccountSummariesRequest message. + * @function verify + * @memberof google.analytics.admin.v1alpha.ListAccountSummariesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListAccountSummariesRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object 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 ListAccountSummariesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.ListAccountSummariesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.ListAccountSummariesRequest} ListAccountSummariesRequest + */ + ListAccountSummariesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.ListAccountSummariesRequest) + return object; + var message = new $root.google.analytics.admin.v1alpha.ListAccountSummariesRequest(); + 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 ListAccountSummariesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.ListAccountSummariesRequest + * @static + * @param {google.analytics.admin.v1alpha.ListAccountSummariesRequest} message ListAccountSummariesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListAccountSummariesRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.pageSize = 0; + object.pageToken = ""; + } + 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 ListAccountSummariesRequest to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.ListAccountSummariesRequest + * @instance + * @returns {Object.} JSON object + */ + ListAccountSummariesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListAccountSummariesRequest + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.ListAccountSummariesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListAccountSummariesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.ListAccountSummariesRequest"; + }; + + return ListAccountSummariesRequest; + })(); + + v1alpha.ListAccountSummariesResponse = (function() { + + /** + * Properties of a ListAccountSummariesResponse. + * @memberof google.analytics.admin.v1alpha + * @interface IListAccountSummariesResponse + * @property {Array.|null} [accountSummaries] ListAccountSummariesResponse accountSummaries + * @property {string|null} [nextPageToken] ListAccountSummariesResponse nextPageToken + */ + + /** + * Constructs a new ListAccountSummariesResponse. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents a ListAccountSummariesResponse. + * @implements IListAccountSummariesResponse + * @constructor + * @param {google.analytics.admin.v1alpha.IListAccountSummariesResponse=} [properties] Properties to set + */ + function ListAccountSummariesResponse(properties) { + this.accountSummaries = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListAccountSummariesResponse accountSummaries. + * @member {Array.} accountSummaries + * @memberof google.analytics.admin.v1alpha.ListAccountSummariesResponse + * @instance + */ + ListAccountSummariesResponse.prototype.accountSummaries = $util.emptyArray; + + /** + * ListAccountSummariesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.analytics.admin.v1alpha.ListAccountSummariesResponse + * @instance + */ + ListAccountSummariesResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListAccountSummariesResponse instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.ListAccountSummariesResponse + * @static + * @param {google.analytics.admin.v1alpha.IListAccountSummariesResponse=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.ListAccountSummariesResponse} ListAccountSummariesResponse instance + */ + ListAccountSummariesResponse.create = function create(properties) { + return new ListAccountSummariesResponse(properties); + }; + + /** + * Encodes the specified ListAccountSummariesResponse message. Does not implicitly {@link google.analytics.admin.v1alpha.ListAccountSummariesResponse.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.ListAccountSummariesResponse + * @static + * @param {google.analytics.admin.v1alpha.IListAccountSummariesResponse} message ListAccountSummariesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListAccountSummariesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.accountSummaries != null && message.accountSummaries.length) + for (var i = 0; i < message.accountSummaries.length; ++i) + $root.google.analytics.admin.v1alpha.AccountSummary.encode(message.accountSummaries[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 ListAccountSummariesResponse message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.ListAccountSummariesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.ListAccountSummariesResponse + * @static + * @param {google.analytics.admin.v1alpha.IListAccountSummariesResponse} message ListAccountSummariesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListAccountSummariesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListAccountSummariesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.ListAccountSummariesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.ListAccountSummariesResponse} ListAccountSummariesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListAccountSummariesResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.ListAccountSummariesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.accountSummaries && message.accountSummaries.length)) + message.accountSummaries = []; + message.accountSummaries.push($root.google.analytics.admin.v1alpha.AccountSummary.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListAccountSummariesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.ListAccountSummariesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.ListAccountSummariesResponse} ListAccountSummariesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListAccountSummariesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListAccountSummariesResponse message. + * @function verify + * @memberof google.analytics.admin.v1alpha.ListAccountSummariesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListAccountSummariesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.accountSummaries != null && message.hasOwnProperty("accountSummaries")) { + if (!Array.isArray(message.accountSummaries)) + return "accountSummaries: array expected"; + for (var i = 0; i < message.accountSummaries.length; ++i) { + var error = $root.google.analytics.admin.v1alpha.AccountSummary.verify(message.accountSummaries[i]); + if (error) + return "accountSummaries." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListAccountSummariesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.ListAccountSummariesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.ListAccountSummariesResponse} ListAccountSummariesResponse + */ + ListAccountSummariesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.ListAccountSummariesResponse) + return object; + var message = new $root.google.analytics.admin.v1alpha.ListAccountSummariesResponse(); + if (object.accountSummaries) { + if (!Array.isArray(object.accountSummaries)) + throw TypeError(".google.analytics.admin.v1alpha.ListAccountSummariesResponse.accountSummaries: array expected"); + message.accountSummaries = []; + for (var i = 0; i < object.accountSummaries.length; ++i) { + if (typeof object.accountSummaries[i] !== "object") + throw TypeError(".google.analytics.admin.v1alpha.ListAccountSummariesResponse.accountSummaries: object expected"); + message.accountSummaries[i] = $root.google.analytics.admin.v1alpha.AccountSummary.fromObject(object.accountSummaries[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListAccountSummariesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.ListAccountSummariesResponse + * @static + * @param {google.analytics.admin.v1alpha.ListAccountSummariesResponse} message ListAccountSummariesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListAccountSummariesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.accountSummaries = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.accountSummaries && message.accountSummaries.length) { + object.accountSummaries = []; + for (var j = 0; j < message.accountSummaries.length; ++j) + object.accountSummaries[j] = $root.google.analytics.admin.v1alpha.AccountSummary.toObject(message.accountSummaries[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListAccountSummariesResponse to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.ListAccountSummariesResponse + * @instance + * @returns {Object.} JSON object + */ + ListAccountSummariesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListAccountSummariesResponse + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.ListAccountSummariesResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListAccountSummariesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.ListAccountSummariesResponse"; + }; + + return ListAccountSummariesResponse; + })(); + + v1alpha.AcknowledgeUserDataCollectionRequest = (function() { + + /** + * Properties of an AcknowledgeUserDataCollectionRequest. + * @memberof google.analytics.admin.v1alpha + * @interface IAcknowledgeUserDataCollectionRequest + * @property {string|null} [property] AcknowledgeUserDataCollectionRequest property + * @property {string|null} [acknowledgement] AcknowledgeUserDataCollectionRequest acknowledgement + */ + + /** + * Constructs a new AcknowledgeUserDataCollectionRequest. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents an AcknowledgeUserDataCollectionRequest. + * @implements IAcknowledgeUserDataCollectionRequest + * @constructor + * @param {google.analytics.admin.v1alpha.IAcknowledgeUserDataCollectionRequest=} [properties] Properties to set + */ + function AcknowledgeUserDataCollectionRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AcknowledgeUserDataCollectionRequest property. + * @member {string} property + * @memberof google.analytics.admin.v1alpha.AcknowledgeUserDataCollectionRequest + * @instance + */ + AcknowledgeUserDataCollectionRequest.prototype.property = ""; + + /** + * AcknowledgeUserDataCollectionRequest acknowledgement. + * @member {string} acknowledgement + * @memberof google.analytics.admin.v1alpha.AcknowledgeUserDataCollectionRequest + * @instance + */ + AcknowledgeUserDataCollectionRequest.prototype.acknowledgement = ""; + + /** + * Creates a new AcknowledgeUserDataCollectionRequest instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.AcknowledgeUserDataCollectionRequest + * @static + * @param {google.analytics.admin.v1alpha.IAcknowledgeUserDataCollectionRequest=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.AcknowledgeUserDataCollectionRequest} AcknowledgeUserDataCollectionRequest instance + */ + AcknowledgeUserDataCollectionRequest.create = function create(properties) { + return new AcknowledgeUserDataCollectionRequest(properties); + }; + + /** + * Encodes the specified AcknowledgeUserDataCollectionRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.AcknowledgeUserDataCollectionRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.AcknowledgeUserDataCollectionRequest + * @static + * @param {google.analytics.admin.v1alpha.IAcknowledgeUserDataCollectionRequest} message AcknowledgeUserDataCollectionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AcknowledgeUserDataCollectionRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.property != null && Object.hasOwnProperty.call(message, "property")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.property); + if (message.acknowledgement != null && Object.hasOwnProperty.call(message, "acknowledgement")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.acknowledgement); + return writer; + }; + + /** + * Encodes the specified AcknowledgeUserDataCollectionRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AcknowledgeUserDataCollectionRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.AcknowledgeUserDataCollectionRequest + * @static + * @param {google.analytics.admin.v1alpha.IAcknowledgeUserDataCollectionRequest} message AcknowledgeUserDataCollectionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AcknowledgeUserDataCollectionRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AcknowledgeUserDataCollectionRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.AcknowledgeUserDataCollectionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.AcknowledgeUserDataCollectionRequest} AcknowledgeUserDataCollectionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AcknowledgeUserDataCollectionRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.AcknowledgeUserDataCollectionRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.property = reader.string(); + break; + } + case 2: { + message.acknowledgement = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AcknowledgeUserDataCollectionRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.AcknowledgeUserDataCollectionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.AcknowledgeUserDataCollectionRequest} AcknowledgeUserDataCollectionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AcknowledgeUserDataCollectionRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AcknowledgeUserDataCollectionRequest message. + * @function verify + * @memberof google.analytics.admin.v1alpha.AcknowledgeUserDataCollectionRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AcknowledgeUserDataCollectionRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.property != null && message.hasOwnProperty("property")) + if (!$util.isString(message.property)) + return "property: string expected"; + if (message.acknowledgement != null && message.hasOwnProperty("acknowledgement")) + if (!$util.isString(message.acknowledgement)) + return "acknowledgement: string expected"; + return null; + }; + + /** + * Creates an AcknowledgeUserDataCollectionRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.AcknowledgeUserDataCollectionRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.AcknowledgeUserDataCollectionRequest} AcknowledgeUserDataCollectionRequest + */ + AcknowledgeUserDataCollectionRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.AcknowledgeUserDataCollectionRequest) + return object; + var message = new $root.google.analytics.admin.v1alpha.AcknowledgeUserDataCollectionRequest(); + if (object.property != null) + message.property = String(object.property); + if (object.acknowledgement != null) + message.acknowledgement = String(object.acknowledgement); + return message; + }; + + /** + * Creates a plain object from an AcknowledgeUserDataCollectionRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.AcknowledgeUserDataCollectionRequest + * @static + * @param {google.analytics.admin.v1alpha.AcknowledgeUserDataCollectionRequest} message AcknowledgeUserDataCollectionRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AcknowledgeUserDataCollectionRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.property = ""; + object.acknowledgement = ""; + } + if (message.property != null && message.hasOwnProperty("property")) + object.property = message.property; + if (message.acknowledgement != null && message.hasOwnProperty("acknowledgement")) + object.acknowledgement = message.acknowledgement; + return object; + }; + + /** + * Converts this AcknowledgeUserDataCollectionRequest to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.AcknowledgeUserDataCollectionRequest + * @instance + * @returns {Object.} JSON object + */ + AcknowledgeUserDataCollectionRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AcknowledgeUserDataCollectionRequest + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.AcknowledgeUserDataCollectionRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AcknowledgeUserDataCollectionRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.AcknowledgeUserDataCollectionRequest"; + }; + + return AcknowledgeUserDataCollectionRequest; + })(); + + v1alpha.AcknowledgeUserDataCollectionResponse = (function() { + + /** + * Properties of an AcknowledgeUserDataCollectionResponse. + * @memberof google.analytics.admin.v1alpha + * @interface IAcknowledgeUserDataCollectionResponse + */ + + /** + * Constructs a new AcknowledgeUserDataCollectionResponse. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents an AcknowledgeUserDataCollectionResponse. + * @implements IAcknowledgeUserDataCollectionResponse + * @constructor + * @param {google.analytics.admin.v1alpha.IAcknowledgeUserDataCollectionResponse=} [properties] Properties to set + */ + function AcknowledgeUserDataCollectionResponse(properties) { + if (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 AcknowledgeUserDataCollectionResponse instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.AcknowledgeUserDataCollectionResponse + * @static + * @param {google.analytics.admin.v1alpha.IAcknowledgeUserDataCollectionResponse=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.AcknowledgeUserDataCollectionResponse} AcknowledgeUserDataCollectionResponse instance + */ + AcknowledgeUserDataCollectionResponse.create = function create(properties) { + return new AcknowledgeUserDataCollectionResponse(properties); + }; + + /** + * Encodes the specified AcknowledgeUserDataCollectionResponse message. Does not implicitly {@link google.analytics.admin.v1alpha.AcknowledgeUserDataCollectionResponse.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.AcknowledgeUserDataCollectionResponse + * @static + * @param {google.analytics.admin.v1alpha.IAcknowledgeUserDataCollectionResponse} message AcknowledgeUserDataCollectionResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AcknowledgeUserDataCollectionResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified AcknowledgeUserDataCollectionResponse message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AcknowledgeUserDataCollectionResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.AcknowledgeUserDataCollectionResponse + * @static + * @param {google.analytics.admin.v1alpha.IAcknowledgeUserDataCollectionResponse} message AcknowledgeUserDataCollectionResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AcknowledgeUserDataCollectionResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AcknowledgeUserDataCollectionResponse message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.AcknowledgeUserDataCollectionResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.AcknowledgeUserDataCollectionResponse} AcknowledgeUserDataCollectionResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AcknowledgeUserDataCollectionResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.AcknowledgeUserDataCollectionResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AcknowledgeUserDataCollectionResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.AcknowledgeUserDataCollectionResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.AcknowledgeUserDataCollectionResponse} AcknowledgeUserDataCollectionResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AcknowledgeUserDataCollectionResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AcknowledgeUserDataCollectionResponse message. + * @function verify + * @memberof google.analytics.admin.v1alpha.AcknowledgeUserDataCollectionResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AcknowledgeUserDataCollectionResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates an AcknowledgeUserDataCollectionResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.AcknowledgeUserDataCollectionResponse + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.AcknowledgeUserDataCollectionResponse} AcknowledgeUserDataCollectionResponse + */ + AcknowledgeUserDataCollectionResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.AcknowledgeUserDataCollectionResponse) + return object; + return new $root.google.analytics.admin.v1alpha.AcknowledgeUserDataCollectionResponse(); + }; + + /** + * Creates a plain object from an AcknowledgeUserDataCollectionResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.AcknowledgeUserDataCollectionResponse + * @static + * @param {google.analytics.admin.v1alpha.AcknowledgeUserDataCollectionResponse} message AcknowledgeUserDataCollectionResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AcknowledgeUserDataCollectionResponse.toObject = function toObject() { + return {}; + }; + + /** + * Converts this AcknowledgeUserDataCollectionResponse to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.AcknowledgeUserDataCollectionResponse + * @instance + * @returns {Object.} JSON object + */ + AcknowledgeUserDataCollectionResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AcknowledgeUserDataCollectionResponse + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.AcknowledgeUserDataCollectionResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AcknowledgeUserDataCollectionResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.AcknowledgeUserDataCollectionResponse"; + }; + + return AcknowledgeUserDataCollectionResponse; + })(); + + v1alpha.SearchChangeHistoryEventsRequest = (function() { + + /** + * Properties of a SearchChangeHistoryEventsRequest. + * @memberof google.analytics.admin.v1alpha + * @interface ISearchChangeHistoryEventsRequest + * @property {string|null} [account] SearchChangeHistoryEventsRequest account + * @property {string|null} [property] SearchChangeHistoryEventsRequest property + * @property {Array.|null} [resourceType] SearchChangeHistoryEventsRequest resourceType + * @property {Array.|null} [action] SearchChangeHistoryEventsRequest action + * @property {Array.|null} [actorEmail] SearchChangeHistoryEventsRequest actorEmail + * @property {google.protobuf.ITimestamp|null} [earliestChangeTime] SearchChangeHistoryEventsRequest earliestChangeTime + * @property {google.protobuf.ITimestamp|null} [latestChangeTime] SearchChangeHistoryEventsRequest latestChangeTime + * @property {number|null} [pageSize] SearchChangeHistoryEventsRequest pageSize + * @property {string|null} [pageToken] SearchChangeHistoryEventsRequest pageToken + */ + + /** + * Constructs a new SearchChangeHistoryEventsRequest. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents a SearchChangeHistoryEventsRequest. + * @implements ISearchChangeHistoryEventsRequest + * @constructor + * @param {google.analytics.admin.v1alpha.ISearchChangeHistoryEventsRequest=} [properties] Properties to set + */ + function SearchChangeHistoryEventsRequest(properties) { + this.resourceType = []; + this.action = []; + this.actorEmail = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SearchChangeHistoryEventsRequest account. + * @member {string} account + * @memberof google.analytics.admin.v1alpha.SearchChangeHistoryEventsRequest + * @instance + */ + SearchChangeHistoryEventsRequest.prototype.account = ""; + + /** + * SearchChangeHistoryEventsRequest property. + * @member {string} property + * @memberof google.analytics.admin.v1alpha.SearchChangeHistoryEventsRequest + * @instance + */ + SearchChangeHistoryEventsRequest.prototype.property = ""; + + /** + * SearchChangeHistoryEventsRequest resourceType. + * @member {Array.} resourceType + * @memberof google.analytics.admin.v1alpha.SearchChangeHistoryEventsRequest + * @instance + */ + SearchChangeHistoryEventsRequest.prototype.resourceType = $util.emptyArray; + + /** + * SearchChangeHistoryEventsRequest action. + * @member {Array.} action + * @memberof google.analytics.admin.v1alpha.SearchChangeHistoryEventsRequest + * @instance + */ + SearchChangeHistoryEventsRequest.prototype.action = $util.emptyArray; + + /** + * SearchChangeHistoryEventsRequest actorEmail. + * @member {Array.} actorEmail + * @memberof google.analytics.admin.v1alpha.SearchChangeHistoryEventsRequest + * @instance + */ + SearchChangeHistoryEventsRequest.prototype.actorEmail = $util.emptyArray; + + /** + * SearchChangeHistoryEventsRequest earliestChangeTime. + * @member {google.protobuf.ITimestamp|null|undefined} earliestChangeTime + * @memberof google.analytics.admin.v1alpha.SearchChangeHistoryEventsRequest + * @instance + */ + SearchChangeHistoryEventsRequest.prototype.earliestChangeTime = null; + + /** + * SearchChangeHistoryEventsRequest latestChangeTime. + * @member {google.protobuf.ITimestamp|null|undefined} latestChangeTime + * @memberof google.analytics.admin.v1alpha.SearchChangeHistoryEventsRequest + * @instance + */ + SearchChangeHistoryEventsRequest.prototype.latestChangeTime = null; + + /** + * SearchChangeHistoryEventsRequest pageSize. + * @member {number} pageSize + * @memberof google.analytics.admin.v1alpha.SearchChangeHistoryEventsRequest + * @instance + */ + SearchChangeHistoryEventsRequest.prototype.pageSize = 0; + + /** + * SearchChangeHistoryEventsRequest pageToken. + * @member {string} pageToken + * @memberof google.analytics.admin.v1alpha.SearchChangeHistoryEventsRequest + * @instance + */ + SearchChangeHistoryEventsRequest.prototype.pageToken = ""; + + /** + * Creates a new SearchChangeHistoryEventsRequest instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.SearchChangeHistoryEventsRequest + * @static + * @param {google.analytics.admin.v1alpha.ISearchChangeHistoryEventsRequest=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.SearchChangeHistoryEventsRequest} SearchChangeHistoryEventsRequest instance + */ + SearchChangeHistoryEventsRequest.create = function create(properties) { + return new SearchChangeHistoryEventsRequest(properties); + }; + + /** + * Encodes the specified SearchChangeHistoryEventsRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.SearchChangeHistoryEventsRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.SearchChangeHistoryEventsRequest + * @static + * @param {google.analytics.admin.v1alpha.ISearchChangeHistoryEventsRequest} message SearchChangeHistoryEventsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SearchChangeHistoryEventsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.account != null && Object.hasOwnProperty.call(message, "account")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.account); + if (message.property != null && Object.hasOwnProperty.call(message, "property")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.property); + if (message.resourceType != null && message.resourceType.length) { + writer.uint32(/* id 3, wireType 2 =*/26).fork(); + for (var i = 0; i < message.resourceType.length; ++i) + writer.int32(message.resourceType[i]); + writer.ldelim(); + } + if (message.action != null && message.action.length) { + writer.uint32(/* id 4, wireType 2 =*/34).fork(); + for (var i = 0; i < message.action.length; ++i) + writer.int32(message.action[i]); + writer.ldelim(); + } + if (message.actorEmail != null && message.actorEmail.length) + for (var i = 0; i < message.actorEmail.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.actorEmail[i]); + if (message.earliestChangeTime != null && Object.hasOwnProperty.call(message, "earliestChangeTime")) + $root.google.protobuf.Timestamp.encode(message.earliestChangeTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.latestChangeTime != null && Object.hasOwnProperty.call(message, "latestChangeTime")) + $root.google.protobuf.Timestamp.encode(message.latestChangeTime, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 8, wireType 0 =*/64).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.pageToken); + return writer; + }; + + /** + * Encodes the specified SearchChangeHistoryEventsRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.SearchChangeHistoryEventsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.SearchChangeHistoryEventsRequest + * @static + * @param {google.analytics.admin.v1alpha.ISearchChangeHistoryEventsRequest} message SearchChangeHistoryEventsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SearchChangeHistoryEventsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SearchChangeHistoryEventsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.SearchChangeHistoryEventsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.SearchChangeHistoryEventsRequest} SearchChangeHistoryEventsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SearchChangeHistoryEventsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.SearchChangeHistoryEventsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.account = reader.string(); + break; + } + case 2: { + message.property = reader.string(); + break; + } + case 3: { + if (!(message.resourceType && message.resourceType.length)) + message.resourceType = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.resourceType.push(reader.int32()); + } else + message.resourceType.push(reader.int32()); + break; + } + case 4: { + if (!(message.action && message.action.length)) + message.action = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.action.push(reader.int32()); + } else + message.action.push(reader.int32()); + break; + } + case 5: { + if (!(message.actorEmail && message.actorEmail.length)) + message.actorEmail = []; + message.actorEmail.push(reader.string()); + break; + } + case 6: { + message.earliestChangeTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 7: { + message.latestChangeTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 8: { + message.pageSize = reader.int32(); + break; + } + case 9: { + message.pageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SearchChangeHistoryEventsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.SearchChangeHistoryEventsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.SearchChangeHistoryEventsRequest} SearchChangeHistoryEventsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SearchChangeHistoryEventsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SearchChangeHistoryEventsRequest message. + * @function verify + * @memberof google.analytics.admin.v1alpha.SearchChangeHistoryEventsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SearchChangeHistoryEventsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.account != null && message.hasOwnProperty("account")) + if (!$util.isString(message.account)) + return "account: string expected"; + if (message.property != null && message.hasOwnProperty("property")) + if (!$util.isString(message.property)) + return "property: string expected"; + if (message.resourceType != null && message.hasOwnProperty("resourceType")) { + if (!Array.isArray(message.resourceType)) + return "resourceType: array expected"; + for (var i = 0; i < message.resourceType.length; ++i) + switch (message.resourceType[i]) { + default: + return "resourceType: enum value[] expected"; + case 0: + case 1: + case 2: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + case 13: + case 14: + case 15: + case 16: + case 18: + case 20: + break; + } + } + if (message.action != null && message.hasOwnProperty("action")) { + if (!Array.isArray(message.action)) + return "action: array expected"; + for (var i = 0; i < message.action.length; ++i) + switch (message.action[i]) { + default: + return "action: enum value[] expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + } + if (message.actorEmail != null && message.hasOwnProperty("actorEmail")) { + if (!Array.isArray(message.actorEmail)) + return "actorEmail: array expected"; + for (var i = 0; i < message.actorEmail.length; ++i) + if (!$util.isString(message.actorEmail[i])) + return "actorEmail: string[] expected"; + } + if (message.earliestChangeTime != null && message.hasOwnProperty("earliestChangeTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.earliestChangeTime); + if (error) + return "earliestChangeTime." + error; + } + if (message.latestChangeTime != null && message.hasOwnProperty("latestChangeTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.latestChangeTime); + if (error) + return "latestChangeTime." + error; + } + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + return null; + }; + + /** + * Creates a SearchChangeHistoryEventsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.SearchChangeHistoryEventsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.SearchChangeHistoryEventsRequest} SearchChangeHistoryEventsRequest + */ + SearchChangeHistoryEventsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.SearchChangeHistoryEventsRequest) + return object; + var message = new $root.google.analytics.admin.v1alpha.SearchChangeHistoryEventsRequest(); + if (object.account != null) + message.account = String(object.account); + if (object.property != null) + message.property = String(object.property); + if (object.resourceType) { + if (!Array.isArray(object.resourceType)) + throw TypeError(".google.analytics.admin.v1alpha.SearchChangeHistoryEventsRequest.resourceType: array expected"); + message.resourceType = []; + for (var i = 0; i < object.resourceType.length; ++i) + switch (object.resourceType[i]) { + default: + if (typeof object.resourceType[i] === "number") { + message.resourceType[i] = object.resourceType[i]; + break; + } + case "CHANGE_HISTORY_RESOURCE_TYPE_UNSPECIFIED": + case 0: + message.resourceType[i] = 0; + break; + case "ACCOUNT": + case 1: + message.resourceType[i] = 1; + break; + case "PROPERTY": + case 2: + message.resourceType[i] = 2; + break; + case "FIREBASE_LINK": + case 6: + message.resourceType[i] = 6; + break; + case "GOOGLE_ADS_LINK": + case 7: + message.resourceType[i] = 7; + break; + case "GOOGLE_SIGNALS_SETTINGS": + case 8: + message.resourceType[i] = 8; + break; + case "CONVERSION_EVENT": + case 9: + message.resourceType[i] = 9; + break; + case "MEASUREMENT_PROTOCOL_SECRET": + case 10: + message.resourceType[i] = 10; + break; + case "CUSTOM_DIMENSION": + case 11: + message.resourceType[i] = 11; + break; + case "CUSTOM_METRIC": + case 12: + message.resourceType[i] = 12; + break; + case "DATA_RETENTION_SETTINGS": + case 13: + message.resourceType[i] = 13; + break; + case "DISPLAY_VIDEO_360_ADVERTISER_LINK": + case 14: + message.resourceType[i] = 14; + break; + case "DISPLAY_VIDEO_360_ADVERTISER_LINK_PROPOSAL": + case 15: + message.resourceType[i] = 15; + break; + case "SEARCH_ADS_360_LINK": + case 16: + message.resourceType[i] = 16; + break; + case "DATA_STREAM": + case 18: + message.resourceType[i] = 18; + break; + case "ATTRIBUTION_SETTINGS": + case 20: + message.resourceType[i] = 20; + break; + } + } + if (object.action) { + if (!Array.isArray(object.action)) + throw TypeError(".google.analytics.admin.v1alpha.SearchChangeHistoryEventsRequest.action: array expected"); + message.action = []; + for (var i = 0; i < object.action.length; ++i) + switch (object.action[i]) { + default: + if (typeof object.action[i] === "number") { + message.action[i] = object.action[i]; + break; + } + case "ACTION_TYPE_UNSPECIFIED": + case 0: + message.action[i] = 0; + break; + case "CREATED": + case 1: + message.action[i] = 1; + break; + case "UPDATED": + case 2: + message.action[i] = 2; + break; + case "DELETED": + case 3: + message.action[i] = 3; + break; + } + } + if (object.actorEmail) { + if (!Array.isArray(object.actorEmail)) + throw TypeError(".google.analytics.admin.v1alpha.SearchChangeHistoryEventsRequest.actorEmail: array expected"); + message.actorEmail = []; + for (var i = 0; i < object.actorEmail.length; ++i) + message.actorEmail[i] = String(object.actorEmail[i]); + } + if (object.earliestChangeTime != null) { + if (typeof object.earliestChangeTime !== "object") + throw TypeError(".google.analytics.admin.v1alpha.SearchChangeHistoryEventsRequest.earliestChangeTime: object expected"); + message.earliestChangeTime = $root.google.protobuf.Timestamp.fromObject(object.earliestChangeTime); + } + if (object.latestChangeTime != null) { + if (typeof object.latestChangeTime !== "object") + throw TypeError(".google.analytics.admin.v1alpha.SearchChangeHistoryEventsRequest.latestChangeTime: object expected"); + message.latestChangeTime = $root.google.protobuf.Timestamp.fromObject(object.latestChangeTime); + } + 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 SearchChangeHistoryEventsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.SearchChangeHistoryEventsRequest + * @static + * @param {google.analytics.admin.v1alpha.SearchChangeHistoryEventsRequest} message SearchChangeHistoryEventsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SearchChangeHistoryEventsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.resourceType = []; + object.action = []; + object.actorEmail = []; + } + if (options.defaults) { + object.account = ""; + object.property = ""; + object.earliestChangeTime = null; + object.latestChangeTime = null; + object.pageSize = 0; + object.pageToken = ""; + } + if (message.account != null && message.hasOwnProperty("account")) + object.account = message.account; + if (message.property != null && message.hasOwnProperty("property")) + object.property = message.property; + if (message.resourceType && message.resourceType.length) { + object.resourceType = []; + for (var j = 0; j < message.resourceType.length; ++j) + object.resourceType[j] = options.enums === String ? $root.google.analytics.admin.v1alpha.ChangeHistoryResourceType[message.resourceType[j]] === undefined ? message.resourceType[j] : $root.google.analytics.admin.v1alpha.ChangeHistoryResourceType[message.resourceType[j]] : message.resourceType[j]; + } + if (message.action && message.action.length) { + object.action = []; + for (var j = 0; j < message.action.length; ++j) + object.action[j] = options.enums === String ? $root.google.analytics.admin.v1alpha.ActionType[message.action[j]] === undefined ? message.action[j] : $root.google.analytics.admin.v1alpha.ActionType[message.action[j]] : message.action[j]; + } + if (message.actorEmail && message.actorEmail.length) { + object.actorEmail = []; + for (var j = 0; j < message.actorEmail.length; ++j) + object.actorEmail[j] = message.actorEmail[j]; + } + if (message.earliestChangeTime != null && message.hasOwnProperty("earliestChangeTime")) + object.earliestChangeTime = $root.google.protobuf.Timestamp.toObject(message.earliestChangeTime, options); + if (message.latestChangeTime != null && message.hasOwnProperty("latestChangeTime")) + object.latestChangeTime = $root.google.protobuf.Timestamp.toObject(message.latestChangeTime, options); + 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 SearchChangeHistoryEventsRequest to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.SearchChangeHistoryEventsRequest + * @instance + * @returns {Object.} JSON object + */ + SearchChangeHistoryEventsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SearchChangeHistoryEventsRequest + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.SearchChangeHistoryEventsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SearchChangeHistoryEventsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.SearchChangeHistoryEventsRequest"; + }; + + return SearchChangeHistoryEventsRequest; + })(); + + v1alpha.SearchChangeHistoryEventsResponse = (function() { + + /** + * Properties of a SearchChangeHistoryEventsResponse. + * @memberof google.analytics.admin.v1alpha + * @interface ISearchChangeHistoryEventsResponse + * @property {Array.|null} [changeHistoryEvents] SearchChangeHistoryEventsResponse changeHistoryEvents + * @property {string|null} [nextPageToken] SearchChangeHistoryEventsResponse nextPageToken + */ + + /** + * Constructs a new SearchChangeHistoryEventsResponse. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents a SearchChangeHistoryEventsResponse. + * @implements ISearchChangeHistoryEventsResponse + * @constructor + * @param {google.analytics.admin.v1alpha.ISearchChangeHistoryEventsResponse=} [properties] Properties to set + */ + function SearchChangeHistoryEventsResponse(properties) { + this.changeHistoryEvents = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SearchChangeHistoryEventsResponse changeHistoryEvents. + * @member {Array.} changeHistoryEvents + * @memberof google.analytics.admin.v1alpha.SearchChangeHistoryEventsResponse + * @instance + */ + SearchChangeHistoryEventsResponse.prototype.changeHistoryEvents = $util.emptyArray; + + /** + * SearchChangeHistoryEventsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.analytics.admin.v1alpha.SearchChangeHistoryEventsResponse + * @instance + */ + SearchChangeHistoryEventsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new SearchChangeHistoryEventsResponse instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.SearchChangeHistoryEventsResponse + * @static + * @param {google.analytics.admin.v1alpha.ISearchChangeHistoryEventsResponse=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.SearchChangeHistoryEventsResponse} SearchChangeHistoryEventsResponse instance + */ + SearchChangeHistoryEventsResponse.create = function create(properties) { + return new SearchChangeHistoryEventsResponse(properties); + }; + + /** + * Encodes the specified SearchChangeHistoryEventsResponse message. Does not implicitly {@link google.analytics.admin.v1alpha.SearchChangeHistoryEventsResponse.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.SearchChangeHistoryEventsResponse + * @static + * @param {google.analytics.admin.v1alpha.ISearchChangeHistoryEventsResponse} message SearchChangeHistoryEventsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SearchChangeHistoryEventsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.changeHistoryEvents != null && message.changeHistoryEvents.length) + for (var i = 0; i < message.changeHistoryEvents.length; ++i) + $root.google.analytics.admin.v1alpha.ChangeHistoryEvent.encode(message.changeHistoryEvents[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 SearchChangeHistoryEventsResponse message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.SearchChangeHistoryEventsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.SearchChangeHistoryEventsResponse + * @static + * @param {google.analytics.admin.v1alpha.ISearchChangeHistoryEventsResponse} message SearchChangeHistoryEventsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SearchChangeHistoryEventsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SearchChangeHistoryEventsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.SearchChangeHistoryEventsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.SearchChangeHistoryEventsResponse} SearchChangeHistoryEventsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SearchChangeHistoryEventsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.SearchChangeHistoryEventsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.changeHistoryEvents && message.changeHistoryEvents.length)) + message.changeHistoryEvents = []; + message.changeHistoryEvents.push($root.google.analytics.admin.v1alpha.ChangeHistoryEvent.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SearchChangeHistoryEventsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.SearchChangeHistoryEventsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.SearchChangeHistoryEventsResponse} SearchChangeHistoryEventsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SearchChangeHistoryEventsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SearchChangeHistoryEventsResponse message. + * @function verify + * @memberof google.analytics.admin.v1alpha.SearchChangeHistoryEventsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SearchChangeHistoryEventsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.changeHistoryEvents != null && message.hasOwnProperty("changeHistoryEvents")) { + if (!Array.isArray(message.changeHistoryEvents)) + return "changeHistoryEvents: array expected"; + for (var i = 0; i < message.changeHistoryEvents.length; ++i) { + var error = $root.google.analytics.admin.v1alpha.ChangeHistoryEvent.verify(message.changeHistoryEvents[i]); + if (error) + return "changeHistoryEvents." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a SearchChangeHistoryEventsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.SearchChangeHistoryEventsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.SearchChangeHistoryEventsResponse} SearchChangeHistoryEventsResponse + */ + SearchChangeHistoryEventsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.SearchChangeHistoryEventsResponse) + return object; + var message = new $root.google.analytics.admin.v1alpha.SearchChangeHistoryEventsResponse(); + if (object.changeHistoryEvents) { + if (!Array.isArray(object.changeHistoryEvents)) + throw TypeError(".google.analytics.admin.v1alpha.SearchChangeHistoryEventsResponse.changeHistoryEvents: array expected"); + message.changeHistoryEvents = []; + for (var i = 0; i < object.changeHistoryEvents.length; ++i) { + if (typeof object.changeHistoryEvents[i] !== "object") + throw TypeError(".google.analytics.admin.v1alpha.SearchChangeHistoryEventsResponse.changeHistoryEvents: object expected"); + message.changeHistoryEvents[i] = $root.google.analytics.admin.v1alpha.ChangeHistoryEvent.fromObject(object.changeHistoryEvents[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a SearchChangeHistoryEventsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.SearchChangeHistoryEventsResponse + * @static + * @param {google.analytics.admin.v1alpha.SearchChangeHistoryEventsResponse} message SearchChangeHistoryEventsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SearchChangeHistoryEventsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.changeHistoryEvents = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.changeHistoryEvents && message.changeHistoryEvents.length) { + object.changeHistoryEvents = []; + for (var j = 0; j < message.changeHistoryEvents.length; ++j) + object.changeHistoryEvents[j] = $root.google.analytics.admin.v1alpha.ChangeHistoryEvent.toObject(message.changeHistoryEvents[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this SearchChangeHistoryEventsResponse to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.SearchChangeHistoryEventsResponse + * @instance + * @returns {Object.} JSON object + */ + SearchChangeHistoryEventsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SearchChangeHistoryEventsResponse + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.SearchChangeHistoryEventsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SearchChangeHistoryEventsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.SearchChangeHistoryEventsResponse"; + }; + + return SearchChangeHistoryEventsResponse; + })(); + + v1alpha.GetMeasurementProtocolSecretRequest = (function() { + + /** + * Properties of a GetMeasurementProtocolSecretRequest. + * @memberof google.analytics.admin.v1alpha + * @interface IGetMeasurementProtocolSecretRequest + * @property {string|null} [name] GetMeasurementProtocolSecretRequest name + */ + + /** + * Constructs a new GetMeasurementProtocolSecretRequest. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents a GetMeasurementProtocolSecretRequest. + * @implements IGetMeasurementProtocolSecretRequest + * @constructor + * @param {google.analytics.admin.v1alpha.IGetMeasurementProtocolSecretRequest=} [properties] Properties to set + */ + function GetMeasurementProtocolSecretRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetMeasurementProtocolSecretRequest name. + * @member {string} name + * @memberof google.analytics.admin.v1alpha.GetMeasurementProtocolSecretRequest + * @instance + */ + GetMeasurementProtocolSecretRequest.prototype.name = ""; + + /** + * Creates a new GetMeasurementProtocolSecretRequest instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.GetMeasurementProtocolSecretRequest + * @static + * @param {google.analytics.admin.v1alpha.IGetMeasurementProtocolSecretRequest=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.GetMeasurementProtocolSecretRequest} GetMeasurementProtocolSecretRequest instance + */ + GetMeasurementProtocolSecretRequest.create = function create(properties) { + return new GetMeasurementProtocolSecretRequest(properties); + }; + + /** + * Encodes the specified GetMeasurementProtocolSecretRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.GetMeasurementProtocolSecretRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.GetMeasurementProtocolSecretRequest + * @static + * @param {google.analytics.admin.v1alpha.IGetMeasurementProtocolSecretRequest} message GetMeasurementProtocolSecretRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetMeasurementProtocolSecretRequest.encode = function encode(message, writer) { + 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 GetMeasurementProtocolSecretRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.GetMeasurementProtocolSecretRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.GetMeasurementProtocolSecretRequest + * @static + * @param {google.analytics.admin.v1alpha.IGetMeasurementProtocolSecretRequest} message GetMeasurementProtocolSecretRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetMeasurementProtocolSecretRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetMeasurementProtocolSecretRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.GetMeasurementProtocolSecretRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.GetMeasurementProtocolSecretRequest} GetMeasurementProtocolSecretRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetMeasurementProtocolSecretRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.GetMeasurementProtocolSecretRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetMeasurementProtocolSecretRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.GetMeasurementProtocolSecretRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.GetMeasurementProtocolSecretRequest} GetMeasurementProtocolSecretRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetMeasurementProtocolSecretRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetMeasurementProtocolSecretRequest message. + * @function verify + * @memberof google.analytics.admin.v1alpha.GetMeasurementProtocolSecretRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetMeasurementProtocolSecretRequest.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 GetMeasurementProtocolSecretRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.GetMeasurementProtocolSecretRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.GetMeasurementProtocolSecretRequest} GetMeasurementProtocolSecretRequest + */ + GetMeasurementProtocolSecretRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.GetMeasurementProtocolSecretRequest) + return object; + var message = new $root.google.analytics.admin.v1alpha.GetMeasurementProtocolSecretRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetMeasurementProtocolSecretRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.GetMeasurementProtocolSecretRequest + * @static + * @param {google.analytics.admin.v1alpha.GetMeasurementProtocolSecretRequest} message GetMeasurementProtocolSecretRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetMeasurementProtocolSecretRequest.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 GetMeasurementProtocolSecretRequest to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.GetMeasurementProtocolSecretRequest + * @instance + * @returns {Object.} JSON object + */ + GetMeasurementProtocolSecretRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetMeasurementProtocolSecretRequest + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.GetMeasurementProtocolSecretRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetMeasurementProtocolSecretRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.GetMeasurementProtocolSecretRequest"; + }; + + return GetMeasurementProtocolSecretRequest; + })(); + + v1alpha.CreateMeasurementProtocolSecretRequest = (function() { + + /** + * Properties of a CreateMeasurementProtocolSecretRequest. + * @memberof google.analytics.admin.v1alpha + * @interface ICreateMeasurementProtocolSecretRequest + * @property {string|null} [parent] CreateMeasurementProtocolSecretRequest parent + * @property {google.analytics.admin.v1alpha.IMeasurementProtocolSecret|null} [measurementProtocolSecret] CreateMeasurementProtocolSecretRequest measurementProtocolSecret + */ + + /** + * Constructs a new CreateMeasurementProtocolSecretRequest. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents a CreateMeasurementProtocolSecretRequest. + * @implements ICreateMeasurementProtocolSecretRequest + * @constructor + * @param {google.analytics.admin.v1alpha.ICreateMeasurementProtocolSecretRequest=} [properties] Properties to set + */ + function CreateMeasurementProtocolSecretRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateMeasurementProtocolSecretRequest parent. + * @member {string} parent + * @memberof google.analytics.admin.v1alpha.CreateMeasurementProtocolSecretRequest + * @instance + */ + CreateMeasurementProtocolSecretRequest.prototype.parent = ""; + + /** + * CreateMeasurementProtocolSecretRequest measurementProtocolSecret. + * @member {google.analytics.admin.v1alpha.IMeasurementProtocolSecret|null|undefined} measurementProtocolSecret + * @memberof google.analytics.admin.v1alpha.CreateMeasurementProtocolSecretRequest + * @instance + */ + CreateMeasurementProtocolSecretRequest.prototype.measurementProtocolSecret = null; + + /** + * Creates a new CreateMeasurementProtocolSecretRequest instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.CreateMeasurementProtocolSecretRequest + * @static + * @param {google.analytics.admin.v1alpha.ICreateMeasurementProtocolSecretRequest=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.CreateMeasurementProtocolSecretRequest} CreateMeasurementProtocolSecretRequest instance + */ + CreateMeasurementProtocolSecretRequest.create = function create(properties) { + return new CreateMeasurementProtocolSecretRequest(properties); + }; + + /** + * Encodes the specified CreateMeasurementProtocolSecretRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.CreateMeasurementProtocolSecretRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.CreateMeasurementProtocolSecretRequest + * @static + * @param {google.analytics.admin.v1alpha.ICreateMeasurementProtocolSecretRequest} message CreateMeasurementProtocolSecretRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateMeasurementProtocolSecretRequest.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.measurementProtocolSecret != null && Object.hasOwnProperty.call(message, "measurementProtocolSecret")) + $root.google.analytics.admin.v1alpha.MeasurementProtocolSecret.encode(message.measurementProtocolSecret, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CreateMeasurementProtocolSecretRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.CreateMeasurementProtocolSecretRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.CreateMeasurementProtocolSecretRequest + * @static + * @param {google.analytics.admin.v1alpha.ICreateMeasurementProtocolSecretRequest} message CreateMeasurementProtocolSecretRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateMeasurementProtocolSecretRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateMeasurementProtocolSecretRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.CreateMeasurementProtocolSecretRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.CreateMeasurementProtocolSecretRequest} CreateMeasurementProtocolSecretRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateMeasurementProtocolSecretRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.CreateMeasurementProtocolSecretRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.measurementProtocolSecret = $root.google.analytics.admin.v1alpha.MeasurementProtocolSecret.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateMeasurementProtocolSecretRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.CreateMeasurementProtocolSecretRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.CreateMeasurementProtocolSecretRequest} CreateMeasurementProtocolSecretRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateMeasurementProtocolSecretRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateMeasurementProtocolSecretRequest message. + * @function verify + * @memberof google.analytics.admin.v1alpha.CreateMeasurementProtocolSecretRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateMeasurementProtocolSecretRequest.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.measurementProtocolSecret != null && message.hasOwnProperty("measurementProtocolSecret")) { + var error = $root.google.analytics.admin.v1alpha.MeasurementProtocolSecret.verify(message.measurementProtocolSecret); + if (error) + return "measurementProtocolSecret." + error; + } + return null; + }; + + /** + * Creates a CreateMeasurementProtocolSecretRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.CreateMeasurementProtocolSecretRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.CreateMeasurementProtocolSecretRequest} CreateMeasurementProtocolSecretRequest + */ + CreateMeasurementProtocolSecretRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.CreateMeasurementProtocolSecretRequest) + return object; + var message = new $root.google.analytics.admin.v1alpha.CreateMeasurementProtocolSecretRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.measurementProtocolSecret != null) { + if (typeof object.measurementProtocolSecret !== "object") + throw TypeError(".google.analytics.admin.v1alpha.CreateMeasurementProtocolSecretRequest.measurementProtocolSecret: object expected"); + message.measurementProtocolSecret = $root.google.analytics.admin.v1alpha.MeasurementProtocolSecret.fromObject(object.measurementProtocolSecret); + } + return message; + }; + + /** + * Creates a plain object from a CreateMeasurementProtocolSecretRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.CreateMeasurementProtocolSecretRequest + * @static + * @param {google.analytics.admin.v1alpha.CreateMeasurementProtocolSecretRequest} message CreateMeasurementProtocolSecretRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateMeasurementProtocolSecretRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.measurementProtocolSecret = null; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.measurementProtocolSecret != null && message.hasOwnProperty("measurementProtocolSecret")) + object.measurementProtocolSecret = $root.google.analytics.admin.v1alpha.MeasurementProtocolSecret.toObject(message.measurementProtocolSecret, options); + return object; + }; + + /** + * Converts this CreateMeasurementProtocolSecretRequest to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.CreateMeasurementProtocolSecretRequest + * @instance + * @returns {Object.} JSON object + */ + CreateMeasurementProtocolSecretRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateMeasurementProtocolSecretRequest + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.CreateMeasurementProtocolSecretRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateMeasurementProtocolSecretRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.CreateMeasurementProtocolSecretRequest"; + }; + + return CreateMeasurementProtocolSecretRequest; + })(); + + v1alpha.DeleteMeasurementProtocolSecretRequest = (function() { + + /** + * Properties of a DeleteMeasurementProtocolSecretRequest. + * @memberof google.analytics.admin.v1alpha + * @interface IDeleteMeasurementProtocolSecretRequest + * @property {string|null} [name] DeleteMeasurementProtocolSecretRequest name + */ + + /** + * Constructs a new DeleteMeasurementProtocolSecretRequest. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents a DeleteMeasurementProtocolSecretRequest. + * @implements IDeleteMeasurementProtocolSecretRequest + * @constructor + * @param {google.analytics.admin.v1alpha.IDeleteMeasurementProtocolSecretRequest=} [properties] Properties to set + */ + function DeleteMeasurementProtocolSecretRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteMeasurementProtocolSecretRequest name. + * @member {string} name + * @memberof google.analytics.admin.v1alpha.DeleteMeasurementProtocolSecretRequest + * @instance + */ + DeleteMeasurementProtocolSecretRequest.prototype.name = ""; + + /** + * Creates a new DeleteMeasurementProtocolSecretRequest instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.DeleteMeasurementProtocolSecretRequest + * @static + * @param {google.analytics.admin.v1alpha.IDeleteMeasurementProtocolSecretRequest=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.DeleteMeasurementProtocolSecretRequest} DeleteMeasurementProtocolSecretRequest instance + */ + DeleteMeasurementProtocolSecretRequest.create = function create(properties) { + return new DeleteMeasurementProtocolSecretRequest(properties); + }; + + /** + * Encodes the specified DeleteMeasurementProtocolSecretRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.DeleteMeasurementProtocolSecretRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.DeleteMeasurementProtocolSecretRequest + * @static + * @param {google.analytics.admin.v1alpha.IDeleteMeasurementProtocolSecretRequest} message DeleteMeasurementProtocolSecretRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteMeasurementProtocolSecretRequest.encode = function encode(message, writer) { + 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 DeleteMeasurementProtocolSecretRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.DeleteMeasurementProtocolSecretRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.DeleteMeasurementProtocolSecretRequest + * @static + * @param {google.analytics.admin.v1alpha.IDeleteMeasurementProtocolSecretRequest} message DeleteMeasurementProtocolSecretRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteMeasurementProtocolSecretRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteMeasurementProtocolSecretRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.DeleteMeasurementProtocolSecretRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.DeleteMeasurementProtocolSecretRequest} DeleteMeasurementProtocolSecretRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteMeasurementProtocolSecretRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.DeleteMeasurementProtocolSecretRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteMeasurementProtocolSecretRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.DeleteMeasurementProtocolSecretRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.DeleteMeasurementProtocolSecretRequest} DeleteMeasurementProtocolSecretRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteMeasurementProtocolSecretRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteMeasurementProtocolSecretRequest message. + * @function verify + * @memberof google.analytics.admin.v1alpha.DeleteMeasurementProtocolSecretRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteMeasurementProtocolSecretRequest.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 DeleteMeasurementProtocolSecretRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.DeleteMeasurementProtocolSecretRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.DeleteMeasurementProtocolSecretRequest} DeleteMeasurementProtocolSecretRequest + */ + DeleteMeasurementProtocolSecretRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.DeleteMeasurementProtocolSecretRequest) + return object; + var message = new $root.google.analytics.admin.v1alpha.DeleteMeasurementProtocolSecretRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteMeasurementProtocolSecretRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.DeleteMeasurementProtocolSecretRequest + * @static + * @param {google.analytics.admin.v1alpha.DeleteMeasurementProtocolSecretRequest} message DeleteMeasurementProtocolSecretRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteMeasurementProtocolSecretRequest.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 DeleteMeasurementProtocolSecretRequest to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.DeleteMeasurementProtocolSecretRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteMeasurementProtocolSecretRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteMeasurementProtocolSecretRequest + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.DeleteMeasurementProtocolSecretRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteMeasurementProtocolSecretRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.DeleteMeasurementProtocolSecretRequest"; + }; + + return DeleteMeasurementProtocolSecretRequest; + })(); + + v1alpha.UpdateMeasurementProtocolSecretRequest = (function() { + + /** + * Properties of an UpdateMeasurementProtocolSecretRequest. + * @memberof google.analytics.admin.v1alpha + * @interface IUpdateMeasurementProtocolSecretRequest + * @property {google.analytics.admin.v1alpha.IMeasurementProtocolSecret|null} [measurementProtocolSecret] UpdateMeasurementProtocolSecretRequest measurementProtocolSecret + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateMeasurementProtocolSecretRequest updateMask + */ + + /** + * Constructs a new UpdateMeasurementProtocolSecretRequest. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents an UpdateMeasurementProtocolSecretRequest. + * @implements IUpdateMeasurementProtocolSecretRequest + * @constructor + * @param {google.analytics.admin.v1alpha.IUpdateMeasurementProtocolSecretRequest=} [properties] Properties to set + */ + function UpdateMeasurementProtocolSecretRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateMeasurementProtocolSecretRequest measurementProtocolSecret. + * @member {google.analytics.admin.v1alpha.IMeasurementProtocolSecret|null|undefined} measurementProtocolSecret + * @memberof google.analytics.admin.v1alpha.UpdateMeasurementProtocolSecretRequest + * @instance + */ + UpdateMeasurementProtocolSecretRequest.prototype.measurementProtocolSecret = null; + + /** + * UpdateMeasurementProtocolSecretRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.analytics.admin.v1alpha.UpdateMeasurementProtocolSecretRequest + * @instance + */ + UpdateMeasurementProtocolSecretRequest.prototype.updateMask = null; + + /** + * Creates a new UpdateMeasurementProtocolSecretRequest instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.UpdateMeasurementProtocolSecretRequest + * @static + * @param {google.analytics.admin.v1alpha.IUpdateMeasurementProtocolSecretRequest=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.UpdateMeasurementProtocolSecretRequest} UpdateMeasurementProtocolSecretRequest instance + */ + UpdateMeasurementProtocolSecretRequest.create = function create(properties) { + return new UpdateMeasurementProtocolSecretRequest(properties); + }; + + /** + * Encodes the specified UpdateMeasurementProtocolSecretRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.UpdateMeasurementProtocolSecretRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.UpdateMeasurementProtocolSecretRequest + * @static + * @param {google.analytics.admin.v1alpha.IUpdateMeasurementProtocolSecretRequest} message UpdateMeasurementProtocolSecretRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateMeasurementProtocolSecretRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.measurementProtocolSecret != null && Object.hasOwnProperty.call(message, "measurementProtocolSecret")) + $root.google.analytics.admin.v1alpha.MeasurementProtocolSecret.encode(message.measurementProtocolSecret, 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 UpdateMeasurementProtocolSecretRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.UpdateMeasurementProtocolSecretRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.UpdateMeasurementProtocolSecretRequest + * @static + * @param {google.analytics.admin.v1alpha.IUpdateMeasurementProtocolSecretRequest} message UpdateMeasurementProtocolSecretRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateMeasurementProtocolSecretRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateMeasurementProtocolSecretRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.UpdateMeasurementProtocolSecretRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.UpdateMeasurementProtocolSecretRequest} UpdateMeasurementProtocolSecretRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateMeasurementProtocolSecretRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.UpdateMeasurementProtocolSecretRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.measurementProtocolSecret = $root.google.analytics.admin.v1alpha.MeasurementProtocolSecret.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 UpdateMeasurementProtocolSecretRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.UpdateMeasurementProtocolSecretRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.UpdateMeasurementProtocolSecretRequest} UpdateMeasurementProtocolSecretRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateMeasurementProtocolSecretRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateMeasurementProtocolSecretRequest message. + * @function verify + * @memberof google.analytics.admin.v1alpha.UpdateMeasurementProtocolSecretRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateMeasurementProtocolSecretRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.measurementProtocolSecret != null && message.hasOwnProperty("measurementProtocolSecret")) { + var error = $root.google.analytics.admin.v1alpha.MeasurementProtocolSecret.verify(message.measurementProtocolSecret); + if (error) + return "measurementProtocolSecret." + 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 UpdateMeasurementProtocolSecretRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.UpdateMeasurementProtocolSecretRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.UpdateMeasurementProtocolSecretRequest} UpdateMeasurementProtocolSecretRequest + */ + UpdateMeasurementProtocolSecretRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.UpdateMeasurementProtocolSecretRequest) + return object; + var message = new $root.google.analytics.admin.v1alpha.UpdateMeasurementProtocolSecretRequest(); + if (object.measurementProtocolSecret != null) { + if (typeof object.measurementProtocolSecret !== "object") + throw TypeError(".google.analytics.admin.v1alpha.UpdateMeasurementProtocolSecretRequest.measurementProtocolSecret: object expected"); + message.measurementProtocolSecret = $root.google.analytics.admin.v1alpha.MeasurementProtocolSecret.fromObject(object.measurementProtocolSecret); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.analytics.admin.v1alpha.UpdateMeasurementProtocolSecretRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + return message; + }; + + /** + * Creates a plain object from an UpdateMeasurementProtocolSecretRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.UpdateMeasurementProtocolSecretRequest + * @static + * @param {google.analytics.admin.v1alpha.UpdateMeasurementProtocolSecretRequest} message UpdateMeasurementProtocolSecretRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateMeasurementProtocolSecretRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.measurementProtocolSecret = null; + object.updateMask = null; + } + if (message.measurementProtocolSecret != null && message.hasOwnProperty("measurementProtocolSecret")) + object.measurementProtocolSecret = $root.google.analytics.admin.v1alpha.MeasurementProtocolSecret.toObject(message.measurementProtocolSecret, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + return object; + }; + + /** + * Converts this UpdateMeasurementProtocolSecretRequest to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.UpdateMeasurementProtocolSecretRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateMeasurementProtocolSecretRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateMeasurementProtocolSecretRequest + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.UpdateMeasurementProtocolSecretRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateMeasurementProtocolSecretRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.UpdateMeasurementProtocolSecretRequest"; + }; + + return UpdateMeasurementProtocolSecretRequest; + })(); + + v1alpha.ListMeasurementProtocolSecretsRequest = (function() { + + /** + * Properties of a ListMeasurementProtocolSecretsRequest. + * @memberof google.analytics.admin.v1alpha + * @interface IListMeasurementProtocolSecretsRequest + * @property {string|null} [parent] ListMeasurementProtocolSecretsRequest parent + * @property {number|null} [pageSize] ListMeasurementProtocolSecretsRequest pageSize + * @property {string|null} [pageToken] ListMeasurementProtocolSecretsRequest pageToken + */ + + /** + * Constructs a new ListMeasurementProtocolSecretsRequest. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents a ListMeasurementProtocolSecretsRequest. + * @implements IListMeasurementProtocolSecretsRequest + * @constructor + * @param {google.analytics.admin.v1alpha.IListMeasurementProtocolSecretsRequest=} [properties] Properties to set + */ + function ListMeasurementProtocolSecretsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListMeasurementProtocolSecretsRequest parent. + * @member {string} parent + * @memberof google.analytics.admin.v1alpha.ListMeasurementProtocolSecretsRequest + * @instance + */ + ListMeasurementProtocolSecretsRequest.prototype.parent = ""; + + /** + * ListMeasurementProtocolSecretsRequest pageSize. + * @member {number} pageSize + * @memberof google.analytics.admin.v1alpha.ListMeasurementProtocolSecretsRequest + * @instance + */ + ListMeasurementProtocolSecretsRequest.prototype.pageSize = 0; + + /** + * ListMeasurementProtocolSecretsRequest pageToken. + * @member {string} pageToken + * @memberof google.analytics.admin.v1alpha.ListMeasurementProtocolSecretsRequest + * @instance + */ + ListMeasurementProtocolSecretsRequest.prototype.pageToken = ""; + + /** + * Creates a new ListMeasurementProtocolSecretsRequest instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.ListMeasurementProtocolSecretsRequest + * @static + * @param {google.analytics.admin.v1alpha.IListMeasurementProtocolSecretsRequest=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.ListMeasurementProtocolSecretsRequest} ListMeasurementProtocolSecretsRequest instance + */ + ListMeasurementProtocolSecretsRequest.create = function create(properties) { + return new ListMeasurementProtocolSecretsRequest(properties); + }; + + /** + * Encodes the specified ListMeasurementProtocolSecretsRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.ListMeasurementProtocolSecretsRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.ListMeasurementProtocolSecretsRequest + * @static + * @param {google.analytics.admin.v1alpha.IListMeasurementProtocolSecretsRequest} message ListMeasurementProtocolSecretsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListMeasurementProtocolSecretsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + return writer; + }; + + /** + * Encodes the specified ListMeasurementProtocolSecretsRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.ListMeasurementProtocolSecretsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.ListMeasurementProtocolSecretsRequest + * @static + * @param {google.analytics.admin.v1alpha.IListMeasurementProtocolSecretsRequest} message ListMeasurementProtocolSecretsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListMeasurementProtocolSecretsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListMeasurementProtocolSecretsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.ListMeasurementProtocolSecretsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.ListMeasurementProtocolSecretsRequest} ListMeasurementProtocolSecretsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListMeasurementProtocolSecretsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.ListMeasurementProtocolSecretsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListMeasurementProtocolSecretsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.ListMeasurementProtocolSecretsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.ListMeasurementProtocolSecretsRequest} ListMeasurementProtocolSecretsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListMeasurementProtocolSecretsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListMeasurementProtocolSecretsRequest message. + * @function verify + * @memberof google.analytics.admin.v1alpha.ListMeasurementProtocolSecretsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListMeasurementProtocolSecretsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + return null; + }; + + /** + * Creates a ListMeasurementProtocolSecretsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.ListMeasurementProtocolSecretsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.ListMeasurementProtocolSecretsRequest} ListMeasurementProtocolSecretsRequest + */ + ListMeasurementProtocolSecretsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.ListMeasurementProtocolSecretsRequest) + return object; + var message = new $root.google.analytics.admin.v1alpha.ListMeasurementProtocolSecretsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + return message; + }; + + /** + * Creates a plain object from a ListMeasurementProtocolSecretsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.ListMeasurementProtocolSecretsRequest + * @static + * @param {google.analytics.admin.v1alpha.ListMeasurementProtocolSecretsRequest} message ListMeasurementProtocolSecretsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListMeasurementProtocolSecretsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + return object; + }; + + /** + * Converts this ListMeasurementProtocolSecretsRequest to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.ListMeasurementProtocolSecretsRequest + * @instance + * @returns {Object.} JSON object + */ + ListMeasurementProtocolSecretsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListMeasurementProtocolSecretsRequest + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.ListMeasurementProtocolSecretsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListMeasurementProtocolSecretsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.ListMeasurementProtocolSecretsRequest"; + }; + + return ListMeasurementProtocolSecretsRequest; + })(); + + v1alpha.ListMeasurementProtocolSecretsResponse = (function() { + + /** + * Properties of a ListMeasurementProtocolSecretsResponse. + * @memberof google.analytics.admin.v1alpha + * @interface IListMeasurementProtocolSecretsResponse + * @property {Array.|null} [measurementProtocolSecrets] ListMeasurementProtocolSecretsResponse measurementProtocolSecrets + * @property {string|null} [nextPageToken] ListMeasurementProtocolSecretsResponse nextPageToken + */ + + /** + * Constructs a new ListMeasurementProtocolSecretsResponse. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents a ListMeasurementProtocolSecretsResponse. + * @implements IListMeasurementProtocolSecretsResponse + * @constructor + * @param {google.analytics.admin.v1alpha.IListMeasurementProtocolSecretsResponse=} [properties] Properties to set + */ + function ListMeasurementProtocolSecretsResponse(properties) { + this.measurementProtocolSecrets = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListMeasurementProtocolSecretsResponse measurementProtocolSecrets. + * @member {Array.} measurementProtocolSecrets + * @memberof google.analytics.admin.v1alpha.ListMeasurementProtocolSecretsResponse + * @instance + */ + ListMeasurementProtocolSecretsResponse.prototype.measurementProtocolSecrets = $util.emptyArray; + + /** + * ListMeasurementProtocolSecretsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.analytics.admin.v1alpha.ListMeasurementProtocolSecretsResponse + * @instance + */ + ListMeasurementProtocolSecretsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListMeasurementProtocolSecretsResponse instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.ListMeasurementProtocolSecretsResponse + * @static + * @param {google.analytics.admin.v1alpha.IListMeasurementProtocolSecretsResponse=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.ListMeasurementProtocolSecretsResponse} ListMeasurementProtocolSecretsResponse instance + */ + ListMeasurementProtocolSecretsResponse.create = function create(properties) { + return new ListMeasurementProtocolSecretsResponse(properties); + }; + + /** + * Encodes the specified ListMeasurementProtocolSecretsResponse message. Does not implicitly {@link google.analytics.admin.v1alpha.ListMeasurementProtocolSecretsResponse.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.ListMeasurementProtocolSecretsResponse + * @static + * @param {google.analytics.admin.v1alpha.IListMeasurementProtocolSecretsResponse} message ListMeasurementProtocolSecretsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListMeasurementProtocolSecretsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.measurementProtocolSecrets != null && message.measurementProtocolSecrets.length) + for (var i = 0; i < message.measurementProtocolSecrets.length; ++i) + $root.google.analytics.admin.v1alpha.MeasurementProtocolSecret.encode(message.measurementProtocolSecrets[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 ListMeasurementProtocolSecretsResponse message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.ListMeasurementProtocolSecretsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.ListMeasurementProtocolSecretsResponse + * @static + * @param {google.analytics.admin.v1alpha.IListMeasurementProtocolSecretsResponse} message ListMeasurementProtocolSecretsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListMeasurementProtocolSecretsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListMeasurementProtocolSecretsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.ListMeasurementProtocolSecretsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.ListMeasurementProtocolSecretsResponse} ListMeasurementProtocolSecretsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListMeasurementProtocolSecretsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.ListMeasurementProtocolSecretsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.measurementProtocolSecrets && message.measurementProtocolSecrets.length)) + message.measurementProtocolSecrets = []; + message.measurementProtocolSecrets.push($root.google.analytics.admin.v1alpha.MeasurementProtocolSecret.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListMeasurementProtocolSecretsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.ListMeasurementProtocolSecretsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.ListMeasurementProtocolSecretsResponse} ListMeasurementProtocolSecretsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListMeasurementProtocolSecretsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListMeasurementProtocolSecretsResponse message. + * @function verify + * @memberof google.analytics.admin.v1alpha.ListMeasurementProtocolSecretsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListMeasurementProtocolSecretsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.measurementProtocolSecrets != null && message.hasOwnProperty("measurementProtocolSecrets")) { + if (!Array.isArray(message.measurementProtocolSecrets)) + return "measurementProtocolSecrets: array expected"; + for (var i = 0; i < message.measurementProtocolSecrets.length; ++i) { + var error = $root.google.analytics.admin.v1alpha.MeasurementProtocolSecret.verify(message.measurementProtocolSecrets[i]); + if (error) + return "measurementProtocolSecrets." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListMeasurementProtocolSecretsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.ListMeasurementProtocolSecretsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.ListMeasurementProtocolSecretsResponse} ListMeasurementProtocolSecretsResponse + */ + ListMeasurementProtocolSecretsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.ListMeasurementProtocolSecretsResponse) + return object; + var message = new $root.google.analytics.admin.v1alpha.ListMeasurementProtocolSecretsResponse(); + if (object.measurementProtocolSecrets) { + if (!Array.isArray(object.measurementProtocolSecrets)) + throw TypeError(".google.analytics.admin.v1alpha.ListMeasurementProtocolSecretsResponse.measurementProtocolSecrets: array expected"); + message.measurementProtocolSecrets = []; + for (var i = 0; i < object.measurementProtocolSecrets.length; ++i) { + if (typeof object.measurementProtocolSecrets[i] !== "object") + throw TypeError(".google.analytics.admin.v1alpha.ListMeasurementProtocolSecretsResponse.measurementProtocolSecrets: object expected"); + message.measurementProtocolSecrets[i] = $root.google.analytics.admin.v1alpha.MeasurementProtocolSecret.fromObject(object.measurementProtocolSecrets[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListMeasurementProtocolSecretsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.ListMeasurementProtocolSecretsResponse + * @static + * @param {google.analytics.admin.v1alpha.ListMeasurementProtocolSecretsResponse} message ListMeasurementProtocolSecretsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListMeasurementProtocolSecretsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.measurementProtocolSecrets = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.measurementProtocolSecrets && message.measurementProtocolSecrets.length) { + object.measurementProtocolSecrets = []; + for (var j = 0; j < message.measurementProtocolSecrets.length; ++j) + object.measurementProtocolSecrets[j] = $root.google.analytics.admin.v1alpha.MeasurementProtocolSecret.toObject(message.measurementProtocolSecrets[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListMeasurementProtocolSecretsResponse to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.ListMeasurementProtocolSecretsResponse + * @instance + * @returns {Object.} JSON object + */ + ListMeasurementProtocolSecretsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListMeasurementProtocolSecretsResponse + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.ListMeasurementProtocolSecretsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListMeasurementProtocolSecretsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.ListMeasurementProtocolSecretsResponse"; + }; + + return ListMeasurementProtocolSecretsResponse; + })(); + + v1alpha.GetGoogleSignalsSettingsRequest = (function() { + + /** + * Properties of a GetGoogleSignalsSettingsRequest. + * @memberof google.analytics.admin.v1alpha + * @interface IGetGoogleSignalsSettingsRequest + * @property {string|null} [name] GetGoogleSignalsSettingsRequest name + */ + + /** + * Constructs a new GetGoogleSignalsSettingsRequest. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents a GetGoogleSignalsSettingsRequest. + * @implements IGetGoogleSignalsSettingsRequest + * @constructor + * @param {google.analytics.admin.v1alpha.IGetGoogleSignalsSettingsRequest=} [properties] Properties to set + */ + function GetGoogleSignalsSettingsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetGoogleSignalsSettingsRequest name. + * @member {string} name + * @memberof google.analytics.admin.v1alpha.GetGoogleSignalsSettingsRequest + * @instance + */ + GetGoogleSignalsSettingsRequest.prototype.name = ""; + + /** + * Creates a new GetGoogleSignalsSettingsRequest instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.GetGoogleSignalsSettingsRequest + * @static + * @param {google.analytics.admin.v1alpha.IGetGoogleSignalsSettingsRequest=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.GetGoogleSignalsSettingsRequest} GetGoogleSignalsSettingsRequest instance + */ + GetGoogleSignalsSettingsRequest.create = function create(properties) { + return new GetGoogleSignalsSettingsRequest(properties); + }; + + /** + * Encodes the specified GetGoogleSignalsSettingsRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.GetGoogleSignalsSettingsRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.GetGoogleSignalsSettingsRequest + * @static + * @param {google.analytics.admin.v1alpha.IGetGoogleSignalsSettingsRequest} message GetGoogleSignalsSettingsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetGoogleSignalsSettingsRequest.encode = function encode(message, writer) { + 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 GetGoogleSignalsSettingsRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.GetGoogleSignalsSettingsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.GetGoogleSignalsSettingsRequest + * @static + * @param {google.analytics.admin.v1alpha.IGetGoogleSignalsSettingsRequest} message GetGoogleSignalsSettingsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetGoogleSignalsSettingsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetGoogleSignalsSettingsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.GetGoogleSignalsSettingsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.GetGoogleSignalsSettingsRequest} GetGoogleSignalsSettingsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetGoogleSignalsSettingsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.GetGoogleSignalsSettingsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetGoogleSignalsSettingsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.GetGoogleSignalsSettingsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.GetGoogleSignalsSettingsRequest} GetGoogleSignalsSettingsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetGoogleSignalsSettingsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetGoogleSignalsSettingsRequest message. + * @function verify + * @memberof google.analytics.admin.v1alpha.GetGoogleSignalsSettingsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetGoogleSignalsSettingsRequest.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 GetGoogleSignalsSettingsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.GetGoogleSignalsSettingsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.GetGoogleSignalsSettingsRequest} GetGoogleSignalsSettingsRequest + */ + GetGoogleSignalsSettingsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.GetGoogleSignalsSettingsRequest) + return object; + var message = new $root.google.analytics.admin.v1alpha.GetGoogleSignalsSettingsRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetGoogleSignalsSettingsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.GetGoogleSignalsSettingsRequest + * @static + * @param {google.analytics.admin.v1alpha.GetGoogleSignalsSettingsRequest} message GetGoogleSignalsSettingsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetGoogleSignalsSettingsRequest.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 GetGoogleSignalsSettingsRequest to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.GetGoogleSignalsSettingsRequest + * @instance + * @returns {Object.} JSON object + */ + GetGoogleSignalsSettingsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetGoogleSignalsSettingsRequest + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.GetGoogleSignalsSettingsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetGoogleSignalsSettingsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.GetGoogleSignalsSettingsRequest"; + }; + + return GetGoogleSignalsSettingsRequest; + })(); + + v1alpha.UpdateGoogleSignalsSettingsRequest = (function() { + + /** + * Properties of an UpdateGoogleSignalsSettingsRequest. + * @memberof google.analytics.admin.v1alpha + * @interface IUpdateGoogleSignalsSettingsRequest + * @property {google.analytics.admin.v1alpha.IGoogleSignalsSettings|null} [googleSignalsSettings] UpdateGoogleSignalsSettingsRequest googleSignalsSettings + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateGoogleSignalsSettingsRequest updateMask + */ + + /** + * Constructs a new UpdateGoogleSignalsSettingsRequest. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents an UpdateGoogleSignalsSettingsRequest. + * @implements IUpdateGoogleSignalsSettingsRequest + * @constructor + * @param {google.analytics.admin.v1alpha.IUpdateGoogleSignalsSettingsRequest=} [properties] Properties to set + */ + function UpdateGoogleSignalsSettingsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateGoogleSignalsSettingsRequest googleSignalsSettings. + * @member {google.analytics.admin.v1alpha.IGoogleSignalsSettings|null|undefined} googleSignalsSettings + * @memberof google.analytics.admin.v1alpha.UpdateGoogleSignalsSettingsRequest + * @instance + */ + UpdateGoogleSignalsSettingsRequest.prototype.googleSignalsSettings = null; + + /** + * UpdateGoogleSignalsSettingsRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.analytics.admin.v1alpha.UpdateGoogleSignalsSettingsRequest + * @instance + */ + UpdateGoogleSignalsSettingsRequest.prototype.updateMask = null; + + /** + * Creates a new UpdateGoogleSignalsSettingsRequest instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.UpdateGoogleSignalsSettingsRequest + * @static + * @param {google.analytics.admin.v1alpha.IUpdateGoogleSignalsSettingsRequest=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.UpdateGoogleSignalsSettingsRequest} UpdateGoogleSignalsSettingsRequest instance + */ + UpdateGoogleSignalsSettingsRequest.create = function create(properties) { + return new UpdateGoogleSignalsSettingsRequest(properties); + }; + + /** + * Encodes the specified UpdateGoogleSignalsSettingsRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.UpdateGoogleSignalsSettingsRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.UpdateGoogleSignalsSettingsRequest + * @static + * @param {google.analytics.admin.v1alpha.IUpdateGoogleSignalsSettingsRequest} message UpdateGoogleSignalsSettingsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateGoogleSignalsSettingsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.googleSignalsSettings != null && Object.hasOwnProperty.call(message, "googleSignalsSettings")) + $root.google.analytics.admin.v1alpha.GoogleSignalsSettings.encode(message.googleSignalsSettings, 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 UpdateGoogleSignalsSettingsRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.UpdateGoogleSignalsSettingsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.UpdateGoogleSignalsSettingsRequest + * @static + * @param {google.analytics.admin.v1alpha.IUpdateGoogleSignalsSettingsRequest} message UpdateGoogleSignalsSettingsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateGoogleSignalsSettingsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateGoogleSignalsSettingsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.UpdateGoogleSignalsSettingsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.UpdateGoogleSignalsSettingsRequest} UpdateGoogleSignalsSettingsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateGoogleSignalsSettingsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.UpdateGoogleSignalsSettingsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.googleSignalsSettings = $root.google.analytics.admin.v1alpha.GoogleSignalsSettings.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 UpdateGoogleSignalsSettingsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.UpdateGoogleSignalsSettingsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.UpdateGoogleSignalsSettingsRequest} UpdateGoogleSignalsSettingsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateGoogleSignalsSettingsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateGoogleSignalsSettingsRequest message. + * @function verify + * @memberof google.analytics.admin.v1alpha.UpdateGoogleSignalsSettingsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateGoogleSignalsSettingsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.googleSignalsSettings != null && message.hasOwnProperty("googleSignalsSettings")) { + var error = $root.google.analytics.admin.v1alpha.GoogleSignalsSettings.verify(message.googleSignalsSettings); + if (error) + return "googleSignalsSettings." + 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 UpdateGoogleSignalsSettingsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.UpdateGoogleSignalsSettingsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.UpdateGoogleSignalsSettingsRequest} UpdateGoogleSignalsSettingsRequest + */ + UpdateGoogleSignalsSettingsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.UpdateGoogleSignalsSettingsRequest) + return object; + var message = new $root.google.analytics.admin.v1alpha.UpdateGoogleSignalsSettingsRequest(); + if (object.googleSignalsSettings != null) { + if (typeof object.googleSignalsSettings !== "object") + throw TypeError(".google.analytics.admin.v1alpha.UpdateGoogleSignalsSettingsRequest.googleSignalsSettings: object expected"); + message.googleSignalsSettings = $root.google.analytics.admin.v1alpha.GoogleSignalsSettings.fromObject(object.googleSignalsSettings); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.analytics.admin.v1alpha.UpdateGoogleSignalsSettingsRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + return message; + }; + + /** + * Creates a plain object from an UpdateGoogleSignalsSettingsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.UpdateGoogleSignalsSettingsRequest + * @static + * @param {google.analytics.admin.v1alpha.UpdateGoogleSignalsSettingsRequest} message UpdateGoogleSignalsSettingsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateGoogleSignalsSettingsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.googleSignalsSettings = null; + object.updateMask = null; + } + if (message.googleSignalsSettings != null && message.hasOwnProperty("googleSignalsSettings")) + object.googleSignalsSettings = $root.google.analytics.admin.v1alpha.GoogleSignalsSettings.toObject(message.googleSignalsSettings, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + return object; + }; + + /** + * Converts this UpdateGoogleSignalsSettingsRequest to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.UpdateGoogleSignalsSettingsRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateGoogleSignalsSettingsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateGoogleSignalsSettingsRequest + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.UpdateGoogleSignalsSettingsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateGoogleSignalsSettingsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.UpdateGoogleSignalsSettingsRequest"; + }; + + return UpdateGoogleSignalsSettingsRequest; + })(); + + v1alpha.CreateConversionEventRequest = (function() { + + /** + * Properties of a CreateConversionEventRequest. + * @memberof google.analytics.admin.v1alpha + * @interface ICreateConversionEventRequest + * @property {google.analytics.admin.v1alpha.IConversionEvent|null} [conversionEvent] CreateConversionEventRequest conversionEvent + * @property {string|null} [parent] CreateConversionEventRequest parent + */ + + /** + * Constructs a new CreateConversionEventRequest. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents a CreateConversionEventRequest. + * @implements ICreateConversionEventRequest + * @constructor + * @param {google.analytics.admin.v1alpha.ICreateConversionEventRequest=} [properties] Properties to set + */ + function CreateConversionEventRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateConversionEventRequest conversionEvent. + * @member {google.analytics.admin.v1alpha.IConversionEvent|null|undefined} conversionEvent + * @memberof google.analytics.admin.v1alpha.CreateConversionEventRequest + * @instance + */ + CreateConversionEventRequest.prototype.conversionEvent = null; + + /** + * CreateConversionEventRequest parent. + * @member {string} parent + * @memberof google.analytics.admin.v1alpha.CreateConversionEventRequest + * @instance + */ + CreateConversionEventRequest.prototype.parent = ""; + + /** + * Creates a new CreateConversionEventRequest instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.CreateConversionEventRequest + * @static + * @param {google.analytics.admin.v1alpha.ICreateConversionEventRequest=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.CreateConversionEventRequest} CreateConversionEventRequest instance + */ + CreateConversionEventRequest.create = function create(properties) { + return new CreateConversionEventRequest(properties); + }; + + /** + * Encodes the specified CreateConversionEventRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.CreateConversionEventRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.CreateConversionEventRequest + * @static + * @param {google.analytics.admin.v1alpha.ICreateConversionEventRequest} message CreateConversionEventRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateConversionEventRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.conversionEvent != null && Object.hasOwnProperty.call(message, "conversionEvent")) + $root.google.analytics.admin.v1alpha.ConversionEvent.encode(message.conversionEvent, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.parent); + return writer; + }; + + /** + * Encodes the specified CreateConversionEventRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.CreateConversionEventRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.CreateConversionEventRequest + * @static + * @param {google.analytics.admin.v1alpha.ICreateConversionEventRequest} message CreateConversionEventRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateConversionEventRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateConversionEventRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.CreateConversionEventRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.CreateConversionEventRequest} CreateConversionEventRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateConversionEventRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.CreateConversionEventRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.conversionEvent = $root.google.analytics.admin.v1alpha.ConversionEvent.decode(reader, reader.uint32()); + break; + } + case 2: { + message.parent = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateConversionEventRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.CreateConversionEventRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.CreateConversionEventRequest} CreateConversionEventRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateConversionEventRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateConversionEventRequest message. + * @function verify + * @memberof google.analytics.admin.v1alpha.CreateConversionEventRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateConversionEventRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.conversionEvent != null && message.hasOwnProperty("conversionEvent")) { + var error = $root.google.analytics.admin.v1alpha.ConversionEvent.verify(message.conversionEvent); + if (error) + return "conversionEvent." + error; + } + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + return null; + }; + + /** + * Creates a CreateConversionEventRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.CreateConversionEventRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.CreateConversionEventRequest} CreateConversionEventRequest + */ + CreateConversionEventRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.CreateConversionEventRequest) + return object; + var message = new $root.google.analytics.admin.v1alpha.CreateConversionEventRequest(); + if (object.conversionEvent != null) { + if (typeof object.conversionEvent !== "object") + throw TypeError(".google.analytics.admin.v1alpha.CreateConversionEventRequest.conversionEvent: object expected"); + message.conversionEvent = $root.google.analytics.admin.v1alpha.ConversionEvent.fromObject(object.conversionEvent); + } + if (object.parent != null) + message.parent = String(object.parent); + return message; + }; + + /** + * Creates a plain object from a CreateConversionEventRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.CreateConversionEventRequest + * @static + * @param {google.analytics.admin.v1alpha.CreateConversionEventRequest} message CreateConversionEventRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateConversionEventRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.conversionEvent = null; + object.parent = ""; + } + if (message.conversionEvent != null && message.hasOwnProperty("conversionEvent")) + object.conversionEvent = $root.google.analytics.admin.v1alpha.ConversionEvent.toObject(message.conversionEvent, options); + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + return object; + }; + + /** + * Converts this CreateConversionEventRequest to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.CreateConversionEventRequest + * @instance + * @returns {Object.} JSON object + */ + CreateConversionEventRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateConversionEventRequest + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.CreateConversionEventRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateConversionEventRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.CreateConversionEventRequest"; + }; + + return CreateConversionEventRequest; + })(); + + v1alpha.GetConversionEventRequest = (function() { + + /** + * Properties of a GetConversionEventRequest. + * @memberof google.analytics.admin.v1alpha + * @interface IGetConversionEventRequest + * @property {string|null} [name] GetConversionEventRequest name + */ + + /** + * Constructs a new GetConversionEventRequest. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents a GetConversionEventRequest. + * @implements IGetConversionEventRequest + * @constructor + * @param {google.analytics.admin.v1alpha.IGetConversionEventRequest=} [properties] Properties to set + */ + function GetConversionEventRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetConversionEventRequest name. + * @member {string} name + * @memberof google.analytics.admin.v1alpha.GetConversionEventRequest + * @instance + */ + GetConversionEventRequest.prototype.name = ""; + + /** + * Creates a new GetConversionEventRequest instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.GetConversionEventRequest + * @static + * @param {google.analytics.admin.v1alpha.IGetConversionEventRequest=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.GetConversionEventRequest} GetConversionEventRequest instance + */ + GetConversionEventRequest.create = function create(properties) { + return new GetConversionEventRequest(properties); + }; + + /** + * Encodes the specified GetConversionEventRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.GetConversionEventRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.GetConversionEventRequest + * @static + * @param {google.analytics.admin.v1alpha.IGetConversionEventRequest} message GetConversionEventRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetConversionEventRequest.encode = function encode(message, writer) { + 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 GetConversionEventRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.GetConversionEventRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.GetConversionEventRequest + * @static + * @param {google.analytics.admin.v1alpha.IGetConversionEventRequest} message GetConversionEventRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetConversionEventRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetConversionEventRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.GetConversionEventRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.GetConversionEventRequest} GetConversionEventRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetConversionEventRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.GetConversionEventRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetConversionEventRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.GetConversionEventRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.GetConversionEventRequest} GetConversionEventRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetConversionEventRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetConversionEventRequest message. + * @function verify + * @memberof google.analytics.admin.v1alpha.GetConversionEventRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetConversionEventRequest.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 GetConversionEventRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.GetConversionEventRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.GetConversionEventRequest} GetConversionEventRequest + */ + GetConversionEventRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.GetConversionEventRequest) + return object; + var message = new $root.google.analytics.admin.v1alpha.GetConversionEventRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetConversionEventRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.GetConversionEventRequest + * @static + * @param {google.analytics.admin.v1alpha.GetConversionEventRequest} message GetConversionEventRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetConversionEventRequest.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 GetConversionEventRequest to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.GetConversionEventRequest + * @instance + * @returns {Object.} JSON object + */ + GetConversionEventRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetConversionEventRequest + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.GetConversionEventRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetConversionEventRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.GetConversionEventRequest"; + }; + + return GetConversionEventRequest; + })(); + + v1alpha.DeleteConversionEventRequest = (function() { + + /** + * Properties of a DeleteConversionEventRequest. + * @memberof google.analytics.admin.v1alpha + * @interface IDeleteConversionEventRequest + * @property {string|null} [name] DeleteConversionEventRequest name + */ + + /** + * Constructs a new DeleteConversionEventRequest. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents a DeleteConversionEventRequest. + * @implements IDeleteConversionEventRequest + * @constructor + * @param {google.analytics.admin.v1alpha.IDeleteConversionEventRequest=} [properties] Properties to set + */ + function DeleteConversionEventRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteConversionEventRequest name. + * @member {string} name + * @memberof google.analytics.admin.v1alpha.DeleteConversionEventRequest + * @instance + */ + DeleteConversionEventRequest.prototype.name = ""; + + /** + * Creates a new DeleteConversionEventRequest instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.DeleteConversionEventRequest + * @static + * @param {google.analytics.admin.v1alpha.IDeleteConversionEventRequest=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.DeleteConversionEventRequest} DeleteConversionEventRequest instance + */ + DeleteConversionEventRequest.create = function create(properties) { + return new DeleteConversionEventRequest(properties); + }; + + /** + * Encodes the specified DeleteConversionEventRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.DeleteConversionEventRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.DeleteConversionEventRequest + * @static + * @param {google.analytics.admin.v1alpha.IDeleteConversionEventRequest} message DeleteConversionEventRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteConversionEventRequest.encode = function encode(message, writer) { + 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 DeleteConversionEventRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.DeleteConversionEventRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.DeleteConversionEventRequest + * @static + * @param {google.analytics.admin.v1alpha.IDeleteConversionEventRequest} message DeleteConversionEventRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteConversionEventRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteConversionEventRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.DeleteConversionEventRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.DeleteConversionEventRequest} DeleteConversionEventRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteConversionEventRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.DeleteConversionEventRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteConversionEventRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.DeleteConversionEventRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.DeleteConversionEventRequest} DeleteConversionEventRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteConversionEventRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteConversionEventRequest message. + * @function verify + * @memberof google.analytics.admin.v1alpha.DeleteConversionEventRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteConversionEventRequest.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 DeleteConversionEventRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.DeleteConversionEventRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.DeleteConversionEventRequest} DeleteConversionEventRequest + */ + DeleteConversionEventRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.DeleteConversionEventRequest) + return object; + var message = new $root.google.analytics.admin.v1alpha.DeleteConversionEventRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteConversionEventRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.DeleteConversionEventRequest + * @static + * @param {google.analytics.admin.v1alpha.DeleteConversionEventRequest} message DeleteConversionEventRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteConversionEventRequest.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 DeleteConversionEventRequest to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.DeleteConversionEventRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteConversionEventRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteConversionEventRequest + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.DeleteConversionEventRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteConversionEventRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.DeleteConversionEventRequest"; + }; + + return DeleteConversionEventRequest; + })(); + + v1alpha.ListConversionEventsRequest = (function() { + + /** + * Properties of a ListConversionEventsRequest. + * @memberof google.analytics.admin.v1alpha + * @interface IListConversionEventsRequest + * @property {string|null} [parent] ListConversionEventsRequest parent + * @property {number|null} [pageSize] ListConversionEventsRequest pageSize + * @property {string|null} [pageToken] ListConversionEventsRequest pageToken + */ + + /** + * Constructs a new ListConversionEventsRequest. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents a ListConversionEventsRequest. + * @implements IListConversionEventsRequest + * @constructor + * @param {google.analytics.admin.v1alpha.IListConversionEventsRequest=} [properties] Properties to set + */ + function ListConversionEventsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListConversionEventsRequest parent. + * @member {string} parent + * @memberof google.analytics.admin.v1alpha.ListConversionEventsRequest + * @instance + */ + ListConversionEventsRequest.prototype.parent = ""; + + /** + * ListConversionEventsRequest pageSize. + * @member {number} pageSize + * @memberof google.analytics.admin.v1alpha.ListConversionEventsRequest + * @instance + */ + ListConversionEventsRequest.prototype.pageSize = 0; + + /** + * ListConversionEventsRequest pageToken. + * @member {string} pageToken + * @memberof google.analytics.admin.v1alpha.ListConversionEventsRequest + * @instance + */ + ListConversionEventsRequest.prototype.pageToken = ""; + + /** + * Creates a new ListConversionEventsRequest instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.ListConversionEventsRequest + * @static + * @param {google.analytics.admin.v1alpha.IListConversionEventsRequest=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.ListConversionEventsRequest} ListConversionEventsRequest instance + */ + ListConversionEventsRequest.create = function create(properties) { + return new ListConversionEventsRequest(properties); + }; + + /** + * Encodes the specified ListConversionEventsRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.ListConversionEventsRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.ListConversionEventsRequest + * @static + * @param {google.analytics.admin.v1alpha.IListConversionEventsRequest} message ListConversionEventsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListConversionEventsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + return writer; + }; + + /** + * Encodes the specified ListConversionEventsRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.ListConversionEventsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.ListConversionEventsRequest + * @static + * @param {google.analytics.admin.v1alpha.IListConversionEventsRequest} message ListConversionEventsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListConversionEventsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListConversionEventsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.ListConversionEventsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.ListConversionEventsRequest} ListConversionEventsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListConversionEventsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.ListConversionEventsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListConversionEventsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.ListConversionEventsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.ListConversionEventsRequest} ListConversionEventsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListConversionEventsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListConversionEventsRequest message. + * @function verify + * @memberof google.analytics.admin.v1alpha.ListConversionEventsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListConversionEventsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + return null; + }; + + /** + * Creates a ListConversionEventsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.ListConversionEventsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.ListConversionEventsRequest} ListConversionEventsRequest + */ + ListConversionEventsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.ListConversionEventsRequest) + return object; + var message = new $root.google.analytics.admin.v1alpha.ListConversionEventsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + return message; + }; + + /** + * Creates a plain object from a ListConversionEventsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.ListConversionEventsRequest + * @static + * @param {google.analytics.admin.v1alpha.ListConversionEventsRequest} message ListConversionEventsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListConversionEventsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + return object; + }; + + /** + * Converts this ListConversionEventsRequest to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.ListConversionEventsRequest + * @instance + * @returns {Object.} JSON object + */ + ListConversionEventsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListConversionEventsRequest + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.ListConversionEventsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListConversionEventsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.ListConversionEventsRequest"; + }; + + return ListConversionEventsRequest; + })(); + + v1alpha.ListConversionEventsResponse = (function() { + + /** + * Properties of a ListConversionEventsResponse. + * @memberof google.analytics.admin.v1alpha + * @interface IListConversionEventsResponse + * @property {Array.|null} [conversionEvents] ListConversionEventsResponse conversionEvents + * @property {string|null} [nextPageToken] ListConversionEventsResponse nextPageToken + */ + + /** + * Constructs a new ListConversionEventsResponse. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents a ListConversionEventsResponse. + * @implements IListConversionEventsResponse + * @constructor + * @param {google.analytics.admin.v1alpha.IListConversionEventsResponse=} [properties] Properties to set + */ + function ListConversionEventsResponse(properties) { + this.conversionEvents = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListConversionEventsResponse conversionEvents. + * @member {Array.} conversionEvents + * @memberof google.analytics.admin.v1alpha.ListConversionEventsResponse + * @instance + */ + ListConversionEventsResponse.prototype.conversionEvents = $util.emptyArray; + + /** + * ListConversionEventsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.analytics.admin.v1alpha.ListConversionEventsResponse + * @instance + */ + ListConversionEventsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListConversionEventsResponse instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.ListConversionEventsResponse + * @static + * @param {google.analytics.admin.v1alpha.IListConversionEventsResponse=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.ListConversionEventsResponse} ListConversionEventsResponse instance + */ + ListConversionEventsResponse.create = function create(properties) { + return new ListConversionEventsResponse(properties); + }; + + /** + * Encodes the specified ListConversionEventsResponse message. Does not implicitly {@link google.analytics.admin.v1alpha.ListConversionEventsResponse.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.ListConversionEventsResponse + * @static + * @param {google.analytics.admin.v1alpha.IListConversionEventsResponse} message ListConversionEventsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListConversionEventsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.conversionEvents != null && message.conversionEvents.length) + for (var i = 0; i < message.conversionEvents.length; ++i) + $root.google.analytics.admin.v1alpha.ConversionEvent.encode(message.conversionEvents[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 ListConversionEventsResponse message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.ListConversionEventsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.ListConversionEventsResponse + * @static + * @param {google.analytics.admin.v1alpha.IListConversionEventsResponse} message ListConversionEventsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListConversionEventsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListConversionEventsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.ListConversionEventsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.ListConversionEventsResponse} ListConversionEventsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListConversionEventsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.ListConversionEventsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.conversionEvents && message.conversionEvents.length)) + message.conversionEvents = []; + message.conversionEvents.push($root.google.analytics.admin.v1alpha.ConversionEvent.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListConversionEventsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.ListConversionEventsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.ListConversionEventsResponse} ListConversionEventsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListConversionEventsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListConversionEventsResponse message. + * @function verify + * @memberof google.analytics.admin.v1alpha.ListConversionEventsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListConversionEventsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.conversionEvents != null && message.hasOwnProperty("conversionEvents")) { + if (!Array.isArray(message.conversionEvents)) + return "conversionEvents: array expected"; + for (var i = 0; i < message.conversionEvents.length; ++i) { + var error = $root.google.analytics.admin.v1alpha.ConversionEvent.verify(message.conversionEvents[i]); + if (error) + return "conversionEvents." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListConversionEventsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.ListConversionEventsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.ListConversionEventsResponse} ListConversionEventsResponse + */ + ListConversionEventsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.ListConversionEventsResponse) + return object; + var message = new $root.google.analytics.admin.v1alpha.ListConversionEventsResponse(); + if (object.conversionEvents) { + if (!Array.isArray(object.conversionEvents)) + throw TypeError(".google.analytics.admin.v1alpha.ListConversionEventsResponse.conversionEvents: array expected"); + message.conversionEvents = []; + for (var i = 0; i < object.conversionEvents.length; ++i) { + if (typeof object.conversionEvents[i] !== "object") + throw TypeError(".google.analytics.admin.v1alpha.ListConversionEventsResponse.conversionEvents: object expected"); + message.conversionEvents[i] = $root.google.analytics.admin.v1alpha.ConversionEvent.fromObject(object.conversionEvents[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListConversionEventsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.ListConversionEventsResponse + * @static + * @param {google.analytics.admin.v1alpha.ListConversionEventsResponse} message ListConversionEventsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListConversionEventsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.conversionEvents = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.conversionEvents && message.conversionEvents.length) { + object.conversionEvents = []; + for (var j = 0; j < message.conversionEvents.length; ++j) + object.conversionEvents[j] = $root.google.analytics.admin.v1alpha.ConversionEvent.toObject(message.conversionEvents[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListConversionEventsResponse to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.ListConversionEventsResponse + * @instance + * @returns {Object.} JSON object + */ + ListConversionEventsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListConversionEventsResponse + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.ListConversionEventsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListConversionEventsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.ListConversionEventsResponse"; + }; + + return ListConversionEventsResponse; + })(); + + v1alpha.GetDisplayVideo360AdvertiserLinkRequest = (function() { + + /** + * Properties of a GetDisplayVideo360AdvertiserLinkRequest. + * @memberof google.analytics.admin.v1alpha + * @interface IGetDisplayVideo360AdvertiserLinkRequest + * @property {string|null} [name] GetDisplayVideo360AdvertiserLinkRequest name + */ + + /** + * Constructs a new GetDisplayVideo360AdvertiserLinkRequest. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents a GetDisplayVideo360AdvertiserLinkRequest. + * @implements IGetDisplayVideo360AdvertiserLinkRequest + * @constructor + * @param {google.analytics.admin.v1alpha.IGetDisplayVideo360AdvertiserLinkRequest=} [properties] Properties to set + */ + function GetDisplayVideo360AdvertiserLinkRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetDisplayVideo360AdvertiserLinkRequest name. + * @member {string} name + * @memberof google.analytics.admin.v1alpha.GetDisplayVideo360AdvertiserLinkRequest + * @instance + */ + GetDisplayVideo360AdvertiserLinkRequest.prototype.name = ""; + + /** + * Creates a new GetDisplayVideo360AdvertiserLinkRequest instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.GetDisplayVideo360AdvertiserLinkRequest + * @static + * @param {google.analytics.admin.v1alpha.IGetDisplayVideo360AdvertiserLinkRequest=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.GetDisplayVideo360AdvertiserLinkRequest} GetDisplayVideo360AdvertiserLinkRequest instance + */ + GetDisplayVideo360AdvertiserLinkRequest.create = function create(properties) { + return new GetDisplayVideo360AdvertiserLinkRequest(properties); + }; + + /** + * Encodes the specified GetDisplayVideo360AdvertiserLinkRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.GetDisplayVideo360AdvertiserLinkRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.GetDisplayVideo360AdvertiserLinkRequest + * @static + * @param {google.analytics.admin.v1alpha.IGetDisplayVideo360AdvertiserLinkRequest} message GetDisplayVideo360AdvertiserLinkRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetDisplayVideo360AdvertiserLinkRequest.encode = function encode(message, writer) { + 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 GetDisplayVideo360AdvertiserLinkRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.GetDisplayVideo360AdvertiserLinkRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.GetDisplayVideo360AdvertiserLinkRequest + * @static + * @param {google.analytics.admin.v1alpha.IGetDisplayVideo360AdvertiserLinkRequest} message GetDisplayVideo360AdvertiserLinkRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetDisplayVideo360AdvertiserLinkRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetDisplayVideo360AdvertiserLinkRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.GetDisplayVideo360AdvertiserLinkRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.GetDisplayVideo360AdvertiserLinkRequest} GetDisplayVideo360AdvertiserLinkRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetDisplayVideo360AdvertiserLinkRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.GetDisplayVideo360AdvertiserLinkRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetDisplayVideo360AdvertiserLinkRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.GetDisplayVideo360AdvertiserLinkRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.GetDisplayVideo360AdvertiserLinkRequest} GetDisplayVideo360AdvertiserLinkRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetDisplayVideo360AdvertiserLinkRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetDisplayVideo360AdvertiserLinkRequest message. + * @function verify + * @memberof google.analytics.admin.v1alpha.GetDisplayVideo360AdvertiserLinkRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetDisplayVideo360AdvertiserLinkRequest.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 GetDisplayVideo360AdvertiserLinkRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.GetDisplayVideo360AdvertiserLinkRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.GetDisplayVideo360AdvertiserLinkRequest} GetDisplayVideo360AdvertiserLinkRequest + */ + GetDisplayVideo360AdvertiserLinkRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.GetDisplayVideo360AdvertiserLinkRequest) + return object; + var message = new $root.google.analytics.admin.v1alpha.GetDisplayVideo360AdvertiserLinkRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetDisplayVideo360AdvertiserLinkRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.GetDisplayVideo360AdvertiserLinkRequest + * @static + * @param {google.analytics.admin.v1alpha.GetDisplayVideo360AdvertiserLinkRequest} message GetDisplayVideo360AdvertiserLinkRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetDisplayVideo360AdvertiserLinkRequest.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 GetDisplayVideo360AdvertiserLinkRequest to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.GetDisplayVideo360AdvertiserLinkRequest + * @instance + * @returns {Object.} JSON object + */ + GetDisplayVideo360AdvertiserLinkRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetDisplayVideo360AdvertiserLinkRequest + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.GetDisplayVideo360AdvertiserLinkRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetDisplayVideo360AdvertiserLinkRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.GetDisplayVideo360AdvertiserLinkRequest"; + }; + + return GetDisplayVideo360AdvertiserLinkRequest; + })(); + + v1alpha.ListDisplayVideo360AdvertiserLinksRequest = (function() { + + /** + * Properties of a ListDisplayVideo360AdvertiserLinksRequest. + * @memberof google.analytics.admin.v1alpha + * @interface IListDisplayVideo360AdvertiserLinksRequest + * @property {string|null} [parent] ListDisplayVideo360AdvertiserLinksRequest parent + * @property {number|null} [pageSize] ListDisplayVideo360AdvertiserLinksRequest pageSize + * @property {string|null} [pageToken] ListDisplayVideo360AdvertiserLinksRequest pageToken + */ + + /** + * Constructs a new ListDisplayVideo360AdvertiserLinksRequest. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents a ListDisplayVideo360AdvertiserLinksRequest. + * @implements IListDisplayVideo360AdvertiserLinksRequest + * @constructor + * @param {google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinksRequest=} [properties] Properties to set + */ + function ListDisplayVideo360AdvertiserLinksRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListDisplayVideo360AdvertiserLinksRequest parent. + * @member {string} parent + * @memberof google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinksRequest + * @instance + */ + ListDisplayVideo360AdvertiserLinksRequest.prototype.parent = ""; + + /** + * ListDisplayVideo360AdvertiserLinksRequest pageSize. + * @member {number} pageSize + * @memberof google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinksRequest + * @instance + */ + ListDisplayVideo360AdvertiserLinksRequest.prototype.pageSize = 0; + + /** + * ListDisplayVideo360AdvertiserLinksRequest pageToken. + * @member {string} pageToken + * @memberof google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinksRequest + * @instance + */ + ListDisplayVideo360AdvertiserLinksRequest.prototype.pageToken = ""; + + /** + * Creates a new ListDisplayVideo360AdvertiserLinksRequest instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinksRequest + * @static + * @param {google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinksRequest=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinksRequest} ListDisplayVideo360AdvertiserLinksRequest instance + */ + ListDisplayVideo360AdvertiserLinksRequest.create = function create(properties) { + return new ListDisplayVideo360AdvertiserLinksRequest(properties); + }; + + /** + * Encodes the specified ListDisplayVideo360AdvertiserLinksRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinksRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinksRequest + * @static + * @param {google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinksRequest} message ListDisplayVideo360AdvertiserLinksRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListDisplayVideo360AdvertiserLinksRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + return writer; + }; + + /** + * Encodes the specified ListDisplayVideo360AdvertiserLinksRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinksRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinksRequest + * @static + * @param {google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinksRequest} message ListDisplayVideo360AdvertiserLinksRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListDisplayVideo360AdvertiserLinksRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListDisplayVideo360AdvertiserLinksRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinksRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinksRequest} ListDisplayVideo360AdvertiserLinksRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListDisplayVideo360AdvertiserLinksRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinksRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListDisplayVideo360AdvertiserLinksRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinksRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinksRequest} ListDisplayVideo360AdvertiserLinksRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListDisplayVideo360AdvertiserLinksRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListDisplayVideo360AdvertiserLinksRequest message. + * @function verify + * @memberof google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinksRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListDisplayVideo360AdvertiserLinksRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + return null; + }; + + /** + * Creates a ListDisplayVideo360AdvertiserLinksRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinksRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinksRequest} ListDisplayVideo360AdvertiserLinksRequest + */ + ListDisplayVideo360AdvertiserLinksRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinksRequest) + return object; + var message = new $root.google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinksRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + return message; + }; + + /** + * Creates a plain object from a ListDisplayVideo360AdvertiserLinksRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinksRequest + * @static + * @param {google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinksRequest} message ListDisplayVideo360AdvertiserLinksRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListDisplayVideo360AdvertiserLinksRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + return object; + }; + + /** + * Converts this ListDisplayVideo360AdvertiserLinksRequest to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinksRequest + * @instance + * @returns {Object.} JSON object + */ + ListDisplayVideo360AdvertiserLinksRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListDisplayVideo360AdvertiserLinksRequest + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinksRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListDisplayVideo360AdvertiserLinksRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinksRequest"; + }; + + return ListDisplayVideo360AdvertiserLinksRequest; + })(); + + v1alpha.ListDisplayVideo360AdvertiserLinksResponse = (function() { + + /** + * Properties of a ListDisplayVideo360AdvertiserLinksResponse. + * @memberof google.analytics.admin.v1alpha + * @interface IListDisplayVideo360AdvertiserLinksResponse + * @property {Array.|null} [displayVideo_360AdvertiserLinks] ListDisplayVideo360AdvertiserLinksResponse displayVideo_360AdvertiserLinks + * @property {string|null} [nextPageToken] ListDisplayVideo360AdvertiserLinksResponse nextPageToken + */ + + /** + * Constructs a new ListDisplayVideo360AdvertiserLinksResponse. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents a ListDisplayVideo360AdvertiserLinksResponse. + * @implements IListDisplayVideo360AdvertiserLinksResponse + * @constructor + * @param {google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinksResponse=} [properties] Properties to set + */ + function ListDisplayVideo360AdvertiserLinksResponse(properties) { + this.displayVideo_360AdvertiserLinks = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListDisplayVideo360AdvertiserLinksResponse displayVideo_360AdvertiserLinks. + * @member {Array.} displayVideo_360AdvertiserLinks + * @memberof google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinksResponse + * @instance + */ + ListDisplayVideo360AdvertiserLinksResponse.prototype.displayVideo_360AdvertiserLinks = $util.emptyArray; + + /** + * ListDisplayVideo360AdvertiserLinksResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinksResponse + * @instance + */ + ListDisplayVideo360AdvertiserLinksResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListDisplayVideo360AdvertiserLinksResponse instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinksResponse + * @static + * @param {google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinksResponse=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinksResponse} ListDisplayVideo360AdvertiserLinksResponse instance + */ + ListDisplayVideo360AdvertiserLinksResponse.create = function create(properties) { + return new ListDisplayVideo360AdvertiserLinksResponse(properties); + }; + + /** + * Encodes the specified ListDisplayVideo360AdvertiserLinksResponse message. Does not implicitly {@link google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinksResponse.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinksResponse + * @static + * @param {google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinksResponse} message ListDisplayVideo360AdvertiserLinksResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListDisplayVideo360AdvertiserLinksResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.displayVideo_360AdvertiserLinks != null && message.displayVideo_360AdvertiserLinks.length) + for (var i = 0; i < message.displayVideo_360AdvertiserLinks.length; ++i) + $root.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink.encode(message.displayVideo_360AdvertiserLinks[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 ListDisplayVideo360AdvertiserLinksResponse message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinksResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinksResponse + * @static + * @param {google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinksResponse} message ListDisplayVideo360AdvertiserLinksResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListDisplayVideo360AdvertiserLinksResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListDisplayVideo360AdvertiserLinksResponse message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinksResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinksResponse} ListDisplayVideo360AdvertiserLinksResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListDisplayVideo360AdvertiserLinksResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinksResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.displayVideo_360AdvertiserLinks && message.displayVideo_360AdvertiserLinks.length)) + message.displayVideo_360AdvertiserLinks = []; + message.displayVideo_360AdvertiserLinks.push($root.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListDisplayVideo360AdvertiserLinksResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinksResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinksResponse} ListDisplayVideo360AdvertiserLinksResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListDisplayVideo360AdvertiserLinksResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListDisplayVideo360AdvertiserLinksResponse message. + * @function verify + * @memberof google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinksResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListDisplayVideo360AdvertiserLinksResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.displayVideo_360AdvertiserLinks != null && message.hasOwnProperty("displayVideo_360AdvertiserLinks")) { + if (!Array.isArray(message.displayVideo_360AdvertiserLinks)) + return "displayVideo_360AdvertiserLinks: array expected"; + for (var i = 0; i < message.displayVideo_360AdvertiserLinks.length; ++i) { + var error = $root.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink.verify(message.displayVideo_360AdvertiserLinks[i]); + if (error) + return "displayVideo_360AdvertiserLinks." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListDisplayVideo360AdvertiserLinksResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinksResponse + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinksResponse} ListDisplayVideo360AdvertiserLinksResponse + */ + ListDisplayVideo360AdvertiserLinksResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinksResponse) + return object; + var message = new $root.google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinksResponse(); + if (object.displayVideo_360AdvertiserLinks) { + if (!Array.isArray(object.displayVideo_360AdvertiserLinks)) + throw TypeError(".google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinksResponse.displayVideo_360AdvertiserLinks: array expected"); + message.displayVideo_360AdvertiserLinks = []; + for (var i = 0; i < object.displayVideo_360AdvertiserLinks.length; ++i) { + if (typeof object.displayVideo_360AdvertiserLinks[i] !== "object") + throw TypeError(".google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinksResponse.displayVideo_360AdvertiserLinks: object expected"); + message.displayVideo_360AdvertiserLinks[i] = $root.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink.fromObject(object.displayVideo_360AdvertiserLinks[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListDisplayVideo360AdvertiserLinksResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinksResponse + * @static + * @param {google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinksResponse} message ListDisplayVideo360AdvertiserLinksResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListDisplayVideo360AdvertiserLinksResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.displayVideo_360AdvertiserLinks = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.displayVideo_360AdvertiserLinks && message.displayVideo_360AdvertiserLinks.length) { + object.displayVideo_360AdvertiserLinks = []; + for (var j = 0; j < message.displayVideo_360AdvertiserLinks.length; ++j) + object.displayVideo_360AdvertiserLinks[j] = $root.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink.toObject(message.displayVideo_360AdvertiserLinks[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListDisplayVideo360AdvertiserLinksResponse to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinksResponse + * @instance + * @returns {Object.} JSON object + */ + ListDisplayVideo360AdvertiserLinksResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListDisplayVideo360AdvertiserLinksResponse + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinksResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListDisplayVideo360AdvertiserLinksResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinksResponse"; + }; + + return ListDisplayVideo360AdvertiserLinksResponse; + })(); + + v1alpha.CreateDisplayVideo360AdvertiserLinkRequest = (function() { + + /** + * Properties of a CreateDisplayVideo360AdvertiserLinkRequest. + * @memberof google.analytics.admin.v1alpha + * @interface ICreateDisplayVideo360AdvertiserLinkRequest + * @property {string|null} [parent] CreateDisplayVideo360AdvertiserLinkRequest parent + * @property {google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLink|null} [displayVideo_360AdvertiserLink] CreateDisplayVideo360AdvertiserLinkRequest displayVideo_360AdvertiserLink + */ + + /** + * Constructs a new CreateDisplayVideo360AdvertiserLinkRequest. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents a CreateDisplayVideo360AdvertiserLinkRequest. + * @implements ICreateDisplayVideo360AdvertiserLinkRequest + * @constructor + * @param {google.analytics.admin.v1alpha.ICreateDisplayVideo360AdvertiserLinkRequest=} [properties] Properties to set + */ + function CreateDisplayVideo360AdvertiserLinkRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateDisplayVideo360AdvertiserLinkRequest parent. + * @member {string} parent + * @memberof google.analytics.admin.v1alpha.CreateDisplayVideo360AdvertiserLinkRequest + * @instance + */ + CreateDisplayVideo360AdvertiserLinkRequest.prototype.parent = ""; + + /** + * CreateDisplayVideo360AdvertiserLinkRequest displayVideo_360AdvertiserLink. + * @member {google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLink|null|undefined} displayVideo_360AdvertiserLink + * @memberof google.analytics.admin.v1alpha.CreateDisplayVideo360AdvertiserLinkRequest + * @instance + */ + CreateDisplayVideo360AdvertiserLinkRequest.prototype.displayVideo_360AdvertiserLink = null; + + /** + * Creates a new CreateDisplayVideo360AdvertiserLinkRequest instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.CreateDisplayVideo360AdvertiserLinkRequest + * @static + * @param {google.analytics.admin.v1alpha.ICreateDisplayVideo360AdvertiserLinkRequest=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.CreateDisplayVideo360AdvertiserLinkRequest} CreateDisplayVideo360AdvertiserLinkRequest instance + */ + CreateDisplayVideo360AdvertiserLinkRequest.create = function create(properties) { + return new CreateDisplayVideo360AdvertiserLinkRequest(properties); + }; + + /** + * Encodes the specified CreateDisplayVideo360AdvertiserLinkRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.CreateDisplayVideo360AdvertiserLinkRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.CreateDisplayVideo360AdvertiserLinkRequest + * @static + * @param {google.analytics.admin.v1alpha.ICreateDisplayVideo360AdvertiserLinkRequest} message CreateDisplayVideo360AdvertiserLinkRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateDisplayVideo360AdvertiserLinkRequest.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.displayVideo_360AdvertiserLink != null && Object.hasOwnProperty.call(message, "displayVideo_360AdvertiserLink")) + $root.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink.encode(message.displayVideo_360AdvertiserLink, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CreateDisplayVideo360AdvertiserLinkRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.CreateDisplayVideo360AdvertiserLinkRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.CreateDisplayVideo360AdvertiserLinkRequest + * @static + * @param {google.analytics.admin.v1alpha.ICreateDisplayVideo360AdvertiserLinkRequest} message CreateDisplayVideo360AdvertiserLinkRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateDisplayVideo360AdvertiserLinkRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateDisplayVideo360AdvertiserLinkRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.CreateDisplayVideo360AdvertiserLinkRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.CreateDisplayVideo360AdvertiserLinkRequest} CreateDisplayVideo360AdvertiserLinkRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateDisplayVideo360AdvertiserLinkRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.CreateDisplayVideo360AdvertiserLinkRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.displayVideo_360AdvertiserLink = $root.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateDisplayVideo360AdvertiserLinkRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.CreateDisplayVideo360AdvertiserLinkRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.CreateDisplayVideo360AdvertiserLinkRequest} CreateDisplayVideo360AdvertiserLinkRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateDisplayVideo360AdvertiserLinkRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateDisplayVideo360AdvertiserLinkRequest message. + * @function verify + * @memberof google.analytics.admin.v1alpha.CreateDisplayVideo360AdvertiserLinkRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateDisplayVideo360AdvertiserLinkRequest.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.displayVideo_360AdvertiserLink != null && message.hasOwnProperty("displayVideo_360AdvertiserLink")) { + var error = $root.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink.verify(message.displayVideo_360AdvertiserLink); + if (error) + return "displayVideo_360AdvertiserLink." + error; + } + return null; + }; + + /** + * Creates a CreateDisplayVideo360AdvertiserLinkRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.CreateDisplayVideo360AdvertiserLinkRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.CreateDisplayVideo360AdvertiserLinkRequest} CreateDisplayVideo360AdvertiserLinkRequest + */ + CreateDisplayVideo360AdvertiserLinkRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.CreateDisplayVideo360AdvertiserLinkRequest) + return object; + var message = new $root.google.analytics.admin.v1alpha.CreateDisplayVideo360AdvertiserLinkRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.displayVideo_360AdvertiserLink != null) { + if (typeof object.displayVideo_360AdvertiserLink !== "object") + throw TypeError(".google.analytics.admin.v1alpha.CreateDisplayVideo360AdvertiserLinkRequest.displayVideo_360AdvertiserLink: object expected"); + message.displayVideo_360AdvertiserLink = $root.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink.fromObject(object.displayVideo_360AdvertiserLink); + } + return message; + }; + + /** + * Creates a plain object from a CreateDisplayVideo360AdvertiserLinkRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.CreateDisplayVideo360AdvertiserLinkRequest + * @static + * @param {google.analytics.admin.v1alpha.CreateDisplayVideo360AdvertiserLinkRequest} message CreateDisplayVideo360AdvertiserLinkRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateDisplayVideo360AdvertiserLinkRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.displayVideo_360AdvertiserLink = null; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.displayVideo_360AdvertiserLink != null && message.hasOwnProperty("displayVideo_360AdvertiserLink")) + object.displayVideo_360AdvertiserLink = $root.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink.toObject(message.displayVideo_360AdvertiserLink, options); + return object; + }; + + /** + * Converts this CreateDisplayVideo360AdvertiserLinkRequest to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.CreateDisplayVideo360AdvertiserLinkRequest + * @instance + * @returns {Object.} JSON object + */ + CreateDisplayVideo360AdvertiserLinkRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateDisplayVideo360AdvertiserLinkRequest + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.CreateDisplayVideo360AdvertiserLinkRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateDisplayVideo360AdvertiserLinkRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.CreateDisplayVideo360AdvertiserLinkRequest"; + }; + + return CreateDisplayVideo360AdvertiserLinkRequest; + })(); + + v1alpha.DeleteDisplayVideo360AdvertiserLinkRequest = (function() { + + /** + * Properties of a DeleteDisplayVideo360AdvertiserLinkRequest. + * @memberof google.analytics.admin.v1alpha + * @interface IDeleteDisplayVideo360AdvertiserLinkRequest + * @property {string|null} [name] DeleteDisplayVideo360AdvertiserLinkRequest name + */ + + /** + * Constructs a new DeleteDisplayVideo360AdvertiserLinkRequest. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents a DeleteDisplayVideo360AdvertiserLinkRequest. + * @implements IDeleteDisplayVideo360AdvertiserLinkRequest + * @constructor + * @param {google.analytics.admin.v1alpha.IDeleteDisplayVideo360AdvertiserLinkRequest=} [properties] Properties to set + */ + function DeleteDisplayVideo360AdvertiserLinkRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteDisplayVideo360AdvertiserLinkRequest name. + * @member {string} name + * @memberof google.analytics.admin.v1alpha.DeleteDisplayVideo360AdvertiserLinkRequest + * @instance + */ + DeleteDisplayVideo360AdvertiserLinkRequest.prototype.name = ""; + + /** + * Creates a new DeleteDisplayVideo360AdvertiserLinkRequest instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.DeleteDisplayVideo360AdvertiserLinkRequest + * @static + * @param {google.analytics.admin.v1alpha.IDeleteDisplayVideo360AdvertiserLinkRequest=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.DeleteDisplayVideo360AdvertiserLinkRequest} DeleteDisplayVideo360AdvertiserLinkRequest instance + */ + DeleteDisplayVideo360AdvertiserLinkRequest.create = function create(properties) { + return new DeleteDisplayVideo360AdvertiserLinkRequest(properties); + }; + + /** + * Encodes the specified DeleteDisplayVideo360AdvertiserLinkRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.DeleteDisplayVideo360AdvertiserLinkRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.DeleteDisplayVideo360AdvertiserLinkRequest + * @static + * @param {google.analytics.admin.v1alpha.IDeleteDisplayVideo360AdvertiserLinkRequest} message DeleteDisplayVideo360AdvertiserLinkRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteDisplayVideo360AdvertiserLinkRequest.encode = function encode(message, writer) { + 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 DeleteDisplayVideo360AdvertiserLinkRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.DeleteDisplayVideo360AdvertiserLinkRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.DeleteDisplayVideo360AdvertiserLinkRequest + * @static + * @param {google.analytics.admin.v1alpha.IDeleteDisplayVideo360AdvertiserLinkRequest} message DeleteDisplayVideo360AdvertiserLinkRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteDisplayVideo360AdvertiserLinkRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteDisplayVideo360AdvertiserLinkRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.DeleteDisplayVideo360AdvertiserLinkRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.DeleteDisplayVideo360AdvertiserLinkRequest} DeleteDisplayVideo360AdvertiserLinkRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteDisplayVideo360AdvertiserLinkRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.DeleteDisplayVideo360AdvertiserLinkRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteDisplayVideo360AdvertiserLinkRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.DeleteDisplayVideo360AdvertiserLinkRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.DeleteDisplayVideo360AdvertiserLinkRequest} DeleteDisplayVideo360AdvertiserLinkRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteDisplayVideo360AdvertiserLinkRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteDisplayVideo360AdvertiserLinkRequest message. + * @function verify + * @memberof google.analytics.admin.v1alpha.DeleteDisplayVideo360AdvertiserLinkRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteDisplayVideo360AdvertiserLinkRequest.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 DeleteDisplayVideo360AdvertiserLinkRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.DeleteDisplayVideo360AdvertiserLinkRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.DeleteDisplayVideo360AdvertiserLinkRequest} DeleteDisplayVideo360AdvertiserLinkRequest + */ + DeleteDisplayVideo360AdvertiserLinkRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.DeleteDisplayVideo360AdvertiserLinkRequest) + return object; + var message = new $root.google.analytics.admin.v1alpha.DeleteDisplayVideo360AdvertiserLinkRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteDisplayVideo360AdvertiserLinkRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.DeleteDisplayVideo360AdvertiserLinkRequest + * @static + * @param {google.analytics.admin.v1alpha.DeleteDisplayVideo360AdvertiserLinkRequest} message DeleteDisplayVideo360AdvertiserLinkRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteDisplayVideo360AdvertiserLinkRequest.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 DeleteDisplayVideo360AdvertiserLinkRequest to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.DeleteDisplayVideo360AdvertiserLinkRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteDisplayVideo360AdvertiserLinkRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteDisplayVideo360AdvertiserLinkRequest + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.DeleteDisplayVideo360AdvertiserLinkRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteDisplayVideo360AdvertiserLinkRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.DeleteDisplayVideo360AdvertiserLinkRequest"; + }; + + return DeleteDisplayVideo360AdvertiserLinkRequest; + })(); + + v1alpha.UpdateDisplayVideo360AdvertiserLinkRequest = (function() { + + /** + * Properties of an UpdateDisplayVideo360AdvertiserLinkRequest. + * @memberof google.analytics.admin.v1alpha + * @interface IUpdateDisplayVideo360AdvertiserLinkRequest + * @property {google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLink|null} [displayVideo_360AdvertiserLink] UpdateDisplayVideo360AdvertiserLinkRequest displayVideo_360AdvertiserLink + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateDisplayVideo360AdvertiserLinkRequest updateMask + */ + + /** + * Constructs a new UpdateDisplayVideo360AdvertiserLinkRequest. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents an UpdateDisplayVideo360AdvertiserLinkRequest. + * @implements IUpdateDisplayVideo360AdvertiserLinkRequest + * @constructor + * @param {google.analytics.admin.v1alpha.IUpdateDisplayVideo360AdvertiserLinkRequest=} [properties] Properties to set + */ + function UpdateDisplayVideo360AdvertiserLinkRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateDisplayVideo360AdvertiserLinkRequest displayVideo_360AdvertiserLink. + * @member {google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLink|null|undefined} displayVideo_360AdvertiserLink + * @memberof google.analytics.admin.v1alpha.UpdateDisplayVideo360AdvertiserLinkRequest + * @instance + */ + UpdateDisplayVideo360AdvertiserLinkRequest.prototype.displayVideo_360AdvertiserLink = null; + + /** + * UpdateDisplayVideo360AdvertiserLinkRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.analytics.admin.v1alpha.UpdateDisplayVideo360AdvertiserLinkRequest + * @instance + */ + UpdateDisplayVideo360AdvertiserLinkRequest.prototype.updateMask = null; + + /** + * Creates a new UpdateDisplayVideo360AdvertiserLinkRequest instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.UpdateDisplayVideo360AdvertiserLinkRequest + * @static + * @param {google.analytics.admin.v1alpha.IUpdateDisplayVideo360AdvertiserLinkRequest=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.UpdateDisplayVideo360AdvertiserLinkRequest} UpdateDisplayVideo360AdvertiserLinkRequest instance + */ + UpdateDisplayVideo360AdvertiserLinkRequest.create = function create(properties) { + return new UpdateDisplayVideo360AdvertiserLinkRequest(properties); + }; + + /** + * Encodes the specified UpdateDisplayVideo360AdvertiserLinkRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.UpdateDisplayVideo360AdvertiserLinkRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.UpdateDisplayVideo360AdvertiserLinkRequest + * @static + * @param {google.analytics.admin.v1alpha.IUpdateDisplayVideo360AdvertiserLinkRequest} message UpdateDisplayVideo360AdvertiserLinkRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateDisplayVideo360AdvertiserLinkRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.displayVideo_360AdvertiserLink != null && Object.hasOwnProperty.call(message, "displayVideo_360AdvertiserLink")) + $root.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink.encode(message.displayVideo_360AdvertiserLink, 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 UpdateDisplayVideo360AdvertiserLinkRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.UpdateDisplayVideo360AdvertiserLinkRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.UpdateDisplayVideo360AdvertiserLinkRequest + * @static + * @param {google.analytics.admin.v1alpha.IUpdateDisplayVideo360AdvertiserLinkRequest} message UpdateDisplayVideo360AdvertiserLinkRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateDisplayVideo360AdvertiserLinkRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateDisplayVideo360AdvertiserLinkRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.UpdateDisplayVideo360AdvertiserLinkRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.UpdateDisplayVideo360AdvertiserLinkRequest} UpdateDisplayVideo360AdvertiserLinkRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateDisplayVideo360AdvertiserLinkRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.UpdateDisplayVideo360AdvertiserLinkRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.displayVideo_360AdvertiserLink = $root.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink.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 UpdateDisplayVideo360AdvertiserLinkRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.UpdateDisplayVideo360AdvertiserLinkRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.UpdateDisplayVideo360AdvertiserLinkRequest} UpdateDisplayVideo360AdvertiserLinkRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateDisplayVideo360AdvertiserLinkRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateDisplayVideo360AdvertiserLinkRequest message. + * @function verify + * @memberof google.analytics.admin.v1alpha.UpdateDisplayVideo360AdvertiserLinkRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateDisplayVideo360AdvertiserLinkRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.displayVideo_360AdvertiserLink != null && message.hasOwnProperty("displayVideo_360AdvertiserLink")) { + var error = $root.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink.verify(message.displayVideo_360AdvertiserLink); + if (error) + return "displayVideo_360AdvertiserLink." + 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 UpdateDisplayVideo360AdvertiserLinkRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.UpdateDisplayVideo360AdvertiserLinkRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.UpdateDisplayVideo360AdvertiserLinkRequest} UpdateDisplayVideo360AdvertiserLinkRequest + */ + UpdateDisplayVideo360AdvertiserLinkRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.UpdateDisplayVideo360AdvertiserLinkRequest) + return object; + var message = new $root.google.analytics.admin.v1alpha.UpdateDisplayVideo360AdvertiserLinkRequest(); + if (object.displayVideo_360AdvertiserLink != null) { + if (typeof object.displayVideo_360AdvertiserLink !== "object") + throw TypeError(".google.analytics.admin.v1alpha.UpdateDisplayVideo360AdvertiserLinkRequest.displayVideo_360AdvertiserLink: object expected"); + message.displayVideo_360AdvertiserLink = $root.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink.fromObject(object.displayVideo_360AdvertiserLink); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.analytics.admin.v1alpha.UpdateDisplayVideo360AdvertiserLinkRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + return message; + }; + + /** + * Creates a plain object from an UpdateDisplayVideo360AdvertiserLinkRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.UpdateDisplayVideo360AdvertiserLinkRequest + * @static + * @param {google.analytics.admin.v1alpha.UpdateDisplayVideo360AdvertiserLinkRequest} message UpdateDisplayVideo360AdvertiserLinkRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateDisplayVideo360AdvertiserLinkRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.displayVideo_360AdvertiserLink = null; + object.updateMask = null; + } + if (message.displayVideo_360AdvertiserLink != null && message.hasOwnProperty("displayVideo_360AdvertiserLink")) + object.displayVideo_360AdvertiserLink = $root.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink.toObject(message.displayVideo_360AdvertiserLink, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + return object; + }; + + /** + * Converts this UpdateDisplayVideo360AdvertiserLinkRequest to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.UpdateDisplayVideo360AdvertiserLinkRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateDisplayVideo360AdvertiserLinkRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateDisplayVideo360AdvertiserLinkRequest + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.UpdateDisplayVideo360AdvertiserLinkRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateDisplayVideo360AdvertiserLinkRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.UpdateDisplayVideo360AdvertiserLinkRequest"; + }; + + return UpdateDisplayVideo360AdvertiserLinkRequest; + })(); + + v1alpha.GetDisplayVideo360AdvertiserLinkProposalRequest = (function() { + + /** + * Properties of a GetDisplayVideo360AdvertiserLinkProposalRequest. + * @memberof google.analytics.admin.v1alpha + * @interface IGetDisplayVideo360AdvertiserLinkProposalRequest + * @property {string|null} [name] GetDisplayVideo360AdvertiserLinkProposalRequest name + */ + + /** + * Constructs a new GetDisplayVideo360AdvertiserLinkProposalRequest. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents a GetDisplayVideo360AdvertiserLinkProposalRequest. + * @implements IGetDisplayVideo360AdvertiserLinkProposalRequest + * @constructor + * @param {google.analytics.admin.v1alpha.IGetDisplayVideo360AdvertiserLinkProposalRequest=} [properties] Properties to set + */ + function GetDisplayVideo360AdvertiserLinkProposalRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetDisplayVideo360AdvertiserLinkProposalRequest name. + * @member {string} name + * @memberof google.analytics.admin.v1alpha.GetDisplayVideo360AdvertiserLinkProposalRequest + * @instance + */ + GetDisplayVideo360AdvertiserLinkProposalRequest.prototype.name = ""; + + /** + * Creates a new GetDisplayVideo360AdvertiserLinkProposalRequest instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.GetDisplayVideo360AdvertiserLinkProposalRequest + * @static + * @param {google.analytics.admin.v1alpha.IGetDisplayVideo360AdvertiserLinkProposalRequest=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.GetDisplayVideo360AdvertiserLinkProposalRequest} GetDisplayVideo360AdvertiserLinkProposalRequest instance + */ + GetDisplayVideo360AdvertiserLinkProposalRequest.create = function create(properties) { + return new GetDisplayVideo360AdvertiserLinkProposalRequest(properties); + }; + + /** + * Encodes the specified GetDisplayVideo360AdvertiserLinkProposalRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.GetDisplayVideo360AdvertiserLinkProposalRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.GetDisplayVideo360AdvertiserLinkProposalRequest + * @static + * @param {google.analytics.admin.v1alpha.IGetDisplayVideo360AdvertiserLinkProposalRequest} message GetDisplayVideo360AdvertiserLinkProposalRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetDisplayVideo360AdvertiserLinkProposalRequest.encode = function encode(message, writer) { + 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 GetDisplayVideo360AdvertiserLinkProposalRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.GetDisplayVideo360AdvertiserLinkProposalRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.GetDisplayVideo360AdvertiserLinkProposalRequest + * @static + * @param {google.analytics.admin.v1alpha.IGetDisplayVideo360AdvertiserLinkProposalRequest} message GetDisplayVideo360AdvertiserLinkProposalRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetDisplayVideo360AdvertiserLinkProposalRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetDisplayVideo360AdvertiserLinkProposalRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.GetDisplayVideo360AdvertiserLinkProposalRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.GetDisplayVideo360AdvertiserLinkProposalRequest} GetDisplayVideo360AdvertiserLinkProposalRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetDisplayVideo360AdvertiserLinkProposalRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.GetDisplayVideo360AdvertiserLinkProposalRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetDisplayVideo360AdvertiserLinkProposalRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.GetDisplayVideo360AdvertiserLinkProposalRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.GetDisplayVideo360AdvertiserLinkProposalRequest} GetDisplayVideo360AdvertiserLinkProposalRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetDisplayVideo360AdvertiserLinkProposalRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetDisplayVideo360AdvertiserLinkProposalRequest message. + * @function verify + * @memberof google.analytics.admin.v1alpha.GetDisplayVideo360AdvertiserLinkProposalRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetDisplayVideo360AdvertiserLinkProposalRequest.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 GetDisplayVideo360AdvertiserLinkProposalRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.GetDisplayVideo360AdvertiserLinkProposalRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.GetDisplayVideo360AdvertiserLinkProposalRequest} GetDisplayVideo360AdvertiserLinkProposalRequest + */ + GetDisplayVideo360AdvertiserLinkProposalRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.GetDisplayVideo360AdvertiserLinkProposalRequest) + return object; + var message = new $root.google.analytics.admin.v1alpha.GetDisplayVideo360AdvertiserLinkProposalRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetDisplayVideo360AdvertiserLinkProposalRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.GetDisplayVideo360AdvertiserLinkProposalRequest + * @static + * @param {google.analytics.admin.v1alpha.GetDisplayVideo360AdvertiserLinkProposalRequest} message GetDisplayVideo360AdvertiserLinkProposalRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetDisplayVideo360AdvertiserLinkProposalRequest.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 GetDisplayVideo360AdvertiserLinkProposalRequest to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.GetDisplayVideo360AdvertiserLinkProposalRequest + * @instance + * @returns {Object.} JSON object + */ + GetDisplayVideo360AdvertiserLinkProposalRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetDisplayVideo360AdvertiserLinkProposalRequest + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.GetDisplayVideo360AdvertiserLinkProposalRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetDisplayVideo360AdvertiserLinkProposalRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.GetDisplayVideo360AdvertiserLinkProposalRequest"; + }; + + return GetDisplayVideo360AdvertiserLinkProposalRequest; + })(); + + v1alpha.ListDisplayVideo360AdvertiserLinkProposalsRequest = (function() { + + /** + * Properties of a ListDisplayVideo360AdvertiserLinkProposalsRequest. + * @memberof google.analytics.admin.v1alpha + * @interface IListDisplayVideo360AdvertiserLinkProposalsRequest + * @property {string|null} [parent] ListDisplayVideo360AdvertiserLinkProposalsRequest parent + * @property {number|null} [pageSize] ListDisplayVideo360AdvertiserLinkProposalsRequest pageSize + * @property {string|null} [pageToken] ListDisplayVideo360AdvertiserLinkProposalsRequest pageToken + */ + + /** + * Constructs a new ListDisplayVideo360AdvertiserLinkProposalsRequest. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents a ListDisplayVideo360AdvertiserLinkProposalsRequest. + * @implements IListDisplayVideo360AdvertiserLinkProposalsRequest + * @constructor + * @param {google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinkProposalsRequest=} [properties] Properties to set + */ + function ListDisplayVideo360AdvertiserLinkProposalsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListDisplayVideo360AdvertiserLinkProposalsRequest parent. + * @member {string} parent + * @memberof google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinkProposalsRequest + * @instance + */ + ListDisplayVideo360AdvertiserLinkProposalsRequest.prototype.parent = ""; + + /** + * ListDisplayVideo360AdvertiserLinkProposalsRequest pageSize. + * @member {number} pageSize + * @memberof google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinkProposalsRequest + * @instance + */ + ListDisplayVideo360AdvertiserLinkProposalsRequest.prototype.pageSize = 0; + + /** + * ListDisplayVideo360AdvertiserLinkProposalsRequest pageToken. + * @member {string} pageToken + * @memberof google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinkProposalsRequest + * @instance + */ + ListDisplayVideo360AdvertiserLinkProposalsRequest.prototype.pageToken = ""; + + /** + * Creates a new ListDisplayVideo360AdvertiserLinkProposalsRequest instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinkProposalsRequest + * @static + * @param {google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinkProposalsRequest=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinkProposalsRequest} ListDisplayVideo360AdvertiserLinkProposalsRequest instance + */ + ListDisplayVideo360AdvertiserLinkProposalsRequest.create = function create(properties) { + return new ListDisplayVideo360AdvertiserLinkProposalsRequest(properties); + }; + + /** + * Encodes the specified ListDisplayVideo360AdvertiserLinkProposalsRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinkProposalsRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinkProposalsRequest + * @static + * @param {google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinkProposalsRequest} message ListDisplayVideo360AdvertiserLinkProposalsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListDisplayVideo360AdvertiserLinkProposalsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + return writer; + }; + + /** + * Encodes the specified ListDisplayVideo360AdvertiserLinkProposalsRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinkProposalsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinkProposalsRequest + * @static + * @param {google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinkProposalsRequest} message ListDisplayVideo360AdvertiserLinkProposalsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListDisplayVideo360AdvertiserLinkProposalsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListDisplayVideo360AdvertiserLinkProposalsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinkProposalsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinkProposalsRequest} ListDisplayVideo360AdvertiserLinkProposalsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListDisplayVideo360AdvertiserLinkProposalsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinkProposalsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListDisplayVideo360AdvertiserLinkProposalsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinkProposalsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinkProposalsRequest} ListDisplayVideo360AdvertiserLinkProposalsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListDisplayVideo360AdvertiserLinkProposalsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListDisplayVideo360AdvertiserLinkProposalsRequest message. + * @function verify + * @memberof google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinkProposalsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListDisplayVideo360AdvertiserLinkProposalsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + return null; + }; + + /** + * Creates a ListDisplayVideo360AdvertiserLinkProposalsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinkProposalsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinkProposalsRequest} ListDisplayVideo360AdvertiserLinkProposalsRequest + */ + ListDisplayVideo360AdvertiserLinkProposalsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinkProposalsRequest) + return object; + var message = new $root.google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinkProposalsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + return message; + }; + + /** + * Creates a plain object from a ListDisplayVideo360AdvertiserLinkProposalsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinkProposalsRequest + * @static + * @param {google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinkProposalsRequest} message ListDisplayVideo360AdvertiserLinkProposalsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListDisplayVideo360AdvertiserLinkProposalsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + return object; + }; + + /** + * Converts this ListDisplayVideo360AdvertiserLinkProposalsRequest to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinkProposalsRequest + * @instance + * @returns {Object.} JSON object + */ + ListDisplayVideo360AdvertiserLinkProposalsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListDisplayVideo360AdvertiserLinkProposalsRequest + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinkProposalsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListDisplayVideo360AdvertiserLinkProposalsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinkProposalsRequest"; + }; + + return ListDisplayVideo360AdvertiserLinkProposalsRequest; + })(); + + v1alpha.ListDisplayVideo360AdvertiserLinkProposalsResponse = (function() { + + /** + * Properties of a ListDisplayVideo360AdvertiserLinkProposalsResponse. + * @memberof google.analytics.admin.v1alpha + * @interface IListDisplayVideo360AdvertiserLinkProposalsResponse + * @property {Array.|null} [displayVideo_360AdvertiserLinkProposals] ListDisplayVideo360AdvertiserLinkProposalsResponse displayVideo_360AdvertiserLinkProposals + * @property {string|null} [nextPageToken] ListDisplayVideo360AdvertiserLinkProposalsResponse nextPageToken + */ + + /** + * Constructs a new ListDisplayVideo360AdvertiserLinkProposalsResponse. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents a ListDisplayVideo360AdvertiserLinkProposalsResponse. + * @implements IListDisplayVideo360AdvertiserLinkProposalsResponse + * @constructor + * @param {google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinkProposalsResponse=} [properties] Properties to set + */ + function ListDisplayVideo360AdvertiserLinkProposalsResponse(properties) { + this.displayVideo_360AdvertiserLinkProposals = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListDisplayVideo360AdvertiserLinkProposalsResponse displayVideo_360AdvertiserLinkProposals. + * @member {Array.} displayVideo_360AdvertiserLinkProposals + * @memberof google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinkProposalsResponse + * @instance + */ + ListDisplayVideo360AdvertiserLinkProposalsResponse.prototype.displayVideo_360AdvertiserLinkProposals = $util.emptyArray; + + /** + * ListDisplayVideo360AdvertiserLinkProposalsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinkProposalsResponse + * @instance + */ + ListDisplayVideo360AdvertiserLinkProposalsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListDisplayVideo360AdvertiserLinkProposalsResponse instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinkProposalsResponse + * @static + * @param {google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinkProposalsResponse=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinkProposalsResponse} ListDisplayVideo360AdvertiserLinkProposalsResponse instance + */ + ListDisplayVideo360AdvertiserLinkProposalsResponse.create = function create(properties) { + return new ListDisplayVideo360AdvertiserLinkProposalsResponse(properties); + }; + + /** + * Encodes the specified ListDisplayVideo360AdvertiserLinkProposalsResponse message. Does not implicitly {@link google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinkProposalsResponse.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinkProposalsResponse + * @static + * @param {google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinkProposalsResponse} message ListDisplayVideo360AdvertiserLinkProposalsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListDisplayVideo360AdvertiserLinkProposalsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.displayVideo_360AdvertiserLinkProposals != null && message.displayVideo_360AdvertiserLinkProposals.length) + for (var i = 0; i < message.displayVideo_360AdvertiserLinkProposals.length; ++i) + $root.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal.encode(message.displayVideo_360AdvertiserLinkProposals[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 ListDisplayVideo360AdvertiserLinkProposalsResponse message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinkProposalsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinkProposalsResponse + * @static + * @param {google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinkProposalsResponse} message ListDisplayVideo360AdvertiserLinkProposalsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListDisplayVideo360AdvertiserLinkProposalsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListDisplayVideo360AdvertiserLinkProposalsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinkProposalsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinkProposalsResponse} ListDisplayVideo360AdvertiserLinkProposalsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListDisplayVideo360AdvertiserLinkProposalsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinkProposalsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.displayVideo_360AdvertiserLinkProposals && message.displayVideo_360AdvertiserLinkProposals.length)) + message.displayVideo_360AdvertiserLinkProposals = []; + message.displayVideo_360AdvertiserLinkProposals.push($root.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListDisplayVideo360AdvertiserLinkProposalsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinkProposalsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinkProposalsResponse} ListDisplayVideo360AdvertiserLinkProposalsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListDisplayVideo360AdvertiserLinkProposalsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListDisplayVideo360AdvertiserLinkProposalsResponse message. + * @function verify + * @memberof google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinkProposalsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListDisplayVideo360AdvertiserLinkProposalsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.displayVideo_360AdvertiserLinkProposals != null && message.hasOwnProperty("displayVideo_360AdvertiserLinkProposals")) { + if (!Array.isArray(message.displayVideo_360AdvertiserLinkProposals)) + return "displayVideo_360AdvertiserLinkProposals: array expected"; + for (var i = 0; i < message.displayVideo_360AdvertiserLinkProposals.length; ++i) { + var error = $root.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal.verify(message.displayVideo_360AdvertiserLinkProposals[i]); + if (error) + return "displayVideo_360AdvertiserLinkProposals." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListDisplayVideo360AdvertiserLinkProposalsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinkProposalsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinkProposalsResponse} ListDisplayVideo360AdvertiserLinkProposalsResponse + */ + ListDisplayVideo360AdvertiserLinkProposalsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinkProposalsResponse) + return object; + var message = new $root.google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinkProposalsResponse(); + if (object.displayVideo_360AdvertiserLinkProposals) { + if (!Array.isArray(object.displayVideo_360AdvertiserLinkProposals)) + throw TypeError(".google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinkProposalsResponse.displayVideo_360AdvertiserLinkProposals: array expected"); + message.displayVideo_360AdvertiserLinkProposals = []; + for (var i = 0; i < object.displayVideo_360AdvertiserLinkProposals.length; ++i) { + if (typeof object.displayVideo_360AdvertiserLinkProposals[i] !== "object") + throw TypeError(".google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinkProposalsResponse.displayVideo_360AdvertiserLinkProposals: object expected"); + message.displayVideo_360AdvertiserLinkProposals[i] = $root.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal.fromObject(object.displayVideo_360AdvertiserLinkProposals[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListDisplayVideo360AdvertiserLinkProposalsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinkProposalsResponse + * @static + * @param {google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinkProposalsResponse} message ListDisplayVideo360AdvertiserLinkProposalsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListDisplayVideo360AdvertiserLinkProposalsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.displayVideo_360AdvertiserLinkProposals = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.displayVideo_360AdvertiserLinkProposals && message.displayVideo_360AdvertiserLinkProposals.length) { + object.displayVideo_360AdvertiserLinkProposals = []; + for (var j = 0; j < message.displayVideo_360AdvertiserLinkProposals.length; ++j) + object.displayVideo_360AdvertiserLinkProposals[j] = $root.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal.toObject(message.displayVideo_360AdvertiserLinkProposals[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListDisplayVideo360AdvertiserLinkProposalsResponse to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinkProposalsResponse + * @instance + * @returns {Object.} JSON object + */ + ListDisplayVideo360AdvertiserLinkProposalsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListDisplayVideo360AdvertiserLinkProposalsResponse + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinkProposalsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListDisplayVideo360AdvertiserLinkProposalsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinkProposalsResponse"; + }; + + return ListDisplayVideo360AdvertiserLinkProposalsResponse; + })(); + + v1alpha.CreateDisplayVideo360AdvertiserLinkProposalRequest = (function() { + + /** + * Properties of a CreateDisplayVideo360AdvertiserLinkProposalRequest. + * @memberof google.analytics.admin.v1alpha + * @interface ICreateDisplayVideo360AdvertiserLinkProposalRequest + * @property {string|null} [parent] CreateDisplayVideo360AdvertiserLinkProposalRequest parent + * @property {google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLinkProposal|null} [displayVideo_360AdvertiserLinkProposal] CreateDisplayVideo360AdvertiserLinkProposalRequest displayVideo_360AdvertiserLinkProposal + */ + + /** + * Constructs a new CreateDisplayVideo360AdvertiserLinkProposalRequest. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents a CreateDisplayVideo360AdvertiserLinkProposalRequest. + * @implements ICreateDisplayVideo360AdvertiserLinkProposalRequest + * @constructor + * @param {google.analytics.admin.v1alpha.ICreateDisplayVideo360AdvertiserLinkProposalRequest=} [properties] Properties to set + */ + function CreateDisplayVideo360AdvertiserLinkProposalRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateDisplayVideo360AdvertiserLinkProposalRequest parent. + * @member {string} parent + * @memberof google.analytics.admin.v1alpha.CreateDisplayVideo360AdvertiserLinkProposalRequest + * @instance + */ + CreateDisplayVideo360AdvertiserLinkProposalRequest.prototype.parent = ""; + + /** + * CreateDisplayVideo360AdvertiserLinkProposalRequest displayVideo_360AdvertiserLinkProposal. + * @member {google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLinkProposal|null|undefined} displayVideo_360AdvertiserLinkProposal + * @memberof google.analytics.admin.v1alpha.CreateDisplayVideo360AdvertiserLinkProposalRequest + * @instance + */ + CreateDisplayVideo360AdvertiserLinkProposalRequest.prototype.displayVideo_360AdvertiserLinkProposal = null; + + /** + * Creates a new CreateDisplayVideo360AdvertiserLinkProposalRequest instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.CreateDisplayVideo360AdvertiserLinkProposalRequest + * @static + * @param {google.analytics.admin.v1alpha.ICreateDisplayVideo360AdvertiserLinkProposalRequest=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.CreateDisplayVideo360AdvertiserLinkProposalRequest} CreateDisplayVideo360AdvertiserLinkProposalRequest instance + */ + CreateDisplayVideo360AdvertiserLinkProposalRequest.create = function create(properties) { + return new CreateDisplayVideo360AdvertiserLinkProposalRequest(properties); + }; + + /** + * Encodes the specified CreateDisplayVideo360AdvertiserLinkProposalRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.CreateDisplayVideo360AdvertiserLinkProposalRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.CreateDisplayVideo360AdvertiserLinkProposalRequest + * @static + * @param {google.analytics.admin.v1alpha.ICreateDisplayVideo360AdvertiserLinkProposalRequest} message CreateDisplayVideo360AdvertiserLinkProposalRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateDisplayVideo360AdvertiserLinkProposalRequest.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.displayVideo_360AdvertiserLinkProposal != null && Object.hasOwnProperty.call(message, "displayVideo_360AdvertiserLinkProposal")) + $root.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal.encode(message.displayVideo_360AdvertiserLinkProposal, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CreateDisplayVideo360AdvertiserLinkProposalRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.CreateDisplayVideo360AdvertiserLinkProposalRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.CreateDisplayVideo360AdvertiserLinkProposalRequest + * @static + * @param {google.analytics.admin.v1alpha.ICreateDisplayVideo360AdvertiserLinkProposalRequest} message CreateDisplayVideo360AdvertiserLinkProposalRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateDisplayVideo360AdvertiserLinkProposalRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateDisplayVideo360AdvertiserLinkProposalRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.CreateDisplayVideo360AdvertiserLinkProposalRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.CreateDisplayVideo360AdvertiserLinkProposalRequest} CreateDisplayVideo360AdvertiserLinkProposalRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateDisplayVideo360AdvertiserLinkProposalRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.CreateDisplayVideo360AdvertiserLinkProposalRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.displayVideo_360AdvertiserLinkProposal = $root.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateDisplayVideo360AdvertiserLinkProposalRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.CreateDisplayVideo360AdvertiserLinkProposalRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.CreateDisplayVideo360AdvertiserLinkProposalRequest} CreateDisplayVideo360AdvertiserLinkProposalRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateDisplayVideo360AdvertiserLinkProposalRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateDisplayVideo360AdvertiserLinkProposalRequest message. + * @function verify + * @memberof google.analytics.admin.v1alpha.CreateDisplayVideo360AdvertiserLinkProposalRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateDisplayVideo360AdvertiserLinkProposalRequest.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.displayVideo_360AdvertiserLinkProposal != null && message.hasOwnProperty("displayVideo_360AdvertiserLinkProposal")) { + var error = $root.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal.verify(message.displayVideo_360AdvertiserLinkProposal); + if (error) + return "displayVideo_360AdvertiserLinkProposal." + error; + } + return null; + }; + + /** + * Creates a CreateDisplayVideo360AdvertiserLinkProposalRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.CreateDisplayVideo360AdvertiserLinkProposalRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.CreateDisplayVideo360AdvertiserLinkProposalRequest} CreateDisplayVideo360AdvertiserLinkProposalRequest + */ + CreateDisplayVideo360AdvertiserLinkProposalRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.CreateDisplayVideo360AdvertiserLinkProposalRequest) + return object; + var message = new $root.google.analytics.admin.v1alpha.CreateDisplayVideo360AdvertiserLinkProposalRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.displayVideo_360AdvertiserLinkProposal != null) { + if (typeof object.displayVideo_360AdvertiserLinkProposal !== "object") + throw TypeError(".google.analytics.admin.v1alpha.CreateDisplayVideo360AdvertiserLinkProposalRequest.displayVideo_360AdvertiserLinkProposal: object expected"); + message.displayVideo_360AdvertiserLinkProposal = $root.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal.fromObject(object.displayVideo_360AdvertiserLinkProposal); + } + return message; + }; + + /** + * Creates a plain object from a CreateDisplayVideo360AdvertiserLinkProposalRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.CreateDisplayVideo360AdvertiserLinkProposalRequest + * @static + * @param {google.analytics.admin.v1alpha.CreateDisplayVideo360AdvertiserLinkProposalRequest} message CreateDisplayVideo360AdvertiserLinkProposalRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateDisplayVideo360AdvertiserLinkProposalRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.displayVideo_360AdvertiserLinkProposal = null; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.displayVideo_360AdvertiserLinkProposal != null && message.hasOwnProperty("displayVideo_360AdvertiserLinkProposal")) + object.displayVideo_360AdvertiserLinkProposal = $root.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal.toObject(message.displayVideo_360AdvertiserLinkProposal, options); + return object; + }; + + /** + * Converts this CreateDisplayVideo360AdvertiserLinkProposalRequest to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.CreateDisplayVideo360AdvertiserLinkProposalRequest + * @instance + * @returns {Object.} JSON object + */ + CreateDisplayVideo360AdvertiserLinkProposalRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateDisplayVideo360AdvertiserLinkProposalRequest + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.CreateDisplayVideo360AdvertiserLinkProposalRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateDisplayVideo360AdvertiserLinkProposalRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.CreateDisplayVideo360AdvertiserLinkProposalRequest"; + }; + + return CreateDisplayVideo360AdvertiserLinkProposalRequest; + })(); + + v1alpha.DeleteDisplayVideo360AdvertiserLinkProposalRequest = (function() { + + /** + * Properties of a DeleteDisplayVideo360AdvertiserLinkProposalRequest. + * @memberof google.analytics.admin.v1alpha + * @interface IDeleteDisplayVideo360AdvertiserLinkProposalRequest + * @property {string|null} [name] DeleteDisplayVideo360AdvertiserLinkProposalRequest name + */ + + /** + * Constructs a new DeleteDisplayVideo360AdvertiserLinkProposalRequest. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents a DeleteDisplayVideo360AdvertiserLinkProposalRequest. + * @implements IDeleteDisplayVideo360AdvertiserLinkProposalRequest + * @constructor + * @param {google.analytics.admin.v1alpha.IDeleteDisplayVideo360AdvertiserLinkProposalRequest=} [properties] Properties to set + */ + function DeleteDisplayVideo360AdvertiserLinkProposalRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteDisplayVideo360AdvertiserLinkProposalRequest name. + * @member {string} name + * @memberof google.analytics.admin.v1alpha.DeleteDisplayVideo360AdvertiserLinkProposalRequest + * @instance + */ + DeleteDisplayVideo360AdvertiserLinkProposalRequest.prototype.name = ""; + + /** + * Creates a new DeleteDisplayVideo360AdvertiserLinkProposalRequest instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.DeleteDisplayVideo360AdvertiserLinkProposalRequest + * @static + * @param {google.analytics.admin.v1alpha.IDeleteDisplayVideo360AdvertiserLinkProposalRequest=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.DeleteDisplayVideo360AdvertiserLinkProposalRequest} DeleteDisplayVideo360AdvertiserLinkProposalRequest instance + */ + DeleteDisplayVideo360AdvertiserLinkProposalRequest.create = function create(properties) { + return new DeleteDisplayVideo360AdvertiserLinkProposalRequest(properties); + }; + + /** + * Encodes the specified DeleteDisplayVideo360AdvertiserLinkProposalRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.DeleteDisplayVideo360AdvertiserLinkProposalRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.DeleteDisplayVideo360AdvertiserLinkProposalRequest + * @static + * @param {google.analytics.admin.v1alpha.IDeleteDisplayVideo360AdvertiserLinkProposalRequest} message DeleteDisplayVideo360AdvertiserLinkProposalRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteDisplayVideo360AdvertiserLinkProposalRequest.encode = function encode(message, writer) { + 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 DeleteDisplayVideo360AdvertiserLinkProposalRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.DeleteDisplayVideo360AdvertiserLinkProposalRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.DeleteDisplayVideo360AdvertiserLinkProposalRequest + * @static + * @param {google.analytics.admin.v1alpha.IDeleteDisplayVideo360AdvertiserLinkProposalRequest} message DeleteDisplayVideo360AdvertiserLinkProposalRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteDisplayVideo360AdvertiserLinkProposalRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteDisplayVideo360AdvertiserLinkProposalRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.DeleteDisplayVideo360AdvertiserLinkProposalRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.DeleteDisplayVideo360AdvertiserLinkProposalRequest} DeleteDisplayVideo360AdvertiserLinkProposalRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteDisplayVideo360AdvertiserLinkProposalRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.DeleteDisplayVideo360AdvertiserLinkProposalRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteDisplayVideo360AdvertiserLinkProposalRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.DeleteDisplayVideo360AdvertiserLinkProposalRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.DeleteDisplayVideo360AdvertiserLinkProposalRequest} DeleteDisplayVideo360AdvertiserLinkProposalRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteDisplayVideo360AdvertiserLinkProposalRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteDisplayVideo360AdvertiserLinkProposalRequest message. + * @function verify + * @memberof google.analytics.admin.v1alpha.DeleteDisplayVideo360AdvertiserLinkProposalRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteDisplayVideo360AdvertiserLinkProposalRequest.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 DeleteDisplayVideo360AdvertiserLinkProposalRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.DeleteDisplayVideo360AdvertiserLinkProposalRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.DeleteDisplayVideo360AdvertiserLinkProposalRequest} DeleteDisplayVideo360AdvertiserLinkProposalRequest + */ + DeleteDisplayVideo360AdvertiserLinkProposalRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.DeleteDisplayVideo360AdvertiserLinkProposalRequest) + return object; + var message = new $root.google.analytics.admin.v1alpha.DeleteDisplayVideo360AdvertiserLinkProposalRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteDisplayVideo360AdvertiserLinkProposalRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.DeleteDisplayVideo360AdvertiserLinkProposalRequest + * @static + * @param {google.analytics.admin.v1alpha.DeleteDisplayVideo360AdvertiserLinkProposalRequest} message DeleteDisplayVideo360AdvertiserLinkProposalRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteDisplayVideo360AdvertiserLinkProposalRequest.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 DeleteDisplayVideo360AdvertiserLinkProposalRequest to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.DeleteDisplayVideo360AdvertiserLinkProposalRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteDisplayVideo360AdvertiserLinkProposalRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteDisplayVideo360AdvertiserLinkProposalRequest + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.DeleteDisplayVideo360AdvertiserLinkProposalRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteDisplayVideo360AdvertiserLinkProposalRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.DeleteDisplayVideo360AdvertiserLinkProposalRequest"; + }; + + return DeleteDisplayVideo360AdvertiserLinkProposalRequest; + })(); + + v1alpha.ApproveDisplayVideo360AdvertiserLinkProposalRequest = (function() { + + /** + * Properties of an ApproveDisplayVideo360AdvertiserLinkProposalRequest. + * @memberof google.analytics.admin.v1alpha + * @interface IApproveDisplayVideo360AdvertiserLinkProposalRequest + * @property {string|null} [name] ApproveDisplayVideo360AdvertiserLinkProposalRequest name + */ + + /** + * Constructs a new ApproveDisplayVideo360AdvertiserLinkProposalRequest. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents an ApproveDisplayVideo360AdvertiserLinkProposalRequest. + * @implements IApproveDisplayVideo360AdvertiserLinkProposalRequest + * @constructor + * @param {google.analytics.admin.v1alpha.IApproveDisplayVideo360AdvertiserLinkProposalRequest=} [properties] Properties to set + */ + function ApproveDisplayVideo360AdvertiserLinkProposalRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ApproveDisplayVideo360AdvertiserLinkProposalRequest name. + * @member {string} name + * @memberof google.analytics.admin.v1alpha.ApproveDisplayVideo360AdvertiserLinkProposalRequest + * @instance + */ + ApproveDisplayVideo360AdvertiserLinkProposalRequest.prototype.name = ""; + + /** + * Creates a new ApproveDisplayVideo360AdvertiserLinkProposalRequest instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.ApproveDisplayVideo360AdvertiserLinkProposalRequest + * @static + * @param {google.analytics.admin.v1alpha.IApproveDisplayVideo360AdvertiserLinkProposalRequest=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.ApproveDisplayVideo360AdvertiserLinkProposalRequest} ApproveDisplayVideo360AdvertiserLinkProposalRequest instance + */ + ApproveDisplayVideo360AdvertiserLinkProposalRequest.create = function create(properties) { + return new ApproveDisplayVideo360AdvertiserLinkProposalRequest(properties); + }; + + /** + * Encodes the specified ApproveDisplayVideo360AdvertiserLinkProposalRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.ApproveDisplayVideo360AdvertiserLinkProposalRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.ApproveDisplayVideo360AdvertiserLinkProposalRequest + * @static + * @param {google.analytics.admin.v1alpha.IApproveDisplayVideo360AdvertiserLinkProposalRequest} message ApproveDisplayVideo360AdvertiserLinkProposalRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ApproveDisplayVideo360AdvertiserLinkProposalRequest.encode = function encode(message, writer) { + 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 ApproveDisplayVideo360AdvertiserLinkProposalRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.ApproveDisplayVideo360AdvertiserLinkProposalRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.ApproveDisplayVideo360AdvertiserLinkProposalRequest + * @static + * @param {google.analytics.admin.v1alpha.IApproveDisplayVideo360AdvertiserLinkProposalRequest} message ApproveDisplayVideo360AdvertiserLinkProposalRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ApproveDisplayVideo360AdvertiserLinkProposalRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ApproveDisplayVideo360AdvertiserLinkProposalRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.ApproveDisplayVideo360AdvertiserLinkProposalRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.ApproveDisplayVideo360AdvertiserLinkProposalRequest} ApproveDisplayVideo360AdvertiserLinkProposalRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ApproveDisplayVideo360AdvertiserLinkProposalRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.ApproveDisplayVideo360AdvertiserLinkProposalRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ApproveDisplayVideo360AdvertiserLinkProposalRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.ApproveDisplayVideo360AdvertiserLinkProposalRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.ApproveDisplayVideo360AdvertiserLinkProposalRequest} ApproveDisplayVideo360AdvertiserLinkProposalRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ApproveDisplayVideo360AdvertiserLinkProposalRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ApproveDisplayVideo360AdvertiserLinkProposalRequest message. + * @function verify + * @memberof google.analytics.admin.v1alpha.ApproveDisplayVideo360AdvertiserLinkProposalRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ApproveDisplayVideo360AdvertiserLinkProposalRequest.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 an ApproveDisplayVideo360AdvertiserLinkProposalRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.ApproveDisplayVideo360AdvertiserLinkProposalRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.ApproveDisplayVideo360AdvertiserLinkProposalRequest} ApproveDisplayVideo360AdvertiserLinkProposalRequest + */ + ApproveDisplayVideo360AdvertiserLinkProposalRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.ApproveDisplayVideo360AdvertiserLinkProposalRequest) + return object; + var message = new $root.google.analytics.admin.v1alpha.ApproveDisplayVideo360AdvertiserLinkProposalRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from an ApproveDisplayVideo360AdvertiserLinkProposalRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.ApproveDisplayVideo360AdvertiserLinkProposalRequest + * @static + * @param {google.analytics.admin.v1alpha.ApproveDisplayVideo360AdvertiserLinkProposalRequest} message ApproveDisplayVideo360AdvertiserLinkProposalRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ApproveDisplayVideo360AdvertiserLinkProposalRequest.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 ApproveDisplayVideo360AdvertiserLinkProposalRequest to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.ApproveDisplayVideo360AdvertiserLinkProposalRequest + * @instance + * @returns {Object.} JSON object + */ + ApproveDisplayVideo360AdvertiserLinkProposalRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ApproveDisplayVideo360AdvertiserLinkProposalRequest + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.ApproveDisplayVideo360AdvertiserLinkProposalRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ApproveDisplayVideo360AdvertiserLinkProposalRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.ApproveDisplayVideo360AdvertiserLinkProposalRequest"; + }; + + return ApproveDisplayVideo360AdvertiserLinkProposalRequest; + })(); + + v1alpha.ApproveDisplayVideo360AdvertiserLinkProposalResponse = (function() { + + /** + * Properties of an ApproveDisplayVideo360AdvertiserLinkProposalResponse. + * @memberof google.analytics.admin.v1alpha + * @interface IApproveDisplayVideo360AdvertiserLinkProposalResponse + * @property {google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLink|null} [displayVideo_360AdvertiserLink] ApproveDisplayVideo360AdvertiserLinkProposalResponse displayVideo_360AdvertiserLink + */ + + /** + * Constructs a new ApproveDisplayVideo360AdvertiserLinkProposalResponse. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents an ApproveDisplayVideo360AdvertiserLinkProposalResponse. + * @implements IApproveDisplayVideo360AdvertiserLinkProposalResponse + * @constructor + * @param {google.analytics.admin.v1alpha.IApproveDisplayVideo360AdvertiserLinkProposalResponse=} [properties] Properties to set + */ + function ApproveDisplayVideo360AdvertiserLinkProposalResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ApproveDisplayVideo360AdvertiserLinkProposalResponse displayVideo_360AdvertiserLink. + * @member {google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLink|null|undefined} displayVideo_360AdvertiserLink + * @memberof google.analytics.admin.v1alpha.ApproveDisplayVideo360AdvertiserLinkProposalResponse + * @instance + */ + ApproveDisplayVideo360AdvertiserLinkProposalResponse.prototype.displayVideo_360AdvertiserLink = null; + + /** + * Creates a new ApproveDisplayVideo360AdvertiserLinkProposalResponse instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.ApproveDisplayVideo360AdvertiserLinkProposalResponse + * @static + * @param {google.analytics.admin.v1alpha.IApproveDisplayVideo360AdvertiserLinkProposalResponse=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.ApproveDisplayVideo360AdvertiserLinkProposalResponse} ApproveDisplayVideo360AdvertiserLinkProposalResponse instance + */ + ApproveDisplayVideo360AdvertiserLinkProposalResponse.create = function create(properties) { + return new ApproveDisplayVideo360AdvertiserLinkProposalResponse(properties); + }; + + /** + * Encodes the specified ApproveDisplayVideo360AdvertiserLinkProposalResponse message. Does not implicitly {@link google.analytics.admin.v1alpha.ApproveDisplayVideo360AdvertiserLinkProposalResponse.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.ApproveDisplayVideo360AdvertiserLinkProposalResponse + * @static + * @param {google.analytics.admin.v1alpha.IApproveDisplayVideo360AdvertiserLinkProposalResponse} message ApproveDisplayVideo360AdvertiserLinkProposalResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ApproveDisplayVideo360AdvertiserLinkProposalResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.displayVideo_360AdvertiserLink != null && Object.hasOwnProperty.call(message, "displayVideo_360AdvertiserLink")) + $root.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink.encode(message.displayVideo_360AdvertiserLink, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ApproveDisplayVideo360AdvertiserLinkProposalResponse message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.ApproveDisplayVideo360AdvertiserLinkProposalResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.ApproveDisplayVideo360AdvertiserLinkProposalResponse + * @static + * @param {google.analytics.admin.v1alpha.IApproveDisplayVideo360AdvertiserLinkProposalResponse} message ApproveDisplayVideo360AdvertiserLinkProposalResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ApproveDisplayVideo360AdvertiserLinkProposalResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ApproveDisplayVideo360AdvertiserLinkProposalResponse message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.ApproveDisplayVideo360AdvertiserLinkProposalResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.ApproveDisplayVideo360AdvertiserLinkProposalResponse} ApproveDisplayVideo360AdvertiserLinkProposalResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ApproveDisplayVideo360AdvertiserLinkProposalResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.ApproveDisplayVideo360AdvertiserLinkProposalResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.displayVideo_360AdvertiserLink = $root.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ApproveDisplayVideo360AdvertiserLinkProposalResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.ApproveDisplayVideo360AdvertiserLinkProposalResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.ApproveDisplayVideo360AdvertiserLinkProposalResponse} ApproveDisplayVideo360AdvertiserLinkProposalResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ApproveDisplayVideo360AdvertiserLinkProposalResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ApproveDisplayVideo360AdvertiserLinkProposalResponse message. + * @function verify + * @memberof google.analytics.admin.v1alpha.ApproveDisplayVideo360AdvertiserLinkProposalResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ApproveDisplayVideo360AdvertiserLinkProposalResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.displayVideo_360AdvertiserLink != null && message.hasOwnProperty("displayVideo_360AdvertiserLink")) { + var error = $root.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink.verify(message.displayVideo_360AdvertiserLink); + if (error) + return "displayVideo_360AdvertiserLink." + error; + } + return null; + }; + + /** + * Creates an ApproveDisplayVideo360AdvertiserLinkProposalResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.ApproveDisplayVideo360AdvertiserLinkProposalResponse + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.ApproveDisplayVideo360AdvertiserLinkProposalResponse} ApproveDisplayVideo360AdvertiserLinkProposalResponse + */ + ApproveDisplayVideo360AdvertiserLinkProposalResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.ApproveDisplayVideo360AdvertiserLinkProposalResponse) + return object; + var message = new $root.google.analytics.admin.v1alpha.ApproveDisplayVideo360AdvertiserLinkProposalResponse(); + if (object.displayVideo_360AdvertiserLink != null) { + if (typeof object.displayVideo_360AdvertiserLink !== "object") + throw TypeError(".google.analytics.admin.v1alpha.ApproveDisplayVideo360AdvertiserLinkProposalResponse.displayVideo_360AdvertiserLink: object expected"); + message.displayVideo_360AdvertiserLink = $root.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink.fromObject(object.displayVideo_360AdvertiserLink); + } + return message; + }; + + /** + * Creates a plain object from an ApproveDisplayVideo360AdvertiserLinkProposalResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.ApproveDisplayVideo360AdvertiserLinkProposalResponse + * @static + * @param {google.analytics.admin.v1alpha.ApproveDisplayVideo360AdvertiserLinkProposalResponse} message ApproveDisplayVideo360AdvertiserLinkProposalResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ApproveDisplayVideo360AdvertiserLinkProposalResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.displayVideo_360AdvertiserLink = null; + if (message.displayVideo_360AdvertiserLink != null && message.hasOwnProperty("displayVideo_360AdvertiserLink")) + object.displayVideo_360AdvertiserLink = $root.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink.toObject(message.displayVideo_360AdvertiserLink, options); + return object; + }; + + /** + * Converts this ApproveDisplayVideo360AdvertiserLinkProposalResponse to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.ApproveDisplayVideo360AdvertiserLinkProposalResponse + * @instance + * @returns {Object.} JSON object + */ + ApproveDisplayVideo360AdvertiserLinkProposalResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ApproveDisplayVideo360AdvertiserLinkProposalResponse + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.ApproveDisplayVideo360AdvertiserLinkProposalResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ApproveDisplayVideo360AdvertiserLinkProposalResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.ApproveDisplayVideo360AdvertiserLinkProposalResponse"; + }; + + return ApproveDisplayVideo360AdvertiserLinkProposalResponse; + })(); + + v1alpha.CancelDisplayVideo360AdvertiserLinkProposalRequest = (function() { + + /** + * Properties of a CancelDisplayVideo360AdvertiserLinkProposalRequest. + * @memberof google.analytics.admin.v1alpha + * @interface ICancelDisplayVideo360AdvertiserLinkProposalRequest + * @property {string|null} [name] CancelDisplayVideo360AdvertiserLinkProposalRequest name + */ + + /** + * Constructs a new CancelDisplayVideo360AdvertiserLinkProposalRequest. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents a CancelDisplayVideo360AdvertiserLinkProposalRequest. + * @implements ICancelDisplayVideo360AdvertiserLinkProposalRequest + * @constructor + * @param {google.analytics.admin.v1alpha.ICancelDisplayVideo360AdvertiserLinkProposalRequest=} [properties] Properties to set + */ + function CancelDisplayVideo360AdvertiserLinkProposalRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CancelDisplayVideo360AdvertiserLinkProposalRequest name. + * @member {string} name + * @memberof google.analytics.admin.v1alpha.CancelDisplayVideo360AdvertiserLinkProposalRequest + * @instance + */ + CancelDisplayVideo360AdvertiserLinkProposalRequest.prototype.name = ""; + + /** + * Creates a new CancelDisplayVideo360AdvertiserLinkProposalRequest instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.CancelDisplayVideo360AdvertiserLinkProposalRequest + * @static + * @param {google.analytics.admin.v1alpha.ICancelDisplayVideo360AdvertiserLinkProposalRequest=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.CancelDisplayVideo360AdvertiserLinkProposalRequest} CancelDisplayVideo360AdvertiserLinkProposalRequest instance + */ + CancelDisplayVideo360AdvertiserLinkProposalRequest.create = function create(properties) { + return new CancelDisplayVideo360AdvertiserLinkProposalRequest(properties); + }; + + /** + * Encodes the specified CancelDisplayVideo360AdvertiserLinkProposalRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.CancelDisplayVideo360AdvertiserLinkProposalRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.CancelDisplayVideo360AdvertiserLinkProposalRequest + * @static + * @param {google.analytics.admin.v1alpha.ICancelDisplayVideo360AdvertiserLinkProposalRequest} message CancelDisplayVideo360AdvertiserLinkProposalRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CancelDisplayVideo360AdvertiserLinkProposalRequest.encode = function encode(message, writer) { + 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 CancelDisplayVideo360AdvertiserLinkProposalRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.CancelDisplayVideo360AdvertiserLinkProposalRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.CancelDisplayVideo360AdvertiserLinkProposalRequest + * @static + * @param {google.analytics.admin.v1alpha.ICancelDisplayVideo360AdvertiserLinkProposalRequest} message CancelDisplayVideo360AdvertiserLinkProposalRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CancelDisplayVideo360AdvertiserLinkProposalRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CancelDisplayVideo360AdvertiserLinkProposalRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.CancelDisplayVideo360AdvertiserLinkProposalRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.CancelDisplayVideo360AdvertiserLinkProposalRequest} CancelDisplayVideo360AdvertiserLinkProposalRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CancelDisplayVideo360AdvertiserLinkProposalRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.CancelDisplayVideo360AdvertiserLinkProposalRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CancelDisplayVideo360AdvertiserLinkProposalRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.CancelDisplayVideo360AdvertiserLinkProposalRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.CancelDisplayVideo360AdvertiserLinkProposalRequest} CancelDisplayVideo360AdvertiserLinkProposalRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CancelDisplayVideo360AdvertiserLinkProposalRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CancelDisplayVideo360AdvertiserLinkProposalRequest message. + * @function verify + * @memberof google.analytics.admin.v1alpha.CancelDisplayVideo360AdvertiserLinkProposalRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CancelDisplayVideo360AdvertiserLinkProposalRequest.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 CancelDisplayVideo360AdvertiserLinkProposalRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.CancelDisplayVideo360AdvertiserLinkProposalRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.CancelDisplayVideo360AdvertiserLinkProposalRequest} CancelDisplayVideo360AdvertiserLinkProposalRequest + */ + CancelDisplayVideo360AdvertiserLinkProposalRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.CancelDisplayVideo360AdvertiserLinkProposalRequest) + return object; + var message = new $root.google.analytics.admin.v1alpha.CancelDisplayVideo360AdvertiserLinkProposalRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a CancelDisplayVideo360AdvertiserLinkProposalRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.CancelDisplayVideo360AdvertiserLinkProposalRequest + * @static + * @param {google.analytics.admin.v1alpha.CancelDisplayVideo360AdvertiserLinkProposalRequest} message CancelDisplayVideo360AdvertiserLinkProposalRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CancelDisplayVideo360AdvertiserLinkProposalRequest.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 CancelDisplayVideo360AdvertiserLinkProposalRequest to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.CancelDisplayVideo360AdvertiserLinkProposalRequest + * @instance + * @returns {Object.} JSON object + */ + CancelDisplayVideo360AdvertiserLinkProposalRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CancelDisplayVideo360AdvertiserLinkProposalRequest + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.CancelDisplayVideo360AdvertiserLinkProposalRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CancelDisplayVideo360AdvertiserLinkProposalRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.CancelDisplayVideo360AdvertiserLinkProposalRequest"; + }; + + return CancelDisplayVideo360AdvertiserLinkProposalRequest; + })(); + + v1alpha.CreateCustomDimensionRequest = (function() { + + /** + * Properties of a CreateCustomDimensionRequest. + * @memberof google.analytics.admin.v1alpha + * @interface ICreateCustomDimensionRequest + * @property {string|null} [parent] CreateCustomDimensionRequest parent + * @property {google.analytics.admin.v1alpha.ICustomDimension|null} [customDimension] CreateCustomDimensionRequest customDimension + */ + + /** + * Constructs a new CreateCustomDimensionRequest. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents a CreateCustomDimensionRequest. + * @implements ICreateCustomDimensionRequest + * @constructor + * @param {google.analytics.admin.v1alpha.ICreateCustomDimensionRequest=} [properties] Properties to set + */ + function CreateCustomDimensionRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateCustomDimensionRequest parent. + * @member {string} parent + * @memberof google.analytics.admin.v1alpha.CreateCustomDimensionRequest + * @instance + */ + CreateCustomDimensionRequest.prototype.parent = ""; + + /** + * CreateCustomDimensionRequest customDimension. + * @member {google.analytics.admin.v1alpha.ICustomDimension|null|undefined} customDimension + * @memberof google.analytics.admin.v1alpha.CreateCustomDimensionRequest + * @instance + */ + CreateCustomDimensionRequest.prototype.customDimension = null; + + /** + * Creates a new CreateCustomDimensionRequest instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.CreateCustomDimensionRequest + * @static + * @param {google.analytics.admin.v1alpha.ICreateCustomDimensionRequest=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.CreateCustomDimensionRequest} CreateCustomDimensionRequest instance + */ + CreateCustomDimensionRequest.create = function create(properties) { + return new CreateCustomDimensionRequest(properties); + }; + + /** + * Encodes the specified CreateCustomDimensionRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.CreateCustomDimensionRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.CreateCustomDimensionRequest + * @static + * @param {google.analytics.admin.v1alpha.ICreateCustomDimensionRequest} message CreateCustomDimensionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateCustomDimensionRequest.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.customDimension != null && Object.hasOwnProperty.call(message, "customDimension")) + $root.google.analytics.admin.v1alpha.CustomDimension.encode(message.customDimension, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CreateCustomDimensionRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.CreateCustomDimensionRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.CreateCustomDimensionRequest + * @static + * @param {google.analytics.admin.v1alpha.ICreateCustomDimensionRequest} message CreateCustomDimensionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateCustomDimensionRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateCustomDimensionRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.CreateCustomDimensionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.CreateCustomDimensionRequest} CreateCustomDimensionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateCustomDimensionRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.CreateCustomDimensionRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.customDimension = $root.google.analytics.admin.v1alpha.CustomDimension.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateCustomDimensionRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.CreateCustomDimensionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.CreateCustomDimensionRequest} CreateCustomDimensionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateCustomDimensionRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateCustomDimensionRequest message. + * @function verify + * @memberof google.analytics.admin.v1alpha.CreateCustomDimensionRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateCustomDimensionRequest.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.customDimension != null && message.hasOwnProperty("customDimension")) { + var error = $root.google.analytics.admin.v1alpha.CustomDimension.verify(message.customDimension); + if (error) + return "customDimension." + error; + } + return null; + }; + + /** + * Creates a CreateCustomDimensionRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.CreateCustomDimensionRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.CreateCustomDimensionRequest} CreateCustomDimensionRequest + */ + CreateCustomDimensionRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.CreateCustomDimensionRequest) + return object; + var message = new $root.google.analytics.admin.v1alpha.CreateCustomDimensionRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.customDimension != null) { + if (typeof object.customDimension !== "object") + throw TypeError(".google.analytics.admin.v1alpha.CreateCustomDimensionRequest.customDimension: object expected"); + message.customDimension = $root.google.analytics.admin.v1alpha.CustomDimension.fromObject(object.customDimension); + } + return message; + }; + + /** + * Creates a plain object from a CreateCustomDimensionRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.CreateCustomDimensionRequest + * @static + * @param {google.analytics.admin.v1alpha.CreateCustomDimensionRequest} message CreateCustomDimensionRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateCustomDimensionRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.customDimension = null; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.customDimension != null && message.hasOwnProperty("customDimension")) + object.customDimension = $root.google.analytics.admin.v1alpha.CustomDimension.toObject(message.customDimension, options); + return object; + }; + + /** + * Converts this CreateCustomDimensionRequest to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.CreateCustomDimensionRequest + * @instance + * @returns {Object.} JSON object + */ + CreateCustomDimensionRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateCustomDimensionRequest + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.CreateCustomDimensionRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateCustomDimensionRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.CreateCustomDimensionRequest"; + }; + + return CreateCustomDimensionRequest; + })(); + + v1alpha.UpdateCustomDimensionRequest = (function() { + + /** + * Properties of an UpdateCustomDimensionRequest. + * @memberof google.analytics.admin.v1alpha + * @interface IUpdateCustomDimensionRequest + * @property {google.analytics.admin.v1alpha.ICustomDimension|null} [customDimension] UpdateCustomDimensionRequest customDimension + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateCustomDimensionRequest updateMask + */ + + /** + * Constructs a new UpdateCustomDimensionRequest. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents an UpdateCustomDimensionRequest. + * @implements IUpdateCustomDimensionRequest + * @constructor + * @param {google.analytics.admin.v1alpha.IUpdateCustomDimensionRequest=} [properties] Properties to set + */ + function UpdateCustomDimensionRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateCustomDimensionRequest customDimension. + * @member {google.analytics.admin.v1alpha.ICustomDimension|null|undefined} customDimension + * @memberof google.analytics.admin.v1alpha.UpdateCustomDimensionRequest + * @instance + */ + UpdateCustomDimensionRequest.prototype.customDimension = null; + + /** + * UpdateCustomDimensionRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.analytics.admin.v1alpha.UpdateCustomDimensionRequest + * @instance + */ + UpdateCustomDimensionRequest.prototype.updateMask = null; + + /** + * Creates a new UpdateCustomDimensionRequest instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.UpdateCustomDimensionRequest + * @static + * @param {google.analytics.admin.v1alpha.IUpdateCustomDimensionRequest=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.UpdateCustomDimensionRequest} UpdateCustomDimensionRequest instance + */ + UpdateCustomDimensionRequest.create = function create(properties) { + return new UpdateCustomDimensionRequest(properties); + }; + + /** + * Encodes the specified UpdateCustomDimensionRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.UpdateCustomDimensionRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.UpdateCustomDimensionRequest + * @static + * @param {google.analytics.admin.v1alpha.IUpdateCustomDimensionRequest} message UpdateCustomDimensionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateCustomDimensionRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.customDimension != null && Object.hasOwnProperty.call(message, "customDimension")) + $root.google.analytics.admin.v1alpha.CustomDimension.encode(message.customDimension, 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 UpdateCustomDimensionRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.UpdateCustomDimensionRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.UpdateCustomDimensionRequest + * @static + * @param {google.analytics.admin.v1alpha.IUpdateCustomDimensionRequest} message UpdateCustomDimensionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateCustomDimensionRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateCustomDimensionRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.UpdateCustomDimensionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.UpdateCustomDimensionRequest} UpdateCustomDimensionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateCustomDimensionRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.UpdateCustomDimensionRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.customDimension = $root.google.analytics.admin.v1alpha.CustomDimension.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 UpdateCustomDimensionRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.UpdateCustomDimensionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.UpdateCustomDimensionRequest} UpdateCustomDimensionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateCustomDimensionRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateCustomDimensionRequest message. + * @function verify + * @memberof google.analytics.admin.v1alpha.UpdateCustomDimensionRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateCustomDimensionRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.customDimension != null && message.hasOwnProperty("customDimension")) { + var error = $root.google.analytics.admin.v1alpha.CustomDimension.verify(message.customDimension); + if (error) + return "customDimension." + 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 UpdateCustomDimensionRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.UpdateCustomDimensionRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.UpdateCustomDimensionRequest} UpdateCustomDimensionRequest + */ + UpdateCustomDimensionRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.UpdateCustomDimensionRequest) + return object; + var message = new $root.google.analytics.admin.v1alpha.UpdateCustomDimensionRequest(); + if (object.customDimension != null) { + if (typeof object.customDimension !== "object") + throw TypeError(".google.analytics.admin.v1alpha.UpdateCustomDimensionRequest.customDimension: object expected"); + message.customDimension = $root.google.analytics.admin.v1alpha.CustomDimension.fromObject(object.customDimension); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.analytics.admin.v1alpha.UpdateCustomDimensionRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + return message; + }; + + /** + * Creates a plain object from an UpdateCustomDimensionRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.UpdateCustomDimensionRequest + * @static + * @param {google.analytics.admin.v1alpha.UpdateCustomDimensionRequest} message UpdateCustomDimensionRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateCustomDimensionRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.customDimension = null; + object.updateMask = null; + } + if (message.customDimension != null && message.hasOwnProperty("customDimension")) + object.customDimension = $root.google.analytics.admin.v1alpha.CustomDimension.toObject(message.customDimension, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + return object; + }; + + /** + * Converts this UpdateCustomDimensionRequest to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.UpdateCustomDimensionRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateCustomDimensionRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateCustomDimensionRequest + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.UpdateCustomDimensionRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateCustomDimensionRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.UpdateCustomDimensionRequest"; + }; + + return UpdateCustomDimensionRequest; + })(); + + v1alpha.ListCustomDimensionsRequest = (function() { + + /** + * Properties of a ListCustomDimensionsRequest. + * @memberof google.analytics.admin.v1alpha + * @interface IListCustomDimensionsRequest + * @property {string|null} [parent] ListCustomDimensionsRequest parent + * @property {number|null} [pageSize] ListCustomDimensionsRequest pageSize + * @property {string|null} [pageToken] ListCustomDimensionsRequest pageToken + */ + + /** + * Constructs a new ListCustomDimensionsRequest. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents a ListCustomDimensionsRequest. + * @implements IListCustomDimensionsRequest + * @constructor + * @param {google.analytics.admin.v1alpha.IListCustomDimensionsRequest=} [properties] Properties to set + */ + function ListCustomDimensionsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListCustomDimensionsRequest parent. + * @member {string} parent + * @memberof google.analytics.admin.v1alpha.ListCustomDimensionsRequest + * @instance + */ + ListCustomDimensionsRequest.prototype.parent = ""; + + /** + * ListCustomDimensionsRequest pageSize. + * @member {number} pageSize + * @memberof google.analytics.admin.v1alpha.ListCustomDimensionsRequest + * @instance + */ + ListCustomDimensionsRequest.prototype.pageSize = 0; + + /** + * ListCustomDimensionsRequest pageToken. + * @member {string} pageToken + * @memberof google.analytics.admin.v1alpha.ListCustomDimensionsRequest + * @instance + */ + ListCustomDimensionsRequest.prototype.pageToken = ""; + + /** + * Creates a new ListCustomDimensionsRequest instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.ListCustomDimensionsRequest + * @static + * @param {google.analytics.admin.v1alpha.IListCustomDimensionsRequest=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.ListCustomDimensionsRequest} ListCustomDimensionsRequest instance + */ + ListCustomDimensionsRequest.create = function create(properties) { + return new ListCustomDimensionsRequest(properties); + }; + + /** + * Encodes the specified ListCustomDimensionsRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.ListCustomDimensionsRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.ListCustomDimensionsRequest + * @static + * @param {google.analytics.admin.v1alpha.IListCustomDimensionsRequest} message ListCustomDimensionsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListCustomDimensionsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + return writer; + }; + + /** + * Encodes the specified ListCustomDimensionsRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.ListCustomDimensionsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.ListCustomDimensionsRequest + * @static + * @param {google.analytics.admin.v1alpha.IListCustomDimensionsRequest} message ListCustomDimensionsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListCustomDimensionsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListCustomDimensionsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.ListCustomDimensionsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.ListCustomDimensionsRequest} ListCustomDimensionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListCustomDimensionsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.ListCustomDimensionsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListCustomDimensionsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.ListCustomDimensionsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.ListCustomDimensionsRequest} ListCustomDimensionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListCustomDimensionsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListCustomDimensionsRequest message. + * @function verify + * @memberof google.analytics.admin.v1alpha.ListCustomDimensionsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListCustomDimensionsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + return null; + }; + + /** + * Creates a ListCustomDimensionsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.ListCustomDimensionsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.ListCustomDimensionsRequest} ListCustomDimensionsRequest + */ + ListCustomDimensionsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.ListCustomDimensionsRequest) + return object; + var message = new $root.google.analytics.admin.v1alpha.ListCustomDimensionsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + return message; + }; + + /** + * Creates a plain object from a ListCustomDimensionsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.ListCustomDimensionsRequest + * @static + * @param {google.analytics.admin.v1alpha.ListCustomDimensionsRequest} message ListCustomDimensionsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListCustomDimensionsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + return object; + }; + + /** + * Converts this ListCustomDimensionsRequest to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.ListCustomDimensionsRequest + * @instance + * @returns {Object.} JSON object + */ + ListCustomDimensionsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListCustomDimensionsRequest + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.ListCustomDimensionsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListCustomDimensionsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.ListCustomDimensionsRequest"; + }; + + return ListCustomDimensionsRequest; + })(); + + v1alpha.ListCustomDimensionsResponse = (function() { + + /** + * Properties of a ListCustomDimensionsResponse. + * @memberof google.analytics.admin.v1alpha + * @interface IListCustomDimensionsResponse + * @property {Array.|null} [customDimensions] ListCustomDimensionsResponse customDimensions + * @property {string|null} [nextPageToken] ListCustomDimensionsResponse nextPageToken + */ + + /** + * Constructs a new ListCustomDimensionsResponse. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents a ListCustomDimensionsResponse. + * @implements IListCustomDimensionsResponse + * @constructor + * @param {google.analytics.admin.v1alpha.IListCustomDimensionsResponse=} [properties] Properties to set + */ + function ListCustomDimensionsResponse(properties) { + this.customDimensions = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListCustomDimensionsResponse customDimensions. + * @member {Array.} customDimensions + * @memberof google.analytics.admin.v1alpha.ListCustomDimensionsResponse + * @instance + */ + ListCustomDimensionsResponse.prototype.customDimensions = $util.emptyArray; + + /** + * ListCustomDimensionsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.analytics.admin.v1alpha.ListCustomDimensionsResponse + * @instance + */ + ListCustomDimensionsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListCustomDimensionsResponse instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.ListCustomDimensionsResponse + * @static + * @param {google.analytics.admin.v1alpha.IListCustomDimensionsResponse=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.ListCustomDimensionsResponse} ListCustomDimensionsResponse instance + */ + ListCustomDimensionsResponse.create = function create(properties) { + return new ListCustomDimensionsResponse(properties); + }; + + /** + * Encodes the specified ListCustomDimensionsResponse message. Does not implicitly {@link google.analytics.admin.v1alpha.ListCustomDimensionsResponse.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.ListCustomDimensionsResponse + * @static + * @param {google.analytics.admin.v1alpha.IListCustomDimensionsResponse} message ListCustomDimensionsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListCustomDimensionsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.customDimensions != null && message.customDimensions.length) + for (var i = 0; i < message.customDimensions.length; ++i) + $root.google.analytics.admin.v1alpha.CustomDimension.encode(message.customDimensions[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 ListCustomDimensionsResponse message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.ListCustomDimensionsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.ListCustomDimensionsResponse + * @static + * @param {google.analytics.admin.v1alpha.IListCustomDimensionsResponse} message ListCustomDimensionsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListCustomDimensionsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListCustomDimensionsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.ListCustomDimensionsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.ListCustomDimensionsResponse} ListCustomDimensionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListCustomDimensionsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.ListCustomDimensionsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.customDimensions && message.customDimensions.length)) + message.customDimensions = []; + message.customDimensions.push($root.google.analytics.admin.v1alpha.CustomDimension.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListCustomDimensionsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.ListCustomDimensionsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.ListCustomDimensionsResponse} ListCustomDimensionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListCustomDimensionsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListCustomDimensionsResponse message. + * @function verify + * @memberof google.analytics.admin.v1alpha.ListCustomDimensionsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListCustomDimensionsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.customDimensions != null && message.hasOwnProperty("customDimensions")) { + if (!Array.isArray(message.customDimensions)) + return "customDimensions: array expected"; + for (var i = 0; i < message.customDimensions.length; ++i) { + var error = $root.google.analytics.admin.v1alpha.CustomDimension.verify(message.customDimensions[i]); + if (error) + return "customDimensions." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListCustomDimensionsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.ListCustomDimensionsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.ListCustomDimensionsResponse} ListCustomDimensionsResponse + */ + ListCustomDimensionsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.ListCustomDimensionsResponse) + return object; + var message = new $root.google.analytics.admin.v1alpha.ListCustomDimensionsResponse(); + if (object.customDimensions) { + if (!Array.isArray(object.customDimensions)) + throw TypeError(".google.analytics.admin.v1alpha.ListCustomDimensionsResponse.customDimensions: array expected"); + message.customDimensions = []; + for (var i = 0; i < object.customDimensions.length; ++i) { + if (typeof object.customDimensions[i] !== "object") + throw TypeError(".google.analytics.admin.v1alpha.ListCustomDimensionsResponse.customDimensions: object expected"); + message.customDimensions[i] = $root.google.analytics.admin.v1alpha.CustomDimension.fromObject(object.customDimensions[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListCustomDimensionsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.ListCustomDimensionsResponse + * @static + * @param {google.analytics.admin.v1alpha.ListCustomDimensionsResponse} message ListCustomDimensionsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListCustomDimensionsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.customDimensions = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.customDimensions && message.customDimensions.length) { + object.customDimensions = []; + for (var j = 0; j < message.customDimensions.length; ++j) + object.customDimensions[j] = $root.google.analytics.admin.v1alpha.CustomDimension.toObject(message.customDimensions[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListCustomDimensionsResponse to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.ListCustomDimensionsResponse + * @instance + * @returns {Object.} JSON object + */ + ListCustomDimensionsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListCustomDimensionsResponse + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.ListCustomDimensionsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListCustomDimensionsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.ListCustomDimensionsResponse"; + }; + + return ListCustomDimensionsResponse; + })(); + + v1alpha.ArchiveCustomDimensionRequest = (function() { + + /** + * Properties of an ArchiveCustomDimensionRequest. + * @memberof google.analytics.admin.v1alpha + * @interface IArchiveCustomDimensionRequest + * @property {string|null} [name] ArchiveCustomDimensionRequest name + */ + + /** + * Constructs a new ArchiveCustomDimensionRequest. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents an ArchiveCustomDimensionRequest. + * @implements IArchiveCustomDimensionRequest + * @constructor + * @param {google.analytics.admin.v1alpha.IArchiveCustomDimensionRequest=} [properties] Properties to set + */ + function ArchiveCustomDimensionRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ArchiveCustomDimensionRequest name. + * @member {string} name + * @memberof google.analytics.admin.v1alpha.ArchiveCustomDimensionRequest + * @instance + */ + ArchiveCustomDimensionRequest.prototype.name = ""; + + /** + * Creates a new ArchiveCustomDimensionRequest instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.ArchiveCustomDimensionRequest + * @static + * @param {google.analytics.admin.v1alpha.IArchiveCustomDimensionRequest=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.ArchiveCustomDimensionRequest} ArchiveCustomDimensionRequest instance + */ + ArchiveCustomDimensionRequest.create = function create(properties) { + return new ArchiveCustomDimensionRequest(properties); + }; + + /** + * Encodes the specified ArchiveCustomDimensionRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.ArchiveCustomDimensionRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.ArchiveCustomDimensionRequest + * @static + * @param {google.analytics.admin.v1alpha.IArchiveCustomDimensionRequest} message ArchiveCustomDimensionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ArchiveCustomDimensionRequest.encode = function encode(message, writer) { + 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 ArchiveCustomDimensionRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.ArchiveCustomDimensionRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.ArchiveCustomDimensionRequest + * @static + * @param {google.analytics.admin.v1alpha.IArchiveCustomDimensionRequest} message ArchiveCustomDimensionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ArchiveCustomDimensionRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ArchiveCustomDimensionRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.ArchiveCustomDimensionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.ArchiveCustomDimensionRequest} ArchiveCustomDimensionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ArchiveCustomDimensionRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.ArchiveCustomDimensionRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ArchiveCustomDimensionRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.ArchiveCustomDimensionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.ArchiveCustomDimensionRequest} ArchiveCustomDimensionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ArchiveCustomDimensionRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ArchiveCustomDimensionRequest message. + * @function verify + * @memberof google.analytics.admin.v1alpha.ArchiveCustomDimensionRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ArchiveCustomDimensionRequest.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 an ArchiveCustomDimensionRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.ArchiveCustomDimensionRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.ArchiveCustomDimensionRequest} ArchiveCustomDimensionRequest + */ + ArchiveCustomDimensionRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.ArchiveCustomDimensionRequest) + return object; + var message = new $root.google.analytics.admin.v1alpha.ArchiveCustomDimensionRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from an ArchiveCustomDimensionRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.ArchiveCustomDimensionRequest + * @static + * @param {google.analytics.admin.v1alpha.ArchiveCustomDimensionRequest} message ArchiveCustomDimensionRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ArchiveCustomDimensionRequest.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 ArchiveCustomDimensionRequest to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.ArchiveCustomDimensionRequest + * @instance + * @returns {Object.} JSON object + */ + ArchiveCustomDimensionRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ArchiveCustomDimensionRequest + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.ArchiveCustomDimensionRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ArchiveCustomDimensionRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.ArchiveCustomDimensionRequest"; + }; + + return ArchiveCustomDimensionRequest; + })(); + + v1alpha.GetCustomDimensionRequest = (function() { + + /** + * Properties of a GetCustomDimensionRequest. + * @memberof google.analytics.admin.v1alpha + * @interface IGetCustomDimensionRequest + * @property {string|null} [name] GetCustomDimensionRequest name + */ + + /** + * Constructs a new GetCustomDimensionRequest. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents a GetCustomDimensionRequest. + * @implements IGetCustomDimensionRequest + * @constructor + * @param {google.analytics.admin.v1alpha.IGetCustomDimensionRequest=} [properties] Properties to set + */ + function GetCustomDimensionRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetCustomDimensionRequest name. + * @member {string} name + * @memberof google.analytics.admin.v1alpha.GetCustomDimensionRequest + * @instance + */ + GetCustomDimensionRequest.prototype.name = ""; + + /** + * Creates a new GetCustomDimensionRequest instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.GetCustomDimensionRequest + * @static + * @param {google.analytics.admin.v1alpha.IGetCustomDimensionRequest=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.GetCustomDimensionRequest} GetCustomDimensionRequest instance + */ + GetCustomDimensionRequest.create = function create(properties) { + return new GetCustomDimensionRequest(properties); + }; + + /** + * Encodes the specified GetCustomDimensionRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.GetCustomDimensionRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.GetCustomDimensionRequest + * @static + * @param {google.analytics.admin.v1alpha.IGetCustomDimensionRequest} message GetCustomDimensionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetCustomDimensionRequest.encode = function encode(message, writer) { + 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 GetCustomDimensionRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.GetCustomDimensionRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.GetCustomDimensionRequest + * @static + * @param {google.analytics.admin.v1alpha.IGetCustomDimensionRequest} message GetCustomDimensionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetCustomDimensionRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetCustomDimensionRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.GetCustomDimensionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.GetCustomDimensionRequest} GetCustomDimensionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetCustomDimensionRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.GetCustomDimensionRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetCustomDimensionRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.GetCustomDimensionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.GetCustomDimensionRequest} GetCustomDimensionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetCustomDimensionRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetCustomDimensionRequest message. + * @function verify + * @memberof google.analytics.admin.v1alpha.GetCustomDimensionRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetCustomDimensionRequest.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 GetCustomDimensionRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.GetCustomDimensionRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.GetCustomDimensionRequest} GetCustomDimensionRequest + */ + GetCustomDimensionRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.GetCustomDimensionRequest) + return object; + var message = new $root.google.analytics.admin.v1alpha.GetCustomDimensionRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetCustomDimensionRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.GetCustomDimensionRequest + * @static + * @param {google.analytics.admin.v1alpha.GetCustomDimensionRequest} message GetCustomDimensionRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetCustomDimensionRequest.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 GetCustomDimensionRequest to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.GetCustomDimensionRequest + * @instance + * @returns {Object.} JSON object + */ + GetCustomDimensionRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetCustomDimensionRequest + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.GetCustomDimensionRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetCustomDimensionRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.GetCustomDimensionRequest"; + }; + + return GetCustomDimensionRequest; + })(); + + v1alpha.CreateCustomMetricRequest = (function() { + + /** + * Properties of a CreateCustomMetricRequest. + * @memberof google.analytics.admin.v1alpha + * @interface ICreateCustomMetricRequest + * @property {string|null} [parent] CreateCustomMetricRequest parent + * @property {google.analytics.admin.v1alpha.ICustomMetric|null} [customMetric] CreateCustomMetricRequest customMetric + */ + + /** + * Constructs a new CreateCustomMetricRequest. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents a CreateCustomMetricRequest. + * @implements ICreateCustomMetricRequest + * @constructor + * @param {google.analytics.admin.v1alpha.ICreateCustomMetricRequest=} [properties] Properties to set + */ + function CreateCustomMetricRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateCustomMetricRequest parent. + * @member {string} parent + * @memberof google.analytics.admin.v1alpha.CreateCustomMetricRequest + * @instance + */ + CreateCustomMetricRequest.prototype.parent = ""; + + /** + * CreateCustomMetricRequest customMetric. + * @member {google.analytics.admin.v1alpha.ICustomMetric|null|undefined} customMetric + * @memberof google.analytics.admin.v1alpha.CreateCustomMetricRequest + * @instance + */ + CreateCustomMetricRequest.prototype.customMetric = null; + + /** + * Creates a new CreateCustomMetricRequest instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.CreateCustomMetricRequest + * @static + * @param {google.analytics.admin.v1alpha.ICreateCustomMetricRequest=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.CreateCustomMetricRequest} CreateCustomMetricRequest instance + */ + CreateCustomMetricRequest.create = function create(properties) { + return new CreateCustomMetricRequest(properties); + }; + + /** + * Encodes the specified CreateCustomMetricRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.CreateCustomMetricRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.CreateCustomMetricRequest + * @static + * @param {google.analytics.admin.v1alpha.ICreateCustomMetricRequest} message CreateCustomMetricRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateCustomMetricRequest.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.customMetric != null && Object.hasOwnProperty.call(message, "customMetric")) + $root.google.analytics.admin.v1alpha.CustomMetric.encode(message.customMetric, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CreateCustomMetricRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.CreateCustomMetricRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.CreateCustomMetricRequest + * @static + * @param {google.analytics.admin.v1alpha.ICreateCustomMetricRequest} message CreateCustomMetricRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateCustomMetricRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateCustomMetricRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.CreateCustomMetricRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.CreateCustomMetricRequest} CreateCustomMetricRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateCustomMetricRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.CreateCustomMetricRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.customMetric = $root.google.analytics.admin.v1alpha.CustomMetric.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateCustomMetricRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.CreateCustomMetricRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.CreateCustomMetricRequest} CreateCustomMetricRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateCustomMetricRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateCustomMetricRequest message. + * @function verify + * @memberof google.analytics.admin.v1alpha.CreateCustomMetricRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateCustomMetricRequest.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.customMetric != null && message.hasOwnProperty("customMetric")) { + var error = $root.google.analytics.admin.v1alpha.CustomMetric.verify(message.customMetric); + if (error) + return "customMetric." + error; + } + return null; + }; + + /** + * Creates a CreateCustomMetricRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.CreateCustomMetricRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.CreateCustomMetricRequest} CreateCustomMetricRequest + */ + CreateCustomMetricRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.CreateCustomMetricRequest) + return object; + var message = new $root.google.analytics.admin.v1alpha.CreateCustomMetricRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.customMetric != null) { + if (typeof object.customMetric !== "object") + throw TypeError(".google.analytics.admin.v1alpha.CreateCustomMetricRequest.customMetric: object expected"); + message.customMetric = $root.google.analytics.admin.v1alpha.CustomMetric.fromObject(object.customMetric); + } + return message; + }; + + /** + * Creates a plain object from a CreateCustomMetricRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.CreateCustomMetricRequest + * @static + * @param {google.analytics.admin.v1alpha.CreateCustomMetricRequest} message CreateCustomMetricRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateCustomMetricRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.customMetric = null; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.customMetric != null && message.hasOwnProperty("customMetric")) + object.customMetric = $root.google.analytics.admin.v1alpha.CustomMetric.toObject(message.customMetric, options); + return object; + }; + + /** + * Converts this CreateCustomMetricRequest to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.CreateCustomMetricRequest + * @instance + * @returns {Object.} JSON object + */ + CreateCustomMetricRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateCustomMetricRequest + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.CreateCustomMetricRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateCustomMetricRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.CreateCustomMetricRequest"; + }; + + return CreateCustomMetricRequest; + })(); + + v1alpha.UpdateCustomMetricRequest = (function() { + + /** + * Properties of an UpdateCustomMetricRequest. + * @memberof google.analytics.admin.v1alpha + * @interface IUpdateCustomMetricRequest + * @property {google.analytics.admin.v1alpha.ICustomMetric|null} [customMetric] UpdateCustomMetricRequest customMetric + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateCustomMetricRequest updateMask + */ + + /** + * Constructs a new UpdateCustomMetricRequest. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents an UpdateCustomMetricRequest. + * @implements IUpdateCustomMetricRequest + * @constructor + * @param {google.analytics.admin.v1alpha.IUpdateCustomMetricRequest=} [properties] Properties to set + */ + function UpdateCustomMetricRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateCustomMetricRequest customMetric. + * @member {google.analytics.admin.v1alpha.ICustomMetric|null|undefined} customMetric + * @memberof google.analytics.admin.v1alpha.UpdateCustomMetricRequest + * @instance + */ + UpdateCustomMetricRequest.prototype.customMetric = null; + + /** + * UpdateCustomMetricRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.analytics.admin.v1alpha.UpdateCustomMetricRequest + * @instance + */ + UpdateCustomMetricRequest.prototype.updateMask = null; + + /** + * Creates a new UpdateCustomMetricRequest instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.UpdateCustomMetricRequest + * @static + * @param {google.analytics.admin.v1alpha.IUpdateCustomMetricRequest=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.UpdateCustomMetricRequest} UpdateCustomMetricRequest instance + */ + UpdateCustomMetricRequest.create = function create(properties) { + return new UpdateCustomMetricRequest(properties); + }; + + /** + * Encodes the specified UpdateCustomMetricRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.UpdateCustomMetricRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.UpdateCustomMetricRequest + * @static + * @param {google.analytics.admin.v1alpha.IUpdateCustomMetricRequest} message UpdateCustomMetricRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateCustomMetricRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.customMetric != null && Object.hasOwnProperty.call(message, "customMetric")) + $root.google.analytics.admin.v1alpha.CustomMetric.encode(message.customMetric, 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 UpdateCustomMetricRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.UpdateCustomMetricRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.UpdateCustomMetricRequest + * @static + * @param {google.analytics.admin.v1alpha.IUpdateCustomMetricRequest} message UpdateCustomMetricRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateCustomMetricRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateCustomMetricRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.UpdateCustomMetricRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.UpdateCustomMetricRequest} UpdateCustomMetricRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateCustomMetricRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.UpdateCustomMetricRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.customMetric = $root.google.analytics.admin.v1alpha.CustomMetric.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 UpdateCustomMetricRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.UpdateCustomMetricRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.UpdateCustomMetricRequest} UpdateCustomMetricRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateCustomMetricRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateCustomMetricRequest message. + * @function verify + * @memberof google.analytics.admin.v1alpha.UpdateCustomMetricRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateCustomMetricRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.customMetric != null && message.hasOwnProperty("customMetric")) { + var error = $root.google.analytics.admin.v1alpha.CustomMetric.verify(message.customMetric); + if (error) + return "customMetric." + 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 UpdateCustomMetricRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.UpdateCustomMetricRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.UpdateCustomMetricRequest} UpdateCustomMetricRequest + */ + UpdateCustomMetricRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.UpdateCustomMetricRequest) + return object; + var message = new $root.google.analytics.admin.v1alpha.UpdateCustomMetricRequest(); + if (object.customMetric != null) { + if (typeof object.customMetric !== "object") + throw TypeError(".google.analytics.admin.v1alpha.UpdateCustomMetricRequest.customMetric: object expected"); + message.customMetric = $root.google.analytics.admin.v1alpha.CustomMetric.fromObject(object.customMetric); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.analytics.admin.v1alpha.UpdateCustomMetricRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + return message; + }; + + /** + * Creates a plain object from an UpdateCustomMetricRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.UpdateCustomMetricRequest + * @static + * @param {google.analytics.admin.v1alpha.UpdateCustomMetricRequest} message UpdateCustomMetricRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateCustomMetricRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.customMetric = null; + object.updateMask = null; + } + if (message.customMetric != null && message.hasOwnProperty("customMetric")) + object.customMetric = $root.google.analytics.admin.v1alpha.CustomMetric.toObject(message.customMetric, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + return object; + }; + + /** + * Converts this UpdateCustomMetricRequest to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.UpdateCustomMetricRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateCustomMetricRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateCustomMetricRequest + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.UpdateCustomMetricRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateCustomMetricRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.UpdateCustomMetricRequest"; + }; + + return UpdateCustomMetricRequest; + })(); + + v1alpha.ListCustomMetricsRequest = (function() { + + /** + * Properties of a ListCustomMetricsRequest. + * @memberof google.analytics.admin.v1alpha + * @interface IListCustomMetricsRequest + * @property {string|null} [parent] ListCustomMetricsRequest parent + * @property {number|null} [pageSize] ListCustomMetricsRequest pageSize + * @property {string|null} [pageToken] ListCustomMetricsRequest pageToken + */ + + /** + * Constructs a new ListCustomMetricsRequest. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents a ListCustomMetricsRequest. + * @implements IListCustomMetricsRequest + * @constructor + * @param {google.analytics.admin.v1alpha.IListCustomMetricsRequest=} [properties] Properties to set + */ + function ListCustomMetricsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListCustomMetricsRequest parent. + * @member {string} parent + * @memberof google.analytics.admin.v1alpha.ListCustomMetricsRequest + * @instance + */ + ListCustomMetricsRequest.prototype.parent = ""; + + /** + * ListCustomMetricsRequest pageSize. + * @member {number} pageSize + * @memberof google.analytics.admin.v1alpha.ListCustomMetricsRequest + * @instance + */ + ListCustomMetricsRequest.prototype.pageSize = 0; + + /** + * ListCustomMetricsRequest pageToken. + * @member {string} pageToken + * @memberof google.analytics.admin.v1alpha.ListCustomMetricsRequest + * @instance + */ + ListCustomMetricsRequest.prototype.pageToken = ""; + + /** + * Creates a new ListCustomMetricsRequest instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.ListCustomMetricsRequest + * @static + * @param {google.analytics.admin.v1alpha.IListCustomMetricsRequest=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.ListCustomMetricsRequest} ListCustomMetricsRequest instance + */ + ListCustomMetricsRequest.create = function create(properties) { + return new ListCustomMetricsRequest(properties); + }; + + /** + * Encodes the specified ListCustomMetricsRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.ListCustomMetricsRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.ListCustomMetricsRequest + * @static + * @param {google.analytics.admin.v1alpha.IListCustomMetricsRequest} message ListCustomMetricsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListCustomMetricsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + return writer; + }; + + /** + * Encodes the specified ListCustomMetricsRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.ListCustomMetricsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.ListCustomMetricsRequest + * @static + * @param {google.analytics.admin.v1alpha.IListCustomMetricsRequest} message ListCustomMetricsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListCustomMetricsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListCustomMetricsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.ListCustomMetricsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.ListCustomMetricsRequest} ListCustomMetricsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListCustomMetricsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.ListCustomMetricsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListCustomMetricsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.ListCustomMetricsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.ListCustomMetricsRequest} ListCustomMetricsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListCustomMetricsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListCustomMetricsRequest message. + * @function verify + * @memberof google.analytics.admin.v1alpha.ListCustomMetricsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListCustomMetricsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + return null; + }; + + /** + * Creates a ListCustomMetricsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.ListCustomMetricsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.ListCustomMetricsRequest} ListCustomMetricsRequest + */ + ListCustomMetricsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.ListCustomMetricsRequest) + return object; + var message = new $root.google.analytics.admin.v1alpha.ListCustomMetricsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + return message; + }; + + /** + * Creates a plain object from a ListCustomMetricsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.ListCustomMetricsRequest + * @static + * @param {google.analytics.admin.v1alpha.ListCustomMetricsRequest} message ListCustomMetricsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListCustomMetricsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + return object; + }; + + /** + * Converts this ListCustomMetricsRequest to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.ListCustomMetricsRequest + * @instance + * @returns {Object.} JSON object + */ + ListCustomMetricsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListCustomMetricsRequest + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.ListCustomMetricsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListCustomMetricsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.ListCustomMetricsRequest"; + }; + + return ListCustomMetricsRequest; + })(); + + v1alpha.ListCustomMetricsResponse = (function() { + + /** + * Properties of a ListCustomMetricsResponse. + * @memberof google.analytics.admin.v1alpha + * @interface IListCustomMetricsResponse + * @property {Array.|null} [customMetrics] ListCustomMetricsResponse customMetrics + * @property {string|null} [nextPageToken] ListCustomMetricsResponse nextPageToken + */ + + /** + * Constructs a new ListCustomMetricsResponse. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents a ListCustomMetricsResponse. + * @implements IListCustomMetricsResponse + * @constructor + * @param {google.analytics.admin.v1alpha.IListCustomMetricsResponse=} [properties] Properties to set + */ + function ListCustomMetricsResponse(properties) { + this.customMetrics = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListCustomMetricsResponse customMetrics. + * @member {Array.} customMetrics + * @memberof google.analytics.admin.v1alpha.ListCustomMetricsResponse + * @instance + */ + ListCustomMetricsResponse.prototype.customMetrics = $util.emptyArray; + + /** + * ListCustomMetricsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.analytics.admin.v1alpha.ListCustomMetricsResponse + * @instance + */ + ListCustomMetricsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListCustomMetricsResponse instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.ListCustomMetricsResponse + * @static + * @param {google.analytics.admin.v1alpha.IListCustomMetricsResponse=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.ListCustomMetricsResponse} ListCustomMetricsResponse instance + */ + ListCustomMetricsResponse.create = function create(properties) { + return new ListCustomMetricsResponse(properties); + }; + + /** + * Encodes the specified ListCustomMetricsResponse message. Does not implicitly {@link google.analytics.admin.v1alpha.ListCustomMetricsResponse.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.ListCustomMetricsResponse + * @static + * @param {google.analytics.admin.v1alpha.IListCustomMetricsResponse} message ListCustomMetricsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListCustomMetricsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.customMetrics != null && message.customMetrics.length) + for (var i = 0; i < message.customMetrics.length; ++i) + $root.google.analytics.admin.v1alpha.CustomMetric.encode(message.customMetrics[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 ListCustomMetricsResponse message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.ListCustomMetricsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.ListCustomMetricsResponse + * @static + * @param {google.analytics.admin.v1alpha.IListCustomMetricsResponse} message ListCustomMetricsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListCustomMetricsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListCustomMetricsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.ListCustomMetricsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.ListCustomMetricsResponse} ListCustomMetricsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListCustomMetricsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.ListCustomMetricsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.customMetrics && message.customMetrics.length)) + message.customMetrics = []; + message.customMetrics.push($root.google.analytics.admin.v1alpha.CustomMetric.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListCustomMetricsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.ListCustomMetricsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.ListCustomMetricsResponse} ListCustomMetricsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListCustomMetricsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListCustomMetricsResponse message. + * @function verify + * @memberof google.analytics.admin.v1alpha.ListCustomMetricsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListCustomMetricsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.customMetrics != null && message.hasOwnProperty("customMetrics")) { + if (!Array.isArray(message.customMetrics)) + return "customMetrics: array expected"; + for (var i = 0; i < message.customMetrics.length; ++i) { + var error = $root.google.analytics.admin.v1alpha.CustomMetric.verify(message.customMetrics[i]); + if (error) + return "customMetrics." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListCustomMetricsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.ListCustomMetricsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.ListCustomMetricsResponse} ListCustomMetricsResponse + */ + ListCustomMetricsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.ListCustomMetricsResponse) + return object; + var message = new $root.google.analytics.admin.v1alpha.ListCustomMetricsResponse(); + if (object.customMetrics) { + if (!Array.isArray(object.customMetrics)) + throw TypeError(".google.analytics.admin.v1alpha.ListCustomMetricsResponse.customMetrics: array expected"); + message.customMetrics = []; + for (var i = 0; i < object.customMetrics.length; ++i) { + if (typeof object.customMetrics[i] !== "object") + throw TypeError(".google.analytics.admin.v1alpha.ListCustomMetricsResponse.customMetrics: object expected"); + message.customMetrics[i] = $root.google.analytics.admin.v1alpha.CustomMetric.fromObject(object.customMetrics[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListCustomMetricsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.ListCustomMetricsResponse + * @static + * @param {google.analytics.admin.v1alpha.ListCustomMetricsResponse} message ListCustomMetricsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListCustomMetricsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.customMetrics = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.customMetrics && message.customMetrics.length) { + object.customMetrics = []; + for (var j = 0; j < message.customMetrics.length; ++j) + object.customMetrics[j] = $root.google.analytics.admin.v1alpha.CustomMetric.toObject(message.customMetrics[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListCustomMetricsResponse to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.ListCustomMetricsResponse + * @instance + * @returns {Object.} JSON object + */ + ListCustomMetricsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListCustomMetricsResponse + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.ListCustomMetricsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListCustomMetricsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.ListCustomMetricsResponse"; + }; + + return ListCustomMetricsResponse; + })(); + + v1alpha.ArchiveCustomMetricRequest = (function() { + + /** + * Properties of an ArchiveCustomMetricRequest. + * @memberof google.analytics.admin.v1alpha + * @interface IArchiveCustomMetricRequest + * @property {string|null} [name] ArchiveCustomMetricRequest name + */ + + /** + * Constructs a new ArchiveCustomMetricRequest. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents an ArchiveCustomMetricRequest. + * @implements IArchiveCustomMetricRequest + * @constructor + * @param {google.analytics.admin.v1alpha.IArchiveCustomMetricRequest=} [properties] Properties to set + */ + function ArchiveCustomMetricRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ArchiveCustomMetricRequest name. + * @member {string} name + * @memberof google.analytics.admin.v1alpha.ArchiveCustomMetricRequest + * @instance + */ + ArchiveCustomMetricRequest.prototype.name = ""; + + /** + * Creates a new ArchiveCustomMetricRequest instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.ArchiveCustomMetricRequest + * @static + * @param {google.analytics.admin.v1alpha.IArchiveCustomMetricRequest=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.ArchiveCustomMetricRequest} ArchiveCustomMetricRequest instance + */ + ArchiveCustomMetricRequest.create = function create(properties) { + return new ArchiveCustomMetricRequest(properties); + }; + + /** + * Encodes the specified ArchiveCustomMetricRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.ArchiveCustomMetricRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.ArchiveCustomMetricRequest + * @static + * @param {google.analytics.admin.v1alpha.IArchiveCustomMetricRequest} message ArchiveCustomMetricRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ArchiveCustomMetricRequest.encode = function encode(message, writer) { + 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 ArchiveCustomMetricRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.ArchiveCustomMetricRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.ArchiveCustomMetricRequest + * @static + * @param {google.analytics.admin.v1alpha.IArchiveCustomMetricRequest} message ArchiveCustomMetricRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ArchiveCustomMetricRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ArchiveCustomMetricRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.ArchiveCustomMetricRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.ArchiveCustomMetricRequest} ArchiveCustomMetricRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ArchiveCustomMetricRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.ArchiveCustomMetricRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ArchiveCustomMetricRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.ArchiveCustomMetricRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.ArchiveCustomMetricRequest} ArchiveCustomMetricRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ArchiveCustomMetricRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ArchiveCustomMetricRequest message. + * @function verify + * @memberof google.analytics.admin.v1alpha.ArchiveCustomMetricRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ArchiveCustomMetricRequest.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 an ArchiveCustomMetricRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.ArchiveCustomMetricRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.ArchiveCustomMetricRequest} ArchiveCustomMetricRequest + */ + ArchiveCustomMetricRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.ArchiveCustomMetricRequest) + return object; + var message = new $root.google.analytics.admin.v1alpha.ArchiveCustomMetricRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from an ArchiveCustomMetricRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.ArchiveCustomMetricRequest + * @static + * @param {google.analytics.admin.v1alpha.ArchiveCustomMetricRequest} message ArchiveCustomMetricRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ArchiveCustomMetricRequest.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 ArchiveCustomMetricRequest to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.ArchiveCustomMetricRequest + * @instance + * @returns {Object.} JSON object + */ + ArchiveCustomMetricRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ArchiveCustomMetricRequest + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.ArchiveCustomMetricRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ArchiveCustomMetricRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.ArchiveCustomMetricRequest"; + }; + + return ArchiveCustomMetricRequest; + })(); + + v1alpha.GetCustomMetricRequest = (function() { + + /** + * Properties of a GetCustomMetricRequest. + * @memberof google.analytics.admin.v1alpha + * @interface IGetCustomMetricRequest + * @property {string|null} [name] GetCustomMetricRequest name + */ + + /** + * Constructs a new GetCustomMetricRequest. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents a GetCustomMetricRequest. + * @implements IGetCustomMetricRequest + * @constructor + * @param {google.analytics.admin.v1alpha.IGetCustomMetricRequest=} [properties] Properties to set + */ + function GetCustomMetricRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetCustomMetricRequest name. + * @member {string} name + * @memberof google.analytics.admin.v1alpha.GetCustomMetricRequest + * @instance + */ + GetCustomMetricRequest.prototype.name = ""; + + /** + * Creates a new GetCustomMetricRequest instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.GetCustomMetricRequest + * @static + * @param {google.analytics.admin.v1alpha.IGetCustomMetricRequest=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.GetCustomMetricRequest} GetCustomMetricRequest instance + */ + GetCustomMetricRequest.create = function create(properties) { + return new GetCustomMetricRequest(properties); + }; + + /** + * Encodes the specified GetCustomMetricRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.GetCustomMetricRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.GetCustomMetricRequest + * @static + * @param {google.analytics.admin.v1alpha.IGetCustomMetricRequest} message GetCustomMetricRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetCustomMetricRequest.encode = function encode(message, writer) { + 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 GetCustomMetricRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.GetCustomMetricRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.GetCustomMetricRequest + * @static + * @param {google.analytics.admin.v1alpha.IGetCustomMetricRequest} message GetCustomMetricRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetCustomMetricRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetCustomMetricRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.GetCustomMetricRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.GetCustomMetricRequest} GetCustomMetricRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetCustomMetricRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.GetCustomMetricRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetCustomMetricRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.GetCustomMetricRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.GetCustomMetricRequest} GetCustomMetricRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetCustomMetricRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetCustomMetricRequest message. + * @function verify + * @memberof google.analytics.admin.v1alpha.GetCustomMetricRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetCustomMetricRequest.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 GetCustomMetricRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.GetCustomMetricRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.GetCustomMetricRequest} GetCustomMetricRequest + */ + GetCustomMetricRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.GetCustomMetricRequest) + return object; + var message = new $root.google.analytics.admin.v1alpha.GetCustomMetricRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetCustomMetricRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.GetCustomMetricRequest + * @static + * @param {google.analytics.admin.v1alpha.GetCustomMetricRequest} message GetCustomMetricRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetCustomMetricRequest.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 GetCustomMetricRequest to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.GetCustomMetricRequest + * @instance + * @returns {Object.} JSON object + */ + GetCustomMetricRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetCustomMetricRequest + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.GetCustomMetricRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetCustomMetricRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.GetCustomMetricRequest"; + }; + + return GetCustomMetricRequest; + })(); + + v1alpha.GetDataRetentionSettingsRequest = (function() { + + /** + * Properties of a GetDataRetentionSettingsRequest. + * @memberof google.analytics.admin.v1alpha + * @interface IGetDataRetentionSettingsRequest + * @property {string|null} [name] GetDataRetentionSettingsRequest name + */ + + /** + * Constructs a new GetDataRetentionSettingsRequest. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents a GetDataRetentionSettingsRequest. + * @implements IGetDataRetentionSettingsRequest + * @constructor + * @param {google.analytics.admin.v1alpha.IGetDataRetentionSettingsRequest=} [properties] Properties to set + */ + function GetDataRetentionSettingsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetDataRetentionSettingsRequest name. + * @member {string} name + * @memberof google.analytics.admin.v1alpha.GetDataRetentionSettingsRequest + * @instance + */ + GetDataRetentionSettingsRequest.prototype.name = ""; + + /** + * Creates a new GetDataRetentionSettingsRequest instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.GetDataRetentionSettingsRequest + * @static + * @param {google.analytics.admin.v1alpha.IGetDataRetentionSettingsRequest=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.GetDataRetentionSettingsRequest} GetDataRetentionSettingsRequest instance + */ + GetDataRetentionSettingsRequest.create = function create(properties) { + return new GetDataRetentionSettingsRequest(properties); + }; + + /** + * Encodes the specified GetDataRetentionSettingsRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.GetDataRetentionSettingsRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.GetDataRetentionSettingsRequest + * @static + * @param {google.analytics.admin.v1alpha.IGetDataRetentionSettingsRequest} message GetDataRetentionSettingsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetDataRetentionSettingsRequest.encode = function encode(message, writer) { + 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 GetDataRetentionSettingsRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.GetDataRetentionSettingsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.GetDataRetentionSettingsRequest + * @static + * @param {google.analytics.admin.v1alpha.IGetDataRetentionSettingsRequest} message GetDataRetentionSettingsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetDataRetentionSettingsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetDataRetentionSettingsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.GetDataRetentionSettingsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.GetDataRetentionSettingsRequest} GetDataRetentionSettingsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetDataRetentionSettingsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.GetDataRetentionSettingsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetDataRetentionSettingsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.GetDataRetentionSettingsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.GetDataRetentionSettingsRequest} GetDataRetentionSettingsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetDataRetentionSettingsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetDataRetentionSettingsRequest message. + * @function verify + * @memberof google.analytics.admin.v1alpha.GetDataRetentionSettingsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetDataRetentionSettingsRequest.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 GetDataRetentionSettingsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.GetDataRetentionSettingsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.GetDataRetentionSettingsRequest} GetDataRetentionSettingsRequest + */ + GetDataRetentionSettingsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.GetDataRetentionSettingsRequest) + return object; + var message = new $root.google.analytics.admin.v1alpha.GetDataRetentionSettingsRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetDataRetentionSettingsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.GetDataRetentionSettingsRequest + * @static + * @param {google.analytics.admin.v1alpha.GetDataRetentionSettingsRequest} message GetDataRetentionSettingsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetDataRetentionSettingsRequest.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 GetDataRetentionSettingsRequest to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.GetDataRetentionSettingsRequest + * @instance + * @returns {Object.} JSON object + */ + GetDataRetentionSettingsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetDataRetentionSettingsRequest + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.GetDataRetentionSettingsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetDataRetentionSettingsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.GetDataRetentionSettingsRequest"; + }; + + return GetDataRetentionSettingsRequest; + })(); + + v1alpha.UpdateDataRetentionSettingsRequest = (function() { + + /** + * Properties of an UpdateDataRetentionSettingsRequest. + * @memberof google.analytics.admin.v1alpha + * @interface IUpdateDataRetentionSettingsRequest + * @property {google.analytics.admin.v1alpha.IDataRetentionSettings|null} [dataRetentionSettings] UpdateDataRetentionSettingsRequest dataRetentionSettings + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateDataRetentionSettingsRequest updateMask + */ + + /** + * Constructs a new UpdateDataRetentionSettingsRequest. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents an UpdateDataRetentionSettingsRequest. + * @implements IUpdateDataRetentionSettingsRequest + * @constructor + * @param {google.analytics.admin.v1alpha.IUpdateDataRetentionSettingsRequest=} [properties] Properties to set + */ + function UpdateDataRetentionSettingsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateDataRetentionSettingsRequest dataRetentionSettings. + * @member {google.analytics.admin.v1alpha.IDataRetentionSettings|null|undefined} dataRetentionSettings + * @memberof google.analytics.admin.v1alpha.UpdateDataRetentionSettingsRequest + * @instance + */ + UpdateDataRetentionSettingsRequest.prototype.dataRetentionSettings = null; + + /** + * UpdateDataRetentionSettingsRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.analytics.admin.v1alpha.UpdateDataRetentionSettingsRequest + * @instance + */ + UpdateDataRetentionSettingsRequest.prototype.updateMask = null; + + /** + * Creates a new UpdateDataRetentionSettingsRequest instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.UpdateDataRetentionSettingsRequest + * @static + * @param {google.analytics.admin.v1alpha.IUpdateDataRetentionSettingsRequest=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.UpdateDataRetentionSettingsRequest} UpdateDataRetentionSettingsRequest instance + */ + UpdateDataRetentionSettingsRequest.create = function create(properties) { + return new UpdateDataRetentionSettingsRequest(properties); + }; + + /** + * Encodes the specified UpdateDataRetentionSettingsRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.UpdateDataRetentionSettingsRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.UpdateDataRetentionSettingsRequest + * @static + * @param {google.analytics.admin.v1alpha.IUpdateDataRetentionSettingsRequest} message UpdateDataRetentionSettingsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateDataRetentionSettingsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dataRetentionSettings != null && Object.hasOwnProperty.call(message, "dataRetentionSettings")) + $root.google.analytics.admin.v1alpha.DataRetentionSettings.encode(message.dataRetentionSettings, 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 UpdateDataRetentionSettingsRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.UpdateDataRetentionSettingsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.UpdateDataRetentionSettingsRequest + * @static + * @param {google.analytics.admin.v1alpha.IUpdateDataRetentionSettingsRequest} message UpdateDataRetentionSettingsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateDataRetentionSettingsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateDataRetentionSettingsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.UpdateDataRetentionSettingsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.UpdateDataRetentionSettingsRequest} UpdateDataRetentionSettingsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateDataRetentionSettingsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.UpdateDataRetentionSettingsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.dataRetentionSettings = $root.google.analytics.admin.v1alpha.DataRetentionSettings.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 UpdateDataRetentionSettingsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.UpdateDataRetentionSettingsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.UpdateDataRetentionSettingsRequest} UpdateDataRetentionSettingsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateDataRetentionSettingsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateDataRetentionSettingsRequest message. + * @function verify + * @memberof google.analytics.admin.v1alpha.UpdateDataRetentionSettingsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateDataRetentionSettingsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dataRetentionSettings != null && message.hasOwnProperty("dataRetentionSettings")) { + var error = $root.google.analytics.admin.v1alpha.DataRetentionSettings.verify(message.dataRetentionSettings); + if (error) + return "dataRetentionSettings." + 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 UpdateDataRetentionSettingsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.UpdateDataRetentionSettingsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.UpdateDataRetentionSettingsRequest} UpdateDataRetentionSettingsRequest + */ + UpdateDataRetentionSettingsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.UpdateDataRetentionSettingsRequest) + return object; + var message = new $root.google.analytics.admin.v1alpha.UpdateDataRetentionSettingsRequest(); + if (object.dataRetentionSettings != null) { + if (typeof object.dataRetentionSettings !== "object") + throw TypeError(".google.analytics.admin.v1alpha.UpdateDataRetentionSettingsRequest.dataRetentionSettings: object expected"); + message.dataRetentionSettings = $root.google.analytics.admin.v1alpha.DataRetentionSettings.fromObject(object.dataRetentionSettings); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.analytics.admin.v1alpha.UpdateDataRetentionSettingsRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + return message; + }; + + /** + * Creates a plain object from an UpdateDataRetentionSettingsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.UpdateDataRetentionSettingsRequest + * @static + * @param {google.analytics.admin.v1alpha.UpdateDataRetentionSettingsRequest} message UpdateDataRetentionSettingsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateDataRetentionSettingsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.dataRetentionSettings = null; + object.updateMask = null; + } + if (message.dataRetentionSettings != null && message.hasOwnProperty("dataRetentionSettings")) + object.dataRetentionSettings = $root.google.analytics.admin.v1alpha.DataRetentionSettings.toObject(message.dataRetentionSettings, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + return object; + }; + + /** + * Converts this UpdateDataRetentionSettingsRequest to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.UpdateDataRetentionSettingsRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateDataRetentionSettingsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateDataRetentionSettingsRequest + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.UpdateDataRetentionSettingsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateDataRetentionSettingsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.UpdateDataRetentionSettingsRequest"; + }; + + return UpdateDataRetentionSettingsRequest; + })(); + + v1alpha.CreateDataStreamRequest = (function() { + + /** + * Properties of a CreateDataStreamRequest. + * @memberof google.analytics.admin.v1alpha + * @interface ICreateDataStreamRequest + * @property {string|null} [parent] CreateDataStreamRequest parent + * @property {google.analytics.admin.v1alpha.IDataStream|null} [dataStream] CreateDataStreamRequest dataStream + */ + + /** + * Constructs a new CreateDataStreamRequest. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents a CreateDataStreamRequest. + * @implements ICreateDataStreamRequest + * @constructor + * @param {google.analytics.admin.v1alpha.ICreateDataStreamRequest=} [properties] Properties to set + */ + function CreateDataStreamRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateDataStreamRequest parent. + * @member {string} parent + * @memberof google.analytics.admin.v1alpha.CreateDataStreamRequest + * @instance + */ + CreateDataStreamRequest.prototype.parent = ""; + + /** + * CreateDataStreamRequest dataStream. + * @member {google.analytics.admin.v1alpha.IDataStream|null|undefined} dataStream + * @memberof google.analytics.admin.v1alpha.CreateDataStreamRequest + * @instance + */ + CreateDataStreamRequest.prototype.dataStream = null; + + /** + * Creates a new CreateDataStreamRequest instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.CreateDataStreamRequest + * @static + * @param {google.analytics.admin.v1alpha.ICreateDataStreamRequest=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.CreateDataStreamRequest} CreateDataStreamRequest instance + */ + CreateDataStreamRequest.create = function create(properties) { + return new CreateDataStreamRequest(properties); + }; + + /** + * Encodes the specified CreateDataStreamRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.CreateDataStreamRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.CreateDataStreamRequest + * @static + * @param {google.analytics.admin.v1alpha.ICreateDataStreamRequest} message CreateDataStreamRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateDataStreamRequest.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.dataStream != null && Object.hasOwnProperty.call(message, "dataStream")) + $root.google.analytics.admin.v1alpha.DataStream.encode(message.dataStream, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CreateDataStreamRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.CreateDataStreamRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.CreateDataStreamRequest + * @static + * @param {google.analytics.admin.v1alpha.ICreateDataStreamRequest} message CreateDataStreamRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateDataStreamRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateDataStreamRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.CreateDataStreamRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.CreateDataStreamRequest} CreateDataStreamRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateDataStreamRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.CreateDataStreamRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.dataStream = $root.google.analytics.admin.v1alpha.DataStream.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateDataStreamRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.CreateDataStreamRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.CreateDataStreamRequest} CreateDataStreamRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateDataStreamRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateDataStreamRequest message. + * @function verify + * @memberof google.analytics.admin.v1alpha.CreateDataStreamRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateDataStreamRequest.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.dataStream != null && message.hasOwnProperty("dataStream")) { + var error = $root.google.analytics.admin.v1alpha.DataStream.verify(message.dataStream); + if (error) + return "dataStream." + error; + } + return null; + }; + + /** + * Creates a CreateDataStreamRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.CreateDataStreamRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.CreateDataStreamRequest} CreateDataStreamRequest + */ + CreateDataStreamRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.CreateDataStreamRequest) + return object; + var message = new $root.google.analytics.admin.v1alpha.CreateDataStreamRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.dataStream != null) { + if (typeof object.dataStream !== "object") + throw TypeError(".google.analytics.admin.v1alpha.CreateDataStreamRequest.dataStream: object expected"); + message.dataStream = $root.google.analytics.admin.v1alpha.DataStream.fromObject(object.dataStream); + } + return message; + }; + + /** + * Creates a plain object from a CreateDataStreamRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.CreateDataStreamRequest + * @static + * @param {google.analytics.admin.v1alpha.CreateDataStreamRequest} message CreateDataStreamRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateDataStreamRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.dataStream = null; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.dataStream != null && message.hasOwnProperty("dataStream")) + object.dataStream = $root.google.analytics.admin.v1alpha.DataStream.toObject(message.dataStream, options); + return object; + }; + + /** + * Converts this CreateDataStreamRequest to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.CreateDataStreamRequest + * @instance + * @returns {Object.} JSON object + */ + CreateDataStreamRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateDataStreamRequest + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.CreateDataStreamRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateDataStreamRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.CreateDataStreamRequest"; + }; + + return CreateDataStreamRequest; + })(); + + v1alpha.DeleteDataStreamRequest = (function() { + + /** + * Properties of a DeleteDataStreamRequest. + * @memberof google.analytics.admin.v1alpha + * @interface IDeleteDataStreamRequest + * @property {string|null} [name] DeleteDataStreamRequest name + */ + + /** + * Constructs a new DeleteDataStreamRequest. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents a DeleteDataStreamRequest. + * @implements IDeleteDataStreamRequest + * @constructor + * @param {google.analytics.admin.v1alpha.IDeleteDataStreamRequest=} [properties] Properties to set + */ + function DeleteDataStreamRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteDataStreamRequest name. + * @member {string} name + * @memberof google.analytics.admin.v1alpha.DeleteDataStreamRequest + * @instance + */ + DeleteDataStreamRequest.prototype.name = ""; + + /** + * Creates a new DeleteDataStreamRequest instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.DeleteDataStreamRequest + * @static + * @param {google.analytics.admin.v1alpha.IDeleteDataStreamRequest=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.DeleteDataStreamRequest} DeleteDataStreamRequest instance + */ + DeleteDataStreamRequest.create = function create(properties) { + return new DeleteDataStreamRequest(properties); + }; + + /** + * Encodes the specified DeleteDataStreamRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.DeleteDataStreamRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.DeleteDataStreamRequest + * @static + * @param {google.analytics.admin.v1alpha.IDeleteDataStreamRequest} message DeleteDataStreamRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteDataStreamRequest.encode = function encode(message, writer) { + 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 DeleteDataStreamRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.DeleteDataStreamRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.DeleteDataStreamRequest + * @static + * @param {google.analytics.admin.v1alpha.IDeleteDataStreamRequest} message DeleteDataStreamRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteDataStreamRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteDataStreamRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.DeleteDataStreamRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.DeleteDataStreamRequest} DeleteDataStreamRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteDataStreamRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.DeleteDataStreamRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteDataStreamRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.DeleteDataStreamRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.DeleteDataStreamRequest} DeleteDataStreamRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteDataStreamRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteDataStreamRequest message. + * @function verify + * @memberof google.analytics.admin.v1alpha.DeleteDataStreamRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteDataStreamRequest.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 DeleteDataStreamRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.DeleteDataStreamRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.DeleteDataStreamRequest} DeleteDataStreamRequest + */ + DeleteDataStreamRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.DeleteDataStreamRequest) + return object; + var message = new $root.google.analytics.admin.v1alpha.DeleteDataStreamRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteDataStreamRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.DeleteDataStreamRequest + * @static + * @param {google.analytics.admin.v1alpha.DeleteDataStreamRequest} message DeleteDataStreamRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteDataStreamRequest.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 DeleteDataStreamRequest to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.DeleteDataStreamRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteDataStreamRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteDataStreamRequest + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.DeleteDataStreamRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteDataStreamRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.DeleteDataStreamRequest"; + }; + + return DeleteDataStreamRequest; + })(); + + v1alpha.UpdateDataStreamRequest = (function() { + + /** + * Properties of an UpdateDataStreamRequest. + * @memberof google.analytics.admin.v1alpha + * @interface IUpdateDataStreamRequest + * @property {google.analytics.admin.v1alpha.IDataStream|null} [dataStream] UpdateDataStreamRequest dataStream + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateDataStreamRequest updateMask + */ + + /** + * Constructs a new UpdateDataStreamRequest. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents an UpdateDataStreamRequest. + * @implements IUpdateDataStreamRequest + * @constructor + * @param {google.analytics.admin.v1alpha.IUpdateDataStreamRequest=} [properties] Properties to set + */ + function UpdateDataStreamRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateDataStreamRequest dataStream. + * @member {google.analytics.admin.v1alpha.IDataStream|null|undefined} dataStream + * @memberof google.analytics.admin.v1alpha.UpdateDataStreamRequest + * @instance + */ + UpdateDataStreamRequest.prototype.dataStream = null; + + /** + * UpdateDataStreamRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.analytics.admin.v1alpha.UpdateDataStreamRequest + * @instance + */ + UpdateDataStreamRequest.prototype.updateMask = null; + + /** + * Creates a new UpdateDataStreamRequest instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.UpdateDataStreamRequest + * @static + * @param {google.analytics.admin.v1alpha.IUpdateDataStreamRequest=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.UpdateDataStreamRequest} UpdateDataStreamRequest instance + */ + UpdateDataStreamRequest.create = function create(properties) { + return new UpdateDataStreamRequest(properties); + }; + + /** + * Encodes the specified UpdateDataStreamRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.UpdateDataStreamRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.UpdateDataStreamRequest + * @static + * @param {google.analytics.admin.v1alpha.IUpdateDataStreamRequest} message UpdateDataStreamRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateDataStreamRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dataStream != null && Object.hasOwnProperty.call(message, "dataStream")) + $root.google.analytics.admin.v1alpha.DataStream.encode(message.dataStream, 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 UpdateDataStreamRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.UpdateDataStreamRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.UpdateDataStreamRequest + * @static + * @param {google.analytics.admin.v1alpha.IUpdateDataStreamRequest} message UpdateDataStreamRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateDataStreamRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateDataStreamRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.UpdateDataStreamRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.UpdateDataStreamRequest} UpdateDataStreamRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateDataStreamRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.UpdateDataStreamRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.dataStream = $root.google.analytics.admin.v1alpha.DataStream.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 UpdateDataStreamRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.UpdateDataStreamRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.UpdateDataStreamRequest} UpdateDataStreamRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateDataStreamRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateDataStreamRequest message. + * @function verify + * @memberof google.analytics.admin.v1alpha.UpdateDataStreamRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateDataStreamRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dataStream != null && message.hasOwnProperty("dataStream")) { + var error = $root.google.analytics.admin.v1alpha.DataStream.verify(message.dataStream); + if (error) + return "dataStream." + 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 UpdateDataStreamRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.UpdateDataStreamRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.UpdateDataStreamRequest} UpdateDataStreamRequest + */ + UpdateDataStreamRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.UpdateDataStreamRequest) + return object; + var message = new $root.google.analytics.admin.v1alpha.UpdateDataStreamRequest(); + if (object.dataStream != null) { + if (typeof object.dataStream !== "object") + throw TypeError(".google.analytics.admin.v1alpha.UpdateDataStreamRequest.dataStream: object expected"); + message.dataStream = $root.google.analytics.admin.v1alpha.DataStream.fromObject(object.dataStream); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.analytics.admin.v1alpha.UpdateDataStreamRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + return message; + }; + + /** + * Creates a plain object from an UpdateDataStreamRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.UpdateDataStreamRequest + * @static + * @param {google.analytics.admin.v1alpha.UpdateDataStreamRequest} message UpdateDataStreamRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateDataStreamRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.dataStream = null; + object.updateMask = null; + } + if (message.dataStream != null && message.hasOwnProperty("dataStream")) + object.dataStream = $root.google.analytics.admin.v1alpha.DataStream.toObject(message.dataStream, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + return object; + }; + + /** + * Converts this UpdateDataStreamRequest to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.UpdateDataStreamRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateDataStreamRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateDataStreamRequest + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.UpdateDataStreamRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateDataStreamRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.UpdateDataStreamRequest"; + }; + + return UpdateDataStreamRequest; + })(); + + v1alpha.ListDataStreamsRequest = (function() { + + /** + * Properties of a ListDataStreamsRequest. + * @memberof google.analytics.admin.v1alpha + * @interface IListDataStreamsRequest + * @property {string|null} [parent] ListDataStreamsRequest parent + * @property {number|null} [pageSize] ListDataStreamsRequest pageSize + * @property {string|null} [pageToken] ListDataStreamsRequest pageToken + */ + + /** + * Constructs a new ListDataStreamsRequest. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents a ListDataStreamsRequest. + * @implements IListDataStreamsRequest + * @constructor + * @param {google.analytics.admin.v1alpha.IListDataStreamsRequest=} [properties] Properties to set + */ + function ListDataStreamsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListDataStreamsRequest parent. + * @member {string} parent + * @memberof google.analytics.admin.v1alpha.ListDataStreamsRequest + * @instance + */ + ListDataStreamsRequest.prototype.parent = ""; + + /** + * ListDataStreamsRequest pageSize. + * @member {number} pageSize + * @memberof google.analytics.admin.v1alpha.ListDataStreamsRequest + * @instance + */ + ListDataStreamsRequest.prototype.pageSize = 0; + + /** + * ListDataStreamsRequest pageToken. + * @member {string} pageToken + * @memberof google.analytics.admin.v1alpha.ListDataStreamsRequest + * @instance + */ + ListDataStreamsRequest.prototype.pageToken = ""; + + /** + * Creates a new ListDataStreamsRequest instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.ListDataStreamsRequest + * @static + * @param {google.analytics.admin.v1alpha.IListDataStreamsRequest=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.ListDataStreamsRequest} ListDataStreamsRequest instance + */ + ListDataStreamsRequest.create = function create(properties) { + return new ListDataStreamsRequest(properties); + }; + + /** + * Encodes the specified ListDataStreamsRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.ListDataStreamsRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.ListDataStreamsRequest + * @static + * @param {google.analytics.admin.v1alpha.IListDataStreamsRequest} message ListDataStreamsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListDataStreamsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + return writer; + }; + + /** + * Encodes the specified ListDataStreamsRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.ListDataStreamsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.ListDataStreamsRequest + * @static + * @param {google.analytics.admin.v1alpha.IListDataStreamsRequest} message ListDataStreamsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListDataStreamsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListDataStreamsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.ListDataStreamsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.ListDataStreamsRequest} ListDataStreamsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListDataStreamsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.ListDataStreamsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListDataStreamsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.ListDataStreamsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.ListDataStreamsRequest} ListDataStreamsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListDataStreamsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListDataStreamsRequest message. + * @function verify + * @memberof google.analytics.admin.v1alpha.ListDataStreamsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListDataStreamsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + return null; + }; + + /** + * Creates a ListDataStreamsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.ListDataStreamsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.ListDataStreamsRequest} ListDataStreamsRequest + */ + ListDataStreamsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.ListDataStreamsRequest) + return object; + var message = new $root.google.analytics.admin.v1alpha.ListDataStreamsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + return message; + }; + + /** + * Creates a plain object from a ListDataStreamsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.ListDataStreamsRequest + * @static + * @param {google.analytics.admin.v1alpha.ListDataStreamsRequest} message ListDataStreamsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListDataStreamsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + return object; + }; + + /** + * Converts this ListDataStreamsRequest to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.ListDataStreamsRequest + * @instance + * @returns {Object.} JSON object + */ + ListDataStreamsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListDataStreamsRequest + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.ListDataStreamsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListDataStreamsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.ListDataStreamsRequest"; + }; + + return ListDataStreamsRequest; + })(); + + v1alpha.ListDataStreamsResponse = (function() { + + /** + * Properties of a ListDataStreamsResponse. + * @memberof google.analytics.admin.v1alpha + * @interface IListDataStreamsResponse + * @property {Array.|null} [dataStreams] ListDataStreamsResponse dataStreams + * @property {string|null} [nextPageToken] ListDataStreamsResponse nextPageToken + */ + + /** + * Constructs a new ListDataStreamsResponse. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents a ListDataStreamsResponse. + * @implements IListDataStreamsResponse + * @constructor + * @param {google.analytics.admin.v1alpha.IListDataStreamsResponse=} [properties] Properties to set + */ + function ListDataStreamsResponse(properties) { + this.dataStreams = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListDataStreamsResponse dataStreams. + * @member {Array.} dataStreams + * @memberof google.analytics.admin.v1alpha.ListDataStreamsResponse + * @instance + */ + ListDataStreamsResponse.prototype.dataStreams = $util.emptyArray; + + /** + * ListDataStreamsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.analytics.admin.v1alpha.ListDataStreamsResponse + * @instance + */ + ListDataStreamsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListDataStreamsResponse instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.ListDataStreamsResponse + * @static + * @param {google.analytics.admin.v1alpha.IListDataStreamsResponse=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.ListDataStreamsResponse} ListDataStreamsResponse instance + */ + ListDataStreamsResponse.create = function create(properties) { + return new ListDataStreamsResponse(properties); + }; + + /** + * Encodes the specified ListDataStreamsResponse message. Does not implicitly {@link google.analytics.admin.v1alpha.ListDataStreamsResponse.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.ListDataStreamsResponse + * @static + * @param {google.analytics.admin.v1alpha.IListDataStreamsResponse} message ListDataStreamsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListDataStreamsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dataStreams != null && message.dataStreams.length) + for (var i = 0; i < message.dataStreams.length; ++i) + $root.google.analytics.admin.v1alpha.DataStream.encode(message.dataStreams[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 ListDataStreamsResponse message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.ListDataStreamsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.ListDataStreamsResponse + * @static + * @param {google.analytics.admin.v1alpha.IListDataStreamsResponse} message ListDataStreamsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListDataStreamsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListDataStreamsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.ListDataStreamsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.ListDataStreamsResponse} ListDataStreamsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListDataStreamsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.ListDataStreamsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.dataStreams && message.dataStreams.length)) + message.dataStreams = []; + message.dataStreams.push($root.google.analytics.admin.v1alpha.DataStream.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListDataStreamsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.ListDataStreamsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.ListDataStreamsResponse} ListDataStreamsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListDataStreamsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListDataStreamsResponse message. + * @function verify + * @memberof google.analytics.admin.v1alpha.ListDataStreamsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListDataStreamsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dataStreams != null && message.hasOwnProperty("dataStreams")) { + if (!Array.isArray(message.dataStreams)) + return "dataStreams: array expected"; + for (var i = 0; i < message.dataStreams.length; ++i) { + var error = $root.google.analytics.admin.v1alpha.DataStream.verify(message.dataStreams[i]); + if (error) + return "dataStreams." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListDataStreamsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.ListDataStreamsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.ListDataStreamsResponse} ListDataStreamsResponse + */ + ListDataStreamsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.ListDataStreamsResponse) + return object; + var message = new $root.google.analytics.admin.v1alpha.ListDataStreamsResponse(); + if (object.dataStreams) { + if (!Array.isArray(object.dataStreams)) + throw TypeError(".google.analytics.admin.v1alpha.ListDataStreamsResponse.dataStreams: array expected"); + message.dataStreams = []; + for (var i = 0; i < object.dataStreams.length; ++i) { + if (typeof object.dataStreams[i] !== "object") + throw TypeError(".google.analytics.admin.v1alpha.ListDataStreamsResponse.dataStreams: object expected"); + message.dataStreams[i] = $root.google.analytics.admin.v1alpha.DataStream.fromObject(object.dataStreams[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListDataStreamsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.ListDataStreamsResponse + * @static + * @param {google.analytics.admin.v1alpha.ListDataStreamsResponse} message ListDataStreamsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListDataStreamsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.dataStreams = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.dataStreams && message.dataStreams.length) { + object.dataStreams = []; + for (var j = 0; j < message.dataStreams.length; ++j) + object.dataStreams[j] = $root.google.analytics.admin.v1alpha.DataStream.toObject(message.dataStreams[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListDataStreamsResponse to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.ListDataStreamsResponse + * @instance + * @returns {Object.} JSON object + */ + ListDataStreamsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListDataStreamsResponse + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.ListDataStreamsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListDataStreamsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.ListDataStreamsResponse"; + }; + + return ListDataStreamsResponse; + })(); + + v1alpha.GetDataStreamRequest = (function() { + + /** + * Properties of a GetDataStreamRequest. + * @memberof google.analytics.admin.v1alpha + * @interface IGetDataStreamRequest + * @property {string|null} [name] GetDataStreamRequest name + */ + + /** + * Constructs a new GetDataStreamRequest. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents a GetDataStreamRequest. + * @implements IGetDataStreamRequest + * @constructor + * @param {google.analytics.admin.v1alpha.IGetDataStreamRequest=} [properties] Properties to set + */ + function GetDataStreamRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetDataStreamRequest name. + * @member {string} name + * @memberof google.analytics.admin.v1alpha.GetDataStreamRequest + * @instance + */ + GetDataStreamRequest.prototype.name = ""; + + /** + * Creates a new GetDataStreamRequest instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.GetDataStreamRequest + * @static + * @param {google.analytics.admin.v1alpha.IGetDataStreamRequest=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.GetDataStreamRequest} GetDataStreamRequest instance + */ + GetDataStreamRequest.create = function create(properties) { + return new GetDataStreamRequest(properties); + }; + + /** + * Encodes the specified GetDataStreamRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.GetDataStreamRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.GetDataStreamRequest + * @static + * @param {google.analytics.admin.v1alpha.IGetDataStreamRequest} message GetDataStreamRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetDataStreamRequest.encode = function encode(message, writer) { + 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 GetDataStreamRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.GetDataStreamRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.GetDataStreamRequest + * @static + * @param {google.analytics.admin.v1alpha.IGetDataStreamRequest} message GetDataStreamRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetDataStreamRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetDataStreamRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.GetDataStreamRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.GetDataStreamRequest} GetDataStreamRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetDataStreamRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.GetDataStreamRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetDataStreamRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.GetDataStreamRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.GetDataStreamRequest} GetDataStreamRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetDataStreamRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetDataStreamRequest message. + * @function verify + * @memberof google.analytics.admin.v1alpha.GetDataStreamRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetDataStreamRequest.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 GetDataStreamRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.GetDataStreamRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.GetDataStreamRequest} GetDataStreamRequest + */ + GetDataStreamRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.GetDataStreamRequest) + return object; + var message = new $root.google.analytics.admin.v1alpha.GetDataStreamRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetDataStreamRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.GetDataStreamRequest + * @static + * @param {google.analytics.admin.v1alpha.GetDataStreamRequest} message GetDataStreamRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetDataStreamRequest.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 GetDataStreamRequest to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.GetDataStreamRequest + * @instance + * @returns {Object.} JSON object + */ + GetDataStreamRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetDataStreamRequest + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.GetDataStreamRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetDataStreamRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.GetDataStreamRequest"; + }; + + return GetDataStreamRequest; + })(); + + v1alpha.GetAudienceRequest = (function() { + + /** + * Properties of a GetAudienceRequest. + * @memberof google.analytics.admin.v1alpha + * @interface IGetAudienceRequest + * @property {string|null} [name] GetAudienceRequest name + */ + + /** + * Constructs a new GetAudienceRequest. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents a GetAudienceRequest. + * @implements IGetAudienceRequest + * @constructor + * @param {google.analytics.admin.v1alpha.IGetAudienceRequest=} [properties] Properties to set + */ + function GetAudienceRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetAudienceRequest name. + * @member {string} name + * @memberof google.analytics.admin.v1alpha.GetAudienceRequest + * @instance + */ + GetAudienceRequest.prototype.name = ""; + + /** + * Creates a new GetAudienceRequest instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.GetAudienceRequest + * @static + * @param {google.analytics.admin.v1alpha.IGetAudienceRequest=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.GetAudienceRequest} GetAudienceRequest instance + */ + GetAudienceRequest.create = function create(properties) { + return new GetAudienceRequest(properties); + }; + + /** + * Encodes the specified GetAudienceRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.GetAudienceRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.GetAudienceRequest + * @static + * @param {google.analytics.admin.v1alpha.IGetAudienceRequest} message GetAudienceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetAudienceRequest.encode = function encode(message, writer) { + 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 GetAudienceRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.GetAudienceRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.GetAudienceRequest + * @static + * @param {google.analytics.admin.v1alpha.IGetAudienceRequest} message GetAudienceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetAudienceRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetAudienceRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.GetAudienceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.GetAudienceRequest} GetAudienceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetAudienceRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.GetAudienceRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetAudienceRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.GetAudienceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.GetAudienceRequest} GetAudienceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetAudienceRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetAudienceRequest message. + * @function verify + * @memberof google.analytics.admin.v1alpha.GetAudienceRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetAudienceRequest.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 GetAudienceRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.GetAudienceRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.GetAudienceRequest} GetAudienceRequest + */ + GetAudienceRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.GetAudienceRequest) + return object; + var message = new $root.google.analytics.admin.v1alpha.GetAudienceRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetAudienceRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.GetAudienceRequest + * @static + * @param {google.analytics.admin.v1alpha.GetAudienceRequest} message GetAudienceRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetAudienceRequest.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 GetAudienceRequest to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.GetAudienceRequest + * @instance + * @returns {Object.} JSON object + */ + GetAudienceRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetAudienceRequest + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.GetAudienceRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetAudienceRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.GetAudienceRequest"; + }; + + return GetAudienceRequest; + })(); + + v1alpha.ListAudiencesRequest = (function() { + + /** + * Properties of a ListAudiencesRequest. + * @memberof google.analytics.admin.v1alpha + * @interface IListAudiencesRequest + * @property {string|null} [parent] ListAudiencesRequest parent + * @property {number|null} [pageSize] ListAudiencesRequest pageSize + * @property {string|null} [pageToken] ListAudiencesRequest pageToken + */ + + /** + * Constructs a new ListAudiencesRequest. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents a ListAudiencesRequest. + * @implements IListAudiencesRequest + * @constructor + * @param {google.analytics.admin.v1alpha.IListAudiencesRequest=} [properties] Properties to set + */ + function ListAudiencesRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListAudiencesRequest parent. + * @member {string} parent + * @memberof google.analytics.admin.v1alpha.ListAudiencesRequest + * @instance + */ + ListAudiencesRequest.prototype.parent = ""; + + /** + * ListAudiencesRequest pageSize. + * @member {number} pageSize + * @memberof google.analytics.admin.v1alpha.ListAudiencesRequest + * @instance + */ + ListAudiencesRequest.prototype.pageSize = 0; + + /** + * ListAudiencesRequest pageToken. + * @member {string} pageToken + * @memberof google.analytics.admin.v1alpha.ListAudiencesRequest + * @instance + */ + ListAudiencesRequest.prototype.pageToken = ""; + + /** + * Creates a new ListAudiencesRequest instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.ListAudiencesRequest + * @static + * @param {google.analytics.admin.v1alpha.IListAudiencesRequest=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.ListAudiencesRequest} ListAudiencesRequest instance + */ + ListAudiencesRequest.create = function create(properties) { + return new ListAudiencesRequest(properties); + }; + + /** + * Encodes the specified ListAudiencesRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.ListAudiencesRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.ListAudiencesRequest + * @static + * @param {google.analytics.admin.v1alpha.IListAudiencesRequest} message ListAudiencesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListAudiencesRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + return writer; + }; + + /** + * Encodes the specified ListAudiencesRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.ListAudiencesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.ListAudiencesRequest + * @static + * @param {google.analytics.admin.v1alpha.IListAudiencesRequest} message ListAudiencesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListAudiencesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListAudiencesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.ListAudiencesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.ListAudiencesRequest} ListAudiencesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListAudiencesRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.ListAudiencesRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListAudiencesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.ListAudiencesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.ListAudiencesRequest} ListAudiencesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListAudiencesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListAudiencesRequest message. + * @function verify + * @memberof google.analytics.admin.v1alpha.ListAudiencesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListAudiencesRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + return null; + }; + + /** + * Creates a ListAudiencesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.ListAudiencesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.ListAudiencesRequest} ListAudiencesRequest + */ + ListAudiencesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.ListAudiencesRequest) + return object; + var message = new $root.google.analytics.admin.v1alpha.ListAudiencesRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + return message; + }; + + /** + * Creates a plain object from a ListAudiencesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.ListAudiencesRequest + * @static + * @param {google.analytics.admin.v1alpha.ListAudiencesRequest} message ListAudiencesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListAudiencesRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + return object; + }; + + /** + * Converts this ListAudiencesRequest to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.ListAudiencesRequest + * @instance + * @returns {Object.} JSON object + */ + ListAudiencesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListAudiencesRequest + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.ListAudiencesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListAudiencesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.ListAudiencesRequest"; + }; + + return ListAudiencesRequest; + })(); + + v1alpha.ListAudiencesResponse = (function() { + + /** + * Properties of a ListAudiencesResponse. + * @memberof google.analytics.admin.v1alpha + * @interface IListAudiencesResponse + * @property {Array.|null} [audiences] ListAudiencesResponse audiences + * @property {string|null} [nextPageToken] ListAudiencesResponse nextPageToken + */ + + /** + * Constructs a new ListAudiencesResponse. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents a ListAudiencesResponse. + * @implements IListAudiencesResponse + * @constructor + * @param {google.analytics.admin.v1alpha.IListAudiencesResponse=} [properties] Properties to set + */ + function ListAudiencesResponse(properties) { + this.audiences = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListAudiencesResponse audiences. + * @member {Array.} audiences + * @memberof google.analytics.admin.v1alpha.ListAudiencesResponse + * @instance + */ + ListAudiencesResponse.prototype.audiences = $util.emptyArray; + + /** + * ListAudiencesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.analytics.admin.v1alpha.ListAudiencesResponse + * @instance + */ + ListAudiencesResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListAudiencesResponse instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.ListAudiencesResponse + * @static + * @param {google.analytics.admin.v1alpha.IListAudiencesResponse=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.ListAudiencesResponse} ListAudiencesResponse instance + */ + ListAudiencesResponse.create = function create(properties) { + return new ListAudiencesResponse(properties); + }; + + /** + * Encodes the specified ListAudiencesResponse message. Does not implicitly {@link google.analytics.admin.v1alpha.ListAudiencesResponse.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.ListAudiencesResponse + * @static + * @param {google.analytics.admin.v1alpha.IListAudiencesResponse} message ListAudiencesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListAudiencesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.audiences != null && message.audiences.length) + for (var i = 0; i < message.audiences.length; ++i) + $root.google.analytics.admin.v1alpha.Audience.encode(message.audiences[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 ListAudiencesResponse message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.ListAudiencesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.ListAudiencesResponse + * @static + * @param {google.analytics.admin.v1alpha.IListAudiencesResponse} message ListAudiencesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListAudiencesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListAudiencesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.ListAudiencesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.ListAudiencesResponse} ListAudiencesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListAudiencesResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.ListAudiencesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.audiences && message.audiences.length)) + message.audiences = []; + message.audiences.push($root.google.analytics.admin.v1alpha.Audience.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListAudiencesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.ListAudiencesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.ListAudiencesResponse} ListAudiencesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListAudiencesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListAudiencesResponse message. + * @function verify + * @memberof google.analytics.admin.v1alpha.ListAudiencesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListAudiencesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.audiences != null && message.hasOwnProperty("audiences")) { + if (!Array.isArray(message.audiences)) + return "audiences: array expected"; + for (var i = 0; i < message.audiences.length; ++i) { + var error = $root.google.analytics.admin.v1alpha.Audience.verify(message.audiences[i]); + if (error) + return "audiences." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListAudiencesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.ListAudiencesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.ListAudiencesResponse} ListAudiencesResponse + */ + ListAudiencesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.ListAudiencesResponse) + return object; + var message = new $root.google.analytics.admin.v1alpha.ListAudiencesResponse(); + if (object.audiences) { + if (!Array.isArray(object.audiences)) + throw TypeError(".google.analytics.admin.v1alpha.ListAudiencesResponse.audiences: array expected"); + message.audiences = []; + for (var i = 0; i < object.audiences.length; ++i) { + if (typeof object.audiences[i] !== "object") + throw TypeError(".google.analytics.admin.v1alpha.ListAudiencesResponse.audiences: object expected"); + message.audiences[i] = $root.google.analytics.admin.v1alpha.Audience.fromObject(object.audiences[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListAudiencesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.ListAudiencesResponse + * @static + * @param {google.analytics.admin.v1alpha.ListAudiencesResponse} message ListAudiencesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListAudiencesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.audiences = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.audiences && message.audiences.length) { + object.audiences = []; + for (var j = 0; j < message.audiences.length; ++j) + object.audiences[j] = $root.google.analytics.admin.v1alpha.Audience.toObject(message.audiences[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListAudiencesResponse to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.ListAudiencesResponse + * @instance + * @returns {Object.} JSON object + */ + ListAudiencesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListAudiencesResponse + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.ListAudiencesResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListAudiencesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.ListAudiencesResponse"; + }; + + return ListAudiencesResponse; + })(); + + v1alpha.CreateAudienceRequest = (function() { + + /** + * Properties of a CreateAudienceRequest. + * @memberof google.analytics.admin.v1alpha + * @interface ICreateAudienceRequest + * @property {string|null} [parent] CreateAudienceRequest parent + * @property {google.analytics.admin.v1alpha.IAudience|null} [audience] CreateAudienceRequest audience + */ + + /** + * Constructs a new CreateAudienceRequest. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents a CreateAudienceRequest. + * @implements ICreateAudienceRequest + * @constructor + * @param {google.analytics.admin.v1alpha.ICreateAudienceRequest=} [properties] Properties to set + */ + function CreateAudienceRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateAudienceRequest parent. + * @member {string} parent + * @memberof google.analytics.admin.v1alpha.CreateAudienceRequest + * @instance + */ + CreateAudienceRequest.prototype.parent = ""; + + /** + * CreateAudienceRequest audience. + * @member {google.analytics.admin.v1alpha.IAudience|null|undefined} audience + * @memberof google.analytics.admin.v1alpha.CreateAudienceRequest + * @instance + */ + CreateAudienceRequest.prototype.audience = null; + + /** + * Creates a new CreateAudienceRequest instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.CreateAudienceRequest + * @static + * @param {google.analytics.admin.v1alpha.ICreateAudienceRequest=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.CreateAudienceRequest} CreateAudienceRequest instance + */ + CreateAudienceRequest.create = function create(properties) { + return new CreateAudienceRequest(properties); + }; + + /** + * Encodes the specified CreateAudienceRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.CreateAudienceRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.CreateAudienceRequest + * @static + * @param {google.analytics.admin.v1alpha.ICreateAudienceRequest} message CreateAudienceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateAudienceRequest.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.audience != null && Object.hasOwnProperty.call(message, "audience")) + $root.google.analytics.admin.v1alpha.Audience.encode(message.audience, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CreateAudienceRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.CreateAudienceRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.CreateAudienceRequest + * @static + * @param {google.analytics.admin.v1alpha.ICreateAudienceRequest} message CreateAudienceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateAudienceRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateAudienceRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.CreateAudienceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.CreateAudienceRequest} CreateAudienceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateAudienceRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.CreateAudienceRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.audience = $root.google.analytics.admin.v1alpha.Audience.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateAudienceRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.CreateAudienceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.CreateAudienceRequest} CreateAudienceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateAudienceRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateAudienceRequest message. + * @function verify + * @memberof google.analytics.admin.v1alpha.CreateAudienceRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateAudienceRequest.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.audience != null && message.hasOwnProperty("audience")) { + var error = $root.google.analytics.admin.v1alpha.Audience.verify(message.audience); + if (error) + return "audience." + error; + } + return null; + }; + + /** + * Creates a CreateAudienceRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.CreateAudienceRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.CreateAudienceRequest} CreateAudienceRequest + */ + CreateAudienceRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.CreateAudienceRequest) + return object; + var message = new $root.google.analytics.admin.v1alpha.CreateAudienceRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.audience != null) { + if (typeof object.audience !== "object") + throw TypeError(".google.analytics.admin.v1alpha.CreateAudienceRequest.audience: object expected"); + message.audience = $root.google.analytics.admin.v1alpha.Audience.fromObject(object.audience); + } + return message; + }; + + /** + * Creates a plain object from a CreateAudienceRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.CreateAudienceRequest + * @static + * @param {google.analytics.admin.v1alpha.CreateAudienceRequest} message CreateAudienceRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateAudienceRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.audience = null; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.audience != null && message.hasOwnProperty("audience")) + object.audience = $root.google.analytics.admin.v1alpha.Audience.toObject(message.audience, options); + return object; + }; + + /** + * Converts this CreateAudienceRequest to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.CreateAudienceRequest + * @instance + * @returns {Object.} JSON object + */ + CreateAudienceRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateAudienceRequest + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.CreateAudienceRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateAudienceRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.CreateAudienceRequest"; + }; + + return CreateAudienceRequest; + })(); + + v1alpha.UpdateAudienceRequest = (function() { + + /** + * Properties of an UpdateAudienceRequest. + * @memberof google.analytics.admin.v1alpha + * @interface IUpdateAudienceRequest + * @property {google.analytics.admin.v1alpha.IAudience|null} [audience] UpdateAudienceRequest audience + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateAudienceRequest updateMask + */ + + /** + * Constructs a new UpdateAudienceRequest. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents an UpdateAudienceRequest. + * @implements IUpdateAudienceRequest + * @constructor + * @param {google.analytics.admin.v1alpha.IUpdateAudienceRequest=} [properties] Properties to set + */ + function UpdateAudienceRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateAudienceRequest audience. + * @member {google.analytics.admin.v1alpha.IAudience|null|undefined} audience + * @memberof google.analytics.admin.v1alpha.UpdateAudienceRequest + * @instance + */ + UpdateAudienceRequest.prototype.audience = null; + + /** + * UpdateAudienceRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.analytics.admin.v1alpha.UpdateAudienceRequest + * @instance + */ + UpdateAudienceRequest.prototype.updateMask = null; + + /** + * Creates a new UpdateAudienceRequest instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.UpdateAudienceRequest + * @static + * @param {google.analytics.admin.v1alpha.IUpdateAudienceRequest=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.UpdateAudienceRequest} UpdateAudienceRequest instance + */ + UpdateAudienceRequest.create = function create(properties) { + return new UpdateAudienceRequest(properties); + }; + + /** + * Encodes the specified UpdateAudienceRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.UpdateAudienceRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.UpdateAudienceRequest + * @static + * @param {google.analytics.admin.v1alpha.IUpdateAudienceRequest} message UpdateAudienceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateAudienceRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.audience != null && Object.hasOwnProperty.call(message, "audience")) + $root.google.analytics.admin.v1alpha.Audience.encode(message.audience, 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 UpdateAudienceRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.UpdateAudienceRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.UpdateAudienceRequest + * @static + * @param {google.analytics.admin.v1alpha.IUpdateAudienceRequest} message UpdateAudienceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateAudienceRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateAudienceRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.UpdateAudienceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.UpdateAudienceRequest} UpdateAudienceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateAudienceRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.UpdateAudienceRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.audience = $root.google.analytics.admin.v1alpha.Audience.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 UpdateAudienceRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.UpdateAudienceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.UpdateAudienceRequest} UpdateAudienceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateAudienceRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateAudienceRequest message. + * @function verify + * @memberof google.analytics.admin.v1alpha.UpdateAudienceRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateAudienceRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.audience != null && message.hasOwnProperty("audience")) { + var error = $root.google.analytics.admin.v1alpha.Audience.verify(message.audience); + if (error) + return "audience." + 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 UpdateAudienceRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.UpdateAudienceRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.UpdateAudienceRequest} UpdateAudienceRequest + */ + UpdateAudienceRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.UpdateAudienceRequest) + return object; + var message = new $root.google.analytics.admin.v1alpha.UpdateAudienceRequest(); + if (object.audience != null) { + if (typeof object.audience !== "object") + throw TypeError(".google.analytics.admin.v1alpha.UpdateAudienceRequest.audience: object expected"); + message.audience = $root.google.analytics.admin.v1alpha.Audience.fromObject(object.audience); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.analytics.admin.v1alpha.UpdateAudienceRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + return message; + }; + + /** + * Creates a plain object from an UpdateAudienceRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.UpdateAudienceRequest + * @static + * @param {google.analytics.admin.v1alpha.UpdateAudienceRequest} message UpdateAudienceRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateAudienceRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.audience = null; + object.updateMask = null; + } + if (message.audience != null && message.hasOwnProperty("audience")) + object.audience = $root.google.analytics.admin.v1alpha.Audience.toObject(message.audience, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + return object; + }; + + /** + * Converts this UpdateAudienceRequest to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.UpdateAudienceRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateAudienceRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateAudienceRequest + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.UpdateAudienceRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateAudienceRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.UpdateAudienceRequest"; + }; + + return UpdateAudienceRequest; + })(); + + v1alpha.ArchiveAudienceRequest = (function() { + + /** + * Properties of an ArchiveAudienceRequest. + * @memberof google.analytics.admin.v1alpha + * @interface IArchiveAudienceRequest + * @property {string|null} [name] ArchiveAudienceRequest name + */ + + /** + * Constructs a new ArchiveAudienceRequest. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents an ArchiveAudienceRequest. + * @implements IArchiveAudienceRequest + * @constructor + * @param {google.analytics.admin.v1alpha.IArchiveAudienceRequest=} [properties] Properties to set + */ + function ArchiveAudienceRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ArchiveAudienceRequest name. + * @member {string} name + * @memberof google.analytics.admin.v1alpha.ArchiveAudienceRequest + * @instance + */ + ArchiveAudienceRequest.prototype.name = ""; + + /** + * Creates a new ArchiveAudienceRequest instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.ArchiveAudienceRequest + * @static + * @param {google.analytics.admin.v1alpha.IArchiveAudienceRequest=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.ArchiveAudienceRequest} ArchiveAudienceRequest instance + */ + ArchiveAudienceRequest.create = function create(properties) { + return new ArchiveAudienceRequest(properties); + }; + + /** + * Encodes the specified ArchiveAudienceRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.ArchiveAudienceRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.ArchiveAudienceRequest + * @static + * @param {google.analytics.admin.v1alpha.IArchiveAudienceRequest} message ArchiveAudienceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ArchiveAudienceRequest.encode = function encode(message, writer) { + 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 ArchiveAudienceRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.ArchiveAudienceRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.ArchiveAudienceRequest + * @static + * @param {google.analytics.admin.v1alpha.IArchiveAudienceRequest} message ArchiveAudienceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ArchiveAudienceRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ArchiveAudienceRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.ArchiveAudienceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.ArchiveAudienceRequest} ArchiveAudienceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ArchiveAudienceRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.ArchiveAudienceRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ArchiveAudienceRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.ArchiveAudienceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.ArchiveAudienceRequest} ArchiveAudienceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ArchiveAudienceRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ArchiveAudienceRequest message. + * @function verify + * @memberof google.analytics.admin.v1alpha.ArchiveAudienceRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ArchiveAudienceRequest.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 an ArchiveAudienceRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.ArchiveAudienceRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.ArchiveAudienceRequest} ArchiveAudienceRequest + */ + ArchiveAudienceRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.ArchiveAudienceRequest) + return object; + var message = new $root.google.analytics.admin.v1alpha.ArchiveAudienceRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from an ArchiveAudienceRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.ArchiveAudienceRequest + * @static + * @param {google.analytics.admin.v1alpha.ArchiveAudienceRequest} message ArchiveAudienceRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ArchiveAudienceRequest.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 ArchiveAudienceRequest to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.ArchiveAudienceRequest + * @instance + * @returns {Object.} JSON object + */ + ArchiveAudienceRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ArchiveAudienceRequest + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.ArchiveAudienceRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ArchiveAudienceRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.ArchiveAudienceRequest"; + }; + + return ArchiveAudienceRequest; + })(); + + v1alpha.GetAttributionSettingsRequest = (function() { + + /** + * Properties of a GetAttributionSettingsRequest. + * @memberof google.analytics.admin.v1alpha + * @interface IGetAttributionSettingsRequest + * @property {string|null} [name] GetAttributionSettingsRequest name + */ + + /** + * Constructs a new GetAttributionSettingsRequest. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents a GetAttributionSettingsRequest. + * @implements IGetAttributionSettingsRequest + * @constructor + * @param {google.analytics.admin.v1alpha.IGetAttributionSettingsRequest=} [properties] Properties to set + */ + function GetAttributionSettingsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetAttributionSettingsRequest name. + * @member {string} name + * @memberof google.analytics.admin.v1alpha.GetAttributionSettingsRequest + * @instance + */ + GetAttributionSettingsRequest.prototype.name = ""; + + /** + * Creates a new GetAttributionSettingsRequest instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.GetAttributionSettingsRequest + * @static + * @param {google.analytics.admin.v1alpha.IGetAttributionSettingsRequest=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.GetAttributionSettingsRequest} GetAttributionSettingsRequest instance + */ + GetAttributionSettingsRequest.create = function create(properties) { + return new GetAttributionSettingsRequest(properties); + }; + + /** + * Encodes the specified GetAttributionSettingsRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.GetAttributionSettingsRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.GetAttributionSettingsRequest + * @static + * @param {google.analytics.admin.v1alpha.IGetAttributionSettingsRequest} message GetAttributionSettingsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetAttributionSettingsRequest.encode = function encode(message, writer) { + 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 GetAttributionSettingsRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.GetAttributionSettingsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.GetAttributionSettingsRequest + * @static + * @param {google.analytics.admin.v1alpha.IGetAttributionSettingsRequest} message GetAttributionSettingsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetAttributionSettingsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetAttributionSettingsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.GetAttributionSettingsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.GetAttributionSettingsRequest} GetAttributionSettingsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetAttributionSettingsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.GetAttributionSettingsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetAttributionSettingsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.GetAttributionSettingsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.GetAttributionSettingsRequest} GetAttributionSettingsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetAttributionSettingsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetAttributionSettingsRequest message. + * @function verify + * @memberof google.analytics.admin.v1alpha.GetAttributionSettingsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetAttributionSettingsRequest.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 GetAttributionSettingsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.GetAttributionSettingsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.GetAttributionSettingsRequest} GetAttributionSettingsRequest + */ + GetAttributionSettingsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.GetAttributionSettingsRequest) + return object; + var message = new $root.google.analytics.admin.v1alpha.GetAttributionSettingsRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetAttributionSettingsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.GetAttributionSettingsRequest + * @static + * @param {google.analytics.admin.v1alpha.GetAttributionSettingsRequest} message GetAttributionSettingsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetAttributionSettingsRequest.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 GetAttributionSettingsRequest to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.GetAttributionSettingsRequest + * @instance + * @returns {Object.} JSON object + */ + GetAttributionSettingsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetAttributionSettingsRequest + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.GetAttributionSettingsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetAttributionSettingsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.GetAttributionSettingsRequest"; + }; + + return GetAttributionSettingsRequest; + })(); + + v1alpha.UpdateAttributionSettingsRequest = (function() { + + /** + * Properties of an UpdateAttributionSettingsRequest. + * @memberof google.analytics.admin.v1alpha + * @interface IUpdateAttributionSettingsRequest + * @property {google.analytics.admin.v1alpha.IAttributionSettings|null} [attributionSettings] UpdateAttributionSettingsRequest attributionSettings + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateAttributionSettingsRequest updateMask + */ + + /** + * Constructs a new UpdateAttributionSettingsRequest. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents an UpdateAttributionSettingsRequest. + * @implements IUpdateAttributionSettingsRequest + * @constructor + * @param {google.analytics.admin.v1alpha.IUpdateAttributionSettingsRequest=} [properties] Properties to set + */ + function UpdateAttributionSettingsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateAttributionSettingsRequest attributionSettings. + * @member {google.analytics.admin.v1alpha.IAttributionSettings|null|undefined} attributionSettings + * @memberof google.analytics.admin.v1alpha.UpdateAttributionSettingsRequest + * @instance + */ + UpdateAttributionSettingsRequest.prototype.attributionSettings = null; + + /** + * UpdateAttributionSettingsRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.analytics.admin.v1alpha.UpdateAttributionSettingsRequest + * @instance + */ + UpdateAttributionSettingsRequest.prototype.updateMask = null; + + /** + * Creates a new UpdateAttributionSettingsRequest instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.UpdateAttributionSettingsRequest + * @static + * @param {google.analytics.admin.v1alpha.IUpdateAttributionSettingsRequest=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.UpdateAttributionSettingsRequest} UpdateAttributionSettingsRequest instance + */ + UpdateAttributionSettingsRequest.create = function create(properties) { + return new UpdateAttributionSettingsRequest(properties); + }; + + /** + * Encodes the specified UpdateAttributionSettingsRequest message. Does not implicitly {@link google.analytics.admin.v1alpha.UpdateAttributionSettingsRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.UpdateAttributionSettingsRequest + * @static + * @param {google.analytics.admin.v1alpha.IUpdateAttributionSettingsRequest} message UpdateAttributionSettingsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateAttributionSettingsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.attributionSettings != null && Object.hasOwnProperty.call(message, "attributionSettings")) + $root.google.analytics.admin.v1alpha.AttributionSettings.encode(message.attributionSettings, 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 UpdateAttributionSettingsRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.UpdateAttributionSettingsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.UpdateAttributionSettingsRequest + * @static + * @param {google.analytics.admin.v1alpha.IUpdateAttributionSettingsRequest} message UpdateAttributionSettingsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateAttributionSettingsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateAttributionSettingsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.UpdateAttributionSettingsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.UpdateAttributionSettingsRequest} UpdateAttributionSettingsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateAttributionSettingsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.UpdateAttributionSettingsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.attributionSettings = $root.google.analytics.admin.v1alpha.AttributionSettings.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 UpdateAttributionSettingsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.UpdateAttributionSettingsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.UpdateAttributionSettingsRequest} UpdateAttributionSettingsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateAttributionSettingsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateAttributionSettingsRequest message. + * @function verify + * @memberof google.analytics.admin.v1alpha.UpdateAttributionSettingsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateAttributionSettingsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.attributionSettings != null && message.hasOwnProperty("attributionSettings")) { + var error = $root.google.analytics.admin.v1alpha.AttributionSettings.verify(message.attributionSettings); + if (error) + return "attributionSettings." + 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 UpdateAttributionSettingsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.UpdateAttributionSettingsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.UpdateAttributionSettingsRequest} UpdateAttributionSettingsRequest + */ + UpdateAttributionSettingsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.UpdateAttributionSettingsRequest) + return object; + var message = new $root.google.analytics.admin.v1alpha.UpdateAttributionSettingsRequest(); + if (object.attributionSettings != null) { + if (typeof object.attributionSettings !== "object") + throw TypeError(".google.analytics.admin.v1alpha.UpdateAttributionSettingsRequest.attributionSettings: object expected"); + message.attributionSettings = $root.google.analytics.admin.v1alpha.AttributionSettings.fromObject(object.attributionSettings); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.analytics.admin.v1alpha.UpdateAttributionSettingsRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + return message; + }; + + /** + * Creates a plain object from an UpdateAttributionSettingsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.UpdateAttributionSettingsRequest + * @static + * @param {google.analytics.admin.v1alpha.UpdateAttributionSettingsRequest} message UpdateAttributionSettingsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateAttributionSettingsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.attributionSettings = null; + object.updateMask = null; + } + if (message.attributionSettings != null && message.hasOwnProperty("attributionSettings")) + object.attributionSettings = $root.google.analytics.admin.v1alpha.AttributionSettings.toObject(message.attributionSettings, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + return object; + }; + + /** + * Converts this UpdateAttributionSettingsRequest to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.UpdateAttributionSettingsRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateAttributionSettingsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateAttributionSettingsRequest + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.UpdateAttributionSettingsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateAttributionSettingsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.UpdateAttributionSettingsRequest"; + }; + + return UpdateAttributionSettingsRequest; + })(); + + /** + * AudienceFilterScope enum. + * @name google.analytics.admin.v1alpha.AudienceFilterScope + * @enum {number} + * @property {number} AUDIENCE_FILTER_SCOPE_UNSPECIFIED=0 AUDIENCE_FILTER_SCOPE_UNSPECIFIED value + * @property {number} AUDIENCE_FILTER_SCOPE_WITHIN_SAME_EVENT=1 AUDIENCE_FILTER_SCOPE_WITHIN_SAME_EVENT value + * @property {number} AUDIENCE_FILTER_SCOPE_WITHIN_SAME_SESSION=2 AUDIENCE_FILTER_SCOPE_WITHIN_SAME_SESSION value + * @property {number} AUDIENCE_FILTER_SCOPE_ACROSS_ALL_SESSIONS=3 AUDIENCE_FILTER_SCOPE_ACROSS_ALL_SESSIONS value + */ + v1alpha.AudienceFilterScope = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "AUDIENCE_FILTER_SCOPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "AUDIENCE_FILTER_SCOPE_WITHIN_SAME_EVENT"] = 1; + values[valuesById[2] = "AUDIENCE_FILTER_SCOPE_WITHIN_SAME_SESSION"] = 2; + values[valuesById[3] = "AUDIENCE_FILTER_SCOPE_ACROSS_ALL_SESSIONS"] = 3; + return values; + })(); + + v1alpha.AudienceDimensionOrMetricFilter = (function() { + + /** + * Properties of an AudienceDimensionOrMetricFilter. + * @memberof google.analytics.admin.v1alpha + * @interface IAudienceDimensionOrMetricFilter + * @property {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.IStringFilter|null} [stringFilter] AudienceDimensionOrMetricFilter stringFilter + * @property {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.IInListFilter|null} [inListFilter] AudienceDimensionOrMetricFilter inListFilter + * @property {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.INumericFilter|null} [numericFilter] AudienceDimensionOrMetricFilter numericFilter + * @property {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.IBetweenFilter|null} [betweenFilter] AudienceDimensionOrMetricFilter betweenFilter + * @property {string|null} [fieldName] AudienceDimensionOrMetricFilter fieldName + * @property {boolean|null} [atAnyPointInTime] AudienceDimensionOrMetricFilter atAnyPointInTime + * @property {number|null} [inAnyNDayPeriod] AudienceDimensionOrMetricFilter inAnyNDayPeriod + */ + + /** + * Constructs a new AudienceDimensionOrMetricFilter. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents an AudienceDimensionOrMetricFilter. + * @implements IAudienceDimensionOrMetricFilter + * @constructor + * @param {google.analytics.admin.v1alpha.IAudienceDimensionOrMetricFilter=} [properties] Properties to set + */ + function AudienceDimensionOrMetricFilter(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AudienceDimensionOrMetricFilter stringFilter. + * @member {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.IStringFilter|null|undefined} stringFilter + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter + * @instance + */ + AudienceDimensionOrMetricFilter.prototype.stringFilter = null; + + /** + * AudienceDimensionOrMetricFilter inListFilter. + * @member {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.IInListFilter|null|undefined} inListFilter + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter + * @instance + */ + AudienceDimensionOrMetricFilter.prototype.inListFilter = null; + + /** + * AudienceDimensionOrMetricFilter numericFilter. + * @member {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.INumericFilter|null|undefined} numericFilter + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter + * @instance + */ + AudienceDimensionOrMetricFilter.prototype.numericFilter = null; + + /** + * AudienceDimensionOrMetricFilter betweenFilter. + * @member {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.IBetweenFilter|null|undefined} betweenFilter + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter + * @instance + */ + AudienceDimensionOrMetricFilter.prototype.betweenFilter = null; + + /** + * AudienceDimensionOrMetricFilter fieldName. + * @member {string} fieldName + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter + * @instance + */ + AudienceDimensionOrMetricFilter.prototype.fieldName = ""; + + /** + * AudienceDimensionOrMetricFilter atAnyPointInTime. + * @member {boolean} atAnyPointInTime + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter + * @instance + */ + AudienceDimensionOrMetricFilter.prototype.atAnyPointInTime = false; + + /** + * AudienceDimensionOrMetricFilter inAnyNDayPeriod. + * @member {number} inAnyNDayPeriod + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter + * @instance + */ + AudienceDimensionOrMetricFilter.prototype.inAnyNDayPeriod = 0; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * AudienceDimensionOrMetricFilter oneFilter. + * @member {"stringFilter"|"inListFilter"|"numericFilter"|"betweenFilter"|undefined} oneFilter + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter + * @instance + */ + Object.defineProperty(AudienceDimensionOrMetricFilter.prototype, "oneFilter", { + get: $util.oneOfGetter($oneOfFields = ["stringFilter", "inListFilter", "numericFilter", "betweenFilter"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new AudienceDimensionOrMetricFilter instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter + * @static + * @param {google.analytics.admin.v1alpha.IAudienceDimensionOrMetricFilter=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter} AudienceDimensionOrMetricFilter instance + */ + AudienceDimensionOrMetricFilter.create = function create(properties) { + return new AudienceDimensionOrMetricFilter(properties); + }; + + /** + * Encodes the specified AudienceDimensionOrMetricFilter message. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter + * @static + * @param {google.analytics.admin.v1alpha.IAudienceDimensionOrMetricFilter} message AudienceDimensionOrMetricFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AudienceDimensionOrMetricFilter.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.fieldName != null && Object.hasOwnProperty.call(message, "fieldName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.fieldName); + if (message.stringFilter != null && Object.hasOwnProperty.call(message, "stringFilter")) + $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter.encode(message.stringFilter, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.inListFilter != null && Object.hasOwnProperty.call(message, "inListFilter")) + $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.InListFilter.encode(message.inListFilter, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.numericFilter != null && Object.hasOwnProperty.call(message, "numericFilter")) + $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter.encode(message.numericFilter, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.betweenFilter != null && Object.hasOwnProperty.call(message, "betweenFilter")) + $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.BetweenFilter.encode(message.betweenFilter, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.atAnyPointInTime != null && Object.hasOwnProperty.call(message, "atAnyPointInTime")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.atAnyPointInTime); + if (message.inAnyNDayPeriod != null && Object.hasOwnProperty.call(message, "inAnyNDayPeriod")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.inAnyNDayPeriod); + return writer; + }; + + /** + * Encodes the specified AudienceDimensionOrMetricFilter message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter + * @static + * @param {google.analytics.admin.v1alpha.IAudienceDimensionOrMetricFilter} message AudienceDimensionOrMetricFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AudienceDimensionOrMetricFilter.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AudienceDimensionOrMetricFilter message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter} AudienceDimensionOrMetricFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AudienceDimensionOrMetricFilter.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: { + message.stringFilter = $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter.decode(reader, reader.uint32()); + break; + } + case 3: { + message.inListFilter = $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.InListFilter.decode(reader, reader.uint32()); + break; + } + case 4: { + message.numericFilter = $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter.decode(reader, reader.uint32()); + break; + } + case 5: { + message.betweenFilter = $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.BetweenFilter.decode(reader, reader.uint32()); + break; + } + case 1: { + message.fieldName = reader.string(); + break; + } + case 6: { + message.atAnyPointInTime = reader.bool(); + break; + } + case 7: { + message.inAnyNDayPeriod = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AudienceDimensionOrMetricFilter message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter} AudienceDimensionOrMetricFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AudienceDimensionOrMetricFilter.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AudienceDimensionOrMetricFilter message. + * @function verify + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AudienceDimensionOrMetricFilter.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.stringFilter != null && message.hasOwnProperty("stringFilter")) { + properties.oneFilter = 1; + { + var error = $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter.verify(message.stringFilter); + if (error) + return "stringFilter." + error; + } + } + if (message.inListFilter != null && message.hasOwnProperty("inListFilter")) { + if (properties.oneFilter === 1) + return "oneFilter: multiple values"; + properties.oneFilter = 1; + { + var error = $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.InListFilter.verify(message.inListFilter); + if (error) + return "inListFilter." + error; + } + } + if (message.numericFilter != null && message.hasOwnProperty("numericFilter")) { + if (properties.oneFilter === 1) + return "oneFilter: multiple values"; + properties.oneFilter = 1; + { + var error = $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter.verify(message.numericFilter); + if (error) + return "numericFilter." + error; + } + } + if (message.betweenFilter != null && message.hasOwnProperty("betweenFilter")) { + if (properties.oneFilter === 1) + return "oneFilter: multiple values"; + properties.oneFilter = 1; + { + var error = $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.BetweenFilter.verify(message.betweenFilter); + if (error) + return "betweenFilter." + error; + } + } + if (message.fieldName != null && message.hasOwnProperty("fieldName")) + if (!$util.isString(message.fieldName)) + return "fieldName: string expected"; + if (message.atAnyPointInTime != null && message.hasOwnProperty("atAnyPointInTime")) + if (typeof message.atAnyPointInTime !== "boolean") + return "atAnyPointInTime: boolean expected"; + if (message.inAnyNDayPeriod != null && message.hasOwnProperty("inAnyNDayPeriod")) + if (!$util.isInteger(message.inAnyNDayPeriod)) + return "inAnyNDayPeriod: integer expected"; + return null; + }; + + /** + * Creates an AudienceDimensionOrMetricFilter message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter} AudienceDimensionOrMetricFilter + */ + AudienceDimensionOrMetricFilter.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter) + return object; + var message = new $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter(); + if (object.stringFilter != null) { + if (typeof object.stringFilter !== "object") + throw TypeError(".google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.stringFilter: object expected"); + message.stringFilter = $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter.fromObject(object.stringFilter); + } + if (object.inListFilter != null) { + if (typeof object.inListFilter !== "object") + throw TypeError(".google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.inListFilter: object expected"); + message.inListFilter = $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.InListFilter.fromObject(object.inListFilter); + } + if (object.numericFilter != null) { + if (typeof object.numericFilter !== "object") + throw TypeError(".google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.numericFilter: object expected"); + message.numericFilter = $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter.fromObject(object.numericFilter); + } + if (object.betweenFilter != null) { + if (typeof object.betweenFilter !== "object") + throw TypeError(".google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.betweenFilter: object expected"); + message.betweenFilter = $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.BetweenFilter.fromObject(object.betweenFilter); + } + if (object.fieldName != null) + message.fieldName = String(object.fieldName); + if (object.atAnyPointInTime != null) + message.atAnyPointInTime = Boolean(object.atAnyPointInTime); + if (object.inAnyNDayPeriod != null) + message.inAnyNDayPeriod = object.inAnyNDayPeriod | 0; + return message; + }; + + /** + * Creates a plain object from an AudienceDimensionOrMetricFilter message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter + * @static + * @param {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter} message AudienceDimensionOrMetricFilter + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AudienceDimensionOrMetricFilter.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.fieldName = ""; + object.atAnyPointInTime = false; + object.inAnyNDayPeriod = 0; + } + if (message.fieldName != null && message.hasOwnProperty("fieldName")) + object.fieldName = message.fieldName; + if (message.stringFilter != null && message.hasOwnProperty("stringFilter")) { + object.stringFilter = $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter.toObject(message.stringFilter, options); + if (options.oneofs) + object.oneFilter = "stringFilter"; + } + if (message.inListFilter != null && message.hasOwnProperty("inListFilter")) { + object.inListFilter = $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.InListFilter.toObject(message.inListFilter, options); + if (options.oneofs) + object.oneFilter = "inListFilter"; + } + if (message.numericFilter != null && message.hasOwnProperty("numericFilter")) { + object.numericFilter = $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter.toObject(message.numericFilter, options); + if (options.oneofs) + object.oneFilter = "numericFilter"; + } + if (message.betweenFilter != null && message.hasOwnProperty("betweenFilter")) { + object.betweenFilter = $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.BetweenFilter.toObject(message.betweenFilter, options); + if (options.oneofs) + object.oneFilter = "betweenFilter"; + } + if (message.atAnyPointInTime != null && message.hasOwnProperty("atAnyPointInTime")) + object.atAnyPointInTime = message.atAnyPointInTime; + if (message.inAnyNDayPeriod != null && message.hasOwnProperty("inAnyNDayPeriod")) + object.inAnyNDayPeriod = message.inAnyNDayPeriod; + return object; + }; + + /** + * Converts this AudienceDimensionOrMetricFilter to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter + * @instance + * @returns {Object.} JSON object + */ + AudienceDimensionOrMetricFilter.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AudienceDimensionOrMetricFilter + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AudienceDimensionOrMetricFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter"; + }; + + AudienceDimensionOrMetricFilter.StringFilter = (function() { + + /** + * Properties of a StringFilter. + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter + * @interface IStringFilter + * @property {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter.MatchType|null} [matchType] StringFilter matchType + * @property {string|null} [value] StringFilter value + * @property {boolean|null} [caseSensitive] StringFilter caseSensitive + */ + + /** + * Constructs a new StringFilter. + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter + * @classdesc Represents a StringFilter. + * @implements IStringFilter + * @constructor + * @param {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.IStringFilter=} [properties] Properties to set + */ + function StringFilter(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * StringFilter matchType. + * @member {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter.MatchType} matchType + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter + * @instance + */ + StringFilter.prototype.matchType = 0; + + /** + * StringFilter value. + * @member {string} value + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter + * @instance + */ + StringFilter.prototype.value = ""; + + /** + * StringFilter caseSensitive. + * @member {boolean} caseSensitive + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter + * @instance + */ + StringFilter.prototype.caseSensitive = false; + + /** + * Creates a new StringFilter instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter + * @static + * @param {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.IStringFilter=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter} StringFilter instance + */ + StringFilter.create = function create(properties) { + return new StringFilter(properties); + }; + + /** + * Encodes the specified StringFilter message. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter + * @static + * @param {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.IStringFilter} message StringFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StringFilter.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.matchType != null && Object.hasOwnProperty.call(message, "matchType")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.matchType); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.value); + if (message.caseSensitive != null && Object.hasOwnProperty.call(message, "caseSensitive")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.caseSensitive); + return writer; + }; + + /** + * Encodes the specified StringFilter message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter + * @static + * @param {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.IStringFilter} message StringFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StringFilter.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a StringFilter message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter} StringFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StringFilter.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.matchType = reader.int32(); + break; + } + case 2: { + message.value = reader.string(); + break; + } + case 3: { + message.caseSensitive = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a StringFilter message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter} StringFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StringFilter.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a StringFilter message. + * @function verify + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + StringFilter.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.matchType != null && message.hasOwnProperty("matchType")) + switch (message.matchType) { + default: + return "matchType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + break; + } + if (message.value != null && message.hasOwnProperty("value")) + if (!$util.isString(message.value)) + return "value: string expected"; + if (message.caseSensitive != null && message.hasOwnProperty("caseSensitive")) + if (typeof message.caseSensitive !== "boolean") + return "caseSensitive: boolean expected"; + return null; + }; + + /** + * Creates a StringFilter message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter} StringFilter + */ + StringFilter.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter) + return object; + var message = new $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter(); + switch (object.matchType) { + default: + if (typeof object.matchType === "number") { + message.matchType = object.matchType; + break; + } + break; + case "MATCH_TYPE_UNSPECIFIED": + case 0: + message.matchType = 0; + break; + case "EXACT": + case 1: + message.matchType = 1; + break; + case "BEGINS_WITH": + case 2: + message.matchType = 2; + break; + case "ENDS_WITH": + case 3: + message.matchType = 3; + break; + case "CONTAINS": + case 4: + message.matchType = 4; + break; + case "FULL_REGEXP": + case 5: + message.matchType = 5; + break; + case "PARTIAL_REGEXP": + case 6: + message.matchType = 6; + break; + } + if (object.value != null) + message.value = String(object.value); + if (object.caseSensitive != null) + message.caseSensitive = Boolean(object.caseSensitive); + return message; + }; + + /** + * Creates a plain object from a StringFilter message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter + * @static + * @param {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter} message StringFilter + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + StringFilter.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.matchType = options.enums === String ? "MATCH_TYPE_UNSPECIFIED" : 0; + object.value = ""; + object.caseSensitive = false; + } + if (message.matchType != null && message.hasOwnProperty("matchType")) + object.matchType = options.enums === String ? $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter.MatchType[message.matchType] === undefined ? message.matchType : $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter.MatchType[message.matchType] : message.matchType; + if (message.value != null && message.hasOwnProperty("value")) + object.value = message.value; + if (message.caseSensitive != null && message.hasOwnProperty("caseSensitive")) + object.caseSensitive = message.caseSensitive; + return object; + }; + + /** + * Converts this StringFilter to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter + * @instance + * @returns {Object.} JSON object + */ + StringFilter.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for StringFilter + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + StringFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter"; + }; + + /** + * MatchType enum. + * @name google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.StringFilter.MatchType + * @enum {number} + * @property {number} MATCH_TYPE_UNSPECIFIED=0 MATCH_TYPE_UNSPECIFIED value + * @property {number} EXACT=1 EXACT value + * @property {number} BEGINS_WITH=2 BEGINS_WITH value + * @property {number} ENDS_WITH=3 ENDS_WITH value + * @property {number} CONTAINS=4 CONTAINS value + * @property {number} FULL_REGEXP=5 FULL_REGEXP value + * @property {number} PARTIAL_REGEXP=6 PARTIAL_REGEXP value + */ + StringFilter.MatchType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "MATCH_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "EXACT"] = 1; + values[valuesById[2] = "BEGINS_WITH"] = 2; + values[valuesById[3] = "ENDS_WITH"] = 3; + values[valuesById[4] = "CONTAINS"] = 4; + values[valuesById[5] = "FULL_REGEXP"] = 5; + values[valuesById[6] = "PARTIAL_REGEXP"] = 6; + return values; + })(); + + return StringFilter; + })(); + + AudienceDimensionOrMetricFilter.InListFilter = (function() { + + /** + * Properties of an InListFilter. + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter + * @interface IInListFilter + * @property {Array.|null} [values] InListFilter values + * @property {boolean|null} [caseSensitive] InListFilter caseSensitive + */ + + /** + * Constructs a new InListFilter. + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter + * @classdesc Represents an InListFilter. + * @implements IInListFilter + * @constructor + * @param {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.IInListFilter=} [properties] Properties to set + */ + function InListFilter(properties) { + this.values = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * InListFilter values. + * @member {Array.} values + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.InListFilter + * @instance + */ + InListFilter.prototype.values = $util.emptyArray; + + /** + * InListFilter caseSensitive. + * @member {boolean} caseSensitive + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.InListFilter + * @instance + */ + InListFilter.prototype.caseSensitive = false; + + /** + * Creates a new InListFilter instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.InListFilter + * @static + * @param {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.IInListFilter=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.InListFilter} InListFilter instance + */ + InListFilter.create = function create(properties) { + return new InListFilter(properties); + }; + + /** + * Encodes the specified InListFilter message. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.InListFilter.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.InListFilter + * @static + * @param {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.IInListFilter} message InListFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InListFilter.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.values != null && message.values.length) + for (var i = 0; i < message.values.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.values[i]); + if (message.caseSensitive != null && Object.hasOwnProperty.call(message, "caseSensitive")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.caseSensitive); + return writer; + }; + + /** + * Encodes the specified InListFilter message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.InListFilter.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.InListFilter + * @static + * @param {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.IInListFilter} message InListFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InListFilter.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an InListFilter message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.InListFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.InListFilter} InListFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InListFilter.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.InListFilter(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.values && message.values.length)) + message.values = []; + message.values.push(reader.string()); + break; + } + case 2: { + message.caseSensitive = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an InListFilter message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.InListFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.InListFilter} InListFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InListFilter.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an InListFilter message. + * @function verify + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.InListFilter + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + InListFilter.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.values != null && message.hasOwnProperty("values")) { + if (!Array.isArray(message.values)) + return "values: array expected"; + for (var i = 0; i < message.values.length; ++i) + if (!$util.isString(message.values[i])) + return "values: string[] expected"; + } + if (message.caseSensitive != null && message.hasOwnProperty("caseSensitive")) + if (typeof message.caseSensitive !== "boolean") + return "caseSensitive: boolean expected"; + return null; + }; + + /** + * Creates an InListFilter message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.InListFilter + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.InListFilter} InListFilter + */ + InListFilter.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.InListFilter) + return object; + var message = new $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.InListFilter(); + if (object.values) { + if (!Array.isArray(object.values)) + throw TypeError(".google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.InListFilter.values: array expected"); + message.values = []; + for (var i = 0; i < object.values.length; ++i) + message.values[i] = String(object.values[i]); + } + if (object.caseSensitive != null) + message.caseSensitive = Boolean(object.caseSensitive); + return message; + }; + + /** + * Creates a plain object from an InListFilter message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.InListFilter + * @static + * @param {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.InListFilter} message InListFilter + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + InListFilter.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.values = []; + if (options.defaults) + object.caseSensitive = false; + if (message.values && message.values.length) { + object.values = []; + for (var j = 0; j < message.values.length; ++j) + object.values[j] = message.values[j]; + } + if (message.caseSensitive != null && message.hasOwnProperty("caseSensitive")) + object.caseSensitive = message.caseSensitive; + return object; + }; + + /** + * Converts this InListFilter to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.InListFilter + * @instance + * @returns {Object.} JSON object + */ + InListFilter.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for InListFilter + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.InListFilter + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + InListFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.InListFilter"; + }; + + return InListFilter; + })(); + + AudienceDimensionOrMetricFilter.NumericValue = (function() { + + /** + * Properties of a NumericValue. + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter + * @interface INumericValue + * @property {number|Long|null} [int64Value] NumericValue int64Value + * @property {number|null} [doubleValue] NumericValue doubleValue + */ + + /** + * Constructs a new NumericValue. + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter + * @classdesc Represents a NumericValue. + * @implements INumericValue + * @constructor + * @param {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.INumericValue=} [properties] Properties to set + */ + function NumericValue(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * NumericValue int64Value. + * @member {number|Long|null|undefined} int64Value + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue + * @instance + */ + NumericValue.prototype.int64Value = null; + + /** + * NumericValue doubleValue. + * @member {number|null|undefined} doubleValue + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue + * @instance + */ + NumericValue.prototype.doubleValue = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * NumericValue oneValue. + * @member {"int64Value"|"doubleValue"|undefined} oneValue + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue + * @instance + */ + Object.defineProperty(NumericValue.prototype, "oneValue", { + get: $util.oneOfGetter($oneOfFields = ["int64Value", "doubleValue"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new NumericValue instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue + * @static + * @param {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.INumericValue=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue} NumericValue instance + */ + NumericValue.create = function create(properties) { + return new NumericValue(properties); + }; + + /** + * Encodes the specified NumericValue message. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue + * @static + * @param {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.INumericValue} message NumericValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NumericValue.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.int64Value != null && Object.hasOwnProperty.call(message, "int64Value")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.int64Value); + if (message.doubleValue != null && Object.hasOwnProperty.call(message, "doubleValue")) + writer.uint32(/* id 2, wireType 1 =*/17).double(message.doubleValue); + return writer; + }; + + /** + * Encodes the specified NumericValue message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue + * @static + * @param {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.INumericValue} message NumericValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NumericValue.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NumericValue message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue} NumericValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NumericValue.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.int64Value = reader.int64(); + break; + } + case 2: { + message.doubleValue = reader.double(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a NumericValue message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue} NumericValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NumericValue.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NumericValue message. + * @function verify + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NumericValue.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.int64Value != null && message.hasOwnProperty("int64Value")) { + properties.oneValue = 1; + if (!$util.isInteger(message.int64Value) && !(message.int64Value && $util.isInteger(message.int64Value.low) && $util.isInteger(message.int64Value.high))) + return "int64Value: integer|Long expected"; + } + if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) { + if (properties.oneValue === 1) + return "oneValue: multiple values"; + properties.oneValue = 1; + if (typeof message.doubleValue !== "number") + return "doubleValue: number expected"; + } + return null; + }; + + /** + * Creates a NumericValue message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue} NumericValue + */ + NumericValue.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue) + return object; + var message = new $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue(); + if (object.int64Value != null) + if ($util.Long) + (message.int64Value = $util.Long.fromValue(object.int64Value)).unsigned = false; + else if (typeof object.int64Value === "string") + message.int64Value = parseInt(object.int64Value, 10); + else if (typeof object.int64Value === "number") + message.int64Value = object.int64Value; + else if (typeof object.int64Value === "object") + message.int64Value = new $util.LongBits(object.int64Value.low >>> 0, object.int64Value.high >>> 0).toNumber(); + if (object.doubleValue != null) + message.doubleValue = Number(object.doubleValue); + return message; + }; + + /** + * Creates a plain object from a NumericValue message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue + * @static + * @param {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue} message NumericValue + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NumericValue.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.int64Value != null && message.hasOwnProperty("int64Value")) { + if (typeof message.int64Value === "number") + object.int64Value = options.longs === String ? String(message.int64Value) : message.int64Value; + else + object.int64Value = options.longs === String ? $util.Long.prototype.toString.call(message.int64Value) : options.longs === Number ? new $util.LongBits(message.int64Value.low >>> 0, message.int64Value.high >>> 0).toNumber() : message.int64Value; + if (options.oneofs) + object.oneValue = "int64Value"; + } + if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) { + object.doubleValue = options.json && !isFinite(message.doubleValue) ? String(message.doubleValue) : message.doubleValue; + if (options.oneofs) + object.oneValue = "doubleValue"; + } + return object; + }; + + /** + * Converts this NumericValue to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue + * @instance + * @returns {Object.} JSON object + */ + NumericValue.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for NumericValue + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NumericValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue"; + }; + + return NumericValue; + })(); + + AudienceDimensionOrMetricFilter.NumericFilter = (function() { + + /** + * Properties of a NumericFilter. + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter + * @interface INumericFilter + * @property {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter.Operation|null} [operation] NumericFilter operation + * @property {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.INumericValue|null} [value] NumericFilter value + */ + + /** + * Constructs a new NumericFilter. + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter + * @classdesc Represents a NumericFilter. + * @implements INumericFilter + * @constructor + * @param {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.INumericFilter=} [properties] Properties to set + */ + function NumericFilter(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * NumericFilter operation. + * @member {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter.Operation} operation + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter + * @instance + */ + NumericFilter.prototype.operation = 0; + + /** + * NumericFilter value. + * @member {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.INumericValue|null|undefined} value + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter + * @instance + */ + NumericFilter.prototype.value = null; + + /** + * Creates a new NumericFilter instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter + * @static + * @param {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.INumericFilter=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter} NumericFilter instance + */ + NumericFilter.create = function create(properties) { + return new NumericFilter(properties); + }; + + /** + * Encodes the specified NumericFilter message. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter + * @static + * @param {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.INumericFilter} message NumericFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NumericFilter.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.operation != null && Object.hasOwnProperty.call(message, "operation")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.operation); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue.encode(message.value, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified NumericFilter message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter + * @static + * @param {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.INumericFilter} message NumericFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NumericFilter.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NumericFilter message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter} NumericFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NumericFilter.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.operation = reader.int32(); + break; + } + case 2: { + message.value = $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a NumericFilter message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter} NumericFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NumericFilter.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NumericFilter message. + * @function verify + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NumericFilter.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.operation != null && message.hasOwnProperty("operation")) + switch (message.operation) { + default: + return "operation: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + if (message.value != null && message.hasOwnProperty("value")) { + var error = $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue.verify(message.value); + if (error) + return "value." + error; + } + return null; + }; + + /** + * Creates a NumericFilter message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter} NumericFilter + */ + NumericFilter.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter) + return object; + var message = new $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter(); + switch (object.operation) { + default: + if (typeof object.operation === "number") { + message.operation = object.operation; + break; + } + break; + case "OPERATION_UNSPECIFIED": + case 0: + message.operation = 0; + break; + case "EQUAL": + case 1: + message.operation = 1; + break; + case "LESS_THAN": + case 2: + message.operation = 2; + break; + case "LESS_THAN_OR_EQUAL": + case 3: + message.operation = 3; + break; + case "GREATER_THAN": + case 4: + message.operation = 4; + break; + case "GREATER_THAN_OR_EQUAL": + case 5: + message.operation = 5; + break; + } + if (object.value != null) { + if (typeof object.value !== "object") + throw TypeError(".google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter.value: object expected"); + message.value = $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue.fromObject(object.value); + } + return message; + }; + + /** + * Creates a plain object from a NumericFilter message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter + * @static + * @param {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter} message NumericFilter + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NumericFilter.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.operation = options.enums === String ? "OPERATION_UNSPECIFIED" : 0; + object.value = null; + } + if (message.operation != null && message.hasOwnProperty("operation")) + object.operation = options.enums === String ? $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter.Operation[message.operation] === undefined ? message.operation : $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter.Operation[message.operation] : message.operation; + if (message.value != null && message.hasOwnProperty("value")) + object.value = $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue.toObject(message.value, options); + return object; + }; + + /** + * Converts this NumericFilter to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter + * @instance + * @returns {Object.} JSON object + */ + NumericFilter.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for NumericFilter + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NumericFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter"; + }; + + /** + * Operation enum. + * @name google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericFilter.Operation + * @enum {number} + * @property {number} OPERATION_UNSPECIFIED=0 OPERATION_UNSPECIFIED value + * @property {number} EQUAL=1 EQUAL value + * @property {number} LESS_THAN=2 LESS_THAN value + * @property {number} LESS_THAN_OR_EQUAL=3 LESS_THAN_OR_EQUAL value + * @property {number} GREATER_THAN=4 GREATER_THAN value + * @property {number} GREATER_THAN_OR_EQUAL=5 GREATER_THAN_OR_EQUAL value + */ + NumericFilter.Operation = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "OPERATION_UNSPECIFIED"] = 0; + values[valuesById[1] = "EQUAL"] = 1; + values[valuesById[2] = "LESS_THAN"] = 2; + values[valuesById[3] = "LESS_THAN_OR_EQUAL"] = 3; + values[valuesById[4] = "GREATER_THAN"] = 4; + values[valuesById[5] = "GREATER_THAN_OR_EQUAL"] = 5; + return values; + })(); + + return NumericFilter; + })(); + + AudienceDimensionOrMetricFilter.BetweenFilter = (function() { + + /** + * Properties of a BetweenFilter. + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter + * @interface IBetweenFilter + * @property {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.INumericValue|null} [fromValue] BetweenFilter fromValue + * @property {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.INumericValue|null} [toValue] BetweenFilter toValue + */ + + /** + * Constructs a new BetweenFilter. + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter + * @classdesc Represents a BetweenFilter. + * @implements IBetweenFilter + * @constructor + * @param {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.IBetweenFilter=} [properties] Properties to set + */ + function BetweenFilter(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BetweenFilter fromValue. + * @member {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.INumericValue|null|undefined} fromValue + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.BetweenFilter + * @instance + */ + BetweenFilter.prototype.fromValue = null; + + /** + * BetweenFilter toValue. + * @member {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.INumericValue|null|undefined} toValue + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.BetweenFilter + * @instance + */ + BetweenFilter.prototype.toValue = null; + + /** + * Creates a new BetweenFilter instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.BetweenFilter + * @static + * @param {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.IBetweenFilter=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.BetweenFilter} BetweenFilter instance + */ + BetweenFilter.create = function create(properties) { + return new BetweenFilter(properties); + }; + + /** + * Encodes the specified BetweenFilter message. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.BetweenFilter.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.BetweenFilter + * @static + * @param {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.IBetweenFilter} message BetweenFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BetweenFilter.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.fromValue != null && Object.hasOwnProperty.call(message, "fromValue")) + $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue.encode(message.fromValue, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.toValue != null && Object.hasOwnProperty.call(message, "toValue")) + $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue.encode(message.toValue, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified BetweenFilter message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.BetweenFilter.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.BetweenFilter + * @static + * @param {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.IBetweenFilter} message BetweenFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BetweenFilter.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BetweenFilter message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.BetweenFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.BetweenFilter} BetweenFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BetweenFilter.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.BetweenFilter(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.fromValue = $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue.decode(reader, reader.uint32()); + break; + } + case 2: { + message.toValue = $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BetweenFilter message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.BetweenFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.BetweenFilter} BetweenFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BetweenFilter.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BetweenFilter message. + * @function verify + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.BetweenFilter + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BetweenFilter.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.fromValue != null && message.hasOwnProperty("fromValue")) { + var error = $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue.verify(message.fromValue); + if (error) + return "fromValue." + error; + } + if (message.toValue != null && message.hasOwnProperty("toValue")) { + var error = $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue.verify(message.toValue); + if (error) + return "toValue." + error; + } + return null; + }; + + /** + * Creates a BetweenFilter message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.BetweenFilter + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.BetweenFilter} BetweenFilter + */ + BetweenFilter.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.BetweenFilter) + return object; + var message = new $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.BetweenFilter(); + if (object.fromValue != null) { + if (typeof object.fromValue !== "object") + throw TypeError(".google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.BetweenFilter.fromValue: object expected"); + message.fromValue = $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue.fromObject(object.fromValue); + } + if (object.toValue != null) { + if (typeof object.toValue !== "object") + throw TypeError(".google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.BetweenFilter.toValue: object expected"); + message.toValue = $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue.fromObject(object.toValue); + } + return message; + }; + + /** + * Creates a plain object from a BetweenFilter message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.BetweenFilter + * @static + * @param {google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.BetweenFilter} message BetweenFilter + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BetweenFilter.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.fromValue = null; + object.toValue = null; + } + if (message.fromValue != null && message.hasOwnProperty("fromValue")) + object.fromValue = $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue.toObject(message.fromValue, options); + if (message.toValue != null && message.hasOwnProperty("toValue")) + object.toValue = $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.NumericValue.toObject(message.toValue, options); + return object; + }; + + /** + * Converts this BetweenFilter to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.BetweenFilter + * @instance + * @returns {Object.} JSON object + */ + BetweenFilter.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BetweenFilter + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.BetweenFilter + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BetweenFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.BetweenFilter"; + }; + + return BetweenFilter; + })(); + + return AudienceDimensionOrMetricFilter; + })(); + + v1alpha.AudienceEventFilter = (function() { + + /** + * Properties of an AudienceEventFilter. + * @memberof google.analytics.admin.v1alpha + * @interface IAudienceEventFilter + * @property {string|null} [eventName] AudienceEventFilter eventName + * @property {google.analytics.admin.v1alpha.IAudienceFilterExpression|null} [eventParameterFilterExpression] AudienceEventFilter eventParameterFilterExpression + */ + + /** + * Constructs a new AudienceEventFilter. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents an AudienceEventFilter. + * @implements IAudienceEventFilter + * @constructor + * @param {google.analytics.admin.v1alpha.IAudienceEventFilter=} [properties] Properties to set + */ + function AudienceEventFilter(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AudienceEventFilter eventName. + * @member {string} eventName + * @memberof google.analytics.admin.v1alpha.AudienceEventFilter + * @instance + */ + AudienceEventFilter.prototype.eventName = ""; + + /** + * AudienceEventFilter eventParameterFilterExpression. + * @member {google.analytics.admin.v1alpha.IAudienceFilterExpression|null|undefined} eventParameterFilterExpression + * @memberof google.analytics.admin.v1alpha.AudienceEventFilter + * @instance + */ + AudienceEventFilter.prototype.eventParameterFilterExpression = null; + + /** + * Creates a new AudienceEventFilter instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.AudienceEventFilter + * @static + * @param {google.analytics.admin.v1alpha.IAudienceEventFilter=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.AudienceEventFilter} AudienceEventFilter instance + */ + AudienceEventFilter.create = function create(properties) { + return new AudienceEventFilter(properties); + }; + + /** + * Encodes the specified AudienceEventFilter message. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceEventFilter.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.AudienceEventFilter + * @static + * @param {google.analytics.admin.v1alpha.IAudienceEventFilter} message AudienceEventFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AudienceEventFilter.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.eventName != null && Object.hasOwnProperty.call(message, "eventName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.eventName); + if (message.eventParameterFilterExpression != null && Object.hasOwnProperty.call(message, "eventParameterFilterExpression")) + $root.google.analytics.admin.v1alpha.AudienceFilterExpression.encode(message.eventParameterFilterExpression, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified AudienceEventFilter message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceEventFilter.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.AudienceEventFilter + * @static + * @param {google.analytics.admin.v1alpha.IAudienceEventFilter} message AudienceEventFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AudienceEventFilter.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AudienceEventFilter message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.AudienceEventFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.AudienceEventFilter} AudienceEventFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AudienceEventFilter.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.AudienceEventFilter(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.eventName = reader.string(); + break; + } + case 2: { + message.eventParameterFilterExpression = $root.google.analytics.admin.v1alpha.AudienceFilterExpression.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AudienceEventFilter message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.AudienceEventFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.AudienceEventFilter} AudienceEventFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AudienceEventFilter.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AudienceEventFilter message. + * @function verify + * @memberof google.analytics.admin.v1alpha.AudienceEventFilter + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AudienceEventFilter.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.eventName != null && message.hasOwnProperty("eventName")) + if (!$util.isString(message.eventName)) + return "eventName: string expected"; + if (message.eventParameterFilterExpression != null && message.hasOwnProperty("eventParameterFilterExpression")) { + var error = $root.google.analytics.admin.v1alpha.AudienceFilterExpression.verify(message.eventParameterFilterExpression); + if (error) + return "eventParameterFilterExpression." + error; + } + return null; + }; + + /** + * Creates an AudienceEventFilter message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.AudienceEventFilter + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.AudienceEventFilter} AudienceEventFilter + */ + AudienceEventFilter.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.AudienceEventFilter) + return object; + var message = new $root.google.analytics.admin.v1alpha.AudienceEventFilter(); + if (object.eventName != null) + message.eventName = String(object.eventName); + if (object.eventParameterFilterExpression != null) { + if (typeof object.eventParameterFilterExpression !== "object") + throw TypeError(".google.analytics.admin.v1alpha.AudienceEventFilter.eventParameterFilterExpression: object expected"); + message.eventParameterFilterExpression = $root.google.analytics.admin.v1alpha.AudienceFilterExpression.fromObject(object.eventParameterFilterExpression); + } + return message; + }; + + /** + * Creates a plain object from an AudienceEventFilter message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.AudienceEventFilter + * @static + * @param {google.analytics.admin.v1alpha.AudienceEventFilter} message AudienceEventFilter + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AudienceEventFilter.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.eventName = ""; + object.eventParameterFilterExpression = null; + } + if (message.eventName != null && message.hasOwnProperty("eventName")) + object.eventName = message.eventName; + if (message.eventParameterFilterExpression != null && message.hasOwnProperty("eventParameterFilterExpression")) + object.eventParameterFilterExpression = $root.google.analytics.admin.v1alpha.AudienceFilterExpression.toObject(message.eventParameterFilterExpression, options); + return object; + }; + + /** + * Converts this AudienceEventFilter to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.AudienceEventFilter + * @instance + * @returns {Object.} JSON object + */ + AudienceEventFilter.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AudienceEventFilter + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.AudienceEventFilter + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AudienceEventFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.AudienceEventFilter"; + }; + + return AudienceEventFilter; + })(); + + v1alpha.AudienceFilterExpression = (function() { + + /** + * Properties of an AudienceFilterExpression. + * @memberof google.analytics.admin.v1alpha + * @interface IAudienceFilterExpression + * @property {google.analytics.admin.v1alpha.IAudienceFilterExpressionList|null} [andGroup] AudienceFilterExpression andGroup + * @property {google.analytics.admin.v1alpha.IAudienceFilterExpressionList|null} [orGroup] AudienceFilterExpression orGroup + * @property {google.analytics.admin.v1alpha.IAudienceFilterExpression|null} [notExpression] AudienceFilterExpression notExpression + * @property {google.analytics.admin.v1alpha.IAudienceDimensionOrMetricFilter|null} [dimensionOrMetricFilter] AudienceFilterExpression dimensionOrMetricFilter + * @property {google.analytics.admin.v1alpha.IAudienceEventFilter|null} [eventFilter] AudienceFilterExpression eventFilter + */ + + /** + * Constructs a new AudienceFilterExpression. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents an AudienceFilterExpression. + * @implements IAudienceFilterExpression + * @constructor + * @param {google.analytics.admin.v1alpha.IAudienceFilterExpression=} [properties] Properties to set + */ + function AudienceFilterExpression(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AudienceFilterExpression andGroup. + * @member {google.analytics.admin.v1alpha.IAudienceFilterExpressionList|null|undefined} andGroup + * @memberof google.analytics.admin.v1alpha.AudienceFilterExpression + * @instance + */ + AudienceFilterExpression.prototype.andGroup = null; + + /** + * AudienceFilterExpression orGroup. + * @member {google.analytics.admin.v1alpha.IAudienceFilterExpressionList|null|undefined} orGroup + * @memberof google.analytics.admin.v1alpha.AudienceFilterExpression + * @instance + */ + AudienceFilterExpression.prototype.orGroup = null; + + /** + * AudienceFilterExpression notExpression. + * @member {google.analytics.admin.v1alpha.IAudienceFilterExpression|null|undefined} notExpression + * @memberof google.analytics.admin.v1alpha.AudienceFilterExpression + * @instance + */ + AudienceFilterExpression.prototype.notExpression = null; + + /** + * AudienceFilterExpression dimensionOrMetricFilter. + * @member {google.analytics.admin.v1alpha.IAudienceDimensionOrMetricFilter|null|undefined} dimensionOrMetricFilter + * @memberof google.analytics.admin.v1alpha.AudienceFilterExpression + * @instance + */ + AudienceFilterExpression.prototype.dimensionOrMetricFilter = null; + + /** + * AudienceFilterExpression eventFilter. + * @member {google.analytics.admin.v1alpha.IAudienceEventFilter|null|undefined} eventFilter + * @memberof google.analytics.admin.v1alpha.AudienceFilterExpression + * @instance + */ + AudienceFilterExpression.prototype.eventFilter = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * AudienceFilterExpression expr. + * @member {"andGroup"|"orGroup"|"notExpression"|"dimensionOrMetricFilter"|"eventFilter"|undefined} expr + * @memberof google.analytics.admin.v1alpha.AudienceFilterExpression + * @instance + */ + Object.defineProperty(AudienceFilterExpression.prototype, "expr", { + get: $util.oneOfGetter($oneOfFields = ["andGroup", "orGroup", "notExpression", "dimensionOrMetricFilter", "eventFilter"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new AudienceFilterExpression instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.AudienceFilterExpression + * @static + * @param {google.analytics.admin.v1alpha.IAudienceFilterExpression=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.AudienceFilterExpression} AudienceFilterExpression instance + */ + AudienceFilterExpression.create = function create(properties) { + return new AudienceFilterExpression(properties); + }; + + /** + * Encodes the specified AudienceFilterExpression message. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceFilterExpression.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.AudienceFilterExpression + * @static + * @param {google.analytics.admin.v1alpha.IAudienceFilterExpression} message AudienceFilterExpression message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AudienceFilterExpression.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.andGroup != null && Object.hasOwnProperty.call(message, "andGroup")) + $root.google.analytics.admin.v1alpha.AudienceFilterExpressionList.encode(message.andGroup, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.orGroup != null && Object.hasOwnProperty.call(message, "orGroup")) + $root.google.analytics.admin.v1alpha.AudienceFilterExpressionList.encode(message.orGroup, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.notExpression != null && Object.hasOwnProperty.call(message, "notExpression")) + $root.google.analytics.admin.v1alpha.AudienceFilterExpression.encode(message.notExpression, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.dimensionOrMetricFilter != null && Object.hasOwnProperty.call(message, "dimensionOrMetricFilter")) + $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.encode(message.dimensionOrMetricFilter, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.eventFilter != null && Object.hasOwnProperty.call(message, "eventFilter")) + $root.google.analytics.admin.v1alpha.AudienceEventFilter.encode(message.eventFilter, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified AudienceFilterExpression message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceFilterExpression.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.AudienceFilterExpression + * @static + * @param {google.analytics.admin.v1alpha.IAudienceFilterExpression} message AudienceFilterExpression message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AudienceFilterExpression.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AudienceFilterExpression message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.AudienceFilterExpression + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.AudienceFilterExpression} AudienceFilterExpression + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AudienceFilterExpression.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.AudienceFilterExpression(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.andGroup = $root.google.analytics.admin.v1alpha.AudienceFilterExpressionList.decode(reader, reader.uint32()); + break; + } + case 2: { + message.orGroup = $root.google.analytics.admin.v1alpha.AudienceFilterExpressionList.decode(reader, reader.uint32()); + break; + } + case 3: { + message.notExpression = $root.google.analytics.admin.v1alpha.AudienceFilterExpression.decode(reader, reader.uint32()); + break; + } + case 4: { + message.dimensionOrMetricFilter = $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.decode(reader, reader.uint32()); + break; + } + case 5: { + message.eventFilter = $root.google.analytics.admin.v1alpha.AudienceEventFilter.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AudienceFilterExpression message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.AudienceFilterExpression + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.AudienceFilterExpression} AudienceFilterExpression + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AudienceFilterExpression.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AudienceFilterExpression message. + * @function verify + * @memberof google.analytics.admin.v1alpha.AudienceFilterExpression + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AudienceFilterExpression.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.andGroup != null && message.hasOwnProperty("andGroup")) { + properties.expr = 1; + { + var error = $root.google.analytics.admin.v1alpha.AudienceFilterExpressionList.verify(message.andGroup); + if (error) + return "andGroup." + error; + } + } + if (message.orGroup != null && message.hasOwnProperty("orGroup")) { + if (properties.expr === 1) + return "expr: multiple values"; + properties.expr = 1; + { + var error = $root.google.analytics.admin.v1alpha.AudienceFilterExpressionList.verify(message.orGroup); + if (error) + return "orGroup." + error; + } + } + if (message.notExpression != null && message.hasOwnProperty("notExpression")) { + if (properties.expr === 1) + return "expr: multiple values"; + properties.expr = 1; + { + var error = $root.google.analytics.admin.v1alpha.AudienceFilterExpression.verify(message.notExpression); + if (error) + return "notExpression." + error; + } + } + if (message.dimensionOrMetricFilter != null && message.hasOwnProperty("dimensionOrMetricFilter")) { + if (properties.expr === 1) + return "expr: multiple values"; + properties.expr = 1; + { + var error = $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.verify(message.dimensionOrMetricFilter); + if (error) + return "dimensionOrMetricFilter." + error; + } + } + if (message.eventFilter != null && message.hasOwnProperty("eventFilter")) { + if (properties.expr === 1) + return "expr: multiple values"; + properties.expr = 1; + { + var error = $root.google.analytics.admin.v1alpha.AudienceEventFilter.verify(message.eventFilter); + if (error) + return "eventFilter." + error; + } + } + return null; + }; + + /** + * Creates an AudienceFilterExpression message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.AudienceFilterExpression + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.AudienceFilterExpression} AudienceFilterExpression + */ + AudienceFilterExpression.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.AudienceFilterExpression) + return object; + var message = new $root.google.analytics.admin.v1alpha.AudienceFilterExpression(); + if (object.andGroup != null) { + if (typeof object.andGroup !== "object") + throw TypeError(".google.analytics.admin.v1alpha.AudienceFilterExpression.andGroup: object expected"); + message.andGroup = $root.google.analytics.admin.v1alpha.AudienceFilterExpressionList.fromObject(object.andGroup); + } + if (object.orGroup != null) { + if (typeof object.orGroup !== "object") + throw TypeError(".google.analytics.admin.v1alpha.AudienceFilterExpression.orGroup: object expected"); + message.orGroup = $root.google.analytics.admin.v1alpha.AudienceFilterExpressionList.fromObject(object.orGroup); + } + if (object.notExpression != null) { + if (typeof object.notExpression !== "object") + throw TypeError(".google.analytics.admin.v1alpha.AudienceFilterExpression.notExpression: object expected"); + message.notExpression = $root.google.analytics.admin.v1alpha.AudienceFilterExpression.fromObject(object.notExpression); + } + if (object.dimensionOrMetricFilter != null) { + if (typeof object.dimensionOrMetricFilter !== "object") + throw TypeError(".google.analytics.admin.v1alpha.AudienceFilterExpression.dimensionOrMetricFilter: object expected"); + message.dimensionOrMetricFilter = $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.fromObject(object.dimensionOrMetricFilter); + } + if (object.eventFilter != null) { + if (typeof object.eventFilter !== "object") + throw TypeError(".google.analytics.admin.v1alpha.AudienceFilterExpression.eventFilter: object expected"); + message.eventFilter = $root.google.analytics.admin.v1alpha.AudienceEventFilter.fromObject(object.eventFilter); + } + return message; + }; + + /** + * Creates a plain object from an AudienceFilterExpression message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.AudienceFilterExpression + * @static + * @param {google.analytics.admin.v1alpha.AudienceFilterExpression} message AudienceFilterExpression + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AudienceFilterExpression.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.andGroup != null && message.hasOwnProperty("andGroup")) { + object.andGroup = $root.google.analytics.admin.v1alpha.AudienceFilterExpressionList.toObject(message.andGroup, options); + if (options.oneofs) + object.expr = "andGroup"; + } + if (message.orGroup != null && message.hasOwnProperty("orGroup")) { + object.orGroup = $root.google.analytics.admin.v1alpha.AudienceFilterExpressionList.toObject(message.orGroup, options); + if (options.oneofs) + object.expr = "orGroup"; + } + if (message.notExpression != null && message.hasOwnProperty("notExpression")) { + object.notExpression = $root.google.analytics.admin.v1alpha.AudienceFilterExpression.toObject(message.notExpression, options); + if (options.oneofs) + object.expr = "notExpression"; + } + if (message.dimensionOrMetricFilter != null && message.hasOwnProperty("dimensionOrMetricFilter")) { + object.dimensionOrMetricFilter = $root.google.analytics.admin.v1alpha.AudienceDimensionOrMetricFilter.toObject(message.dimensionOrMetricFilter, options); + if (options.oneofs) + object.expr = "dimensionOrMetricFilter"; + } + if (message.eventFilter != null && message.hasOwnProperty("eventFilter")) { + object.eventFilter = $root.google.analytics.admin.v1alpha.AudienceEventFilter.toObject(message.eventFilter, options); + if (options.oneofs) + object.expr = "eventFilter"; + } + return object; + }; + + /** + * Converts this AudienceFilterExpression to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.AudienceFilterExpression + * @instance + * @returns {Object.} JSON object + */ + AudienceFilterExpression.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AudienceFilterExpression + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.AudienceFilterExpression + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AudienceFilterExpression.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.AudienceFilterExpression"; + }; + + return AudienceFilterExpression; + })(); + + v1alpha.AudienceFilterExpressionList = (function() { + + /** + * Properties of an AudienceFilterExpressionList. + * @memberof google.analytics.admin.v1alpha + * @interface IAudienceFilterExpressionList + * @property {Array.|null} [filterExpressions] AudienceFilterExpressionList filterExpressions + */ + + /** + * Constructs a new AudienceFilterExpressionList. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents an AudienceFilterExpressionList. + * @implements IAudienceFilterExpressionList + * @constructor + * @param {google.analytics.admin.v1alpha.IAudienceFilterExpressionList=} [properties] Properties to set + */ + function AudienceFilterExpressionList(properties) { + this.filterExpressions = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AudienceFilterExpressionList filterExpressions. + * @member {Array.} filterExpressions + * @memberof google.analytics.admin.v1alpha.AudienceFilterExpressionList + * @instance + */ + AudienceFilterExpressionList.prototype.filterExpressions = $util.emptyArray; + + /** + * Creates a new AudienceFilterExpressionList instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.AudienceFilterExpressionList + * @static + * @param {google.analytics.admin.v1alpha.IAudienceFilterExpressionList=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.AudienceFilterExpressionList} AudienceFilterExpressionList instance + */ + AudienceFilterExpressionList.create = function create(properties) { + return new AudienceFilterExpressionList(properties); + }; + + /** + * Encodes the specified AudienceFilterExpressionList message. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceFilterExpressionList.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.AudienceFilterExpressionList + * @static + * @param {google.analytics.admin.v1alpha.IAudienceFilterExpressionList} message AudienceFilterExpressionList message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AudienceFilterExpressionList.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.filterExpressions != null && message.filterExpressions.length) + for (var i = 0; i < message.filterExpressions.length; ++i) + $root.google.analytics.admin.v1alpha.AudienceFilterExpression.encode(message.filterExpressions[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified AudienceFilterExpressionList message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceFilterExpressionList.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.AudienceFilterExpressionList + * @static + * @param {google.analytics.admin.v1alpha.IAudienceFilterExpressionList} message AudienceFilterExpressionList message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AudienceFilterExpressionList.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AudienceFilterExpressionList message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.AudienceFilterExpressionList + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.AudienceFilterExpressionList} AudienceFilterExpressionList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AudienceFilterExpressionList.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.AudienceFilterExpressionList(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.filterExpressions && message.filterExpressions.length)) + message.filterExpressions = []; + message.filterExpressions.push($root.google.analytics.admin.v1alpha.AudienceFilterExpression.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AudienceFilterExpressionList message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.AudienceFilterExpressionList + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.AudienceFilterExpressionList} AudienceFilterExpressionList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AudienceFilterExpressionList.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AudienceFilterExpressionList message. + * @function verify + * @memberof google.analytics.admin.v1alpha.AudienceFilterExpressionList + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AudienceFilterExpressionList.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.filterExpressions != null && message.hasOwnProperty("filterExpressions")) { + if (!Array.isArray(message.filterExpressions)) + return "filterExpressions: array expected"; + for (var i = 0; i < message.filterExpressions.length; ++i) { + var error = $root.google.analytics.admin.v1alpha.AudienceFilterExpression.verify(message.filterExpressions[i]); + if (error) + return "filterExpressions." + error; + } + } + return null; + }; + + /** + * Creates an AudienceFilterExpressionList message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.AudienceFilterExpressionList + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.AudienceFilterExpressionList} AudienceFilterExpressionList + */ + AudienceFilterExpressionList.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.AudienceFilterExpressionList) + return object; + var message = new $root.google.analytics.admin.v1alpha.AudienceFilterExpressionList(); + if (object.filterExpressions) { + if (!Array.isArray(object.filterExpressions)) + throw TypeError(".google.analytics.admin.v1alpha.AudienceFilterExpressionList.filterExpressions: array expected"); + message.filterExpressions = []; + for (var i = 0; i < object.filterExpressions.length; ++i) { + if (typeof object.filterExpressions[i] !== "object") + throw TypeError(".google.analytics.admin.v1alpha.AudienceFilterExpressionList.filterExpressions: object expected"); + message.filterExpressions[i] = $root.google.analytics.admin.v1alpha.AudienceFilterExpression.fromObject(object.filterExpressions[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an AudienceFilterExpressionList message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.AudienceFilterExpressionList + * @static + * @param {google.analytics.admin.v1alpha.AudienceFilterExpressionList} message AudienceFilterExpressionList + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AudienceFilterExpressionList.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.filterExpressions = []; + if (message.filterExpressions && message.filterExpressions.length) { + object.filterExpressions = []; + for (var j = 0; j < message.filterExpressions.length; ++j) + object.filterExpressions[j] = $root.google.analytics.admin.v1alpha.AudienceFilterExpression.toObject(message.filterExpressions[j], options); + } + return object; + }; + + /** + * Converts this AudienceFilterExpressionList to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.AudienceFilterExpressionList + * @instance + * @returns {Object.} JSON object + */ + AudienceFilterExpressionList.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AudienceFilterExpressionList + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.AudienceFilterExpressionList + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AudienceFilterExpressionList.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.AudienceFilterExpressionList"; + }; + + return AudienceFilterExpressionList; + })(); + + v1alpha.AudienceSimpleFilter = (function() { + + /** + * Properties of an AudienceSimpleFilter. + * @memberof google.analytics.admin.v1alpha + * @interface IAudienceSimpleFilter + * @property {google.analytics.admin.v1alpha.AudienceFilterScope|null} [scope] AudienceSimpleFilter scope + * @property {google.analytics.admin.v1alpha.IAudienceFilterExpression|null} [filterExpression] AudienceSimpleFilter filterExpression + */ + + /** + * Constructs a new AudienceSimpleFilter. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents an AudienceSimpleFilter. + * @implements IAudienceSimpleFilter + * @constructor + * @param {google.analytics.admin.v1alpha.IAudienceSimpleFilter=} [properties] Properties to set + */ + function AudienceSimpleFilter(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AudienceSimpleFilter scope. + * @member {google.analytics.admin.v1alpha.AudienceFilterScope} scope + * @memberof google.analytics.admin.v1alpha.AudienceSimpleFilter + * @instance + */ + AudienceSimpleFilter.prototype.scope = 0; + + /** + * AudienceSimpleFilter filterExpression. + * @member {google.analytics.admin.v1alpha.IAudienceFilterExpression|null|undefined} filterExpression + * @memberof google.analytics.admin.v1alpha.AudienceSimpleFilter + * @instance + */ + AudienceSimpleFilter.prototype.filterExpression = null; + + /** + * Creates a new AudienceSimpleFilter instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.AudienceSimpleFilter + * @static + * @param {google.analytics.admin.v1alpha.IAudienceSimpleFilter=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.AudienceSimpleFilter} AudienceSimpleFilter instance + */ + AudienceSimpleFilter.create = function create(properties) { + return new AudienceSimpleFilter(properties); + }; + + /** + * Encodes the specified AudienceSimpleFilter message. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceSimpleFilter.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.AudienceSimpleFilter + * @static + * @param {google.analytics.admin.v1alpha.IAudienceSimpleFilter} message AudienceSimpleFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AudienceSimpleFilter.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.scope != null && Object.hasOwnProperty.call(message, "scope")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.scope); + if (message.filterExpression != null && Object.hasOwnProperty.call(message, "filterExpression")) + $root.google.analytics.admin.v1alpha.AudienceFilterExpression.encode(message.filterExpression, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified AudienceSimpleFilter message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceSimpleFilter.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.AudienceSimpleFilter + * @static + * @param {google.analytics.admin.v1alpha.IAudienceSimpleFilter} message AudienceSimpleFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AudienceSimpleFilter.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AudienceSimpleFilter message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.AudienceSimpleFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.AudienceSimpleFilter} AudienceSimpleFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AudienceSimpleFilter.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.AudienceSimpleFilter(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.scope = reader.int32(); + break; + } + case 2: { + message.filterExpression = $root.google.analytics.admin.v1alpha.AudienceFilterExpression.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AudienceSimpleFilter message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.AudienceSimpleFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.AudienceSimpleFilter} AudienceSimpleFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AudienceSimpleFilter.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AudienceSimpleFilter message. + * @function verify + * @memberof google.analytics.admin.v1alpha.AudienceSimpleFilter + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AudienceSimpleFilter.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.scope != null && message.hasOwnProperty("scope")) + switch (message.scope) { + default: + return "scope: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.filterExpression != null && message.hasOwnProperty("filterExpression")) { + var error = $root.google.analytics.admin.v1alpha.AudienceFilterExpression.verify(message.filterExpression); + if (error) + return "filterExpression." + error; + } + return null; + }; + + /** + * Creates an AudienceSimpleFilter message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.AudienceSimpleFilter + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.AudienceSimpleFilter} AudienceSimpleFilter + */ + AudienceSimpleFilter.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.AudienceSimpleFilter) + return object; + var message = new $root.google.analytics.admin.v1alpha.AudienceSimpleFilter(); + switch (object.scope) { + default: + if (typeof object.scope === "number") { + message.scope = object.scope; + break; + } + break; + case "AUDIENCE_FILTER_SCOPE_UNSPECIFIED": + case 0: + message.scope = 0; + break; + case "AUDIENCE_FILTER_SCOPE_WITHIN_SAME_EVENT": + case 1: + message.scope = 1; + break; + case "AUDIENCE_FILTER_SCOPE_WITHIN_SAME_SESSION": + case 2: + message.scope = 2; + break; + case "AUDIENCE_FILTER_SCOPE_ACROSS_ALL_SESSIONS": + case 3: + message.scope = 3; + break; + } + if (object.filterExpression != null) { + if (typeof object.filterExpression !== "object") + throw TypeError(".google.analytics.admin.v1alpha.AudienceSimpleFilter.filterExpression: object expected"); + message.filterExpression = $root.google.analytics.admin.v1alpha.AudienceFilterExpression.fromObject(object.filterExpression); + } + return message; + }; + + /** + * Creates a plain object from an AudienceSimpleFilter message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.AudienceSimpleFilter + * @static + * @param {google.analytics.admin.v1alpha.AudienceSimpleFilter} message AudienceSimpleFilter + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AudienceSimpleFilter.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.scope = options.enums === String ? "AUDIENCE_FILTER_SCOPE_UNSPECIFIED" : 0; + object.filterExpression = null; + } + if (message.scope != null && message.hasOwnProperty("scope")) + object.scope = options.enums === String ? $root.google.analytics.admin.v1alpha.AudienceFilterScope[message.scope] === undefined ? message.scope : $root.google.analytics.admin.v1alpha.AudienceFilterScope[message.scope] : message.scope; + if (message.filterExpression != null && message.hasOwnProperty("filterExpression")) + object.filterExpression = $root.google.analytics.admin.v1alpha.AudienceFilterExpression.toObject(message.filterExpression, options); + return object; + }; + + /** + * Converts this AudienceSimpleFilter to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.AudienceSimpleFilter + * @instance + * @returns {Object.} JSON object + */ + AudienceSimpleFilter.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AudienceSimpleFilter + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.AudienceSimpleFilter + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AudienceSimpleFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.AudienceSimpleFilter"; + }; + + return AudienceSimpleFilter; + })(); + + v1alpha.AudienceSequenceFilter = (function() { + + /** + * Properties of an AudienceSequenceFilter. + * @memberof google.analytics.admin.v1alpha + * @interface IAudienceSequenceFilter + * @property {google.analytics.admin.v1alpha.AudienceFilterScope|null} [scope] AudienceSequenceFilter scope + * @property {google.protobuf.IDuration|null} [sequenceMaximumDuration] AudienceSequenceFilter sequenceMaximumDuration + * @property {Array.|null} [sequenceSteps] AudienceSequenceFilter sequenceSteps + */ + + /** + * Constructs a new AudienceSequenceFilter. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents an AudienceSequenceFilter. + * @implements IAudienceSequenceFilter + * @constructor + * @param {google.analytics.admin.v1alpha.IAudienceSequenceFilter=} [properties] Properties to set + */ + function AudienceSequenceFilter(properties) { + this.sequenceSteps = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AudienceSequenceFilter scope. + * @member {google.analytics.admin.v1alpha.AudienceFilterScope} scope + * @memberof google.analytics.admin.v1alpha.AudienceSequenceFilter + * @instance + */ + AudienceSequenceFilter.prototype.scope = 0; + + /** + * AudienceSequenceFilter sequenceMaximumDuration. + * @member {google.protobuf.IDuration|null|undefined} sequenceMaximumDuration + * @memberof google.analytics.admin.v1alpha.AudienceSequenceFilter + * @instance + */ + AudienceSequenceFilter.prototype.sequenceMaximumDuration = null; + + /** + * AudienceSequenceFilter sequenceSteps. + * @member {Array.} sequenceSteps + * @memberof google.analytics.admin.v1alpha.AudienceSequenceFilter + * @instance + */ + AudienceSequenceFilter.prototype.sequenceSteps = $util.emptyArray; + + /** + * Creates a new AudienceSequenceFilter instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.AudienceSequenceFilter + * @static + * @param {google.analytics.admin.v1alpha.IAudienceSequenceFilter=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.AudienceSequenceFilter} AudienceSequenceFilter instance + */ + AudienceSequenceFilter.create = function create(properties) { + return new AudienceSequenceFilter(properties); + }; + + /** + * Encodes the specified AudienceSequenceFilter message. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceSequenceFilter.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.AudienceSequenceFilter + * @static + * @param {google.analytics.admin.v1alpha.IAudienceSequenceFilter} message AudienceSequenceFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AudienceSequenceFilter.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.scope != null && Object.hasOwnProperty.call(message, "scope")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.scope); + if (message.sequenceMaximumDuration != null && Object.hasOwnProperty.call(message, "sequenceMaximumDuration")) + $root.google.protobuf.Duration.encode(message.sequenceMaximumDuration, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.sequenceSteps != null && message.sequenceSteps.length) + for (var i = 0; i < message.sequenceSteps.length; ++i) + $root.google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep.encode(message.sequenceSteps[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified AudienceSequenceFilter message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceSequenceFilter.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.AudienceSequenceFilter + * @static + * @param {google.analytics.admin.v1alpha.IAudienceSequenceFilter} message AudienceSequenceFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AudienceSequenceFilter.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AudienceSequenceFilter message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.AudienceSequenceFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.AudienceSequenceFilter} AudienceSequenceFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AudienceSequenceFilter.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.AudienceSequenceFilter(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.scope = reader.int32(); + break; + } + case 2: { + message.sequenceMaximumDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 3: { + if (!(message.sequenceSteps && message.sequenceSteps.length)) + message.sequenceSteps = []; + message.sequenceSteps.push($root.google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AudienceSequenceFilter message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.AudienceSequenceFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.AudienceSequenceFilter} AudienceSequenceFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AudienceSequenceFilter.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AudienceSequenceFilter message. + * @function verify + * @memberof google.analytics.admin.v1alpha.AudienceSequenceFilter + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AudienceSequenceFilter.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.scope != null && message.hasOwnProperty("scope")) + switch (message.scope) { + default: + return "scope: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.sequenceMaximumDuration != null && message.hasOwnProperty("sequenceMaximumDuration")) { + var error = $root.google.protobuf.Duration.verify(message.sequenceMaximumDuration); + if (error) + return "sequenceMaximumDuration." + error; + } + if (message.sequenceSteps != null && message.hasOwnProperty("sequenceSteps")) { + if (!Array.isArray(message.sequenceSteps)) + return "sequenceSteps: array expected"; + for (var i = 0; i < message.sequenceSteps.length; ++i) { + var error = $root.google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep.verify(message.sequenceSteps[i]); + if (error) + return "sequenceSteps." + error; + } + } + return null; + }; + + /** + * Creates an AudienceSequenceFilter message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.AudienceSequenceFilter + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.AudienceSequenceFilter} AudienceSequenceFilter + */ + AudienceSequenceFilter.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.AudienceSequenceFilter) + return object; + var message = new $root.google.analytics.admin.v1alpha.AudienceSequenceFilter(); + switch (object.scope) { + default: + if (typeof object.scope === "number") { + message.scope = object.scope; + break; + } + break; + case "AUDIENCE_FILTER_SCOPE_UNSPECIFIED": + case 0: + message.scope = 0; + break; + case "AUDIENCE_FILTER_SCOPE_WITHIN_SAME_EVENT": + case 1: + message.scope = 1; + break; + case "AUDIENCE_FILTER_SCOPE_WITHIN_SAME_SESSION": + case 2: + message.scope = 2; + break; + case "AUDIENCE_FILTER_SCOPE_ACROSS_ALL_SESSIONS": + case 3: + message.scope = 3; + break; + } + if (object.sequenceMaximumDuration != null) { + if (typeof object.sequenceMaximumDuration !== "object") + throw TypeError(".google.analytics.admin.v1alpha.AudienceSequenceFilter.sequenceMaximumDuration: object expected"); + message.sequenceMaximumDuration = $root.google.protobuf.Duration.fromObject(object.sequenceMaximumDuration); + } + if (object.sequenceSteps) { + if (!Array.isArray(object.sequenceSteps)) + throw TypeError(".google.analytics.admin.v1alpha.AudienceSequenceFilter.sequenceSteps: array expected"); + message.sequenceSteps = []; + for (var i = 0; i < object.sequenceSteps.length; ++i) { + if (typeof object.sequenceSteps[i] !== "object") + throw TypeError(".google.analytics.admin.v1alpha.AudienceSequenceFilter.sequenceSteps: object expected"); + message.sequenceSteps[i] = $root.google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep.fromObject(object.sequenceSteps[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an AudienceSequenceFilter message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.AudienceSequenceFilter + * @static + * @param {google.analytics.admin.v1alpha.AudienceSequenceFilter} message AudienceSequenceFilter + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AudienceSequenceFilter.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.sequenceSteps = []; + if (options.defaults) { + object.scope = options.enums === String ? "AUDIENCE_FILTER_SCOPE_UNSPECIFIED" : 0; + object.sequenceMaximumDuration = null; + } + if (message.scope != null && message.hasOwnProperty("scope")) + object.scope = options.enums === String ? $root.google.analytics.admin.v1alpha.AudienceFilterScope[message.scope] === undefined ? message.scope : $root.google.analytics.admin.v1alpha.AudienceFilterScope[message.scope] : message.scope; + if (message.sequenceMaximumDuration != null && message.hasOwnProperty("sequenceMaximumDuration")) + object.sequenceMaximumDuration = $root.google.protobuf.Duration.toObject(message.sequenceMaximumDuration, options); + if (message.sequenceSteps && message.sequenceSteps.length) { + object.sequenceSteps = []; + for (var j = 0; j < message.sequenceSteps.length; ++j) + object.sequenceSteps[j] = $root.google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep.toObject(message.sequenceSteps[j], options); + } + return object; + }; + + /** + * Converts this AudienceSequenceFilter to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.AudienceSequenceFilter + * @instance + * @returns {Object.} JSON object + */ + AudienceSequenceFilter.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AudienceSequenceFilter + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.AudienceSequenceFilter + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AudienceSequenceFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.AudienceSequenceFilter"; + }; + + AudienceSequenceFilter.AudienceSequenceStep = (function() { + + /** + * Properties of an AudienceSequenceStep. + * @memberof google.analytics.admin.v1alpha.AudienceSequenceFilter + * @interface IAudienceSequenceStep + * @property {google.analytics.admin.v1alpha.AudienceFilterScope|null} [scope] AudienceSequenceStep scope + * @property {boolean|null} [immediatelyFollows] AudienceSequenceStep immediatelyFollows + * @property {google.protobuf.IDuration|null} [constraintDuration] AudienceSequenceStep constraintDuration + * @property {google.analytics.admin.v1alpha.IAudienceFilterExpression|null} [filterExpression] AudienceSequenceStep filterExpression + */ + + /** + * Constructs a new AudienceSequenceStep. + * @memberof google.analytics.admin.v1alpha.AudienceSequenceFilter + * @classdesc Represents an AudienceSequenceStep. + * @implements IAudienceSequenceStep + * @constructor + * @param {google.analytics.admin.v1alpha.AudienceSequenceFilter.IAudienceSequenceStep=} [properties] Properties to set + */ + function AudienceSequenceStep(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AudienceSequenceStep scope. + * @member {google.analytics.admin.v1alpha.AudienceFilterScope} scope + * @memberof google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep + * @instance + */ + AudienceSequenceStep.prototype.scope = 0; + + /** + * AudienceSequenceStep immediatelyFollows. + * @member {boolean} immediatelyFollows + * @memberof google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep + * @instance + */ + AudienceSequenceStep.prototype.immediatelyFollows = false; + + /** + * AudienceSequenceStep constraintDuration. + * @member {google.protobuf.IDuration|null|undefined} constraintDuration + * @memberof google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep + * @instance + */ + AudienceSequenceStep.prototype.constraintDuration = null; + + /** + * AudienceSequenceStep filterExpression. + * @member {google.analytics.admin.v1alpha.IAudienceFilterExpression|null|undefined} filterExpression + * @memberof google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep + * @instance + */ + AudienceSequenceStep.prototype.filterExpression = null; + + /** + * Creates a new AudienceSequenceStep instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep + * @static + * @param {google.analytics.admin.v1alpha.AudienceSequenceFilter.IAudienceSequenceStep=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep} AudienceSequenceStep instance + */ + AudienceSequenceStep.create = function create(properties) { + return new AudienceSequenceStep(properties); + }; + + /** + * Encodes the specified AudienceSequenceStep message. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep + * @static + * @param {google.analytics.admin.v1alpha.AudienceSequenceFilter.IAudienceSequenceStep} message AudienceSequenceStep message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AudienceSequenceStep.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.scope != null && Object.hasOwnProperty.call(message, "scope")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.scope); + if (message.immediatelyFollows != null && Object.hasOwnProperty.call(message, "immediatelyFollows")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.immediatelyFollows); + if (message.constraintDuration != null && Object.hasOwnProperty.call(message, "constraintDuration")) + $root.google.protobuf.Duration.encode(message.constraintDuration, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.filterExpression != null && Object.hasOwnProperty.call(message, "filterExpression")) + $root.google.analytics.admin.v1alpha.AudienceFilterExpression.encode(message.filterExpression, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified AudienceSequenceStep message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep + * @static + * @param {google.analytics.admin.v1alpha.AudienceSequenceFilter.IAudienceSequenceStep} message AudienceSequenceStep message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AudienceSequenceStep.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AudienceSequenceStep message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep} AudienceSequenceStep + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AudienceSequenceStep.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.scope = reader.int32(); + break; + } + case 2: { + message.immediatelyFollows = reader.bool(); + break; + } + case 3: { + message.constraintDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 4: { + message.filterExpression = $root.google.analytics.admin.v1alpha.AudienceFilterExpression.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AudienceSequenceStep message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep} AudienceSequenceStep + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AudienceSequenceStep.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AudienceSequenceStep message. + * @function verify + * @memberof google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AudienceSequenceStep.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.scope != null && message.hasOwnProperty("scope")) + switch (message.scope) { + default: + return "scope: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.immediatelyFollows != null && message.hasOwnProperty("immediatelyFollows")) + if (typeof message.immediatelyFollows !== "boolean") + return "immediatelyFollows: boolean expected"; + if (message.constraintDuration != null && message.hasOwnProperty("constraintDuration")) { + var error = $root.google.protobuf.Duration.verify(message.constraintDuration); + if (error) + return "constraintDuration." + error; + } + if (message.filterExpression != null && message.hasOwnProperty("filterExpression")) { + var error = $root.google.analytics.admin.v1alpha.AudienceFilterExpression.verify(message.filterExpression); + if (error) + return "filterExpression." + error; + } + return null; + }; + + /** + * Creates an AudienceSequenceStep message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep} AudienceSequenceStep + */ + AudienceSequenceStep.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep) + return object; + var message = new $root.google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep(); + switch (object.scope) { + default: + if (typeof object.scope === "number") { + message.scope = object.scope; + break; + } + break; + case "AUDIENCE_FILTER_SCOPE_UNSPECIFIED": + case 0: + message.scope = 0; + break; + case "AUDIENCE_FILTER_SCOPE_WITHIN_SAME_EVENT": + case 1: + message.scope = 1; + break; + case "AUDIENCE_FILTER_SCOPE_WITHIN_SAME_SESSION": + case 2: + message.scope = 2; + break; + case "AUDIENCE_FILTER_SCOPE_ACROSS_ALL_SESSIONS": + case 3: + message.scope = 3; + break; + } + if (object.immediatelyFollows != null) + message.immediatelyFollows = Boolean(object.immediatelyFollows); + if (object.constraintDuration != null) { + if (typeof object.constraintDuration !== "object") + throw TypeError(".google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep.constraintDuration: object expected"); + message.constraintDuration = $root.google.protobuf.Duration.fromObject(object.constraintDuration); + } + if (object.filterExpression != null) { + if (typeof object.filterExpression !== "object") + throw TypeError(".google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep.filterExpression: object expected"); + message.filterExpression = $root.google.analytics.admin.v1alpha.AudienceFilterExpression.fromObject(object.filterExpression); + } + return message; + }; + + /** + * Creates a plain object from an AudienceSequenceStep message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep + * @static + * @param {google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep} message AudienceSequenceStep + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AudienceSequenceStep.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.scope = options.enums === String ? "AUDIENCE_FILTER_SCOPE_UNSPECIFIED" : 0; + object.immediatelyFollows = false; + object.constraintDuration = null; + object.filterExpression = null; + } + if (message.scope != null && message.hasOwnProperty("scope")) + object.scope = options.enums === String ? $root.google.analytics.admin.v1alpha.AudienceFilterScope[message.scope] === undefined ? message.scope : $root.google.analytics.admin.v1alpha.AudienceFilterScope[message.scope] : message.scope; + if (message.immediatelyFollows != null && message.hasOwnProperty("immediatelyFollows")) + object.immediatelyFollows = message.immediatelyFollows; + if (message.constraintDuration != null && message.hasOwnProperty("constraintDuration")) + object.constraintDuration = $root.google.protobuf.Duration.toObject(message.constraintDuration, options); + if (message.filterExpression != null && message.hasOwnProperty("filterExpression")) + object.filterExpression = $root.google.analytics.admin.v1alpha.AudienceFilterExpression.toObject(message.filterExpression, options); + return object; + }; + + /** + * Converts this AudienceSequenceStep to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep + * @instance + * @returns {Object.} JSON object + */ + AudienceSequenceStep.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AudienceSequenceStep + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AudienceSequenceStep.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.AudienceSequenceFilter.AudienceSequenceStep"; + }; + + return AudienceSequenceStep; + })(); + + return AudienceSequenceFilter; + })(); + + v1alpha.AudienceFilterClause = (function() { + + /** + * Properties of an AudienceFilterClause. + * @memberof google.analytics.admin.v1alpha + * @interface IAudienceFilterClause + * @property {google.analytics.admin.v1alpha.IAudienceSimpleFilter|null} [simpleFilter] AudienceFilterClause simpleFilter + * @property {google.analytics.admin.v1alpha.IAudienceSequenceFilter|null} [sequenceFilter] AudienceFilterClause sequenceFilter + * @property {google.analytics.admin.v1alpha.AudienceFilterClause.AudienceClauseType|null} [clauseType] AudienceFilterClause clauseType + */ + + /** + * Constructs a new AudienceFilterClause. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents an AudienceFilterClause. + * @implements IAudienceFilterClause + * @constructor + * @param {google.analytics.admin.v1alpha.IAudienceFilterClause=} [properties] Properties to set + */ + function AudienceFilterClause(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AudienceFilterClause simpleFilter. + * @member {google.analytics.admin.v1alpha.IAudienceSimpleFilter|null|undefined} simpleFilter + * @memberof google.analytics.admin.v1alpha.AudienceFilterClause + * @instance + */ + AudienceFilterClause.prototype.simpleFilter = null; + + /** + * AudienceFilterClause sequenceFilter. + * @member {google.analytics.admin.v1alpha.IAudienceSequenceFilter|null|undefined} sequenceFilter + * @memberof google.analytics.admin.v1alpha.AudienceFilterClause + * @instance + */ + AudienceFilterClause.prototype.sequenceFilter = null; + + /** + * AudienceFilterClause clauseType. + * @member {google.analytics.admin.v1alpha.AudienceFilterClause.AudienceClauseType} clauseType + * @memberof google.analytics.admin.v1alpha.AudienceFilterClause + * @instance + */ + AudienceFilterClause.prototype.clauseType = 0; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * AudienceFilterClause filter. + * @member {"simpleFilter"|"sequenceFilter"|undefined} filter + * @memberof google.analytics.admin.v1alpha.AudienceFilterClause + * @instance + */ + Object.defineProperty(AudienceFilterClause.prototype, "filter", { + get: $util.oneOfGetter($oneOfFields = ["simpleFilter", "sequenceFilter"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new AudienceFilterClause instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.AudienceFilterClause + * @static + * @param {google.analytics.admin.v1alpha.IAudienceFilterClause=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.AudienceFilterClause} AudienceFilterClause instance + */ + AudienceFilterClause.create = function create(properties) { + return new AudienceFilterClause(properties); + }; + + /** + * Encodes the specified AudienceFilterClause message. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceFilterClause.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.AudienceFilterClause + * @static + * @param {google.analytics.admin.v1alpha.IAudienceFilterClause} message AudienceFilterClause message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AudienceFilterClause.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.clauseType != null && Object.hasOwnProperty.call(message, "clauseType")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.clauseType); + if (message.simpleFilter != null && Object.hasOwnProperty.call(message, "simpleFilter")) + $root.google.analytics.admin.v1alpha.AudienceSimpleFilter.encode(message.simpleFilter, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.sequenceFilter != null && Object.hasOwnProperty.call(message, "sequenceFilter")) + $root.google.analytics.admin.v1alpha.AudienceSequenceFilter.encode(message.sequenceFilter, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified AudienceFilterClause message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceFilterClause.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.AudienceFilterClause + * @static + * @param {google.analytics.admin.v1alpha.IAudienceFilterClause} message AudienceFilterClause message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AudienceFilterClause.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AudienceFilterClause message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.AudienceFilterClause + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.AudienceFilterClause} AudienceFilterClause + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AudienceFilterClause.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.AudienceFilterClause(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: { + message.simpleFilter = $root.google.analytics.admin.v1alpha.AudienceSimpleFilter.decode(reader, reader.uint32()); + break; + } + case 3: { + message.sequenceFilter = $root.google.analytics.admin.v1alpha.AudienceSequenceFilter.decode(reader, reader.uint32()); + break; + } + case 1: { + message.clauseType = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AudienceFilterClause message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.AudienceFilterClause + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.AudienceFilterClause} AudienceFilterClause + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AudienceFilterClause.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AudienceFilterClause message. + * @function verify + * @memberof google.analytics.admin.v1alpha.AudienceFilterClause + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AudienceFilterClause.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.simpleFilter != null && message.hasOwnProperty("simpleFilter")) { + properties.filter = 1; + { + var error = $root.google.analytics.admin.v1alpha.AudienceSimpleFilter.verify(message.simpleFilter); + if (error) + return "simpleFilter." + error; + } + } + if (message.sequenceFilter != null && message.hasOwnProperty("sequenceFilter")) { + if (properties.filter === 1) + return "filter: multiple values"; + properties.filter = 1; + { + var error = $root.google.analytics.admin.v1alpha.AudienceSequenceFilter.verify(message.sequenceFilter); + if (error) + return "sequenceFilter." + error; + } + } + if (message.clauseType != null && message.hasOwnProperty("clauseType")) + switch (message.clauseType) { + default: + return "clauseType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates an AudienceFilterClause message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.AudienceFilterClause + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.AudienceFilterClause} AudienceFilterClause + */ + AudienceFilterClause.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.AudienceFilterClause) + return object; + var message = new $root.google.analytics.admin.v1alpha.AudienceFilterClause(); + if (object.simpleFilter != null) { + if (typeof object.simpleFilter !== "object") + throw TypeError(".google.analytics.admin.v1alpha.AudienceFilterClause.simpleFilter: object expected"); + message.simpleFilter = $root.google.analytics.admin.v1alpha.AudienceSimpleFilter.fromObject(object.simpleFilter); + } + if (object.sequenceFilter != null) { + if (typeof object.sequenceFilter !== "object") + throw TypeError(".google.analytics.admin.v1alpha.AudienceFilterClause.sequenceFilter: object expected"); + message.sequenceFilter = $root.google.analytics.admin.v1alpha.AudienceSequenceFilter.fromObject(object.sequenceFilter); + } + switch (object.clauseType) { + default: + if (typeof object.clauseType === "number") { + message.clauseType = object.clauseType; + break; + } + break; + case "AUDIENCE_CLAUSE_TYPE_UNSPECIFIED": + case 0: + message.clauseType = 0; + break; + case "INCLUDE": + case 1: + message.clauseType = 1; + break; + case "EXCLUDE": + case 2: + message.clauseType = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from an AudienceFilterClause message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.AudienceFilterClause + * @static + * @param {google.analytics.admin.v1alpha.AudienceFilterClause} message AudienceFilterClause + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AudienceFilterClause.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.clauseType = options.enums === String ? "AUDIENCE_CLAUSE_TYPE_UNSPECIFIED" : 0; + if (message.clauseType != null && message.hasOwnProperty("clauseType")) + object.clauseType = options.enums === String ? $root.google.analytics.admin.v1alpha.AudienceFilterClause.AudienceClauseType[message.clauseType] === undefined ? message.clauseType : $root.google.analytics.admin.v1alpha.AudienceFilterClause.AudienceClauseType[message.clauseType] : message.clauseType; + if (message.simpleFilter != null && message.hasOwnProperty("simpleFilter")) { + object.simpleFilter = $root.google.analytics.admin.v1alpha.AudienceSimpleFilter.toObject(message.simpleFilter, options); + if (options.oneofs) + object.filter = "simpleFilter"; + } + if (message.sequenceFilter != null && message.hasOwnProperty("sequenceFilter")) { + object.sequenceFilter = $root.google.analytics.admin.v1alpha.AudienceSequenceFilter.toObject(message.sequenceFilter, options); + if (options.oneofs) + object.filter = "sequenceFilter"; + } + return object; + }; + + /** + * Converts this AudienceFilterClause to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.AudienceFilterClause + * @instance + * @returns {Object.} JSON object + */ + AudienceFilterClause.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AudienceFilterClause + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.AudienceFilterClause + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AudienceFilterClause.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.AudienceFilterClause"; + }; + + /** + * AudienceClauseType enum. + * @name google.analytics.admin.v1alpha.AudienceFilterClause.AudienceClauseType + * @enum {number} + * @property {number} AUDIENCE_CLAUSE_TYPE_UNSPECIFIED=0 AUDIENCE_CLAUSE_TYPE_UNSPECIFIED value + * @property {number} INCLUDE=1 INCLUDE value + * @property {number} EXCLUDE=2 EXCLUDE value + */ + AudienceFilterClause.AudienceClauseType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "AUDIENCE_CLAUSE_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "INCLUDE"] = 1; + values[valuesById[2] = "EXCLUDE"] = 2; + return values; + })(); + + return AudienceFilterClause; + })(); + + v1alpha.AudienceEventTrigger = (function() { + + /** + * Properties of an AudienceEventTrigger. + * @memberof google.analytics.admin.v1alpha + * @interface IAudienceEventTrigger + * @property {string|null} [eventName] AudienceEventTrigger eventName + * @property {google.analytics.admin.v1alpha.AudienceEventTrigger.LogCondition|null} [logCondition] AudienceEventTrigger logCondition + */ + + /** + * Constructs a new AudienceEventTrigger. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents an AudienceEventTrigger. + * @implements IAudienceEventTrigger + * @constructor + * @param {google.analytics.admin.v1alpha.IAudienceEventTrigger=} [properties] Properties to set + */ + function AudienceEventTrigger(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AudienceEventTrigger eventName. + * @member {string} eventName + * @memberof google.analytics.admin.v1alpha.AudienceEventTrigger + * @instance + */ + AudienceEventTrigger.prototype.eventName = ""; + + /** + * AudienceEventTrigger logCondition. + * @member {google.analytics.admin.v1alpha.AudienceEventTrigger.LogCondition} logCondition + * @memberof google.analytics.admin.v1alpha.AudienceEventTrigger + * @instance + */ + AudienceEventTrigger.prototype.logCondition = 0; + + /** + * Creates a new AudienceEventTrigger instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.AudienceEventTrigger + * @static + * @param {google.analytics.admin.v1alpha.IAudienceEventTrigger=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.AudienceEventTrigger} AudienceEventTrigger instance + */ + AudienceEventTrigger.create = function create(properties) { + return new AudienceEventTrigger(properties); + }; + + /** + * Encodes the specified AudienceEventTrigger message. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceEventTrigger.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.AudienceEventTrigger + * @static + * @param {google.analytics.admin.v1alpha.IAudienceEventTrigger} message AudienceEventTrigger message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AudienceEventTrigger.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.eventName != null && Object.hasOwnProperty.call(message, "eventName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.eventName); + if (message.logCondition != null && Object.hasOwnProperty.call(message, "logCondition")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.logCondition); + return writer; + }; + + /** + * Encodes the specified AudienceEventTrigger message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AudienceEventTrigger.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.AudienceEventTrigger + * @static + * @param {google.analytics.admin.v1alpha.IAudienceEventTrigger} message AudienceEventTrigger message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AudienceEventTrigger.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AudienceEventTrigger message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.AudienceEventTrigger + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.AudienceEventTrigger} AudienceEventTrigger + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AudienceEventTrigger.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.AudienceEventTrigger(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.eventName = reader.string(); + break; + } + case 2: { + message.logCondition = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AudienceEventTrigger message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.AudienceEventTrigger + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.AudienceEventTrigger} AudienceEventTrigger + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AudienceEventTrigger.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AudienceEventTrigger message. + * @function verify + * @memberof google.analytics.admin.v1alpha.AudienceEventTrigger + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AudienceEventTrigger.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.eventName != null && message.hasOwnProperty("eventName")) + if (!$util.isString(message.eventName)) + return "eventName: string expected"; + if (message.logCondition != null && message.hasOwnProperty("logCondition")) + switch (message.logCondition) { + default: + return "logCondition: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates an AudienceEventTrigger message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.AudienceEventTrigger + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.AudienceEventTrigger} AudienceEventTrigger + */ + AudienceEventTrigger.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.AudienceEventTrigger) + return object; + var message = new $root.google.analytics.admin.v1alpha.AudienceEventTrigger(); + if (object.eventName != null) + message.eventName = String(object.eventName); + switch (object.logCondition) { + default: + if (typeof object.logCondition === "number") { + message.logCondition = object.logCondition; + break; + } + break; + case "LOG_CONDITION_UNSPECIFIED": + case 0: + message.logCondition = 0; + break; + case "AUDIENCE_JOINED": + case 1: + message.logCondition = 1; + break; + case "AUDIENCE_MEMBERSHIP_RENEWED": + case 2: + message.logCondition = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from an AudienceEventTrigger message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.AudienceEventTrigger + * @static + * @param {google.analytics.admin.v1alpha.AudienceEventTrigger} message AudienceEventTrigger + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AudienceEventTrigger.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.eventName = ""; + object.logCondition = options.enums === String ? "LOG_CONDITION_UNSPECIFIED" : 0; + } + if (message.eventName != null && message.hasOwnProperty("eventName")) + object.eventName = message.eventName; + if (message.logCondition != null && message.hasOwnProperty("logCondition")) + object.logCondition = options.enums === String ? $root.google.analytics.admin.v1alpha.AudienceEventTrigger.LogCondition[message.logCondition] === undefined ? message.logCondition : $root.google.analytics.admin.v1alpha.AudienceEventTrigger.LogCondition[message.logCondition] : message.logCondition; + return object; + }; + + /** + * Converts this AudienceEventTrigger to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.AudienceEventTrigger + * @instance + * @returns {Object.} JSON object + */ + AudienceEventTrigger.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AudienceEventTrigger + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.AudienceEventTrigger + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AudienceEventTrigger.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.AudienceEventTrigger"; + }; + + /** + * LogCondition enum. + * @name google.analytics.admin.v1alpha.AudienceEventTrigger.LogCondition + * @enum {number} + * @property {number} LOG_CONDITION_UNSPECIFIED=0 LOG_CONDITION_UNSPECIFIED value + * @property {number} AUDIENCE_JOINED=1 AUDIENCE_JOINED value + * @property {number} AUDIENCE_MEMBERSHIP_RENEWED=2 AUDIENCE_MEMBERSHIP_RENEWED value + */ + AudienceEventTrigger.LogCondition = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "LOG_CONDITION_UNSPECIFIED"] = 0; + values[valuesById[1] = "AUDIENCE_JOINED"] = 1; + values[valuesById[2] = "AUDIENCE_MEMBERSHIP_RENEWED"] = 2; + return values; + })(); + + return AudienceEventTrigger; + })(); + + v1alpha.Audience = (function() { + + /** + * Properties of an Audience. + * @memberof google.analytics.admin.v1alpha + * @interface IAudience + * @property {string|null} [name] Audience name + * @property {string|null} [displayName] Audience displayName + * @property {string|null} [description] Audience description + * @property {number|null} [membershipDurationDays] Audience membershipDurationDays + * @property {boolean|null} [adsPersonalizationEnabled] Audience adsPersonalizationEnabled + * @property {google.analytics.admin.v1alpha.IAudienceEventTrigger|null} [eventTrigger] Audience eventTrigger + * @property {google.analytics.admin.v1alpha.Audience.AudienceExclusionDurationMode|null} [exclusionDurationMode] Audience exclusionDurationMode + * @property {Array.|null} [filterClauses] Audience filterClauses + */ + + /** + * Constructs a new Audience. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents an Audience. + * @implements IAudience + * @constructor + * @param {google.analytics.admin.v1alpha.IAudience=} [properties] Properties to set + */ + function Audience(properties) { + this.filterClauses = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Audience name. + * @member {string} name + * @memberof google.analytics.admin.v1alpha.Audience + * @instance + */ + Audience.prototype.name = ""; + + /** + * Audience displayName. + * @member {string} displayName + * @memberof google.analytics.admin.v1alpha.Audience + * @instance + */ + Audience.prototype.displayName = ""; + + /** + * Audience description. + * @member {string} description + * @memberof google.analytics.admin.v1alpha.Audience + * @instance + */ + Audience.prototype.description = ""; + + /** + * Audience membershipDurationDays. + * @member {number} membershipDurationDays + * @memberof google.analytics.admin.v1alpha.Audience + * @instance + */ + Audience.prototype.membershipDurationDays = 0; + + /** + * Audience adsPersonalizationEnabled. + * @member {boolean} adsPersonalizationEnabled + * @memberof google.analytics.admin.v1alpha.Audience + * @instance + */ + Audience.prototype.adsPersonalizationEnabled = false; + + /** + * Audience eventTrigger. + * @member {google.analytics.admin.v1alpha.IAudienceEventTrigger|null|undefined} eventTrigger + * @memberof google.analytics.admin.v1alpha.Audience + * @instance + */ + Audience.prototype.eventTrigger = null; + + /** + * Audience exclusionDurationMode. + * @member {google.analytics.admin.v1alpha.Audience.AudienceExclusionDurationMode} exclusionDurationMode + * @memberof google.analytics.admin.v1alpha.Audience + * @instance + */ + Audience.prototype.exclusionDurationMode = 0; + + /** + * Audience filterClauses. + * @member {Array.} filterClauses + * @memberof google.analytics.admin.v1alpha.Audience + * @instance + */ + Audience.prototype.filterClauses = $util.emptyArray; + + /** + * Creates a new Audience instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.Audience + * @static + * @param {google.analytics.admin.v1alpha.IAudience=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.Audience} Audience instance + */ + Audience.create = function create(properties) { + return new Audience(properties); + }; + + /** + * Encodes the specified Audience message. Does not implicitly {@link google.analytics.admin.v1alpha.Audience.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.Audience + * @static + * @param {google.analytics.admin.v1alpha.IAudience} message Audience message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Audience.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); + if (message.membershipDurationDays != null && Object.hasOwnProperty.call(message, "membershipDurationDays")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.membershipDurationDays); + if (message.adsPersonalizationEnabled != null && Object.hasOwnProperty.call(message, "adsPersonalizationEnabled")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.adsPersonalizationEnabled); + if (message.eventTrigger != null && Object.hasOwnProperty.call(message, "eventTrigger")) + $root.google.analytics.admin.v1alpha.AudienceEventTrigger.encode(message.eventTrigger, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.exclusionDurationMode != null && Object.hasOwnProperty.call(message, "exclusionDurationMode")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.exclusionDurationMode); + if (message.filterClauses != null && message.filterClauses.length) + for (var i = 0; i < message.filterClauses.length; ++i) + $root.google.analytics.admin.v1alpha.AudienceFilterClause.encode(message.filterClauses[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Audience message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.Audience.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.Audience + * @static + * @param {google.analytics.admin.v1alpha.IAudience} message Audience message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Audience.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Audience message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.Audience + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.Audience} Audience + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Audience.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.Audience(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.displayName = reader.string(); + break; + } + case 3: { + message.description = reader.string(); + break; + } + case 4: { + message.membershipDurationDays = reader.int32(); + break; + } + case 5: { + message.adsPersonalizationEnabled = reader.bool(); + break; + } + case 6: { + message.eventTrigger = $root.google.analytics.admin.v1alpha.AudienceEventTrigger.decode(reader, reader.uint32()); + break; + } + case 7: { + message.exclusionDurationMode = reader.int32(); + break; + } + case 8: { + if (!(message.filterClauses && message.filterClauses.length)) + message.filterClauses = []; + message.filterClauses.push($root.google.analytics.admin.v1alpha.AudienceFilterClause.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Audience message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.Audience + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.Audience} Audience + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Audience.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Audience message. + * @function verify + * @memberof google.analytics.admin.v1alpha.Audience + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Audience.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.membershipDurationDays != null && message.hasOwnProperty("membershipDurationDays")) + if (!$util.isInteger(message.membershipDurationDays)) + return "membershipDurationDays: integer expected"; + if (message.adsPersonalizationEnabled != null && message.hasOwnProperty("adsPersonalizationEnabled")) + if (typeof message.adsPersonalizationEnabled !== "boolean") + return "adsPersonalizationEnabled: boolean expected"; + if (message.eventTrigger != null && message.hasOwnProperty("eventTrigger")) { + var error = $root.google.analytics.admin.v1alpha.AudienceEventTrigger.verify(message.eventTrigger); + if (error) + return "eventTrigger." + error; + } + if (message.exclusionDurationMode != null && message.hasOwnProperty("exclusionDurationMode")) + switch (message.exclusionDurationMode) { + default: + return "exclusionDurationMode: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.filterClauses != null && message.hasOwnProperty("filterClauses")) { + if (!Array.isArray(message.filterClauses)) + return "filterClauses: array expected"; + for (var i = 0; i < message.filterClauses.length; ++i) { + var error = $root.google.analytics.admin.v1alpha.AudienceFilterClause.verify(message.filterClauses[i]); + if (error) + return "filterClauses." + error; + } + } + return null; + }; + + /** + * Creates an Audience message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.Audience + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.Audience} Audience + */ + Audience.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.Audience) + return object; + var message = new $root.google.analytics.admin.v1alpha.Audience(); + if (object.name != null) + message.name = String(object.name); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.description != null) + message.description = String(object.description); + if (object.membershipDurationDays != null) + message.membershipDurationDays = object.membershipDurationDays | 0; + if (object.adsPersonalizationEnabled != null) + message.adsPersonalizationEnabled = Boolean(object.adsPersonalizationEnabled); + if (object.eventTrigger != null) { + if (typeof object.eventTrigger !== "object") + throw TypeError(".google.analytics.admin.v1alpha.Audience.eventTrigger: object expected"); + message.eventTrigger = $root.google.analytics.admin.v1alpha.AudienceEventTrigger.fromObject(object.eventTrigger); + } + switch (object.exclusionDurationMode) { + default: + if (typeof object.exclusionDurationMode === "number") { + message.exclusionDurationMode = object.exclusionDurationMode; + break; + } + break; + case "AUDIENCE_EXCLUSION_DURATION_MODE_UNSPECIFIED": + case 0: + message.exclusionDurationMode = 0; + break; + case "EXCLUDE_TEMPORARILY": + case 1: + message.exclusionDurationMode = 1; + break; + case "EXCLUDE_PERMANENTLY": + case 2: + message.exclusionDurationMode = 2; + break; + } + if (object.filterClauses) { + if (!Array.isArray(object.filterClauses)) + throw TypeError(".google.analytics.admin.v1alpha.Audience.filterClauses: array expected"); + message.filterClauses = []; + for (var i = 0; i < object.filterClauses.length; ++i) { + if (typeof object.filterClauses[i] !== "object") + throw TypeError(".google.analytics.admin.v1alpha.Audience.filterClauses: object expected"); + message.filterClauses[i] = $root.google.analytics.admin.v1alpha.AudienceFilterClause.fromObject(object.filterClauses[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an Audience message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.Audience + * @static + * @param {google.analytics.admin.v1alpha.Audience} message Audience + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Audience.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.filterClauses = []; + if (options.defaults) { + object.name = ""; + object.displayName = ""; + object.description = ""; + object.membershipDurationDays = 0; + object.adsPersonalizationEnabled = false; + object.eventTrigger = null; + object.exclusionDurationMode = options.enums === String ? "AUDIENCE_EXCLUSION_DURATION_MODE_UNSPECIFIED" : 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.membershipDurationDays != null && message.hasOwnProperty("membershipDurationDays")) + object.membershipDurationDays = message.membershipDurationDays; + if (message.adsPersonalizationEnabled != null && message.hasOwnProperty("adsPersonalizationEnabled")) + object.adsPersonalizationEnabled = message.adsPersonalizationEnabled; + if (message.eventTrigger != null && message.hasOwnProperty("eventTrigger")) + object.eventTrigger = $root.google.analytics.admin.v1alpha.AudienceEventTrigger.toObject(message.eventTrigger, options); + if (message.exclusionDurationMode != null && message.hasOwnProperty("exclusionDurationMode")) + object.exclusionDurationMode = options.enums === String ? $root.google.analytics.admin.v1alpha.Audience.AudienceExclusionDurationMode[message.exclusionDurationMode] === undefined ? message.exclusionDurationMode : $root.google.analytics.admin.v1alpha.Audience.AudienceExclusionDurationMode[message.exclusionDurationMode] : message.exclusionDurationMode; + if (message.filterClauses && message.filterClauses.length) { + object.filterClauses = []; + for (var j = 0; j < message.filterClauses.length; ++j) + object.filterClauses[j] = $root.google.analytics.admin.v1alpha.AudienceFilterClause.toObject(message.filterClauses[j], options); + } + return object; + }; + + /** + * Converts this Audience to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.Audience + * @instance + * @returns {Object.} JSON object + */ + Audience.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Audience + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.Audience + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Audience.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.Audience"; + }; + + /** + * AudienceExclusionDurationMode enum. + * @name google.analytics.admin.v1alpha.Audience.AudienceExclusionDurationMode + * @enum {number} + * @property {number} AUDIENCE_EXCLUSION_DURATION_MODE_UNSPECIFIED=0 AUDIENCE_EXCLUSION_DURATION_MODE_UNSPECIFIED value + * @property {number} EXCLUDE_TEMPORARILY=1 EXCLUDE_TEMPORARILY value + * @property {number} EXCLUDE_PERMANENTLY=2 EXCLUDE_PERMANENTLY value + */ + Audience.AudienceExclusionDurationMode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "AUDIENCE_EXCLUSION_DURATION_MODE_UNSPECIFIED"] = 0; + values[valuesById[1] = "EXCLUDE_TEMPORARILY"] = 1; + values[valuesById[2] = "EXCLUDE_PERMANENTLY"] = 2; + return values; + })(); + + return Audience; + })(); + + /** + * IndustryCategory enum. + * @name google.analytics.admin.v1alpha.IndustryCategory + * @enum {number} + * @property {number} INDUSTRY_CATEGORY_UNSPECIFIED=0 INDUSTRY_CATEGORY_UNSPECIFIED value + * @property {number} AUTOMOTIVE=1 AUTOMOTIVE value + * @property {number} BUSINESS_AND_INDUSTRIAL_MARKETS=2 BUSINESS_AND_INDUSTRIAL_MARKETS value + * @property {number} FINANCE=3 FINANCE value + * @property {number} HEALTHCARE=4 HEALTHCARE value + * @property {number} TECHNOLOGY=5 TECHNOLOGY value + * @property {number} TRAVEL=6 TRAVEL value + * @property {number} OTHER=7 OTHER value + * @property {number} ARTS_AND_ENTERTAINMENT=8 ARTS_AND_ENTERTAINMENT value + * @property {number} BEAUTY_AND_FITNESS=9 BEAUTY_AND_FITNESS value + * @property {number} BOOKS_AND_LITERATURE=10 BOOKS_AND_LITERATURE value + * @property {number} FOOD_AND_DRINK=11 FOOD_AND_DRINK value + * @property {number} GAMES=12 GAMES value + * @property {number} HOBBIES_AND_LEISURE=13 HOBBIES_AND_LEISURE value + * @property {number} HOME_AND_GARDEN=14 HOME_AND_GARDEN value + * @property {number} INTERNET_AND_TELECOM=15 INTERNET_AND_TELECOM value + * @property {number} LAW_AND_GOVERNMENT=16 LAW_AND_GOVERNMENT value + * @property {number} NEWS=17 NEWS value + * @property {number} ONLINE_COMMUNITIES=18 ONLINE_COMMUNITIES value + * @property {number} PEOPLE_AND_SOCIETY=19 PEOPLE_AND_SOCIETY value + * @property {number} PETS_AND_ANIMALS=20 PETS_AND_ANIMALS value + * @property {number} REAL_ESTATE=21 REAL_ESTATE value + * @property {number} REFERENCE=22 REFERENCE value + * @property {number} SCIENCE=23 SCIENCE value + * @property {number} SPORTS=24 SPORTS value + * @property {number} JOBS_AND_EDUCATION=25 JOBS_AND_EDUCATION value + * @property {number} SHOPPING=26 SHOPPING value + */ + v1alpha.IndustryCategory = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "INDUSTRY_CATEGORY_UNSPECIFIED"] = 0; + values[valuesById[1] = "AUTOMOTIVE"] = 1; + values[valuesById[2] = "BUSINESS_AND_INDUSTRIAL_MARKETS"] = 2; + values[valuesById[3] = "FINANCE"] = 3; + values[valuesById[4] = "HEALTHCARE"] = 4; + values[valuesById[5] = "TECHNOLOGY"] = 5; + values[valuesById[6] = "TRAVEL"] = 6; + values[valuesById[7] = "OTHER"] = 7; + values[valuesById[8] = "ARTS_AND_ENTERTAINMENT"] = 8; + values[valuesById[9] = "BEAUTY_AND_FITNESS"] = 9; + values[valuesById[10] = "BOOKS_AND_LITERATURE"] = 10; + values[valuesById[11] = "FOOD_AND_DRINK"] = 11; + values[valuesById[12] = "GAMES"] = 12; + values[valuesById[13] = "HOBBIES_AND_LEISURE"] = 13; + values[valuesById[14] = "HOME_AND_GARDEN"] = 14; + values[valuesById[15] = "INTERNET_AND_TELECOM"] = 15; + values[valuesById[16] = "LAW_AND_GOVERNMENT"] = 16; + values[valuesById[17] = "NEWS"] = 17; + values[valuesById[18] = "ONLINE_COMMUNITIES"] = 18; + values[valuesById[19] = "PEOPLE_AND_SOCIETY"] = 19; + values[valuesById[20] = "PETS_AND_ANIMALS"] = 20; + values[valuesById[21] = "REAL_ESTATE"] = 21; + values[valuesById[22] = "REFERENCE"] = 22; + values[valuesById[23] = "SCIENCE"] = 23; + values[valuesById[24] = "SPORTS"] = 24; + values[valuesById[25] = "JOBS_AND_EDUCATION"] = 25; + values[valuesById[26] = "SHOPPING"] = 26; + return values; + })(); + + /** + * ServiceLevel enum. + * @name google.analytics.admin.v1alpha.ServiceLevel + * @enum {number} + * @property {number} SERVICE_LEVEL_UNSPECIFIED=0 SERVICE_LEVEL_UNSPECIFIED value + * @property {number} GOOGLE_ANALYTICS_STANDARD=1 GOOGLE_ANALYTICS_STANDARD value + * @property {number} GOOGLE_ANALYTICS_360=2 GOOGLE_ANALYTICS_360 value + */ + v1alpha.ServiceLevel = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "SERVICE_LEVEL_UNSPECIFIED"] = 0; + values[valuesById[1] = "GOOGLE_ANALYTICS_STANDARD"] = 1; + values[valuesById[2] = "GOOGLE_ANALYTICS_360"] = 2; + return values; + })(); + + /** + * ActorType enum. + * @name google.analytics.admin.v1alpha.ActorType + * @enum {number} + * @property {number} ACTOR_TYPE_UNSPECIFIED=0 ACTOR_TYPE_UNSPECIFIED value + * @property {number} USER=1 USER value + * @property {number} SYSTEM=2 SYSTEM value + * @property {number} SUPPORT=3 SUPPORT value + */ + v1alpha.ActorType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ACTOR_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "USER"] = 1; + values[valuesById[2] = "SYSTEM"] = 2; + values[valuesById[3] = "SUPPORT"] = 3; + return values; + })(); + + /** + * ActionType enum. + * @name google.analytics.admin.v1alpha.ActionType + * @enum {number} + * @property {number} ACTION_TYPE_UNSPECIFIED=0 ACTION_TYPE_UNSPECIFIED value + * @property {number} CREATED=1 CREATED value + * @property {number} UPDATED=2 UPDATED value + * @property {number} DELETED=3 DELETED value + */ + v1alpha.ActionType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ACTION_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "CREATED"] = 1; + values[valuesById[2] = "UPDATED"] = 2; + values[valuesById[3] = "DELETED"] = 3; + return values; + })(); + + /** + * ChangeHistoryResourceType enum. + * @name google.analytics.admin.v1alpha.ChangeHistoryResourceType + * @enum {number} + * @property {number} CHANGE_HISTORY_RESOURCE_TYPE_UNSPECIFIED=0 CHANGE_HISTORY_RESOURCE_TYPE_UNSPECIFIED value + * @property {number} ACCOUNT=1 ACCOUNT value + * @property {number} PROPERTY=2 PROPERTY value + * @property {number} FIREBASE_LINK=6 FIREBASE_LINK value + * @property {number} GOOGLE_ADS_LINK=7 GOOGLE_ADS_LINK value + * @property {number} GOOGLE_SIGNALS_SETTINGS=8 GOOGLE_SIGNALS_SETTINGS value + * @property {number} CONVERSION_EVENT=9 CONVERSION_EVENT value + * @property {number} MEASUREMENT_PROTOCOL_SECRET=10 MEASUREMENT_PROTOCOL_SECRET value + * @property {number} CUSTOM_DIMENSION=11 CUSTOM_DIMENSION value + * @property {number} CUSTOM_METRIC=12 CUSTOM_METRIC value + * @property {number} DATA_RETENTION_SETTINGS=13 DATA_RETENTION_SETTINGS value + * @property {number} DISPLAY_VIDEO_360_ADVERTISER_LINK=14 DISPLAY_VIDEO_360_ADVERTISER_LINK value + * @property {number} DISPLAY_VIDEO_360_ADVERTISER_LINK_PROPOSAL=15 DISPLAY_VIDEO_360_ADVERTISER_LINK_PROPOSAL value + * @property {number} SEARCH_ADS_360_LINK=16 SEARCH_ADS_360_LINK value + * @property {number} DATA_STREAM=18 DATA_STREAM value + * @property {number} ATTRIBUTION_SETTINGS=20 ATTRIBUTION_SETTINGS value + */ + v1alpha.ChangeHistoryResourceType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "CHANGE_HISTORY_RESOURCE_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "ACCOUNT"] = 1; + values[valuesById[2] = "PROPERTY"] = 2; + values[valuesById[6] = "FIREBASE_LINK"] = 6; + values[valuesById[7] = "GOOGLE_ADS_LINK"] = 7; + values[valuesById[8] = "GOOGLE_SIGNALS_SETTINGS"] = 8; + values[valuesById[9] = "CONVERSION_EVENT"] = 9; + values[valuesById[10] = "MEASUREMENT_PROTOCOL_SECRET"] = 10; + values[valuesById[11] = "CUSTOM_DIMENSION"] = 11; + values[valuesById[12] = "CUSTOM_METRIC"] = 12; + values[valuesById[13] = "DATA_RETENTION_SETTINGS"] = 13; + values[valuesById[14] = "DISPLAY_VIDEO_360_ADVERTISER_LINK"] = 14; + values[valuesById[15] = "DISPLAY_VIDEO_360_ADVERTISER_LINK_PROPOSAL"] = 15; + values[valuesById[16] = "SEARCH_ADS_360_LINK"] = 16; + values[valuesById[18] = "DATA_STREAM"] = 18; + values[valuesById[20] = "ATTRIBUTION_SETTINGS"] = 20; + return values; + })(); + + /** + * GoogleSignalsState enum. + * @name google.analytics.admin.v1alpha.GoogleSignalsState + * @enum {number} + * @property {number} GOOGLE_SIGNALS_STATE_UNSPECIFIED=0 GOOGLE_SIGNALS_STATE_UNSPECIFIED value + * @property {number} GOOGLE_SIGNALS_ENABLED=1 GOOGLE_SIGNALS_ENABLED value + * @property {number} GOOGLE_SIGNALS_DISABLED=2 GOOGLE_SIGNALS_DISABLED value + */ + v1alpha.GoogleSignalsState = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "GOOGLE_SIGNALS_STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "GOOGLE_SIGNALS_ENABLED"] = 1; + values[valuesById[2] = "GOOGLE_SIGNALS_DISABLED"] = 2; + return values; + })(); + + /** + * GoogleSignalsConsent enum. + * @name google.analytics.admin.v1alpha.GoogleSignalsConsent + * @enum {number} + * @property {number} GOOGLE_SIGNALS_CONSENT_UNSPECIFIED=0 GOOGLE_SIGNALS_CONSENT_UNSPECIFIED value + * @property {number} GOOGLE_SIGNALS_CONSENT_CONSENTED=2 GOOGLE_SIGNALS_CONSENT_CONSENTED value + * @property {number} GOOGLE_SIGNALS_CONSENT_NOT_CONSENTED=1 GOOGLE_SIGNALS_CONSENT_NOT_CONSENTED value + */ + v1alpha.GoogleSignalsConsent = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "GOOGLE_SIGNALS_CONSENT_UNSPECIFIED"] = 0; + values[valuesById[2] = "GOOGLE_SIGNALS_CONSENT_CONSENTED"] = 2; + values[valuesById[1] = "GOOGLE_SIGNALS_CONSENT_NOT_CONSENTED"] = 1; + return values; + })(); + + /** + * LinkProposalInitiatingProduct enum. + * @name google.analytics.admin.v1alpha.LinkProposalInitiatingProduct + * @enum {number} + * @property {number} LINK_PROPOSAL_INITIATING_PRODUCT_UNSPECIFIED=0 LINK_PROPOSAL_INITIATING_PRODUCT_UNSPECIFIED value + * @property {number} GOOGLE_ANALYTICS=1 GOOGLE_ANALYTICS value + * @property {number} LINKED_PRODUCT=2 LINKED_PRODUCT value + */ + v1alpha.LinkProposalInitiatingProduct = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "LINK_PROPOSAL_INITIATING_PRODUCT_UNSPECIFIED"] = 0; + values[valuesById[1] = "GOOGLE_ANALYTICS"] = 1; + values[valuesById[2] = "LINKED_PRODUCT"] = 2; + return values; + })(); + + /** + * LinkProposalState enum. + * @name google.analytics.admin.v1alpha.LinkProposalState + * @enum {number} + * @property {number} LINK_PROPOSAL_STATE_UNSPECIFIED=0 LINK_PROPOSAL_STATE_UNSPECIFIED value + * @property {number} AWAITING_REVIEW_FROM_GOOGLE_ANALYTICS=1 AWAITING_REVIEW_FROM_GOOGLE_ANALYTICS value + * @property {number} AWAITING_REVIEW_FROM_LINKED_PRODUCT=2 AWAITING_REVIEW_FROM_LINKED_PRODUCT value + * @property {number} WITHDRAWN=3 WITHDRAWN value + * @property {number} DECLINED=4 DECLINED value + * @property {number} EXPIRED=5 EXPIRED value + * @property {number} OBSOLETE=6 OBSOLETE value + */ + v1alpha.LinkProposalState = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "LINK_PROPOSAL_STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "AWAITING_REVIEW_FROM_GOOGLE_ANALYTICS"] = 1; + values[valuesById[2] = "AWAITING_REVIEW_FROM_LINKED_PRODUCT"] = 2; + values[valuesById[3] = "WITHDRAWN"] = 3; + values[valuesById[4] = "DECLINED"] = 4; + values[valuesById[5] = "EXPIRED"] = 5; + values[valuesById[6] = "OBSOLETE"] = 6; + return values; + })(); + + /** + * PropertyType enum. + * @name google.analytics.admin.v1alpha.PropertyType + * @enum {number} + * @property {number} PROPERTY_TYPE_UNSPECIFIED=0 PROPERTY_TYPE_UNSPECIFIED value + * @property {number} PROPERTY_TYPE_ORDINARY=1 PROPERTY_TYPE_ORDINARY value + * @property {number} PROPERTY_TYPE_SUBPROPERTY=2 PROPERTY_TYPE_SUBPROPERTY value + * @property {number} PROPERTY_TYPE_ROLLUP=3 PROPERTY_TYPE_ROLLUP value + */ + v1alpha.PropertyType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "PROPERTY_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "PROPERTY_TYPE_ORDINARY"] = 1; + values[valuesById[2] = "PROPERTY_TYPE_SUBPROPERTY"] = 2; + values[valuesById[3] = "PROPERTY_TYPE_ROLLUP"] = 3; + return values; + })(); + + v1alpha.Account = (function() { + + /** + * Properties of an Account. + * @memberof google.analytics.admin.v1alpha + * @interface IAccount + * @property {string|null} [name] Account name + * @property {google.protobuf.ITimestamp|null} [createTime] Account createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] Account updateTime + * @property {string|null} [displayName] Account displayName + * @property {string|null} [regionCode] Account regionCode + * @property {boolean|null} [deleted] Account deleted + */ + + /** + * Constructs a new Account. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents an Account. + * @implements IAccount + * @constructor + * @param {google.analytics.admin.v1alpha.IAccount=} [properties] Properties to set + */ + function Account(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Account name. + * @member {string} name + * @memberof google.analytics.admin.v1alpha.Account + * @instance + */ + Account.prototype.name = ""; + + /** + * Account createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.analytics.admin.v1alpha.Account + * @instance + */ + Account.prototype.createTime = null; + + /** + * Account updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.analytics.admin.v1alpha.Account + * @instance + */ + Account.prototype.updateTime = null; + + /** + * Account displayName. + * @member {string} displayName + * @memberof google.analytics.admin.v1alpha.Account + * @instance + */ + Account.prototype.displayName = ""; + + /** + * Account regionCode. + * @member {string} regionCode + * @memberof google.analytics.admin.v1alpha.Account + * @instance + */ + Account.prototype.regionCode = ""; + + /** + * Account deleted. + * @member {boolean} deleted + * @memberof google.analytics.admin.v1alpha.Account + * @instance + */ + Account.prototype.deleted = false; + + /** + * Creates a new Account instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.Account + * @static + * @param {google.analytics.admin.v1alpha.IAccount=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.Account} Account instance + */ + Account.create = function create(properties) { + return new Account(properties); + }; + + /** + * Encodes the specified Account message. Does not implicitly {@link google.analytics.admin.v1alpha.Account.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.Account + * @static + * @param {google.analytics.admin.v1alpha.IAccount} message Account message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Account.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.displayName); + if (message.regionCode != null && Object.hasOwnProperty.call(message, "regionCode")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.regionCode); + if (message.deleted != null && Object.hasOwnProperty.call(message, "deleted")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.deleted); + return writer; + }; + + /** + * Encodes the specified Account message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.Account.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.Account + * @static + * @param {google.analytics.admin.v1alpha.IAccount} message Account message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Account.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Account message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.Account + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.Account} Account + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Account.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.Account(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 3: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 4: { + message.displayName = reader.string(); + break; + } + case 5: { + message.regionCode = reader.string(); + break; + } + case 6: { + message.deleted = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Account message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.Account + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.Account} Account + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Account.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Account message. + * @function verify + * @memberof google.analytics.admin.v1alpha.Account + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Account.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.regionCode != null && message.hasOwnProperty("regionCode")) + if (!$util.isString(message.regionCode)) + return "regionCode: string expected"; + if (message.deleted != null && message.hasOwnProperty("deleted")) + if (typeof message.deleted !== "boolean") + return "deleted: boolean expected"; + return null; + }; + + /** + * Creates an Account message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.Account + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.Account} Account + */ + Account.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.Account) + return object; + var message = new $root.google.analytics.admin.v1alpha.Account(); + if (object.name != null) + message.name = String(object.name); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.analytics.admin.v1alpha.Account.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.analytics.admin.v1alpha.Account.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.regionCode != null) + message.regionCode = String(object.regionCode); + if (object.deleted != null) + message.deleted = Boolean(object.deleted); + return message; + }; + + /** + * Creates a plain object from an Account message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.Account + * @static + * @param {google.analytics.admin.v1alpha.Account} message Account + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Account.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.createTime = null; + object.updateTime = null; + object.displayName = ""; + object.regionCode = ""; + object.deleted = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.regionCode != null && message.hasOwnProperty("regionCode")) + object.regionCode = message.regionCode; + if (message.deleted != null && message.hasOwnProperty("deleted")) + object.deleted = message.deleted; + return object; + }; + + /** + * Converts this Account to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.Account + * @instance + * @returns {Object.} JSON object + */ + Account.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Account + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.Account + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Account.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.Account"; + }; + + return Account; + })(); + + v1alpha.Property = (function() { + + /** + * Properties of a Property. + * @memberof google.analytics.admin.v1alpha + * @interface IProperty + * @property {string|null} [name] Property name + * @property {google.analytics.admin.v1alpha.PropertyType|null} [propertyType] Property propertyType + * @property {google.protobuf.ITimestamp|null} [createTime] Property createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] Property updateTime + * @property {string|null} [parent] Property parent + * @property {string|null} [displayName] Property displayName + * @property {google.analytics.admin.v1alpha.IndustryCategory|null} [industryCategory] Property industryCategory + * @property {string|null} [timeZone] Property timeZone + * @property {string|null} [currencyCode] Property currencyCode + * @property {google.analytics.admin.v1alpha.ServiceLevel|null} [serviceLevel] Property serviceLevel + * @property {google.protobuf.ITimestamp|null} [deleteTime] Property deleteTime + * @property {google.protobuf.ITimestamp|null} [expireTime] Property expireTime + * @property {string|null} [account] Property account + */ + + /** + * Constructs a new Property. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents a Property. + * @implements IProperty + * @constructor + * @param {google.analytics.admin.v1alpha.IProperty=} [properties] Properties to set + */ + function Property(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Property name. + * @member {string} name + * @memberof google.analytics.admin.v1alpha.Property + * @instance + */ + Property.prototype.name = ""; + + /** + * Property propertyType. + * @member {google.analytics.admin.v1alpha.PropertyType} propertyType + * @memberof google.analytics.admin.v1alpha.Property + * @instance + */ + Property.prototype.propertyType = 0; + + /** + * Property createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.analytics.admin.v1alpha.Property + * @instance + */ + Property.prototype.createTime = null; + + /** + * Property updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.analytics.admin.v1alpha.Property + * @instance + */ + Property.prototype.updateTime = null; + + /** + * Property parent. + * @member {string} parent + * @memberof google.analytics.admin.v1alpha.Property + * @instance + */ + Property.prototype.parent = ""; + + /** + * Property displayName. + * @member {string} displayName + * @memberof google.analytics.admin.v1alpha.Property + * @instance + */ + Property.prototype.displayName = ""; + + /** + * Property industryCategory. + * @member {google.analytics.admin.v1alpha.IndustryCategory} industryCategory + * @memberof google.analytics.admin.v1alpha.Property + * @instance + */ + Property.prototype.industryCategory = 0; + + /** + * Property timeZone. + * @member {string} timeZone + * @memberof google.analytics.admin.v1alpha.Property + * @instance + */ + Property.prototype.timeZone = ""; + + /** + * Property currencyCode. + * @member {string} currencyCode + * @memberof google.analytics.admin.v1alpha.Property + * @instance + */ + Property.prototype.currencyCode = ""; + + /** + * Property serviceLevel. + * @member {google.analytics.admin.v1alpha.ServiceLevel} serviceLevel + * @memberof google.analytics.admin.v1alpha.Property + * @instance + */ + Property.prototype.serviceLevel = 0; + + /** + * Property deleteTime. + * @member {google.protobuf.ITimestamp|null|undefined} deleteTime + * @memberof google.analytics.admin.v1alpha.Property + * @instance + */ + Property.prototype.deleteTime = null; + + /** + * Property expireTime. + * @member {google.protobuf.ITimestamp|null|undefined} expireTime + * @memberof google.analytics.admin.v1alpha.Property + * @instance + */ + Property.prototype.expireTime = null; + + /** + * Property account. + * @member {string} account + * @memberof google.analytics.admin.v1alpha.Property + * @instance + */ + Property.prototype.account = ""; + + /** + * Creates a new Property instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.Property + * @static + * @param {google.analytics.admin.v1alpha.IProperty=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.Property} Property instance + */ + Property.create = function create(properties) { + return new Property(properties); + }; + + /** + * Encodes the specified Property message. Does not implicitly {@link google.analytics.admin.v1alpha.Property.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.Property + * @static + * @param {google.analytics.admin.v1alpha.IProperty} message Property message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Property.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.parent); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.displayName); + if (message.industryCategory != null && Object.hasOwnProperty.call(message, "industryCategory")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.industryCategory); + if (message.timeZone != null && Object.hasOwnProperty.call(message, "timeZone")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.timeZone); + if (message.currencyCode != null && Object.hasOwnProperty.call(message, "currencyCode")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.currencyCode); + if (message.serviceLevel != null && Object.hasOwnProperty.call(message, "serviceLevel")) + writer.uint32(/* id 10, wireType 0 =*/80).int32(message.serviceLevel); + if (message.deleteTime != null && Object.hasOwnProperty.call(message, "deleteTime")) + $root.google.protobuf.Timestamp.encode(message.deleteTime, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.expireTime != null && Object.hasOwnProperty.call(message, "expireTime")) + $root.google.protobuf.Timestamp.encode(message.expireTime, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.account != null && Object.hasOwnProperty.call(message, "account")) + writer.uint32(/* id 13, wireType 2 =*/106).string(message.account); + if (message.propertyType != null && Object.hasOwnProperty.call(message, "propertyType")) + writer.uint32(/* id 14, wireType 0 =*/112).int32(message.propertyType); + return writer; + }; + + /** + * Encodes the specified Property message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.Property.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.Property + * @static + * @param {google.analytics.admin.v1alpha.IProperty} message Property message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Property.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Property message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.Property + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.Property} Property + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Property.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.Property(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 14: { + message.propertyType = reader.int32(); + break; + } + case 3: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 4: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 2: { + message.parent = reader.string(); + break; + } + case 5: { + message.displayName = reader.string(); + break; + } + case 6: { + message.industryCategory = reader.int32(); + break; + } + case 7: { + message.timeZone = reader.string(); + break; + } + case 8: { + message.currencyCode = reader.string(); + break; + } + case 10: { + message.serviceLevel = reader.int32(); + break; + } + case 11: { + message.deleteTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 12: { + message.expireTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 13: { + message.account = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Property message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.Property + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.Property} Property + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Property.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Property message. + * @function verify + * @memberof google.analytics.admin.v1alpha.Property + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Property.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.propertyType != null && message.hasOwnProperty("propertyType")) + switch (message.propertyType) { + default: + return "propertyType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.industryCategory != null && message.hasOwnProperty("industryCategory")) + switch (message.industryCategory) { + default: + return "industryCategory: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + case 13: + case 14: + case 15: + case 16: + case 17: + case 18: + case 19: + case 20: + case 21: + case 22: + case 23: + case 24: + case 25: + case 26: + break; + } + if (message.timeZone != null && message.hasOwnProperty("timeZone")) + if (!$util.isString(message.timeZone)) + return "timeZone: string expected"; + if (message.currencyCode != null && message.hasOwnProperty("currencyCode")) + if (!$util.isString(message.currencyCode)) + return "currencyCode: string expected"; + if (message.serviceLevel != null && message.hasOwnProperty("serviceLevel")) + switch (message.serviceLevel) { + default: + return "serviceLevel: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.deleteTime != null && message.hasOwnProperty("deleteTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.deleteTime); + if (error) + return "deleteTime." + error; + } + if (message.expireTime != null && message.hasOwnProperty("expireTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.expireTime); + if (error) + return "expireTime." + error; + } + if (message.account != null && message.hasOwnProperty("account")) + if (!$util.isString(message.account)) + return "account: string expected"; + return null; + }; + + /** + * Creates a Property message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.Property + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.Property} Property + */ + Property.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.Property) + return object; + var message = new $root.google.analytics.admin.v1alpha.Property(); + if (object.name != null) + message.name = String(object.name); + switch (object.propertyType) { + default: + if (typeof object.propertyType === "number") { + message.propertyType = object.propertyType; + break; + } + break; + case "PROPERTY_TYPE_UNSPECIFIED": + case 0: + message.propertyType = 0; + break; + case "PROPERTY_TYPE_ORDINARY": + case 1: + message.propertyType = 1; + break; + case "PROPERTY_TYPE_SUBPROPERTY": + case 2: + message.propertyType = 2; + break; + case "PROPERTY_TYPE_ROLLUP": + case 3: + message.propertyType = 3; + break; + } + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.analytics.admin.v1alpha.Property.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.analytics.admin.v1alpha.Property.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.parent != null) + message.parent = String(object.parent); + if (object.displayName != null) + message.displayName = String(object.displayName); + switch (object.industryCategory) { + default: + if (typeof object.industryCategory === "number") { + message.industryCategory = object.industryCategory; + break; + } + break; + case "INDUSTRY_CATEGORY_UNSPECIFIED": + case 0: + message.industryCategory = 0; + break; + case "AUTOMOTIVE": + case 1: + message.industryCategory = 1; + break; + case "BUSINESS_AND_INDUSTRIAL_MARKETS": + case 2: + message.industryCategory = 2; + break; + case "FINANCE": + case 3: + message.industryCategory = 3; + break; + case "HEALTHCARE": + case 4: + message.industryCategory = 4; + break; + case "TECHNOLOGY": + case 5: + message.industryCategory = 5; + break; + case "TRAVEL": + case 6: + message.industryCategory = 6; + break; + case "OTHER": + case 7: + message.industryCategory = 7; + break; + case "ARTS_AND_ENTERTAINMENT": + case 8: + message.industryCategory = 8; + break; + case "BEAUTY_AND_FITNESS": + case 9: + message.industryCategory = 9; + break; + case "BOOKS_AND_LITERATURE": + case 10: + message.industryCategory = 10; + break; + case "FOOD_AND_DRINK": + case 11: + message.industryCategory = 11; + break; + case "GAMES": + case 12: + message.industryCategory = 12; + break; + case "HOBBIES_AND_LEISURE": + case 13: + message.industryCategory = 13; + break; + case "HOME_AND_GARDEN": + case 14: + message.industryCategory = 14; + break; + case "INTERNET_AND_TELECOM": + case 15: + message.industryCategory = 15; + break; + case "LAW_AND_GOVERNMENT": + case 16: + message.industryCategory = 16; + break; + case "NEWS": + case 17: + message.industryCategory = 17; + break; + case "ONLINE_COMMUNITIES": + case 18: + message.industryCategory = 18; + break; + case "PEOPLE_AND_SOCIETY": + case 19: + message.industryCategory = 19; + break; + case "PETS_AND_ANIMALS": + case 20: + message.industryCategory = 20; + break; + case "REAL_ESTATE": + case 21: + message.industryCategory = 21; + break; + case "REFERENCE": + case 22: + message.industryCategory = 22; + break; + case "SCIENCE": + case 23: + message.industryCategory = 23; + break; + case "SPORTS": + case 24: + message.industryCategory = 24; + break; + case "JOBS_AND_EDUCATION": + case 25: + message.industryCategory = 25; + break; + case "SHOPPING": + case 26: + message.industryCategory = 26; + break; + } + if (object.timeZone != null) + message.timeZone = String(object.timeZone); + if (object.currencyCode != null) + message.currencyCode = String(object.currencyCode); + switch (object.serviceLevel) { + default: + if (typeof object.serviceLevel === "number") { + message.serviceLevel = object.serviceLevel; + break; + } + break; + case "SERVICE_LEVEL_UNSPECIFIED": + case 0: + message.serviceLevel = 0; + break; + case "GOOGLE_ANALYTICS_STANDARD": + case 1: + message.serviceLevel = 1; + break; + case "GOOGLE_ANALYTICS_360": + case 2: + message.serviceLevel = 2; + break; + } + if (object.deleteTime != null) { + if (typeof object.deleteTime !== "object") + throw TypeError(".google.analytics.admin.v1alpha.Property.deleteTime: object expected"); + message.deleteTime = $root.google.protobuf.Timestamp.fromObject(object.deleteTime); + } + if (object.expireTime != null) { + if (typeof object.expireTime !== "object") + throw TypeError(".google.analytics.admin.v1alpha.Property.expireTime: object expected"); + message.expireTime = $root.google.protobuf.Timestamp.fromObject(object.expireTime); + } + if (object.account != null) + message.account = String(object.account); + return message; + }; + + /** + * Creates a plain object from a Property message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.Property + * @static + * @param {google.analytics.admin.v1alpha.Property} message Property + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Property.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.parent = ""; + object.createTime = null; + object.updateTime = null; + object.displayName = ""; + object.industryCategory = options.enums === String ? "INDUSTRY_CATEGORY_UNSPECIFIED" : 0; + object.timeZone = ""; + object.currencyCode = ""; + object.serviceLevel = options.enums === String ? "SERVICE_LEVEL_UNSPECIFIED" : 0; + object.deleteTime = null; + object.expireTime = null; + object.account = ""; + object.propertyType = options.enums === String ? "PROPERTY_TYPE_UNSPECIFIED" : 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.industryCategory != null && message.hasOwnProperty("industryCategory")) + object.industryCategory = options.enums === String ? $root.google.analytics.admin.v1alpha.IndustryCategory[message.industryCategory] === undefined ? message.industryCategory : $root.google.analytics.admin.v1alpha.IndustryCategory[message.industryCategory] : message.industryCategory; + if (message.timeZone != null && message.hasOwnProperty("timeZone")) + object.timeZone = message.timeZone; + if (message.currencyCode != null && message.hasOwnProperty("currencyCode")) + object.currencyCode = message.currencyCode; + if (message.serviceLevel != null && message.hasOwnProperty("serviceLevel")) + object.serviceLevel = options.enums === String ? $root.google.analytics.admin.v1alpha.ServiceLevel[message.serviceLevel] === undefined ? message.serviceLevel : $root.google.analytics.admin.v1alpha.ServiceLevel[message.serviceLevel] : message.serviceLevel; + if (message.deleteTime != null && message.hasOwnProperty("deleteTime")) + object.deleteTime = $root.google.protobuf.Timestamp.toObject(message.deleteTime, options); + if (message.expireTime != null && message.hasOwnProperty("expireTime")) + object.expireTime = $root.google.protobuf.Timestamp.toObject(message.expireTime, options); + if (message.account != null && message.hasOwnProperty("account")) + object.account = message.account; + if (message.propertyType != null && message.hasOwnProperty("propertyType")) + object.propertyType = options.enums === String ? $root.google.analytics.admin.v1alpha.PropertyType[message.propertyType] === undefined ? message.propertyType : $root.google.analytics.admin.v1alpha.PropertyType[message.propertyType] : message.propertyType; + return object; + }; + + /** + * Converts this Property to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.Property + * @instance + * @returns {Object.} JSON object + */ + Property.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Property + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.Property + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Property.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.Property"; + }; + + return Property; + })(); + + v1alpha.DataStream = (function() { + + /** + * Properties of a DataStream. + * @memberof google.analytics.admin.v1alpha + * @interface IDataStream + * @property {google.analytics.admin.v1alpha.DataStream.IWebStreamData|null} [webStreamData] DataStream webStreamData + * @property {google.analytics.admin.v1alpha.DataStream.IAndroidAppStreamData|null} [androidAppStreamData] DataStream androidAppStreamData + * @property {google.analytics.admin.v1alpha.DataStream.IIosAppStreamData|null} [iosAppStreamData] DataStream iosAppStreamData + * @property {string|null} [name] DataStream name + * @property {google.analytics.admin.v1alpha.DataStream.DataStreamType|null} [type] DataStream type + * @property {string|null} [displayName] DataStream displayName + * @property {google.protobuf.ITimestamp|null} [createTime] DataStream createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] DataStream updateTime + */ + + /** + * Constructs a new DataStream. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents a DataStream. + * @implements IDataStream + * @constructor + * @param {google.analytics.admin.v1alpha.IDataStream=} [properties] Properties to set + */ + function DataStream(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DataStream webStreamData. + * @member {google.analytics.admin.v1alpha.DataStream.IWebStreamData|null|undefined} webStreamData + * @memberof google.analytics.admin.v1alpha.DataStream + * @instance + */ + DataStream.prototype.webStreamData = null; + + /** + * DataStream androidAppStreamData. + * @member {google.analytics.admin.v1alpha.DataStream.IAndroidAppStreamData|null|undefined} androidAppStreamData + * @memberof google.analytics.admin.v1alpha.DataStream + * @instance + */ + DataStream.prototype.androidAppStreamData = null; + + /** + * DataStream iosAppStreamData. + * @member {google.analytics.admin.v1alpha.DataStream.IIosAppStreamData|null|undefined} iosAppStreamData + * @memberof google.analytics.admin.v1alpha.DataStream + * @instance + */ + DataStream.prototype.iosAppStreamData = null; + + /** + * DataStream name. + * @member {string} name + * @memberof google.analytics.admin.v1alpha.DataStream + * @instance + */ + DataStream.prototype.name = ""; + + /** + * DataStream type. + * @member {google.analytics.admin.v1alpha.DataStream.DataStreamType} type + * @memberof google.analytics.admin.v1alpha.DataStream + * @instance + */ + DataStream.prototype.type = 0; + + /** + * DataStream displayName. + * @member {string} displayName + * @memberof google.analytics.admin.v1alpha.DataStream + * @instance + */ + DataStream.prototype.displayName = ""; + + /** + * DataStream createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.analytics.admin.v1alpha.DataStream + * @instance + */ + DataStream.prototype.createTime = null; + + /** + * DataStream updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.analytics.admin.v1alpha.DataStream + * @instance + */ + DataStream.prototype.updateTime = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * DataStream streamData. + * @member {"webStreamData"|"androidAppStreamData"|"iosAppStreamData"|undefined} streamData + * @memberof google.analytics.admin.v1alpha.DataStream + * @instance + */ + Object.defineProperty(DataStream.prototype, "streamData", { + get: $util.oneOfGetter($oneOfFields = ["webStreamData", "androidAppStreamData", "iosAppStreamData"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new DataStream instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.DataStream + * @static + * @param {google.analytics.admin.v1alpha.IDataStream=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.DataStream} DataStream instance + */ + DataStream.create = function create(properties) { + return new DataStream(properties); + }; + + /** + * Encodes the specified DataStream message. Does not implicitly {@link google.analytics.admin.v1alpha.DataStream.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.DataStream + * @static + * @param {google.analytics.admin.v1alpha.IDataStream} message DataStream message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataStream.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.type); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.displayName); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.webStreamData != null && Object.hasOwnProperty.call(message, "webStreamData")) + $root.google.analytics.admin.v1alpha.DataStream.WebStreamData.encode(message.webStreamData, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.androidAppStreamData != null && Object.hasOwnProperty.call(message, "androidAppStreamData")) + $root.google.analytics.admin.v1alpha.DataStream.AndroidAppStreamData.encode(message.androidAppStreamData, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.iosAppStreamData != null && Object.hasOwnProperty.call(message, "iosAppStreamData")) + $root.google.analytics.admin.v1alpha.DataStream.IosAppStreamData.encode(message.iosAppStreamData, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified DataStream message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.DataStream.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.DataStream + * @static + * @param {google.analytics.admin.v1alpha.IDataStream} message DataStream message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataStream.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DataStream message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.DataStream + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.DataStream} DataStream + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataStream.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.DataStream(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 6: { + message.webStreamData = $root.google.analytics.admin.v1alpha.DataStream.WebStreamData.decode(reader, reader.uint32()); + break; + } + case 7: { + message.androidAppStreamData = $root.google.analytics.admin.v1alpha.DataStream.AndroidAppStreamData.decode(reader, reader.uint32()); + break; + } + case 8: { + message.iosAppStreamData = $root.google.analytics.admin.v1alpha.DataStream.IosAppStreamData.decode(reader, reader.uint32()); + break; + } + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.type = reader.int32(); + break; + } + case 3: { + message.displayName = reader.string(); + break; + } + case 4: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 5: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DataStream message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.DataStream + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.DataStream} DataStream + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataStream.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DataStream message. + * @function verify + * @memberof google.analytics.admin.v1alpha.DataStream + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DataStream.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.webStreamData != null && message.hasOwnProperty("webStreamData")) { + properties.streamData = 1; + { + var error = $root.google.analytics.admin.v1alpha.DataStream.WebStreamData.verify(message.webStreamData); + if (error) + return "webStreamData." + error; + } + } + if (message.androidAppStreamData != null && message.hasOwnProperty("androidAppStreamData")) { + if (properties.streamData === 1) + return "streamData: multiple values"; + properties.streamData = 1; + { + var error = $root.google.analytics.admin.v1alpha.DataStream.AndroidAppStreamData.verify(message.androidAppStreamData); + if (error) + return "androidAppStreamData." + error; + } + } + if (message.iosAppStreamData != null && message.hasOwnProperty("iosAppStreamData")) { + if (properties.streamData === 1) + return "streamData: multiple values"; + properties.streamData = 1; + { + var error = $root.google.analytics.admin.v1alpha.DataStream.IosAppStreamData.verify(message.iosAppStreamData); + if (error) + return "iosAppStreamData." + error; + } + } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + return null; + }; + + /** + * Creates a DataStream message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.DataStream + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.DataStream} DataStream + */ + DataStream.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.DataStream) + return object; + var message = new $root.google.analytics.admin.v1alpha.DataStream(); + if (object.webStreamData != null) { + if (typeof object.webStreamData !== "object") + throw TypeError(".google.analytics.admin.v1alpha.DataStream.webStreamData: object expected"); + message.webStreamData = $root.google.analytics.admin.v1alpha.DataStream.WebStreamData.fromObject(object.webStreamData); + } + if (object.androidAppStreamData != null) { + if (typeof object.androidAppStreamData !== "object") + throw TypeError(".google.analytics.admin.v1alpha.DataStream.androidAppStreamData: object expected"); + message.androidAppStreamData = $root.google.analytics.admin.v1alpha.DataStream.AndroidAppStreamData.fromObject(object.androidAppStreamData); + } + if (object.iosAppStreamData != null) { + if (typeof object.iosAppStreamData !== "object") + throw TypeError(".google.analytics.admin.v1alpha.DataStream.iosAppStreamData: object expected"); + message.iosAppStreamData = $root.google.analytics.admin.v1alpha.DataStream.IosAppStreamData.fromObject(object.iosAppStreamData); + } + if (object.name != null) + message.name = String(object.name); + switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; + case "DATA_STREAM_TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "WEB_DATA_STREAM": + case 1: + message.type = 1; + break; + case "ANDROID_APP_DATA_STREAM": + case 2: + message.type = 2; + break; + case "IOS_APP_DATA_STREAM": + case 3: + message.type = 3; + break; + } + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.analytics.admin.v1alpha.DataStream.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.analytics.admin.v1alpha.DataStream.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + return message; + }; + + /** + * Creates a plain object from a DataStream message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.DataStream + * @static + * @param {google.analytics.admin.v1alpha.DataStream} message DataStream + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DataStream.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.type = options.enums === String ? "DATA_STREAM_TYPE_UNSPECIFIED" : 0; + object.displayName = ""; + object.createTime = null; + object.updateTime = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.analytics.admin.v1alpha.DataStream.DataStreamType[message.type] === undefined ? message.type : $root.google.analytics.admin.v1alpha.DataStream.DataStreamType[message.type] : message.type; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + if (message.webStreamData != null && message.hasOwnProperty("webStreamData")) { + object.webStreamData = $root.google.analytics.admin.v1alpha.DataStream.WebStreamData.toObject(message.webStreamData, options); + if (options.oneofs) + object.streamData = "webStreamData"; + } + if (message.androidAppStreamData != null && message.hasOwnProperty("androidAppStreamData")) { + object.androidAppStreamData = $root.google.analytics.admin.v1alpha.DataStream.AndroidAppStreamData.toObject(message.androidAppStreamData, options); + if (options.oneofs) + object.streamData = "androidAppStreamData"; + } + if (message.iosAppStreamData != null && message.hasOwnProperty("iosAppStreamData")) { + object.iosAppStreamData = $root.google.analytics.admin.v1alpha.DataStream.IosAppStreamData.toObject(message.iosAppStreamData, options); + if (options.oneofs) + object.streamData = "iosAppStreamData"; + } + return object; + }; + + /** + * Converts this DataStream to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.DataStream + * @instance + * @returns {Object.} JSON object + */ + DataStream.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DataStream + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.DataStream + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DataStream.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.DataStream"; + }; + + DataStream.WebStreamData = (function() { + + /** + * Properties of a WebStreamData. + * @memberof google.analytics.admin.v1alpha.DataStream + * @interface IWebStreamData + * @property {string|null} [measurementId] WebStreamData measurementId + * @property {string|null} [firebaseAppId] WebStreamData firebaseAppId + * @property {string|null} [defaultUri] WebStreamData defaultUri + */ + + /** + * Constructs a new WebStreamData. + * @memberof google.analytics.admin.v1alpha.DataStream + * @classdesc Represents a WebStreamData. + * @implements IWebStreamData + * @constructor + * @param {google.analytics.admin.v1alpha.DataStream.IWebStreamData=} [properties] Properties to set + */ + function WebStreamData(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * WebStreamData measurementId. + * @member {string} measurementId + * @memberof google.analytics.admin.v1alpha.DataStream.WebStreamData + * @instance + */ + WebStreamData.prototype.measurementId = ""; + + /** + * WebStreamData firebaseAppId. + * @member {string} firebaseAppId + * @memberof google.analytics.admin.v1alpha.DataStream.WebStreamData + * @instance + */ + WebStreamData.prototype.firebaseAppId = ""; + + /** + * WebStreamData defaultUri. + * @member {string} defaultUri + * @memberof google.analytics.admin.v1alpha.DataStream.WebStreamData + * @instance + */ + WebStreamData.prototype.defaultUri = ""; + + /** + * Creates a new WebStreamData instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.DataStream.WebStreamData + * @static + * @param {google.analytics.admin.v1alpha.DataStream.IWebStreamData=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.DataStream.WebStreamData} WebStreamData instance + */ + WebStreamData.create = function create(properties) { + return new WebStreamData(properties); + }; + + /** + * Encodes the specified WebStreamData message. Does not implicitly {@link google.analytics.admin.v1alpha.DataStream.WebStreamData.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.DataStream.WebStreamData + * @static + * @param {google.analytics.admin.v1alpha.DataStream.IWebStreamData} message WebStreamData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WebStreamData.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.measurementId != null && Object.hasOwnProperty.call(message, "measurementId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.measurementId); + if (message.firebaseAppId != null && Object.hasOwnProperty.call(message, "firebaseAppId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.firebaseAppId); + if (message.defaultUri != null && Object.hasOwnProperty.call(message, "defaultUri")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.defaultUri); + return writer; + }; + + /** + * Encodes the specified WebStreamData message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.DataStream.WebStreamData.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.DataStream.WebStreamData + * @static + * @param {google.analytics.admin.v1alpha.DataStream.IWebStreamData} message WebStreamData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WebStreamData.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a WebStreamData message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.DataStream.WebStreamData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.DataStream.WebStreamData} WebStreamData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WebStreamData.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.DataStream.WebStreamData(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.measurementId = reader.string(); + break; + } + case 2: { + message.firebaseAppId = reader.string(); + break; + } + case 3: { + message.defaultUri = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a WebStreamData message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.DataStream.WebStreamData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.DataStream.WebStreamData} WebStreamData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WebStreamData.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a WebStreamData message. + * @function verify + * @memberof google.analytics.admin.v1alpha.DataStream.WebStreamData + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + WebStreamData.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.measurementId != null && message.hasOwnProperty("measurementId")) + if (!$util.isString(message.measurementId)) + return "measurementId: string expected"; + if (message.firebaseAppId != null && message.hasOwnProperty("firebaseAppId")) + if (!$util.isString(message.firebaseAppId)) + return "firebaseAppId: string expected"; + if (message.defaultUri != null && message.hasOwnProperty("defaultUri")) + if (!$util.isString(message.defaultUri)) + return "defaultUri: string expected"; + return null; + }; + + /** + * Creates a WebStreamData message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.DataStream.WebStreamData + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.DataStream.WebStreamData} WebStreamData + */ + WebStreamData.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.DataStream.WebStreamData) + return object; + var message = new $root.google.analytics.admin.v1alpha.DataStream.WebStreamData(); + if (object.measurementId != null) + message.measurementId = String(object.measurementId); + if (object.firebaseAppId != null) + message.firebaseAppId = String(object.firebaseAppId); + if (object.defaultUri != null) + message.defaultUri = String(object.defaultUri); + return message; + }; + + /** + * Creates a plain object from a WebStreamData message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.DataStream.WebStreamData + * @static + * @param {google.analytics.admin.v1alpha.DataStream.WebStreamData} message WebStreamData + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + WebStreamData.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.measurementId = ""; + object.firebaseAppId = ""; + object.defaultUri = ""; + } + if (message.measurementId != null && message.hasOwnProperty("measurementId")) + object.measurementId = message.measurementId; + if (message.firebaseAppId != null && message.hasOwnProperty("firebaseAppId")) + object.firebaseAppId = message.firebaseAppId; + if (message.defaultUri != null && message.hasOwnProperty("defaultUri")) + object.defaultUri = message.defaultUri; + return object; + }; + + /** + * Converts this WebStreamData to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.DataStream.WebStreamData + * @instance + * @returns {Object.} JSON object + */ + WebStreamData.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for WebStreamData + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.DataStream.WebStreamData + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + WebStreamData.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.DataStream.WebStreamData"; + }; + + return WebStreamData; + })(); + + DataStream.AndroidAppStreamData = (function() { + + /** + * Properties of an AndroidAppStreamData. + * @memberof google.analytics.admin.v1alpha.DataStream + * @interface IAndroidAppStreamData + * @property {string|null} [firebaseAppId] AndroidAppStreamData firebaseAppId + * @property {string|null} [packageName] AndroidAppStreamData packageName + */ + + /** + * Constructs a new AndroidAppStreamData. + * @memberof google.analytics.admin.v1alpha.DataStream + * @classdesc Represents an AndroidAppStreamData. + * @implements IAndroidAppStreamData + * @constructor + * @param {google.analytics.admin.v1alpha.DataStream.IAndroidAppStreamData=} [properties] Properties to set + */ + function AndroidAppStreamData(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AndroidAppStreamData firebaseAppId. + * @member {string} firebaseAppId + * @memberof google.analytics.admin.v1alpha.DataStream.AndroidAppStreamData + * @instance + */ + AndroidAppStreamData.prototype.firebaseAppId = ""; + + /** + * AndroidAppStreamData packageName. + * @member {string} packageName + * @memberof google.analytics.admin.v1alpha.DataStream.AndroidAppStreamData + * @instance + */ + AndroidAppStreamData.prototype.packageName = ""; + + /** + * Creates a new AndroidAppStreamData instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.DataStream.AndroidAppStreamData + * @static + * @param {google.analytics.admin.v1alpha.DataStream.IAndroidAppStreamData=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.DataStream.AndroidAppStreamData} AndroidAppStreamData instance + */ + AndroidAppStreamData.create = function create(properties) { + return new AndroidAppStreamData(properties); + }; + + /** + * Encodes the specified AndroidAppStreamData message. Does not implicitly {@link google.analytics.admin.v1alpha.DataStream.AndroidAppStreamData.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.DataStream.AndroidAppStreamData + * @static + * @param {google.analytics.admin.v1alpha.DataStream.IAndroidAppStreamData} message AndroidAppStreamData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AndroidAppStreamData.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.firebaseAppId != null && Object.hasOwnProperty.call(message, "firebaseAppId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.firebaseAppId); + if (message.packageName != null && Object.hasOwnProperty.call(message, "packageName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.packageName); + return writer; + }; + + /** + * Encodes the specified AndroidAppStreamData message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.DataStream.AndroidAppStreamData.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.DataStream.AndroidAppStreamData + * @static + * @param {google.analytics.admin.v1alpha.DataStream.IAndroidAppStreamData} message AndroidAppStreamData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AndroidAppStreamData.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AndroidAppStreamData message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.DataStream.AndroidAppStreamData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.DataStream.AndroidAppStreamData} AndroidAppStreamData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AndroidAppStreamData.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.DataStream.AndroidAppStreamData(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.firebaseAppId = reader.string(); + break; + } + case 2: { + message.packageName = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AndroidAppStreamData message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.DataStream.AndroidAppStreamData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.DataStream.AndroidAppStreamData} AndroidAppStreamData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AndroidAppStreamData.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AndroidAppStreamData message. + * @function verify + * @memberof google.analytics.admin.v1alpha.DataStream.AndroidAppStreamData + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AndroidAppStreamData.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.firebaseAppId != null && message.hasOwnProperty("firebaseAppId")) + if (!$util.isString(message.firebaseAppId)) + return "firebaseAppId: string expected"; + if (message.packageName != null && message.hasOwnProperty("packageName")) + if (!$util.isString(message.packageName)) + return "packageName: string expected"; + return null; + }; + + /** + * Creates an AndroidAppStreamData message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.DataStream.AndroidAppStreamData + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.DataStream.AndroidAppStreamData} AndroidAppStreamData + */ + AndroidAppStreamData.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.DataStream.AndroidAppStreamData) + return object; + var message = new $root.google.analytics.admin.v1alpha.DataStream.AndroidAppStreamData(); + if (object.firebaseAppId != null) + message.firebaseAppId = String(object.firebaseAppId); + if (object.packageName != null) + message.packageName = String(object.packageName); + return message; + }; + + /** + * Creates a plain object from an AndroidAppStreamData message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.DataStream.AndroidAppStreamData + * @static + * @param {google.analytics.admin.v1alpha.DataStream.AndroidAppStreamData} message AndroidAppStreamData + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AndroidAppStreamData.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.firebaseAppId = ""; + object.packageName = ""; + } + if (message.firebaseAppId != null && message.hasOwnProperty("firebaseAppId")) + object.firebaseAppId = message.firebaseAppId; + if (message.packageName != null && message.hasOwnProperty("packageName")) + object.packageName = message.packageName; + return object; + }; + + /** + * Converts this AndroidAppStreamData to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.DataStream.AndroidAppStreamData + * @instance + * @returns {Object.} JSON object + */ + AndroidAppStreamData.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AndroidAppStreamData + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.DataStream.AndroidAppStreamData + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AndroidAppStreamData.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.DataStream.AndroidAppStreamData"; + }; + + return AndroidAppStreamData; + })(); + + DataStream.IosAppStreamData = (function() { + + /** + * Properties of an IosAppStreamData. + * @memberof google.analytics.admin.v1alpha.DataStream + * @interface IIosAppStreamData + * @property {string|null} [firebaseAppId] IosAppStreamData firebaseAppId + * @property {string|null} [bundleId] IosAppStreamData bundleId + */ + + /** + * Constructs a new IosAppStreamData. + * @memberof google.analytics.admin.v1alpha.DataStream + * @classdesc Represents an IosAppStreamData. + * @implements IIosAppStreamData + * @constructor + * @param {google.analytics.admin.v1alpha.DataStream.IIosAppStreamData=} [properties] Properties to set + */ + function IosAppStreamData(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * IosAppStreamData firebaseAppId. + * @member {string} firebaseAppId + * @memberof google.analytics.admin.v1alpha.DataStream.IosAppStreamData + * @instance + */ + IosAppStreamData.prototype.firebaseAppId = ""; + + /** + * IosAppStreamData bundleId. + * @member {string} bundleId + * @memberof google.analytics.admin.v1alpha.DataStream.IosAppStreamData + * @instance + */ + IosAppStreamData.prototype.bundleId = ""; + + /** + * Creates a new IosAppStreamData instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.DataStream.IosAppStreamData + * @static + * @param {google.analytics.admin.v1alpha.DataStream.IIosAppStreamData=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.DataStream.IosAppStreamData} IosAppStreamData instance + */ + IosAppStreamData.create = function create(properties) { + return new IosAppStreamData(properties); + }; + + /** + * Encodes the specified IosAppStreamData message. Does not implicitly {@link google.analytics.admin.v1alpha.DataStream.IosAppStreamData.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.DataStream.IosAppStreamData + * @static + * @param {google.analytics.admin.v1alpha.DataStream.IIosAppStreamData} message IosAppStreamData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IosAppStreamData.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.firebaseAppId != null && Object.hasOwnProperty.call(message, "firebaseAppId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.firebaseAppId); + if (message.bundleId != null && Object.hasOwnProperty.call(message, "bundleId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.bundleId); + return writer; + }; + + /** + * Encodes the specified IosAppStreamData message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.DataStream.IosAppStreamData.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.DataStream.IosAppStreamData + * @static + * @param {google.analytics.admin.v1alpha.DataStream.IIosAppStreamData} message IosAppStreamData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IosAppStreamData.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an IosAppStreamData message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.DataStream.IosAppStreamData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.DataStream.IosAppStreamData} IosAppStreamData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IosAppStreamData.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.DataStream.IosAppStreamData(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.firebaseAppId = reader.string(); + break; + } + case 2: { + message.bundleId = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an IosAppStreamData message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.DataStream.IosAppStreamData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.DataStream.IosAppStreamData} IosAppStreamData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IosAppStreamData.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an IosAppStreamData message. + * @function verify + * @memberof google.analytics.admin.v1alpha.DataStream.IosAppStreamData + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + IosAppStreamData.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.firebaseAppId != null && message.hasOwnProperty("firebaseAppId")) + if (!$util.isString(message.firebaseAppId)) + return "firebaseAppId: string expected"; + if (message.bundleId != null && message.hasOwnProperty("bundleId")) + if (!$util.isString(message.bundleId)) + return "bundleId: string expected"; + return null; + }; + + /** + * Creates an IosAppStreamData message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.DataStream.IosAppStreamData + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.DataStream.IosAppStreamData} IosAppStreamData + */ + IosAppStreamData.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.DataStream.IosAppStreamData) + return object; + var message = new $root.google.analytics.admin.v1alpha.DataStream.IosAppStreamData(); + if (object.firebaseAppId != null) + message.firebaseAppId = String(object.firebaseAppId); + if (object.bundleId != null) + message.bundleId = String(object.bundleId); + return message; + }; + + /** + * Creates a plain object from an IosAppStreamData message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.DataStream.IosAppStreamData + * @static + * @param {google.analytics.admin.v1alpha.DataStream.IosAppStreamData} message IosAppStreamData + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + IosAppStreamData.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.firebaseAppId = ""; + object.bundleId = ""; + } + if (message.firebaseAppId != null && message.hasOwnProperty("firebaseAppId")) + object.firebaseAppId = message.firebaseAppId; + if (message.bundleId != null && message.hasOwnProperty("bundleId")) + object.bundleId = message.bundleId; + return object; + }; + + /** + * Converts this IosAppStreamData to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.DataStream.IosAppStreamData + * @instance + * @returns {Object.} JSON object + */ + IosAppStreamData.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for IosAppStreamData + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.DataStream.IosAppStreamData + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + IosAppStreamData.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.DataStream.IosAppStreamData"; + }; + + return IosAppStreamData; + })(); + + /** + * DataStreamType enum. + * @name google.analytics.admin.v1alpha.DataStream.DataStreamType + * @enum {number} + * @property {number} DATA_STREAM_TYPE_UNSPECIFIED=0 DATA_STREAM_TYPE_UNSPECIFIED value + * @property {number} WEB_DATA_STREAM=1 WEB_DATA_STREAM value + * @property {number} ANDROID_APP_DATA_STREAM=2 ANDROID_APP_DATA_STREAM value + * @property {number} IOS_APP_DATA_STREAM=3 IOS_APP_DATA_STREAM value + */ + DataStream.DataStreamType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DATA_STREAM_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "WEB_DATA_STREAM"] = 1; + values[valuesById[2] = "ANDROID_APP_DATA_STREAM"] = 2; + values[valuesById[3] = "IOS_APP_DATA_STREAM"] = 3; + return values; + })(); + + return DataStream; + })(); + + v1alpha.UserLink = (function() { + + /** + * Properties of a UserLink. + * @memberof google.analytics.admin.v1alpha + * @interface IUserLink + * @property {string|null} [name] UserLink name + * @property {string|null} [emailAddress] UserLink emailAddress + * @property {Array.|null} [directRoles] UserLink directRoles + */ + + /** + * Constructs a new UserLink. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents a UserLink. + * @implements IUserLink + * @constructor + * @param {google.analytics.admin.v1alpha.IUserLink=} [properties] Properties to set + */ + function UserLink(properties) { + this.directRoles = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UserLink name. + * @member {string} name + * @memberof google.analytics.admin.v1alpha.UserLink + * @instance + */ + UserLink.prototype.name = ""; + + /** + * UserLink emailAddress. + * @member {string} emailAddress + * @memberof google.analytics.admin.v1alpha.UserLink + * @instance + */ + UserLink.prototype.emailAddress = ""; + + /** + * UserLink directRoles. + * @member {Array.} directRoles + * @memberof google.analytics.admin.v1alpha.UserLink + * @instance + */ + UserLink.prototype.directRoles = $util.emptyArray; + + /** + * Creates a new UserLink instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.UserLink + * @static + * @param {google.analytics.admin.v1alpha.IUserLink=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.UserLink} UserLink instance + */ + UserLink.create = function create(properties) { + return new UserLink(properties); + }; + + /** + * Encodes the specified UserLink message. Does not implicitly {@link google.analytics.admin.v1alpha.UserLink.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.UserLink + * @static + * @param {google.analytics.admin.v1alpha.IUserLink} message UserLink message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UserLink.encode = function encode(message, writer) { + 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.emailAddress != null && Object.hasOwnProperty.call(message, "emailAddress")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.emailAddress); + if (message.directRoles != null && message.directRoles.length) + for (var i = 0; i < message.directRoles.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.directRoles[i]); + return writer; + }; + + /** + * Encodes the specified UserLink message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.UserLink.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.UserLink + * @static + * @param {google.analytics.admin.v1alpha.IUserLink} message UserLink message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UserLink.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a UserLink message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.UserLink + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.UserLink} UserLink + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UserLink.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.UserLink(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.emailAddress = reader.string(); + break; + } + case 3: { + if (!(message.directRoles && message.directRoles.length)) + message.directRoles = []; + message.directRoles.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a UserLink message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.UserLink + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.UserLink} UserLink + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UserLink.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a UserLink message. + * @function verify + * @memberof google.analytics.admin.v1alpha.UserLink + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UserLink.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.emailAddress != null && message.hasOwnProperty("emailAddress")) + if (!$util.isString(message.emailAddress)) + return "emailAddress: string expected"; + if (message.directRoles != null && message.hasOwnProperty("directRoles")) { + if (!Array.isArray(message.directRoles)) + return "directRoles: array expected"; + for (var i = 0; i < message.directRoles.length; ++i) + if (!$util.isString(message.directRoles[i])) + return "directRoles: string[] expected"; + } + return null; + }; + + /** + * Creates a UserLink message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.UserLink + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.UserLink} UserLink + */ + UserLink.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.UserLink) + return object; + var message = new $root.google.analytics.admin.v1alpha.UserLink(); + if (object.name != null) + message.name = String(object.name); + if (object.emailAddress != null) + message.emailAddress = String(object.emailAddress); + if (object.directRoles) { + if (!Array.isArray(object.directRoles)) + throw TypeError(".google.analytics.admin.v1alpha.UserLink.directRoles: array expected"); + message.directRoles = []; + for (var i = 0; i < object.directRoles.length; ++i) + message.directRoles[i] = String(object.directRoles[i]); + } + return message; + }; + + /** + * Creates a plain object from a UserLink message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.UserLink + * @static + * @param {google.analytics.admin.v1alpha.UserLink} message UserLink + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UserLink.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.directRoles = []; + if (options.defaults) { + object.name = ""; + object.emailAddress = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.emailAddress != null && message.hasOwnProperty("emailAddress")) + object.emailAddress = message.emailAddress; + if (message.directRoles && message.directRoles.length) { + object.directRoles = []; + for (var j = 0; j < message.directRoles.length; ++j) + object.directRoles[j] = message.directRoles[j]; + } + return object; + }; + + /** + * Converts this UserLink to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.UserLink + * @instance + * @returns {Object.} JSON object + */ + UserLink.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UserLink + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.UserLink + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UserLink.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.UserLink"; + }; + + return UserLink; + })(); + + v1alpha.AuditUserLink = (function() { + + /** + * Properties of an AuditUserLink. + * @memberof google.analytics.admin.v1alpha + * @interface IAuditUserLink + * @property {string|null} [name] AuditUserLink name + * @property {string|null} [emailAddress] AuditUserLink emailAddress + * @property {Array.|null} [directRoles] AuditUserLink directRoles + * @property {Array.|null} [effectiveRoles] AuditUserLink effectiveRoles + */ + + /** + * Constructs a new AuditUserLink. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents an AuditUserLink. + * @implements IAuditUserLink + * @constructor + * @param {google.analytics.admin.v1alpha.IAuditUserLink=} [properties] Properties to set + */ + function AuditUserLink(properties) { + this.directRoles = []; + this.effectiveRoles = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AuditUserLink name. + * @member {string} name + * @memberof google.analytics.admin.v1alpha.AuditUserLink + * @instance + */ + AuditUserLink.prototype.name = ""; + + /** + * AuditUserLink emailAddress. + * @member {string} emailAddress + * @memberof google.analytics.admin.v1alpha.AuditUserLink + * @instance + */ + AuditUserLink.prototype.emailAddress = ""; + + /** + * AuditUserLink directRoles. + * @member {Array.} directRoles + * @memberof google.analytics.admin.v1alpha.AuditUserLink + * @instance + */ + AuditUserLink.prototype.directRoles = $util.emptyArray; + + /** + * AuditUserLink effectiveRoles. + * @member {Array.} effectiveRoles + * @memberof google.analytics.admin.v1alpha.AuditUserLink + * @instance + */ + AuditUserLink.prototype.effectiveRoles = $util.emptyArray; + + /** + * Creates a new AuditUserLink instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.AuditUserLink + * @static + * @param {google.analytics.admin.v1alpha.IAuditUserLink=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.AuditUserLink} AuditUserLink instance + */ + AuditUserLink.create = function create(properties) { + return new AuditUserLink(properties); + }; + + /** + * Encodes the specified AuditUserLink message. Does not implicitly {@link google.analytics.admin.v1alpha.AuditUserLink.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.AuditUserLink + * @static + * @param {google.analytics.admin.v1alpha.IAuditUserLink} message AuditUserLink message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AuditUserLink.encode = function encode(message, writer) { + 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.emailAddress != null && Object.hasOwnProperty.call(message, "emailAddress")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.emailAddress); + if (message.directRoles != null && message.directRoles.length) + for (var i = 0; i < message.directRoles.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.directRoles[i]); + if (message.effectiveRoles != null && message.effectiveRoles.length) + for (var i = 0; i < message.effectiveRoles.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.effectiveRoles[i]); + return writer; + }; + + /** + * Encodes the specified AuditUserLink message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AuditUserLink.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.AuditUserLink + * @static + * @param {google.analytics.admin.v1alpha.IAuditUserLink} message AuditUserLink message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AuditUserLink.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AuditUserLink message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.AuditUserLink + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.AuditUserLink} AuditUserLink + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AuditUserLink.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.AuditUserLink(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.emailAddress = reader.string(); + break; + } + case 3: { + if (!(message.directRoles && message.directRoles.length)) + message.directRoles = []; + message.directRoles.push(reader.string()); + break; + } + case 4: { + if (!(message.effectiveRoles && message.effectiveRoles.length)) + message.effectiveRoles = []; + message.effectiveRoles.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AuditUserLink message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.AuditUserLink + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.AuditUserLink} AuditUserLink + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AuditUserLink.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AuditUserLink message. + * @function verify + * @memberof google.analytics.admin.v1alpha.AuditUserLink + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AuditUserLink.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.emailAddress != null && message.hasOwnProperty("emailAddress")) + if (!$util.isString(message.emailAddress)) + return "emailAddress: string expected"; + if (message.directRoles != null && message.hasOwnProperty("directRoles")) { + if (!Array.isArray(message.directRoles)) + return "directRoles: array expected"; + for (var i = 0; i < message.directRoles.length; ++i) + if (!$util.isString(message.directRoles[i])) + return "directRoles: string[] expected"; + } + if (message.effectiveRoles != null && message.hasOwnProperty("effectiveRoles")) { + if (!Array.isArray(message.effectiveRoles)) + return "effectiveRoles: array expected"; + for (var i = 0; i < message.effectiveRoles.length; ++i) + if (!$util.isString(message.effectiveRoles[i])) + return "effectiveRoles: string[] expected"; + } + return null; + }; + + /** + * Creates an AuditUserLink message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.AuditUserLink + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.AuditUserLink} AuditUserLink + */ + AuditUserLink.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.AuditUserLink) + return object; + var message = new $root.google.analytics.admin.v1alpha.AuditUserLink(); + if (object.name != null) + message.name = String(object.name); + if (object.emailAddress != null) + message.emailAddress = String(object.emailAddress); + if (object.directRoles) { + if (!Array.isArray(object.directRoles)) + throw TypeError(".google.analytics.admin.v1alpha.AuditUserLink.directRoles: array expected"); + message.directRoles = []; + for (var i = 0; i < object.directRoles.length; ++i) + message.directRoles[i] = String(object.directRoles[i]); + } + if (object.effectiveRoles) { + if (!Array.isArray(object.effectiveRoles)) + throw TypeError(".google.analytics.admin.v1alpha.AuditUserLink.effectiveRoles: array expected"); + message.effectiveRoles = []; + for (var i = 0; i < object.effectiveRoles.length; ++i) + message.effectiveRoles[i] = String(object.effectiveRoles[i]); + } + return message; + }; + + /** + * Creates a plain object from an AuditUserLink message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.AuditUserLink + * @static + * @param {google.analytics.admin.v1alpha.AuditUserLink} message AuditUserLink + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AuditUserLink.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.directRoles = []; + object.effectiveRoles = []; + } + if (options.defaults) { + object.name = ""; + object.emailAddress = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.emailAddress != null && message.hasOwnProperty("emailAddress")) + object.emailAddress = message.emailAddress; + if (message.directRoles && message.directRoles.length) { + object.directRoles = []; + for (var j = 0; j < message.directRoles.length; ++j) + object.directRoles[j] = message.directRoles[j]; + } + if (message.effectiveRoles && message.effectiveRoles.length) { + object.effectiveRoles = []; + for (var j = 0; j < message.effectiveRoles.length; ++j) + object.effectiveRoles[j] = message.effectiveRoles[j]; + } + return object; + }; + + /** + * Converts this AuditUserLink to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.AuditUserLink + * @instance + * @returns {Object.} JSON object + */ + AuditUserLink.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AuditUserLink + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.AuditUserLink + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AuditUserLink.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.AuditUserLink"; + }; + + return AuditUserLink; + })(); + + v1alpha.FirebaseLink = (function() { + + /** + * Properties of a FirebaseLink. + * @memberof google.analytics.admin.v1alpha + * @interface IFirebaseLink + * @property {string|null} [name] FirebaseLink name + * @property {string|null} [project] FirebaseLink project + * @property {google.protobuf.ITimestamp|null} [createTime] FirebaseLink createTime + */ + + /** + * Constructs a new FirebaseLink. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents a FirebaseLink. + * @implements IFirebaseLink + * @constructor + * @param {google.analytics.admin.v1alpha.IFirebaseLink=} [properties] Properties to set + */ + function FirebaseLink(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FirebaseLink name. + * @member {string} name + * @memberof google.analytics.admin.v1alpha.FirebaseLink + * @instance + */ + FirebaseLink.prototype.name = ""; + + /** + * FirebaseLink project. + * @member {string} project + * @memberof google.analytics.admin.v1alpha.FirebaseLink + * @instance + */ + FirebaseLink.prototype.project = ""; + + /** + * FirebaseLink createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.analytics.admin.v1alpha.FirebaseLink + * @instance + */ + FirebaseLink.prototype.createTime = null; + + /** + * Creates a new FirebaseLink instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.FirebaseLink + * @static + * @param {google.analytics.admin.v1alpha.IFirebaseLink=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.FirebaseLink} FirebaseLink instance + */ + FirebaseLink.create = function create(properties) { + return new FirebaseLink(properties); + }; + + /** + * Encodes the specified FirebaseLink message. Does not implicitly {@link google.analytics.admin.v1alpha.FirebaseLink.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.FirebaseLink + * @static + * @param {google.analytics.admin.v1alpha.IFirebaseLink} message FirebaseLink message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FirebaseLink.encode = function encode(message, writer) { + 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.project != null && Object.hasOwnProperty.call(message, "project")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.project); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FirebaseLink message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.FirebaseLink.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.FirebaseLink + * @static + * @param {google.analytics.admin.v1alpha.IFirebaseLink} message FirebaseLink message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FirebaseLink.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FirebaseLink message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.FirebaseLink + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.FirebaseLink} FirebaseLink + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FirebaseLink.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.FirebaseLink(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.project = reader.string(); + break; + } + case 3: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FirebaseLink message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.FirebaseLink + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.FirebaseLink} FirebaseLink + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FirebaseLink.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FirebaseLink message. + * @function verify + * @memberof google.analytics.admin.v1alpha.FirebaseLink + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FirebaseLink.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.project != null && message.hasOwnProperty("project")) + if (!$util.isString(message.project)) + return "project: string expected"; + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + return null; + }; + + /** + * Creates a FirebaseLink message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.FirebaseLink + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.FirebaseLink} FirebaseLink + */ + FirebaseLink.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.FirebaseLink) + return object; + var message = new $root.google.analytics.admin.v1alpha.FirebaseLink(); + if (object.name != null) + message.name = String(object.name); + if (object.project != null) + message.project = String(object.project); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.analytics.admin.v1alpha.FirebaseLink.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + return message; + }; + + /** + * Creates a plain object from a FirebaseLink message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.FirebaseLink + * @static + * @param {google.analytics.admin.v1alpha.FirebaseLink} message FirebaseLink + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FirebaseLink.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.project = ""; + object.createTime = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.project != null && message.hasOwnProperty("project")) + object.project = message.project; + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + return object; + }; + + /** + * Converts this FirebaseLink to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.FirebaseLink + * @instance + * @returns {Object.} JSON object + */ + FirebaseLink.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FirebaseLink + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.FirebaseLink + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FirebaseLink.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.FirebaseLink"; + }; + + return FirebaseLink; + })(); + + v1alpha.GlobalSiteTag = (function() { + + /** + * Properties of a GlobalSiteTag. + * @memberof google.analytics.admin.v1alpha + * @interface IGlobalSiteTag + * @property {string|null} [name] GlobalSiteTag name + * @property {string|null} [snippet] GlobalSiteTag snippet + */ + + /** + * Constructs a new GlobalSiteTag. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents a GlobalSiteTag. + * @implements IGlobalSiteTag + * @constructor + * @param {google.analytics.admin.v1alpha.IGlobalSiteTag=} [properties] Properties to set + */ + function GlobalSiteTag(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GlobalSiteTag name. + * @member {string} name + * @memberof google.analytics.admin.v1alpha.GlobalSiteTag + * @instance + */ + GlobalSiteTag.prototype.name = ""; + + /** + * GlobalSiteTag snippet. + * @member {string} snippet + * @memberof google.analytics.admin.v1alpha.GlobalSiteTag + * @instance + */ + GlobalSiteTag.prototype.snippet = ""; + + /** + * Creates a new GlobalSiteTag instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.GlobalSiteTag + * @static + * @param {google.analytics.admin.v1alpha.IGlobalSiteTag=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.GlobalSiteTag} GlobalSiteTag instance + */ + GlobalSiteTag.create = function create(properties) { + return new GlobalSiteTag(properties); + }; + + /** + * Encodes the specified GlobalSiteTag message. Does not implicitly {@link google.analytics.admin.v1alpha.GlobalSiteTag.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.GlobalSiteTag + * @static + * @param {google.analytics.admin.v1alpha.IGlobalSiteTag} message GlobalSiteTag message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GlobalSiteTag.encode = function encode(message, writer) { + 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.snippet != null && Object.hasOwnProperty.call(message, "snippet")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.snippet); + return writer; + }; + + /** + * Encodes the specified GlobalSiteTag message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.GlobalSiteTag.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.GlobalSiteTag + * @static + * @param {google.analytics.admin.v1alpha.IGlobalSiteTag} message GlobalSiteTag message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GlobalSiteTag.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GlobalSiteTag message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.GlobalSiteTag + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.GlobalSiteTag} GlobalSiteTag + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GlobalSiteTag.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.GlobalSiteTag(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.snippet = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GlobalSiteTag message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.GlobalSiteTag + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.GlobalSiteTag} GlobalSiteTag + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GlobalSiteTag.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GlobalSiteTag message. + * @function verify + * @memberof google.analytics.admin.v1alpha.GlobalSiteTag + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GlobalSiteTag.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.snippet != null && message.hasOwnProperty("snippet")) + if (!$util.isString(message.snippet)) + return "snippet: string expected"; + return null; + }; + + /** + * Creates a GlobalSiteTag message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.GlobalSiteTag + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.GlobalSiteTag} GlobalSiteTag + */ + GlobalSiteTag.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.GlobalSiteTag) + return object; + var message = new $root.google.analytics.admin.v1alpha.GlobalSiteTag(); + if (object.name != null) + message.name = String(object.name); + if (object.snippet != null) + message.snippet = String(object.snippet); + return message; + }; + + /** + * Creates a plain object from a GlobalSiteTag message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.GlobalSiteTag + * @static + * @param {google.analytics.admin.v1alpha.GlobalSiteTag} message GlobalSiteTag + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GlobalSiteTag.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.snippet = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.snippet != null && message.hasOwnProperty("snippet")) + object.snippet = message.snippet; + return object; + }; + + /** + * Converts this GlobalSiteTag to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.GlobalSiteTag + * @instance + * @returns {Object.} JSON object + */ + GlobalSiteTag.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GlobalSiteTag + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.GlobalSiteTag + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GlobalSiteTag.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.GlobalSiteTag"; + }; + + return GlobalSiteTag; + })(); + + v1alpha.GoogleAdsLink = (function() { + + /** + * Properties of a GoogleAdsLink. + * @memberof google.analytics.admin.v1alpha + * @interface IGoogleAdsLink + * @property {string|null} [name] GoogleAdsLink name + * @property {string|null} [customerId] GoogleAdsLink customerId + * @property {boolean|null} [canManageClients] GoogleAdsLink canManageClients + * @property {google.protobuf.IBoolValue|null} [adsPersonalizationEnabled] GoogleAdsLink adsPersonalizationEnabled + * @property {google.protobuf.ITimestamp|null} [createTime] GoogleAdsLink createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] GoogleAdsLink updateTime + * @property {string|null} [creatorEmailAddress] GoogleAdsLink creatorEmailAddress + */ + + /** + * Constructs a new GoogleAdsLink. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents a GoogleAdsLink. + * @implements IGoogleAdsLink + * @constructor + * @param {google.analytics.admin.v1alpha.IGoogleAdsLink=} [properties] Properties to set + */ + function GoogleAdsLink(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GoogleAdsLink name. + * @member {string} name + * @memberof google.analytics.admin.v1alpha.GoogleAdsLink + * @instance + */ + GoogleAdsLink.prototype.name = ""; + + /** + * GoogleAdsLink customerId. + * @member {string} customerId + * @memberof google.analytics.admin.v1alpha.GoogleAdsLink + * @instance + */ + GoogleAdsLink.prototype.customerId = ""; + + /** + * GoogleAdsLink canManageClients. + * @member {boolean} canManageClients + * @memberof google.analytics.admin.v1alpha.GoogleAdsLink + * @instance + */ + GoogleAdsLink.prototype.canManageClients = false; + + /** + * GoogleAdsLink adsPersonalizationEnabled. + * @member {google.protobuf.IBoolValue|null|undefined} adsPersonalizationEnabled + * @memberof google.analytics.admin.v1alpha.GoogleAdsLink + * @instance + */ + GoogleAdsLink.prototype.adsPersonalizationEnabled = null; + + /** + * GoogleAdsLink createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.analytics.admin.v1alpha.GoogleAdsLink + * @instance + */ + GoogleAdsLink.prototype.createTime = null; + + /** + * GoogleAdsLink updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.analytics.admin.v1alpha.GoogleAdsLink + * @instance + */ + GoogleAdsLink.prototype.updateTime = null; + + /** + * GoogleAdsLink creatorEmailAddress. + * @member {string} creatorEmailAddress + * @memberof google.analytics.admin.v1alpha.GoogleAdsLink + * @instance + */ + GoogleAdsLink.prototype.creatorEmailAddress = ""; + + /** + * Creates a new GoogleAdsLink instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.GoogleAdsLink + * @static + * @param {google.analytics.admin.v1alpha.IGoogleAdsLink=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.GoogleAdsLink} GoogleAdsLink instance + */ + GoogleAdsLink.create = function create(properties) { + return new GoogleAdsLink(properties); + }; + + /** + * Encodes the specified GoogleAdsLink message. Does not implicitly {@link google.analytics.admin.v1alpha.GoogleAdsLink.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.GoogleAdsLink + * @static + * @param {google.analytics.admin.v1alpha.IGoogleAdsLink} message GoogleAdsLink message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GoogleAdsLink.encode = function encode(message, writer) { + 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.customerId != null && Object.hasOwnProperty.call(message, "customerId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.customerId); + if (message.canManageClients != null && Object.hasOwnProperty.call(message, "canManageClients")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.canManageClients); + if (message.adsPersonalizationEnabled != null && Object.hasOwnProperty.call(message, "adsPersonalizationEnabled")) + $root.google.protobuf.BoolValue.encode(message.adsPersonalizationEnabled, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.creatorEmailAddress != null && Object.hasOwnProperty.call(message, "creatorEmailAddress")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.creatorEmailAddress); + return writer; + }; + + /** + * Encodes the specified GoogleAdsLink message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.GoogleAdsLink.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.GoogleAdsLink + * @static + * @param {google.analytics.admin.v1alpha.IGoogleAdsLink} message GoogleAdsLink message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GoogleAdsLink.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GoogleAdsLink message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.GoogleAdsLink + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.GoogleAdsLink} GoogleAdsLink + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GoogleAdsLink.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.GoogleAdsLink(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 3: { + message.customerId = reader.string(); + break; + } + case 4: { + message.canManageClients = reader.bool(); + break; + } + case 5: { + message.adsPersonalizationEnabled = $root.google.protobuf.BoolValue.decode(reader, reader.uint32()); + break; + } + case 7: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 8: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 9: { + message.creatorEmailAddress = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GoogleAdsLink message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.GoogleAdsLink + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.GoogleAdsLink} GoogleAdsLink + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GoogleAdsLink.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GoogleAdsLink message. + * @function verify + * @memberof google.analytics.admin.v1alpha.GoogleAdsLink + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GoogleAdsLink.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.customerId != null && message.hasOwnProperty("customerId")) + if (!$util.isString(message.customerId)) + return "customerId: string expected"; + if (message.canManageClients != null && message.hasOwnProperty("canManageClients")) + if (typeof message.canManageClients !== "boolean") + return "canManageClients: boolean expected"; + if (message.adsPersonalizationEnabled != null && message.hasOwnProperty("adsPersonalizationEnabled")) { + var error = $root.google.protobuf.BoolValue.verify(message.adsPersonalizationEnabled); + if (error) + return "adsPersonalizationEnabled." + error; + } + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + if (message.creatorEmailAddress != null && message.hasOwnProperty("creatorEmailAddress")) + if (!$util.isString(message.creatorEmailAddress)) + return "creatorEmailAddress: string expected"; + return null; + }; + + /** + * Creates a GoogleAdsLink message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.GoogleAdsLink + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.GoogleAdsLink} GoogleAdsLink + */ + GoogleAdsLink.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.GoogleAdsLink) + return object; + var message = new $root.google.analytics.admin.v1alpha.GoogleAdsLink(); + if (object.name != null) + message.name = String(object.name); + if (object.customerId != null) + message.customerId = String(object.customerId); + if (object.canManageClients != null) + message.canManageClients = Boolean(object.canManageClients); + if (object.adsPersonalizationEnabled != null) { + if (typeof object.adsPersonalizationEnabled !== "object") + throw TypeError(".google.analytics.admin.v1alpha.GoogleAdsLink.adsPersonalizationEnabled: object expected"); + message.adsPersonalizationEnabled = $root.google.protobuf.BoolValue.fromObject(object.adsPersonalizationEnabled); + } + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.analytics.admin.v1alpha.GoogleAdsLink.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.analytics.admin.v1alpha.GoogleAdsLink.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.creatorEmailAddress != null) + message.creatorEmailAddress = String(object.creatorEmailAddress); + return message; + }; + + /** + * Creates a plain object from a GoogleAdsLink message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.GoogleAdsLink + * @static + * @param {google.analytics.admin.v1alpha.GoogleAdsLink} message GoogleAdsLink + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GoogleAdsLink.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.customerId = ""; + object.canManageClients = false; + object.adsPersonalizationEnabled = null; + object.createTime = null; + object.updateTime = null; + object.creatorEmailAddress = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.customerId != null && message.hasOwnProperty("customerId")) + object.customerId = message.customerId; + if (message.canManageClients != null && message.hasOwnProperty("canManageClients")) + object.canManageClients = message.canManageClients; + if (message.adsPersonalizationEnabled != null && message.hasOwnProperty("adsPersonalizationEnabled")) + object.adsPersonalizationEnabled = $root.google.protobuf.BoolValue.toObject(message.adsPersonalizationEnabled, options); + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + if (message.creatorEmailAddress != null && message.hasOwnProperty("creatorEmailAddress")) + object.creatorEmailAddress = message.creatorEmailAddress; + return object; + }; + + /** + * Converts this GoogleAdsLink to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.GoogleAdsLink + * @instance + * @returns {Object.} JSON object + */ + GoogleAdsLink.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GoogleAdsLink + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.GoogleAdsLink + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GoogleAdsLink.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.GoogleAdsLink"; + }; + + return GoogleAdsLink; + })(); + + v1alpha.DataSharingSettings = (function() { + + /** + * Properties of a DataSharingSettings. + * @memberof google.analytics.admin.v1alpha + * @interface IDataSharingSettings + * @property {string|null} [name] DataSharingSettings name + * @property {boolean|null} [sharingWithGoogleSupportEnabled] DataSharingSettings sharingWithGoogleSupportEnabled + * @property {boolean|null} [sharingWithGoogleAssignedSalesEnabled] DataSharingSettings sharingWithGoogleAssignedSalesEnabled + * @property {boolean|null} [sharingWithGoogleAnySalesEnabled] DataSharingSettings sharingWithGoogleAnySalesEnabled + * @property {boolean|null} [sharingWithGoogleProductsEnabled] DataSharingSettings sharingWithGoogleProductsEnabled + * @property {boolean|null} [sharingWithOthersEnabled] DataSharingSettings sharingWithOthersEnabled + */ + + /** + * Constructs a new DataSharingSettings. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents a DataSharingSettings. + * @implements IDataSharingSettings + * @constructor + * @param {google.analytics.admin.v1alpha.IDataSharingSettings=} [properties] Properties to set + */ + function DataSharingSettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DataSharingSettings name. + * @member {string} name + * @memberof google.analytics.admin.v1alpha.DataSharingSettings + * @instance + */ + DataSharingSettings.prototype.name = ""; + + /** + * DataSharingSettings sharingWithGoogleSupportEnabled. + * @member {boolean} sharingWithGoogleSupportEnabled + * @memberof google.analytics.admin.v1alpha.DataSharingSettings + * @instance + */ + DataSharingSettings.prototype.sharingWithGoogleSupportEnabled = false; + + /** + * DataSharingSettings sharingWithGoogleAssignedSalesEnabled. + * @member {boolean} sharingWithGoogleAssignedSalesEnabled + * @memberof google.analytics.admin.v1alpha.DataSharingSettings + * @instance + */ + DataSharingSettings.prototype.sharingWithGoogleAssignedSalesEnabled = false; + + /** + * DataSharingSettings sharingWithGoogleAnySalesEnabled. + * @member {boolean} sharingWithGoogleAnySalesEnabled + * @memberof google.analytics.admin.v1alpha.DataSharingSettings + * @instance + */ + DataSharingSettings.prototype.sharingWithGoogleAnySalesEnabled = false; + + /** + * DataSharingSettings sharingWithGoogleProductsEnabled. + * @member {boolean} sharingWithGoogleProductsEnabled + * @memberof google.analytics.admin.v1alpha.DataSharingSettings + * @instance + */ + DataSharingSettings.prototype.sharingWithGoogleProductsEnabled = false; + + /** + * DataSharingSettings sharingWithOthersEnabled. + * @member {boolean} sharingWithOthersEnabled + * @memberof google.analytics.admin.v1alpha.DataSharingSettings + * @instance + */ + DataSharingSettings.prototype.sharingWithOthersEnabled = false; + + /** + * Creates a new DataSharingSettings instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.DataSharingSettings + * @static + * @param {google.analytics.admin.v1alpha.IDataSharingSettings=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.DataSharingSettings} DataSharingSettings instance + */ + DataSharingSettings.create = function create(properties) { + return new DataSharingSettings(properties); + }; + + /** + * Encodes the specified DataSharingSettings message. Does not implicitly {@link google.analytics.admin.v1alpha.DataSharingSettings.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.DataSharingSettings + * @static + * @param {google.analytics.admin.v1alpha.IDataSharingSettings} message DataSharingSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataSharingSettings.encode = function encode(message, writer) { + 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.sharingWithGoogleSupportEnabled != null && Object.hasOwnProperty.call(message, "sharingWithGoogleSupportEnabled")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.sharingWithGoogleSupportEnabled); + if (message.sharingWithGoogleAssignedSalesEnabled != null && Object.hasOwnProperty.call(message, "sharingWithGoogleAssignedSalesEnabled")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.sharingWithGoogleAssignedSalesEnabled); + if (message.sharingWithGoogleAnySalesEnabled != null && Object.hasOwnProperty.call(message, "sharingWithGoogleAnySalesEnabled")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.sharingWithGoogleAnySalesEnabled); + if (message.sharingWithGoogleProductsEnabled != null && Object.hasOwnProperty.call(message, "sharingWithGoogleProductsEnabled")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.sharingWithGoogleProductsEnabled); + if (message.sharingWithOthersEnabled != null && Object.hasOwnProperty.call(message, "sharingWithOthersEnabled")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.sharingWithOthersEnabled); + return writer; + }; + + /** + * Encodes the specified DataSharingSettings message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.DataSharingSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.DataSharingSettings + * @static + * @param {google.analytics.admin.v1alpha.IDataSharingSettings} message DataSharingSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataSharingSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DataSharingSettings message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.DataSharingSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.DataSharingSettings} DataSharingSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataSharingSettings.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.DataSharingSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.sharingWithGoogleSupportEnabled = reader.bool(); + break; + } + case 3: { + message.sharingWithGoogleAssignedSalesEnabled = reader.bool(); + break; + } + case 4: { + message.sharingWithGoogleAnySalesEnabled = reader.bool(); + break; + } + case 5: { + message.sharingWithGoogleProductsEnabled = reader.bool(); + break; + } + case 6: { + message.sharingWithOthersEnabled = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DataSharingSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.DataSharingSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.DataSharingSettings} DataSharingSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataSharingSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DataSharingSettings message. + * @function verify + * @memberof google.analytics.admin.v1alpha.DataSharingSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DataSharingSettings.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.sharingWithGoogleSupportEnabled != null && message.hasOwnProperty("sharingWithGoogleSupportEnabled")) + if (typeof message.sharingWithGoogleSupportEnabled !== "boolean") + return "sharingWithGoogleSupportEnabled: boolean expected"; + if (message.sharingWithGoogleAssignedSalesEnabled != null && message.hasOwnProperty("sharingWithGoogleAssignedSalesEnabled")) + if (typeof message.sharingWithGoogleAssignedSalesEnabled !== "boolean") + return "sharingWithGoogleAssignedSalesEnabled: boolean expected"; + if (message.sharingWithGoogleAnySalesEnabled != null && message.hasOwnProperty("sharingWithGoogleAnySalesEnabled")) + if (typeof message.sharingWithGoogleAnySalesEnabled !== "boolean") + return "sharingWithGoogleAnySalesEnabled: boolean expected"; + if (message.sharingWithGoogleProductsEnabled != null && message.hasOwnProperty("sharingWithGoogleProductsEnabled")) + if (typeof message.sharingWithGoogleProductsEnabled !== "boolean") + return "sharingWithGoogleProductsEnabled: boolean expected"; + if (message.sharingWithOthersEnabled != null && message.hasOwnProperty("sharingWithOthersEnabled")) + if (typeof message.sharingWithOthersEnabled !== "boolean") + return "sharingWithOthersEnabled: boolean expected"; + return null; + }; + + /** + * Creates a DataSharingSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.DataSharingSettings + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.DataSharingSettings} DataSharingSettings + */ + DataSharingSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.DataSharingSettings) + return object; + var message = new $root.google.analytics.admin.v1alpha.DataSharingSettings(); + if (object.name != null) + message.name = String(object.name); + if (object.sharingWithGoogleSupportEnabled != null) + message.sharingWithGoogleSupportEnabled = Boolean(object.sharingWithGoogleSupportEnabled); + if (object.sharingWithGoogleAssignedSalesEnabled != null) + message.sharingWithGoogleAssignedSalesEnabled = Boolean(object.sharingWithGoogleAssignedSalesEnabled); + if (object.sharingWithGoogleAnySalesEnabled != null) + message.sharingWithGoogleAnySalesEnabled = Boolean(object.sharingWithGoogleAnySalesEnabled); + if (object.sharingWithGoogleProductsEnabled != null) + message.sharingWithGoogleProductsEnabled = Boolean(object.sharingWithGoogleProductsEnabled); + if (object.sharingWithOthersEnabled != null) + message.sharingWithOthersEnabled = Boolean(object.sharingWithOthersEnabled); + return message; + }; + + /** + * Creates a plain object from a DataSharingSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.DataSharingSettings + * @static + * @param {google.analytics.admin.v1alpha.DataSharingSettings} message DataSharingSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DataSharingSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.sharingWithGoogleSupportEnabled = false; + object.sharingWithGoogleAssignedSalesEnabled = false; + object.sharingWithGoogleAnySalesEnabled = false; + object.sharingWithGoogleProductsEnabled = false; + object.sharingWithOthersEnabled = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.sharingWithGoogleSupportEnabled != null && message.hasOwnProperty("sharingWithGoogleSupportEnabled")) + object.sharingWithGoogleSupportEnabled = message.sharingWithGoogleSupportEnabled; + if (message.sharingWithGoogleAssignedSalesEnabled != null && message.hasOwnProperty("sharingWithGoogleAssignedSalesEnabled")) + object.sharingWithGoogleAssignedSalesEnabled = message.sharingWithGoogleAssignedSalesEnabled; + if (message.sharingWithGoogleAnySalesEnabled != null && message.hasOwnProperty("sharingWithGoogleAnySalesEnabled")) + object.sharingWithGoogleAnySalesEnabled = message.sharingWithGoogleAnySalesEnabled; + if (message.sharingWithGoogleProductsEnabled != null && message.hasOwnProperty("sharingWithGoogleProductsEnabled")) + object.sharingWithGoogleProductsEnabled = message.sharingWithGoogleProductsEnabled; + if (message.sharingWithOthersEnabled != null && message.hasOwnProperty("sharingWithOthersEnabled")) + object.sharingWithOthersEnabled = message.sharingWithOthersEnabled; + return object; + }; + + /** + * Converts this DataSharingSettings to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.DataSharingSettings + * @instance + * @returns {Object.} JSON object + */ + DataSharingSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DataSharingSettings + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.DataSharingSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DataSharingSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.DataSharingSettings"; + }; + + return DataSharingSettings; + })(); + + v1alpha.AccountSummary = (function() { + + /** + * Properties of an AccountSummary. + * @memberof google.analytics.admin.v1alpha + * @interface IAccountSummary + * @property {string|null} [name] AccountSummary name + * @property {string|null} [account] AccountSummary account + * @property {string|null} [displayName] AccountSummary displayName + * @property {Array.|null} [propertySummaries] AccountSummary propertySummaries + */ + + /** + * Constructs a new AccountSummary. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents an AccountSummary. + * @implements IAccountSummary + * @constructor + * @param {google.analytics.admin.v1alpha.IAccountSummary=} [properties] Properties to set + */ + function AccountSummary(properties) { + this.propertySummaries = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AccountSummary name. + * @member {string} name + * @memberof google.analytics.admin.v1alpha.AccountSummary + * @instance + */ + AccountSummary.prototype.name = ""; + + /** + * AccountSummary account. + * @member {string} account + * @memberof google.analytics.admin.v1alpha.AccountSummary + * @instance + */ + AccountSummary.prototype.account = ""; + + /** + * AccountSummary displayName. + * @member {string} displayName + * @memberof google.analytics.admin.v1alpha.AccountSummary + * @instance + */ + AccountSummary.prototype.displayName = ""; + + /** + * AccountSummary propertySummaries. + * @member {Array.} propertySummaries + * @memberof google.analytics.admin.v1alpha.AccountSummary + * @instance + */ + AccountSummary.prototype.propertySummaries = $util.emptyArray; + + /** + * Creates a new AccountSummary instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.AccountSummary + * @static + * @param {google.analytics.admin.v1alpha.IAccountSummary=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.AccountSummary} AccountSummary instance + */ + AccountSummary.create = function create(properties) { + return new AccountSummary(properties); + }; + + /** + * Encodes the specified AccountSummary message. Does not implicitly {@link google.analytics.admin.v1alpha.AccountSummary.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.AccountSummary + * @static + * @param {google.analytics.admin.v1alpha.IAccountSummary} message AccountSummary message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AccountSummary.encode = function encode(message, writer) { + 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.account != null && Object.hasOwnProperty.call(message, "account")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.account); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.displayName); + if (message.propertySummaries != null && message.propertySummaries.length) + for (var i = 0; i < message.propertySummaries.length; ++i) + $root.google.analytics.admin.v1alpha.PropertySummary.encode(message.propertySummaries[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified AccountSummary message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AccountSummary.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.AccountSummary + * @static + * @param {google.analytics.admin.v1alpha.IAccountSummary} message AccountSummary message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AccountSummary.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AccountSummary message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.AccountSummary + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.AccountSummary} AccountSummary + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AccountSummary.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.AccountSummary(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.account = reader.string(); + break; + } + case 3: { + message.displayName = reader.string(); + break; + } + case 4: { + if (!(message.propertySummaries && message.propertySummaries.length)) + message.propertySummaries = []; + message.propertySummaries.push($root.google.analytics.admin.v1alpha.PropertySummary.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AccountSummary message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.AccountSummary + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.AccountSummary} AccountSummary + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AccountSummary.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AccountSummary message. + * @function verify + * @memberof google.analytics.admin.v1alpha.AccountSummary + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AccountSummary.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.account != null && message.hasOwnProperty("account")) + if (!$util.isString(message.account)) + return "account: string expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.propertySummaries != null && message.hasOwnProperty("propertySummaries")) { + if (!Array.isArray(message.propertySummaries)) + return "propertySummaries: array expected"; + for (var i = 0; i < message.propertySummaries.length; ++i) { + var error = $root.google.analytics.admin.v1alpha.PropertySummary.verify(message.propertySummaries[i]); + if (error) + return "propertySummaries." + error; + } + } + return null; + }; + + /** + * Creates an AccountSummary message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.AccountSummary + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.AccountSummary} AccountSummary + */ + AccountSummary.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.AccountSummary) + return object; + var message = new $root.google.analytics.admin.v1alpha.AccountSummary(); + if (object.name != null) + message.name = String(object.name); + if (object.account != null) + message.account = String(object.account); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.propertySummaries) { + if (!Array.isArray(object.propertySummaries)) + throw TypeError(".google.analytics.admin.v1alpha.AccountSummary.propertySummaries: array expected"); + message.propertySummaries = []; + for (var i = 0; i < object.propertySummaries.length; ++i) { + if (typeof object.propertySummaries[i] !== "object") + throw TypeError(".google.analytics.admin.v1alpha.AccountSummary.propertySummaries: object expected"); + message.propertySummaries[i] = $root.google.analytics.admin.v1alpha.PropertySummary.fromObject(object.propertySummaries[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an AccountSummary message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.AccountSummary + * @static + * @param {google.analytics.admin.v1alpha.AccountSummary} message AccountSummary + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AccountSummary.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.propertySummaries = []; + if (options.defaults) { + object.name = ""; + object.account = ""; + object.displayName = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.account != null && message.hasOwnProperty("account")) + object.account = message.account; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.propertySummaries && message.propertySummaries.length) { + object.propertySummaries = []; + for (var j = 0; j < message.propertySummaries.length; ++j) + object.propertySummaries[j] = $root.google.analytics.admin.v1alpha.PropertySummary.toObject(message.propertySummaries[j], options); + } + return object; + }; + + /** + * Converts this AccountSummary to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.AccountSummary + * @instance + * @returns {Object.} JSON object + */ + AccountSummary.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AccountSummary + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.AccountSummary + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AccountSummary.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.AccountSummary"; + }; + + return AccountSummary; + })(); + + v1alpha.PropertySummary = (function() { + + /** + * Properties of a PropertySummary. + * @memberof google.analytics.admin.v1alpha + * @interface IPropertySummary + * @property {string|null} [property] PropertySummary property + * @property {string|null} [displayName] PropertySummary displayName + * @property {google.analytics.admin.v1alpha.PropertyType|null} [propertyType] PropertySummary propertyType + * @property {string|null} [parent] PropertySummary parent + */ + + /** + * Constructs a new PropertySummary. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents a PropertySummary. + * @implements IPropertySummary + * @constructor + * @param {google.analytics.admin.v1alpha.IPropertySummary=} [properties] Properties to set + */ + function PropertySummary(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PropertySummary property. + * @member {string} property + * @memberof google.analytics.admin.v1alpha.PropertySummary + * @instance + */ + PropertySummary.prototype.property = ""; + + /** + * PropertySummary displayName. + * @member {string} displayName + * @memberof google.analytics.admin.v1alpha.PropertySummary + * @instance + */ + PropertySummary.prototype.displayName = ""; + + /** + * PropertySummary propertyType. + * @member {google.analytics.admin.v1alpha.PropertyType} propertyType + * @memberof google.analytics.admin.v1alpha.PropertySummary + * @instance + */ + PropertySummary.prototype.propertyType = 0; + + /** + * PropertySummary parent. + * @member {string} parent + * @memberof google.analytics.admin.v1alpha.PropertySummary + * @instance + */ + PropertySummary.prototype.parent = ""; + + /** + * Creates a new PropertySummary instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.PropertySummary + * @static + * @param {google.analytics.admin.v1alpha.IPropertySummary=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.PropertySummary} PropertySummary instance + */ + PropertySummary.create = function create(properties) { + return new PropertySummary(properties); + }; + + /** + * Encodes the specified PropertySummary message. Does not implicitly {@link google.analytics.admin.v1alpha.PropertySummary.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.PropertySummary + * @static + * @param {google.analytics.admin.v1alpha.IPropertySummary} message PropertySummary message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PropertySummary.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.property != null && Object.hasOwnProperty.call(message, "property")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.property); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); + if (message.propertyType != null && Object.hasOwnProperty.call(message, "propertyType")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.propertyType); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.parent); + return writer; + }; + + /** + * Encodes the specified PropertySummary message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.PropertySummary.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.PropertySummary + * @static + * @param {google.analytics.admin.v1alpha.IPropertySummary} message PropertySummary message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PropertySummary.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PropertySummary message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.PropertySummary + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.PropertySummary} PropertySummary + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PropertySummary.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.PropertySummary(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.property = reader.string(); + break; + } + case 2: { + message.displayName = reader.string(); + break; + } + case 3: { + message.propertyType = reader.int32(); + break; + } + case 4: { + message.parent = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PropertySummary message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.PropertySummary + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.PropertySummary} PropertySummary + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PropertySummary.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PropertySummary message. + * @function verify + * @memberof google.analytics.admin.v1alpha.PropertySummary + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PropertySummary.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.property != null && message.hasOwnProperty("property")) + if (!$util.isString(message.property)) + return "property: string expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.propertyType != null && message.hasOwnProperty("propertyType")) + switch (message.propertyType) { + default: + return "propertyType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + return null; + }; + + /** + * Creates a PropertySummary message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.PropertySummary + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.PropertySummary} PropertySummary + */ + PropertySummary.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.PropertySummary) + return object; + var message = new $root.google.analytics.admin.v1alpha.PropertySummary(); + if (object.property != null) + message.property = String(object.property); + if (object.displayName != null) + message.displayName = String(object.displayName); + switch (object.propertyType) { + default: + if (typeof object.propertyType === "number") { + message.propertyType = object.propertyType; + break; + } + break; + case "PROPERTY_TYPE_UNSPECIFIED": + case 0: + message.propertyType = 0; + break; + case "PROPERTY_TYPE_ORDINARY": + case 1: + message.propertyType = 1; + break; + case "PROPERTY_TYPE_SUBPROPERTY": + case 2: + message.propertyType = 2; + break; + case "PROPERTY_TYPE_ROLLUP": + case 3: + message.propertyType = 3; + break; + } + if (object.parent != null) + message.parent = String(object.parent); + return message; + }; + + /** + * Creates a plain object from a PropertySummary message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.PropertySummary + * @static + * @param {google.analytics.admin.v1alpha.PropertySummary} message PropertySummary + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PropertySummary.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.property = ""; + object.displayName = ""; + object.propertyType = options.enums === String ? "PROPERTY_TYPE_UNSPECIFIED" : 0; + object.parent = ""; + } + if (message.property != null && message.hasOwnProperty("property")) + object.property = message.property; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.propertyType != null && message.hasOwnProperty("propertyType")) + object.propertyType = options.enums === String ? $root.google.analytics.admin.v1alpha.PropertyType[message.propertyType] === undefined ? message.propertyType : $root.google.analytics.admin.v1alpha.PropertyType[message.propertyType] : message.propertyType; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + return object; + }; + + /** + * Converts this PropertySummary to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.PropertySummary + * @instance + * @returns {Object.} JSON object + */ + PropertySummary.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PropertySummary + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.PropertySummary + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PropertySummary.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.PropertySummary"; + }; + + return PropertySummary; + })(); + + v1alpha.MeasurementProtocolSecret = (function() { + + /** + * Properties of a MeasurementProtocolSecret. + * @memberof google.analytics.admin.v1alpha + * @interface IMeasurementProtocolSecret + * @property {string|null} [name] MeasurementProtocolSecret name + * @property {string|null} [displayName] MeasurementProtocolSecret displayName + * @property {string|null} [secretValue] MeasurementProtocolSecret secretValue + */ + + /** + * Constructs a new MeasurementProtocolSecret. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents a MeasurementProtocolSecret. + * @implements IMeasurementProtocolSecret + * @constructor + * @param {google.analytics.admin.v1alpha.IMeasurementProtocolSecret=} [properties] Properties to set + */ + function MeasurementProtocolSecret(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MeasurementProtocolSecret name. + * @member {string} name + * @memberof google.analytics.admin.v1alpha.MeasurementProtocolSecret + * @instance + */ + MeasurementProtocolSecret.prototype.name = ""; + + /** + * MeasurementProtocolSecret displayName. + * @member {string} displayName + * @memberof google.analytics.admin.v1alpha.MeasurementProtocolSecret + * @instance + */ + MeasurementProtocolSecret.prototype.displayName = ""; + + /** + * MeasurementProtocolSecret secretValue. + * @member {string} secretValue + * @memberof google.analytics.admin.v1alpha.MeasurementProtocolSecret + * @instance + */ + MeasurementProtocolSecret.prototype.secretValue = ""; + + /** + * Creates a new MeasurementProtocolSecret instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.MeasurementProtocolSecret + * @static + * @param {google.analytics.admin.v1alpha.IMeasurementProtocolSecret=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.MeasurementProtocolSecret} MeasurementProtocolSecret instance + */ + MeasurementProtocolSecret.create = function create(properties) { + return new MeasurementProtocolSecret(properties); + }; + + /** + * Encodes the specified MeasurementProtocolSecret message. Does not implicitly {@link google.analytics.admin.v1alpha.MeasurementProtocolSecret.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.MeasurementProtocolSecret + * @static + * @param {google.analytics.admin.v1alpha.IMeasurementProtocolSecret} message MeasurementProtocolSecret message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MeasurementProtocolSecret.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); + if (message.secretValue != null && Object.hasOwnProperty.call(message, "secretValue")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.secretValue); + return writer; + }; + + /** + * Encodes the specified MeasurementProtocolSecret message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.MeasurementProtocolSecret.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.MeasurementProtocolSecret + * @static + * @param {google.analytics.admin.v1alpha.IMeasurementProtocolSecret} message MeasurementProtocolSecret message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MeasurementProtocolSecret.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MeasurementProtocolSecret message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.MeasurementProtocolSecret + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.MeasurementProtocolSecret} MeasurementProtocolSecret + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MeasurementProtocolSecret.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.MeasurementProtocolSecret(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.displayName = reader.string(); + break; + } + case 3: { + message.secretValue = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MeasurementProtocolSecret message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.MeasurementProtocolSecret + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.MeasurementProtocolSecret} MeasurementProtocolSecret + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MeasurementProtocolSecret.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MeasurementProtocolSecret message. + * @function verify + * @memberof google.analytics.admin.v1alpha.MeasurementProtocolSecret + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MeasurementProtocolSecret.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.secretValue != null && message.hasOwnProperty("secretValue")) + if (!$util.isString(message.secretValue)) + return "secretValue: string expected"; + return null; + }; + + /** + * Creates a MeasurementProtocolSecret message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.MeasurementProtocolSecret + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.MeasurementProtocolSecret} MeasurementProtocolSecret + */ + MeasurementProtocolSecret.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.MeasurementProtocolSecret) + return object; + var message = new $root.google.analytics.admin.v1alpha.MeasurementProtocolSecret(); + if (object.name != null) + message.name = String(object.name); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.secretValue != null) + message.secretValue = String(object.secretValue); + return message; + }; + + /** + * Creates a plain object from a MeasurementProtocolSecret message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.MeasurementProtocolSecret + * @static + * @param {google.analytics.admin.v1alpha.MeasurementProtocolSecret} message MeasurementProtocolSecret + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MeasurementProtocolSecret.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.displayName = ""; + object.secretValue = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.secretValue != null && message.hasOwnProperty("secretValue")) + object.secretValue = message.secretValue; + return object; + }; + + /** + * Converts this MeasurementProtocolSecret to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.MeasurementProtocolSecret + * @instance + * @returns {Object.} JSON object + */ + MeasurementProtocolSecret.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MeasurementProtocolSecret + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.MeasurementProtocolSecret + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MeasurementProtocolSecret.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.MeasurementProtocolSecret"; + }; + + return MeasurementProtocolSecret; + })(); + + v1alpha.ChangeHistoryEvent = (function() { + + /** + * Properties of a ChangeHistoryEvent. + * @memberof google.analytics.admin.v1alpha + * @interface IChangeHistoryEvent + * @property {string|null} [id] ChangeHistoryEvent id + * @property {google.protobuf.ITimestamp|null} [changeTime] ChangeHistoryEvent changeTime + * @property {google.analytics.admin.v1alpha.ActorType|null} [actorType] ChangeHistoryEvent actorType + * @property {string|null} [userActorEmail] ChangeHistoryEvent userActorEmail + * @property {boolean|null} [changesFiltered] ChangeHistoryEvent changesFiltered + * @property {Array.|null} [changes] ChangeHistoryEvent changes + */ + + /** + * Constructs a new ChangeHistoryEvent. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents a ChangeHistoryEvent. + * @implements IChangeHistoryEvent + * @constructor + * @param {google.analytics.admin.v1alpha.IChangeHistoryEvent=} [properties] Properties to set + */ + function ChangeHistoryEvent(properties) { + this.changes = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ChangeHistoryEvent id. + * @member {string} id + * @memberof google.analytics.admin.v1alpha.ChangeHistoryEvent + * @instance + */ + ChangeHistoryEvent.prototype.id = ""; + + /** + * ChangeHistoryEvent changeTime. + * @member {google.protobuf.ITimestamp|null|undefined} changeTime + * @memberof google.analytics.admin.v1alpha.ChangeHistoryEvent + * @instance + */ + ChangeHistoryEvent.prototype.changeTime = null; + + /** + * ChangeHistoryEvent actorType. + * @member {google.analytics.admin.v1alpha.ActorType} actorType + * @memberof google.analytics.admin.v1alpha.ChangeHistoryEvent + * @instance + */ + ChangeHistoryEvent.prototype.actorType = 0; + + /** + * ChangeHistoryEvent userActorEmail. + * @member {string} userActorEmail + * @memberof google.analytics.admin.v1alpha.ChangeHistoryEvent + * @instance + */ + ChangeHistoryEvent.prototype.userActorEmail = ""; + + /** + * ChangeHistoryEvent changesFiltered. + * @member {boolean} changesFiltered + * @memberof google.analytics.admin.v1alpha.ChangeHistoryEvent + * @instance + */ + ChangeHistoryEvent.prototype.changesFiltered = false; + + /** + * ChangeHistoryEvent changes. + * @member {Array.} changes + * @memberof google.analytics.admin.v1alpha.ChangeHistoryEvent + * @instance + */ + ChangeHistoryEvent.prototype.changes = $util.emptyArray; + + /** + * Creates a new ChangeHistoryEvent instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.ChangeHistoryEvent + * @static + * @param {google.analytics.admin.v1alpha.IChangeHistoryEvent=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.ChangeHistoryEvent} ChangeHistoryEvent instance + */ + ChangeHistoryEvent.create = function create(properties) { + return new ChangeHistoryEvent(properties); + }; + + /** + * Encodes the specified ChangeHistoryEvent message. Does not implicitly {@link google.analytics.admin.v1alpha.ChangeHistoryEvent.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.ChangeHistoryEvent + * @static + * @param {google.analytics.admin.v1alpha.IChangeHistoryEvent} message ChangeHistoryEvent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ChangeHistoryEvent.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.id != null && Object.hasOwnProperty.call(message, "id")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.id); + if (message.changeTime != null && Object.hasOwnProperty.call(message, "changeTime")) + $root.google.protobuf.Timestamp.encode(message.changeTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.actorType != null && Object.hasOwnProperty.call(message, "actorType")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.actorType); + if (message.userActorEmail != null && Object.hasOwnProperty.call(message, "userActorEmail")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.userActorEmail); + if (message.changesFiltered != null && Object.hasOwnProperty.call(message, "changesFiltered")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.changesFiltered); + if (message.changes != null && message.changes.length) + for (var i = 0; i < message.changes.length; ++i) + $root.google.analytics.admin.v1alpha.ChangeHistoryChange.encode(message.changes[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ChangeHistoryEvent message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.ChangeHistoryEvent.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.ChangeHistoryEvent + * @static + * @param {google.analytics.admin.v1alpha.IChangeHistoryEvent} message ChangeHistoryEvent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ChangeHistoryEvent.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ChangeHistoryEvent message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.ChangeHistoryEvent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.ChangeHistoryEvent} ChangeHistoryEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ChangeHistoryEvent.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.ChangeHistoryEvent(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.id = reader.string(); + break; + } + case 2: { + message.changeTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 3: { + message.actorType = reader.int32(); + break; + } + case 4: { + message.userActorEmail = reader.string(); + break; + } + case 5: { + message.changesFiltered = reader.bool(); + break; + } + case 6: { + if (!(message.changes && message.changes.length)) + message.changes = []; + message.changes.push($root.google.analytics.admin.v1alpha.ChangeHistoryChange.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ChangeHistoryEvent message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.ChangeHistoryEvent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.ChangeHistoryEvent} ChangeHistoryEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ChangeHistoryEvent.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ChangeHistoryEvent message. + * @function verify + * @memberof google.analytics.admin.v1alpha.ChangeHistoryEvent + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ChangeHistoryEvent.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.id != null && message.hasOwnProperty("id")) + if (!$util.isString(message.id)) + return "id: string expected"; + if (message.changeTime != null && message.hasOwnProperty("changeTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.changeTime); + if (error) + return "changeTime." + error; + } + if (message.actorType != null && message.hasOwnProperty("actorType")) + switch (message.actorType) { + default: + return "actorType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.userActorEmail != null && message.hasOwnProperty("userActorEmail")) + if (!$util.isString(message.userActorEmail)) + return "userActorEmail: string expected"; + if (message.changesFiltered != null && message.hasOwnProperty("changesFiltered")) + if (typeof message.changesFiltered !== "boolean") + return "changesFiltered: boolean expected"; + if (message.changes != null && message.hasOwnProperty("changes")) { + if (!Array.isArray(message.changes)) + return "changes: array expected"; + for (var i = 0; i < message.changes.length; ++i) { + var error = $root.google.analytics.admin.v1alpha.ChangeHistoryChange.verify(message.changes[i]); + if (error) + return "changes." + error; + } + } + return null; + }; + + /** + * Creates a ChangeHistoryEvent message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.ChangeHistoryEvent + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.ChangeHistoryEvent} ChangeHistoryEvent + */ + ChangeHistoryEvent.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.ChangeHistoryEvent) + return object; + var message = new $root.google.analytics.admin.v1alpha.ChangeHistoryEvent(); + if (object.id != null) + message.id = String(object.id); + if (object.changeTime != null) { + if (typeof object.changeTime !== "object") + throw TypeError(".google.analytics.admin.v1alpha.ChangeHistoryEvent.changeTime: object expected"); + message.changeTime = $root.google.protobuf.Timestamp.fromObject(object.changeTime); + } + switch (object.actorType) { + default: + if (typeof object.actorType === "number") { + message.actorType = object.actorType; + break; + } + break; + case "ACTOR_TYPE_UNSPECIFIED": + case 0: + message.actorType = 0; + break; + case "USER": + case 1: + message.actorType = 1; + break; + case "SYSTEM": + case 2: + message.actorType = 2; + break; + case "SUPPORT": + case 3: + message.actorType = 3; + break; + } + if (object.userActorEmail != null) + message.userActorEmail = String(object.userActorEmail); + if (object.changesFiltered != null) + message.changesFiltered = Boolean(object.changesFiltered); + if (object.changes) { + if (!Array.isArray(object.changes)) + throw TypeError(".google.analytics.admin.v1alpha.ChangeHistoryEvent.changes: array expected"); + message.changes = []; + for (var i = 0; i < object.changes.length; ++i) { + if (typeof object.changes[i] !== "object") + throw TypeError(".google.analytics.admin.v1alpha.ChangeHistoryEvent.changes: object expected"); + message.changes[i] = $root.google.analytics.admin.v1alpha.ChangeHistoryChange.fromObject(object.changes[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a ChangeHistoryEvent message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.ChangeHistoryEvent + * @static + * @param {google.analytics.admin.v1alpha.ChangeHistoryEvent} message ChangeHistoryEvent + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ChangeHistoryEvent.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.changes = []; + if (options.defaults) { + object.id = ""; + object.changeTime = null; + object.actorType = options.enums === String ? "ACTOR_TYPE_UNSPECIFIED" : 0; + object.userActorEmail = ""; + object.changesFiltered = false; + } + if (message.id != null && message.hasOwnProperty("id")) + object.id = message.id; + if (message.changeTime != null && message.hasOwnProperty("changeTime")) + object.changeTime = $root.google.protobuf.Timestamp.toObject(message.changeTime, options); + if (message.actorType != null && message.hasOwnProperty("actorType")) + object.actorType = options.enums === String ? $root.google.analytics.admin.v1alpha.ActorType[message.actorType] === undefined ? message.actorType : $root.google.analytics.admin.v1alpha.ActorType[message.actorType] : message.actorType; + if (message.userActorEmail != null && message.hasOwnProperty("userActorEmail")) + object.userActorEmail = message.userActorEmail; + if (message.changesFiltered != null && message.hasOwnProperty("changesFiltered")) + object.changesFiltered = message.changesFiltered; + if (message.changes && message.changes.length) { + object.changes = []; + for (var j = 0; j < message.changes.length; ++j) + object.changes[j] = $root.google.analytics.admin.v1alpha.ChangeHistoryChange.toObject(message.changes[j], options); + } + return object; + }; + + /** + * Converts this ChangeHistoryEvent to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.ChangeHistoryEvent + * @instance + * @returns {Object.} JSON object + */ + ChangeHistoryEvent.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ChangeHistoryEvent + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.ChangeHistoryEvent + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ChangeHistoryEvent.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.ChangeHistoryEvent"; + }; + + return ChangeHistoryEvent; + })(); + + v1alpha.ChangeHistoryChange = (function() { + + /** + * Properties of a ChangeHistoryChange. + * @memberof google.analytics.admin.v1alpha + * @interface IChangeHistoryChange + * @property {string|null} [resource] ChangeHistoryChange resource + * @property {google.analytics.admin.v1alpha.ActionType|null} [action] ChangeHistoryChange action + * @property {google.analytics.admin.v1alpha.ChangeHistoryChange.IChangeHistoryResource|null} [resourceBeforeChange] ChangeHistoryChange resourceBeforeChange + * @property {google.analytics.admin.v1alpha.ChangeHistoryChange.IChangeHistoryResource|null} [resourceAfterChange] ChangeHistoryChange resourceAfterChange + */ + + /** + * Constructs a new ChangeHistoryChange. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents a ChangeHistoryChange. + * @implements IChangeHistoryChange + * @constructor + * @param {google.analytics.admin.v1alpha.IChangeHistoryChange=} [properties] Properties to set + */ + function ChangeHistoryChange(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ChangeHistoryChange resource. + * @member {string} resource + * @memberof google.analytics.admin.v1alpha.ChangeHistoryChange + * @instance + */ + ChangeHistoryChange.prototype.resource = ""; + + /** + * ChangeHistoryChange action. + * @member {google.analytics.admin.v1alpha.ActionType} action + * @memberof google.analytics.admin.v1alpha.ChangeHistoryChange + * @instance + */ + ChangeHistoryChange.prototype.action = 0; + + /** + * ChangeHistoryChange resourceBeforeChange. + * @member {google.analytics.admin.v1alpha.ChangeHistoryChange.IChangeHistoryResource|null|undefined} resourceBeforeChange + * @memberof google.analytics.admin.v1alpha.ChangeHistoryChange + * @instance + */ + ChangeHistoryChange.prototype.resourceBeforeChange = null; + + /** + * ChangeHistoryChange resourceAfterChange. + * @member {google.analytics.admin.v1alpha.ChangeHistoryChange.IChangeHistoryResource|null|undefined} resourceAfterChange + * @memberof google.analytics.admin.v1alpha.ChangeHistoryChange + * @instance + */ + ChangeHistoryChange.prototype.resourceAfterChange = null; + + /** + * Creates a new ChangeHistoryChange instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.ChangeHistoryChange + * @static + * @param {google.analytics.admin.v1alpha.IChangeHistoryChange=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.ChangeHistoryChange} ChangeHistoryChange instance + */ + ChangeHistoryChange.create = function create(properties) { + return new ChangeHistoryChange(properties); + }; + + /** + * Encodes the specified ChangeHistoryChange message. Does not implicitly {@link google.analytics.admin.v1alpha.ChangeHistoryChange.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.ChangeHistoryChange + * @static + * @param {google.analytics.admin.v1alpha.IChangeHistoryChange} message ChangeHistoryChange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ChangeHistoryChange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.resource != null && Object.hasOwnProperty.call(message, "resource")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.resource); + if (message.action != null && Object.hasOwnProperty.call(message, "action")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.action); + if (message.resourceBeforeChange != null && Object.hasOwnProperty.call(message, "resourceBeforeChange")) + $root.google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource.encode(message.resourceBeforeChange, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.resourceAfterChange != null && Object.hasOwnProperty.call(message, "resourceAfterChange")) + $root.google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource.encode(message.resourceAfterChange, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ChangeHistoryChange message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.ChangeHistoryChange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.ChangeHistoryChange + * @static + * @param {google.analytics.admin.v1alpha.IChangeHistoryChange} message ChangeHistoryChange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ChangeHistoryChange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ChangeHistoryChange message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.ChangeHistoryChange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.ChangeHistoryChange} ChangeHistoryChange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ChangeHistoryChange.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.ChangeHistoryChange(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.resource = reader.string(); + break; + } + case 2: { + message.action = reader.int32(); + break; + } + case 3: { + message.resourceBeforeChange = $root.google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource.decode(reader, reader.uint32()); + break; + } + case 4: { + message.resourceAfterChange = $root.google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ChangeHistoryChange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.ChangeHistoryChange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.ChangeHistoryChange} ChangeHistoryChange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ChangeHistoryChange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ChangeHistoryChange message. + * @function verify + * @memberof google.analytics.admin.v1alpha.ChangeHistoryChange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ChangeHistoryChange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.resource != null && message.hasOwnProperty("resource")) + if (!$util.isString(message.resource)) + return "resource: string expected"; + if (message.action != null && message.hasOwnProperty("action")) + switch (message.action) { + default: + return "action: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.resourceBeforeChange != null && message.hasOwnProperty("resourceBeforeChange")) { + var error = $root.google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource.verify(message.resourceBeforeChange); + if (error) + return "resourceBeforeChange." + error; + } + if (message.resourceAfterChange != null && message.hasOwnProperty("resourceAfterChange")) { + var error = $root.google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource.verify(message.resourceAfterChange); + if (error) + return "resourceAfterChange." + error; + } + return null; + }; + + /** + * Creates a ChangeHistoryChange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.ChangeHistoryChange + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.ChangeHistoryChange} ChangeHistoryChange + */ + ChangeHistoryChange.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.ChangeHistoryChange) + return object; + var message = new $root.google.analytics.admin.v1alpha.ChangeHistoryChange(); + if (object.resource != null) + message.resource = String(object.resource); + switch (object.action) { + default: + if (typeof object.action === "number") { + message.action = object.action; + break; + } + break; + case "ACTION_TYPE_UNSPECIFIED": + case 0: + message.action = 0; + break; + case "CREATED": + case 1: + message.action = 1; + break; + case "UPDATED": + case 2: + message.action = 2; + break; + case "DELETED": + case 3: + message.action = 3; + break; + } + if (object.resourceBeforeChange != null) { + if (typeof object.resourceBeforeChange !== "object") + throw TypeError(".google.analytics.admin.v1alpha.ChangeHistoryChange.resourceBeforeChange: object expected"); + message.resourceBeforeChange = $root.google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource.fromObject(object.resourceBeforeChange); + } + if (object.resourceAfterChange != null) { + if (typeof object.resourceAfterChange !== "object") + throw TypeError(".google.analytics.admin.v1alpha.ChangeHistoryChange.resourceAfterChange: object expected"); + message.resourceAfterChange = $root.google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource.fromObject(object.resourceAfterChange); + } + return message; + }; + + /** + * Creates a plain object from a ChangeHistoryChange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.ChangeHistoryChange + * @static + * @param {google.analytics.admin.v1alpha.ChangeHistoryChange} message ChangeHistoryChange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ChangeHistoryChange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.resource = ""; + object.action = options.enums === String ? "ACTION_TYPE_UNSPECIFIED" : 0; + object.resourceBeforeChange = null; + object.resourceAfterChange = null; + } + if (message.resource != null && message.hasOwnProperty("resource")) + object.resource = message.resource; + if (message.action != null && message.hasOwnProperty("action")) + object.action = options.enums === String ? $root.google.analytics.admin.v1alpha.ActionType[message.action] === undefined ? message.action : $root.google.analytics.admin.v1alpha.ActionType[message.action] : message.action; + if (message.resourceBeforeChange != null && message.hasOwnProperty("resourceBeforeChange")) + object.resourceBeforeChange = $root.google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource.toObject(message.resourceBeforeChange, options); + if (message.resourceAfterChange != null && message.hasOwnProperty("resourceAfterChange")) + object.resourceAfterChange = $root.google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource.toObject(message.resourceAfterChange, options); + return object; + }; + + /** + * Converts this ChangeHistoryChange to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.ChangeHistoryChange + * @instance + * @returns {Object.} JSON object + */ + ChangeHistoryChange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ChangeHistoryChange + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.ChangeHistoryChange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ChangeHistoryChange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.ChangeHistoryChange"; + }; + + ChangeHistoryChange.ChangeHistoryResource = (function() { + + /** + * Properties of a ChangeHistoryResource. + * @memberof google.analytics.admin.v1alpha.ChangeHistoryChange + * @interface IChangeHistoryResource + * @property {google.analytics.admin.v1alpha.IAccount|null} [account] ChangeHistoryResource account + * @property {google.analytics.admin.v1alpha.IProperty|null} [property] ChangeHistoryResource property + * @property {google.analytics.admin.v1alpha.IFirebaseLink|null} [firebaseLink] ChangeHistoryResource firebaseLink + * @property {google.analytics.admin.v1alpha.IGoogleAdsLink|null} [googleAdsLink] ChangeHistoryResource googleAdsLink + * @property {google.analytics.admin.v1alpha.IGoogleSignalsSettings|null} [googleSignalsSettings] ChangeHistoryResource googleSignalsSettings + * @property {google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLink|null} [displayVideo_360AdvertiserLink] ChangeHistoryResource displayVideo_360AdvertiserLink + * @property {google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLinkProposal|null} [displayVideo_360AdvertiserLinkProposal] ChangeHistoryResource displayVideo_360AdvertiserLinkProposal + * @property {google.analytics.admin.v1alpha.IConversionEvent|null} [conversionEvent] ChangeHistoryResource conversionEvent + * @property {google.analytics.admin.v1alpha.IMeasurementProtocolSecret|null} [measurementProtocolSecret] ChangeHistoryResource measurementProtocolSecret + * @property {google.analytics.admin.v1alpha.ICustomDimension|null} [customDimension] ChangeHistoryResource customDimension + * @property {google.analytics.admin.v1alpha.ICustomMetric|null} [customMetric] ChangeHistoryResource customMetric + * @property {google.analytics.admin.v1alpha.IDataRetentionSettings|null} [dataRetentionSettings] ChangeHistoryResource dataRetentionSettings + * @property {google.analytics.admin.v1alpha.IDataStream|null} [dataStream] ChangeHistoryResource dataStream + * @property {google.analytics.admin.v1alpha.IAttributionSettings|null} [attributionSettings] ChangeHistoryResource attributionSettings + */ + + /** + * Constructs a new ChangeHistoryResource. + * @memberof google.analytics.admin.v1alpha.ChangeHistoryChange + * @classdesc Represents a ChangeHistoryResource. + * @implements IChangeHistoryResource + * @constructor + * @param {google.analytics.admin.v1alpha.ChangeHistoryChange.IChangeHistoryResource=} [properties] Properties to set + */ + function ChangeHistoryResource(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ChangeHistoryResource account. + * @member {google.analytics.admin.v1alpha.IAccount|null|undefined} account + * @memberof google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource + * @instance + */ + ChangeHistoryResource.prototype.account = null; + + /** + * ChangeHistoryResource property. + * @member {google.analytics.admin.v1alpha.IProperty|null|undefined} property + * @memberof google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource + * @instance + */ + ChangeHistoryResource.prototype.property = null; + + /** + * ChangeHistoryResource firebaseLink. + * @member {google.analytics.admin.v1alpha.IFirebaseLink|null|undefined} firebaseLink + * @memberof google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource + * @instance + */ + ChangeHistoryResource.prototype.firebaseLink = null; + + /** + * ChangeHistoryResource googleAdsLink. + * @member {google.analytics.admin.v1alpha.IGoogleAdsLink|null|undefined} googleAdsLink + * @memberof google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource + * @instance + */ + ChangeHistoryResource.prototype.googleAdsLink = null; + + /** + * ChangeHistoryResource googleSignalsSettings. + * @member {google.analytics.admin.v1alpha.IGoogleSignalsSettings|null|undefined} googleSignalsSettings + * @memberof google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource + * @instance + */ + ChangeHistoryResource.prototype.googleSignalsSettings = null; + + /** + * ChangeHistoryResource displayVideo_360AdvertiserLink. + * @member {google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLink|null|undefined} displayVideo_360AdvertiserLink + * @memberof google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource + * @instance + */ + ChangeHistoryResource.prototype.displayVideo_360AdvertiserLink = null; + + /** + * ChangeHistoryResource displayVideo_360AdvertiserLinkProposal. + * @member {google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLinkProposal|null|undefined} displayVideo_360AdvertiserLinkProposal + * @memberof google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource + * @instance + */ + ChangeHistoryResource.prototype.displayVideo_360AdvertiserLinkProposal = null; + + /** + * ChangeHistoryResource conversionEvent. + * @member {google.analytics.admin.v1alpha.IConversionEvent|null|undefined} conversionEvent + * @memberof google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource + * @instance + */ + ChangeHistoryResource.prototype.conversionEvent = null; + + /** + * ChangeHistoryResource measurementProtocolSecret. + * @member {google.analytics.admin.v1alpha.IMeasurementProtocolSecret|null|undefined} measurementProtocolSecret + * @memberof google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource + * @instance + */ + ChangeHistoryResource.prototype.measurementProtocolSecret = null; + + /** + * ChangeHistoryResource customDimension. + * @member {google.analytics.admin.v1alpha.ICustomDimension|null|undefined} customDimension + * @memberof google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource + * @instance + */ + ChangeHistoryResource.prototype.customDimension = null; + + /** + * ChangeHistoryResource customMetric. + * @member {google.analytics.admin.v1alpha.ICustomMetric|null|undefined} customMetric + * @memberof google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource + * @instance + */ + ChangeHistoryResource.prototype.customMetric = null; + + /** + * ChangeHistoryResource dataRetentionSettings. + * @member {google.analytics.admin.v1alpha.IDataRetentionSettings|null|undefined} dataRetentionSettings + * @memberof google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource + * @instance + */ + ChangeHistoryResource.prototype.dataRetentionSettings = null; + + /** + * ChangeHistoryResource dataStream. + * @member {google.analytics.admin.v1alpha.IDataStream|null|undefined} dataStream + * @memberof google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource + * @instance + */ + ChangeHistoryResource.prototype.dataStream = null; + + /** + * ChangeHistoryResource attributionSettings. + * @member {google.analytics.admin.v1alpha.IAttributionSettings|null|undefined} attributionSettings + * @memberof google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource + * @instance + */ + ChangeHistoryResource.prototype.attributionSettings = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ChangeHistoryResource resource. + * @member {"account"|"property"|"firebaseLink"|"googleAdsLink"|"googleSignalsSettings"|"displayVideo_360AdvertiserLink"|"displayVideo_360AdvertiserLinkProposal"|"conversionEvent"|"measurementProtocolSecret"|"customDimension"|"customMetric"|"dataRetentionSettings"|"dataStream"|"attributionSettings"|undefined} resource + * @memberof google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource + * @instance + */ + Object.defineProperty(ChangeHistoryResource.prototype, "resource", { + get: $util.oneOfGetter($oneOfFields = ["account", "property", "firebaseLink", "googleAdsLink", "googleSignalsSettings", "displayVideo_360AdvertiserLink", "displayVideo_360AdvertiserLinkProposal", "conversionEvent", "measurementProtocolSecret", "customDimension", "customMetric", "dataRetentionSettings", "dataStream", "attributionSettings"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ChangeHistoryResource instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource + * @static + * @param {google.analytics.admin.v1alpha.ChangeHistoryChange.IChangeHistoryResource=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource} ChangeHistoryResource instance + */ + ChangeHistoryResource.create = function create(properties) { + return new ChangeHistoryResource(properties); + }; + + /** + * Encodes the specified ChangeHistoryResource message. Does not implicitly {@link google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource + * @static + * @param {google.analytics.admin.v1alpha.ChangeHistoryChange.IChangeHistoryResource} message ChangeHistoryResource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ChangeHistoryResource.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.account != null && Object.hasOwnProperty.call(message, "account")) + $root.google.analytics.admin.v1alpha.Account.encode(message.account, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.property != null && Object.hasOwnProperty.call(message, "property")) + $root.google.analytics.admin.v1alpha.Property.encode(message.property, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.firebaseLink != null && Object.hasOwnProperty.call(message, "firebaseLink")) + $root.google.analytics.admin.v1alpha.FirebaseLink.encode(message.firebaseLink, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.googleAdsLink != null && Object.hasOwnProperty.call(message, "googleAdsLink")) + $root.google.analytics.admin.v1alpha.GoogleAdsLink.encode(message.googleAdsLink, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.googleSignalsSettings != null && Object.hasOwnProperty.call(message, "googleSignalsSettings")) + $root.google.analytics.admin.v1alpha.GoogleSignalsSettings.encode(message.googleSignalsSettings, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.displayVideo_360AdvertiserLink != null && Object.hasOwnProperty.call(message, "displayVideo_360AdvertiserLink")) + $root.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink.encode(message.displayVideo_360AdvertiserLink, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.displayVideo_360AdvertiserLinkProposal != null && Object.hasOwnProperty.call(message, "displayVideo_360AdvertiserLinkProposal")) + $root.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal.encode(message.displayVideo_360AdvertiserLinkProposal, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.conversionEvent != null && Object.hasOwnProperty.call(message, "conversionEvent")) + $root.google.analytics.admin.v1alpha.ConversionEvent.encode(message.conversionEvent, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.measurementProtocolSecret != null && Object.hasOwnProperty.call(message, "measurementProtocolSecret")) + $root.google.analytics.admin.v1alpha.MeasurementProtocolSecret.encode(message.measurementProtocolSecret, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.customDimension != null && Object.hasOwnProperty.call(message, "customDimension")) + $root.google.analytics.admin.v1alpha.CustomDimension.encode(message.customDimension, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); + if (message.customMetric != null && Object.hasOwnProperty.call(message, "customMetric")) + $root.google.analytics.admin.v1alpha.CustomMetric.encode(message.customMetric, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); + if (message.dataRetentionSettings != null && Object.hasOwnProperty.call(message, "dataRetentionSettings")) + $root.google.analytics.admin.v1alpha.DataRetentionSettings.encode(message.dataRetentionSettings, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); + if (message.dataStream != null && Object.hasOwnProperty.call(message, "dataStream")) + $root.google.analytics.admin.v1alpha.DataStream.encode(message.dataStream, writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim(); + if (message.attributionSettings != null && Object.hasOwnProperty.call(message, "attributionSettings")) + $root.google.analytics.admin.v1alpha.AttributionSettings.encode(message.attributionSettings, writer.uint32(/* id 20, wireType 2 =*/162).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ChangeHistoryResource message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource + * @static + * @param {google.analytics.admin.v1alpha.ChangeHistoryChange.IChangeHistoryResource} message ChangeHistoryResource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ChangeHistoryResource.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ChangeHistoryResource message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource} ChangeHistoryResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ChangeHistoryResource.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.account = $root.google.analytics.admin.v1alpha.Account.decode(reader, reader.uint32()); + break; + } + case 2: { + message.property = $root.google.analytics.admin.v1alpha.Property.decode(reader, reader.uint32()); + break; + } + case 6: { + message.firebaseLink = $root.google.analytics.admin.v1alpha.FirebaseLink.decode(reader, reader.uint32()); + break; + } + case 7: { + message.googleAdsLink = $root.google.analytics.admin.v1alpha.GoogleAdsLink.decode(reader, reader.uint32()); + break; + } + case 8: { + message.googleSignalsSettings = $root.google.analytics.admin.v1alpha.GoogleSignalsSettings.decode(reader, reader.uint32()); + break; + } + case 9: { + message.displayVideo_360AdvertiserLink = $root.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink.decode(reader, reader.uint32()); + break; + } + case 10: { + message.displayVideo_360AdvertiserLinkProposal = $root.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal.decode(reader, reader.uint32()); + break; + } + case 11: { + message.conversionEvent = $root.google.analytics.admin.v1alpha.ConversionEvent.decode(reader, reader.uint32()); + break; + } + case 12: { + message.measurementProtocolSecret = $root.google.analytics.admin.v1alpha.MeasurementProtocolSecret.decode(reader, reader.uint32()); + break; + } + case 13: { + message.customDimension = $root.google.analytics.admin.v1alpha.CustomDimension.decode(reader, reader.uint32()); + break; + } + case 14: { + message.customMetric = $root.google.analytics.admin.v1alpha.CustomMetric.decode(reader, reader.uint32()); + break; + } + case 15: { + message.dataRetentionSettings = $root.google.analytics.admin.v1alpha.DataRetentionSettings.decode(reader, reader.uint32()); + break; + } + case 18: { + message.dataStream = $root.google.analytics.admin.v1alpha.DataStream.decode(reader, reader.uint32()); + break; + } + case 20: { + message.attributionSettings = $root.google.analytics.admin.v1alpha.AttributionSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ChangeHistoryResource message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource} ChangeHistoryResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ChangeHistoryResource.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ChangeHistoryResource message. + * @function verify + * @memberof google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ChangeHistoryResource.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.account != null && message.hasOwnProperty("account")) { + properties.resource = 1; + { + var error = $root.google.analytics.admin.v1alpha.Account.verify(message.account); + if (error) + return "account." + error; + } + } + if (message.property != null && message.hasOwnProperty("property")) { + if (properties.resource === 1) + return "resource: multiple values"; + properties.resource = 1; + { + var error = $root.google.analytics.admin.v1alpha.Property.verify(message.property); + if (error) + return "property." + error; + } + } + if (message.firebaseLink != null && message.hasOwnProperty("firebaseLink")) { + if (properties.resource === 1) + return "resource: multiple values"; + properties.resource = 1; + { + var error = $root.google.analytics.admin.v1alpha.FirebaseLink.verify(message.firebaseLink); + if (error) + return "firebaseLink." + error; + } + } + if (message.googleAdsLink != null && message.hasOwnProperty("googleAdsLink")) { + if (properties.resource === 1) + return "resource: multiple values"; + properties.resource = 1; + { + var error = $root.google.analytics.admin.v1alpha.GoogleAdsLink.verify(message.googleAdsLink); + if (error) + return "googleAdsLink." + error; + } + } + if (message.googleSignalsSettings != null && message.hasOwnProperty("googleSignalsSettings")) { + if (properties.resource === 1) + return "resource: multiple values"; + properties.resource = 1; + { + var error = $root.google.analytics.admin.v1alpha.GoogleSignalsSettings.verify(message.googleSignalsSettings); + if (error) + return "googleSignalsSettings." + error; + } + } + if (message.displayVideo_360AdvertiserLink != null && message.hasOwnProperty("displayVideo_360AdvertiserLink")) { + if (properties.resource === 1) + return "resource: multiple values"; + properties.resource = 1; + { + var error = $root.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink.verify(message.displayVideo_360AdvertiserLink); + if (error) + return "displayVideo_360AdvertiserLink." + error; + } + } + if (message.displayVideo_360AdvertiserLinkProposal != null && message.hasOwnProperty("displayVideo_360AdvertiserLinkProposal")) { + if (properties.resource === 1) + return "resource: multiple values"; + properties.resource = 1; + { + var error = $root.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal.verify(message.displayVideo_360AdvertiserLinkProposal); + if (error) + return "displayVideo_360AdvertiserLinkProposal." + error; + } + } + if (message.conversionEvent != null && message.hasOwnProperty("conversionEvent")) { + if (properties.resource === 1) + return "resource: multiple values"; + properties.resource = 1; + { + var error = $root.google.analytics.admin.v1alpha.ConversionEvent.verify(message.conversionEvent); + if (error) + return "conversionEvent." + error; + } + } + if (message.measurementProtocolSecret != null && message.hasOwnProperty("measurementProtocolSecret")) { + if (properties.resource === 1) + return "resource: multiple values"; + properties.resource = 1; + { + var error = $root.google.analytics.admin.v1alpha.MeasurementProtocolSecret.verify(message.measurementProtocolSecret); + if (error) + return "measurementProtocolSecret." + error; + } + } + if (message.customDimension != null && message.hasOwnProperty("customDimension")) { + if (properties.resource === 1) + return "resource: multiple values"; + properties.resource = 1; + { + var error = $root.google.analytics.admin.v1alpha.CustomDimension.verify(message.customDimension); + if (error) + return "customDimension." + error; + } + } + if (message.customMetric != null && message.hasOwnProperty("customMetric")) { + if (properties.resource === 1) + return "resource: multiple values"; + properties.resource = 1; + { + var error = $root.google.analytics.admin.v1alpha.CustomMetric.verify(message.customMetric); + if (error) + return "customMetric." + error; + } + } + if (message.dataRetentionSettings != null && message.hasOwnProperty("dataRetentionSettings")) { + if (properties.resource === 1) + return "resource: multiple values"; + properties.resource = 1; + { + var error = $root.google.analytics.admin.v1alpha.DataRetentionSettings.verify(message.dataRetentionSettings); + if (error) + return "dataRetentionSettings." + error; + } + } + if (message.dataStream != null && message.hasOwnProperty("dataStream")) { + if (properties.resource === 1) + return "resource: multiple values"; + properties.resource = 1; + { + var error = $root.google.analytics.admin.v1alpha.DataStream.verify(message.dataStream); + if (error) + return "dataStream." + error; + } + } + if (message.attributionSettings != null && message.hasOwnProperty("attributionSettings")) { + if (properties.resource === 1) + return "resource: multiple values"; + properties.resource = 1; + { + var error = $root.google.analytics.admin.v1alpha.AttributionSettings.verify(message.attributionSettings); + if (error) + return "attributionSettings." + error; + } + } + return null; + }; + + /** + * Creates a ChangeHistoryResource message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource} ChangeHistoryResource + */ + ChangeHistoryResource.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource) + return object; + var message = new $root.google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource(); + if (object.account != null) { + if (typeof object.account !== "object") + throw TypeError(".google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource.account: object expected"); + message.account = $root.google.analytics.admin.v1alpha.Account.fromObject(object.account); + } + if (object.property != null) { + if (typeof object.property !== "object") + throw TypeError(".google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource.property: object expected"); + message.property = $root.google.analytics.admin.v1alpha.Property.fromObject(object.property); + } + if (object.firebaseLink != null) { + if (typeof object.firebaseLink !== "object") + throw TypeError(".google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource.firebaseLink: object expected"); + message.firebaseLink = $root.google.analytics.admin.v1alpha.FirebaseLink.fromObject(object.firebaseLink); + } + if (object.googleAdsLink != null) { + if (typeof object.googleAdsLink !== "object") + throw TypeError(".google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource.googleAdsLink: object expected"); + message.googleAdsLink = $root.google.analytics.admin.v1alpha.GoogleAdsLink.fromObject(object.googleAdsLink); + } + if (object.googleSignalsSettings != null) { + if (typeof object.googleSignalsSettings !== "object") + throw TypeError(".google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource.googleSignalsSettings: object expected"); + message.googleSignalsSettings = $root.google.analytics.admin.v1alpha.GoogleSignalsSettings.fromObject(object.googleSignalsSettings); + } + if (object.displayVideo_360AdvertiserLink != null) { + if (typeof object.displayVideo_360AdvertiserLink !== "object") + throw TypeError(".google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource.displayVideo_360AdvertiserLink: object expected"); + message.displayVideo_360AdvertiserLink = $root.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink.fromObject(object.displayVideo_360AdvertiserLink); + } + if (object.displayVideo_360AdvertiserLinkProposal != null) { + if (typeof object.displayVideo_360AdvertiserLinkProposal !== "object") + throw TypeError(".google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource.displayVideo_360AdvertiserLinkProposal: object expected"); + message.displayVideo_360AdvertiserLinkProposal = $root.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal.fromObject(object.displayVideo_360AdvertiserLinkProposal); + } + if (object.conversionEvent != null) { + if (typeof object.conversionEvent !== "object") + throw TypeError(".google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource.conversionEvent: object expected"); + message.conversionEvent = $root.google.analytics.admin.v1alpha.ConversionEvent.fromObject(object.conversionEvent); + } + if (object.measurementProtocolSecret != null) { + if (typeof object.measurementProtocolSecret !== "object") + throw TypeError(".google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource.measurementProtocolSecret: object expected"); + message.measurementProtocolSecret = $root.google.analytics.admin.v1alpha.MeasurementProtocolSecret.fromObject(object.measurementProtocolSecret); + } + if (object.customDimension != null) { + if (typeof object.customDimension !== "object") + throw TypeError(".google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource.customDimension: object expected"); + message.customDimension = $root.google.analytics.admin.v1alpha.CustomDimension.fromObject(object.customDimension); + } + if (object.customMetric != null) { + if (typeof object.customMetric !== "object") + throw TypeError(".google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource.customMetric: object expected"); + message.customMetric = $root.google.analytics.admin.v1alpha.CustomMetric.fromObject(object.customMetric); + } + if (object.dataRetentionSettings != null) { + if (typeof object.dataRetentionSettings !== "object") + throw TypeError(".google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource.dataRetentionSettings: object expected"); + message.dataRetentionSettings = $root.google.analytics.admin.v1alpha.DataRetentionSettings.fromObject(object.dataRetentionSettings); + } + if (object.dataStream != null) { + if (typeof object.dataStream !== "object") + throw TypeError(".google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource.dataStream: object expected"); + message.dataStream = $root.google.analytics.admin.v1alpha.DataStream.fromObject(object.dataStream); + } + if (object.attributionSettings != null) { + if (typeof object.attributionSettings !== "object") + throw TypeError(".google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource.attributionSettings: object expected"); + message.attributionSettings = $root.google.analytics.admin.v1alpha.AttributionSettings.fromObject(object.attributionSettings); + } + return message; + }; + + /** + * Creates a plain object from a ChangeHistoryResource message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource + * @static + * @param {google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource} message ChangeHistoryResource + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ChangeHistoryResource.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.account != null && message.hasOwnProperty("account")) { + object.account = $root.google.analytics.admin.v1alpha.Account.toObject(message.account, options); + if (options.oneofs) + object.resource = "account"; + } + if (message.property != null && message.hasOwnProperty("property")) { + object.property = $root.google.analytics.admin.v1alpha.Property.toObject(message.property, options); + if (options.oneofs) + object.resource = "property"; + } + if (message.firebaseLink != null && message.hasOwnProperty("firebaseLink")) { + object.firebaseLink = $root.google.analytics.admin.v1alpha.FirebaseLink.toObject(message.firebaseLink, options); + if (options.oneofs) + object.resource = "firebaseLink"; + } + if (message.googleAdsLink != null && message.hasOwnProperty("googleAdsLink")) { + object.googleAdsLink = $root.google.analytics.admin.v1alpha.GoogleAdsLink.toObject(message.googleAdsLink, options); + if (options.oneofs) + object.resource = "googleAdsLink"; + } + if (message.googleSignalsSettings != null && message.hasOwnProperty("googleSignalsSettings")) { + object.googleSignalsSettings = $root.google.analytics.admin.v1alpha.GoogleSignalsSettings.toObject(message.googleSignalsSettings, options); + if (options.oneofs) + object.resource = "googleSignalsSettings"; + } + if (message.displayVideo_360AdvertiserLink != null && message.hasOwnProperty("displayVideo_360AdvertiserLink")) { + object.displayVideo_360AdvertiserLink = $root.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink.toObject(message.displayVideo_360AdvertiserLink, options); + if (options.oneofs) + object.resource = "displayVideo_360AdvertiserLink"; + } + if (message.displayVideo_360AdvertiserLinkProposal != null && message.hasOwnProperty("displayVideo_360AdvertiserLinkProposal")) { + object.displayVideo_360AdvertiserLinkProposal = $root.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal.toObject(message.displayVideo_360AdvertiserLinkProposal, options); + if (options.oneofs) + object.resource = "displayVideo_360AdvertiserLinkProposal"; + } + if (message.conversionEvent != null && message.hasOwnProperty("conversionEvent")) { + object.conversionEvent = $root.google.analytics.admin.v1alpha.ConversionEvent.toObject(message.conversionEvent, options); + if (options.oneofs) + object.resource = "conversionEvent"; + } + if (message.measurementProtocolSecret != null && message.hasOwnProperty("measurementProtocolSecret")) { + object.measurementProtocolSecret = $root.google.analytics.admin.v1alpha.MeasurementProtocolSecret.toObject(message.measurementProtocolSecret, options); + if (options.oneofs) + object.resource = "measurementProtocolSecret"; + } + if (message.customDimension != null && message.hasOwnProperty("customDimension")) { + object.customDimension = $root.google.analytics.admin.v1alpha.CustomDimension.toObject(message.customDimension, options); + if (options.oneofs) + object.resource = "customDimension"; + } + if (message.customMetric != null && message.hasOwnProperty("customMetric")) { + object.customMetric = $root.google.analytics.admin.v1alpha.CustomMetric.toObject(message.customMetric, options); + if (options.oneofs) + object.resource = "customMetric"; + } + if (message.dataRetentionSettings != null && message.hasOwnProperty("dataRetentionSettings")) { + object.dataRetentionSettings = $root.google.analytics.admin.v1alpha.DataRetentionSettings.toObject(message.dataRetentionSettings, options); + if (options.oneofs) + object.resource = "dataRetentionSettings"; + } + if (message.dataStream != null && message.hasOwnProperty("dataStream")) { + object.dataStream = $root.google.analytics.admin.v1alpha.DataStream.toObject(message.dataStream, options); + if (options.oneofs) + object.resource = "dataStream"; + } + if (message.attributionSettings != null && message.hasOwnProperty("attributionSettings")) { + object.attributionSettings = $root.google.analytics.admin.v1alpha.AttributionSettings.toObject(message.attributionSettings, options); + if (options.oneofs) + object.resource = "attributionSettings"; + } + return object; + }; + + /** + * Converts this ChangeHistoryResource to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource + * @instance + * @returns {Object.} JSON object + */ + ChangeHistoryResource.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ChangeHistoryResource + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ChangeHistoryResource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.ChangeHistoryChange.ChangeHistoryResource"; + }; + + return ChangeHistoryResource; + })(); + + return ChangeHistoryChange; + })(); + + v1alpha.DisplayVideo360AdvertiserLink = (function() { + + /** + * Properties of a DisplayVideo360AdvertiserLink. + * @memberof google.analytics.admin.v1alpha + * @interface IDisplayVideo360AdvertiserLink + * @property {string|null} [name] DisplayVideo360AdvertiserLink name + * @property {string|null} [advertiserId] DisplayVideo360AdvertiserLink advertiserId + * @property {string|null} [advertiserDisplayName] DisplayVideo360AdvertiserLink advertiserDisplayName + * @property {google.protobuf.IBoolValue|null} [adsPersonalizationEnabled] DisplayVideo360AdvertiserLink adsPersonalizationEnabled + * @property {google.protobuf.IBoolValue|null} [campaignDataSharingEnabled] DisplayVideo360AdvertiserLink campaignDataSharingEnabled + * @property {google.protobuf.IBoolValue|null} [costDataSharingEnabled] DisplayVideo360AdvertiserLink costDataSharingEnabled + */ + + /** + * Constructs a new DisplayVideo360AdvertiserLink. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents a DisplayVideo360AdvertiserLink. + * @implements IDisplayVideo360AdvertiserLink + * @constructor + * @param {google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLink=} [properties] Properties to set + */ + function DisplayVideo360AdvertiserLink(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DisplayVideo360AdvertiserLink name. + * @member {string} name + * @memberof google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink + * @instance + */ + DisplayVideo360AdvertiserLink.prototype.name = ""; + + /** + * DisplayVideo360AdvertiserLink advertiserId. + * @member {string} advertiserId + * @memberof google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink + * @instance + */ + DisplayVideo360AdvertiserLink.prototype.advertiserId = ""; + + /** + * DisplayVideo360AdvertiserLink advertiserDisplayName. + * @member {string} advertiserDisplayName + * @memberof google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink + * @instance + */ + DisplayVideo360AdvertiserLink.prototype.advertiserDisplayName = ""; + + /** + * DisplayVideo360AdvertiserLink adsPersonalizationEnabled. + * @member {google.protobuf.IBoolValue|null|undefined} adsPersonalizationEnabled + * @memberof google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink + * @instance + */ + DisplayVideo360AdvertiserLink.prototype.adsPersonalizationEnabled = null; + + /** + * DisplayVideo360AdvertiserLink campaignDataSharingEnabled. + * @member {google.protobuf.IBoolValue|null|undefined} campaignDataSharingEnabled + * @memberof google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink + * @instance + */ + DisplayVideo360AdvertiserLink.prototype.campaignDataSharingEnabled = null; + + /** + * DisplayVideo360AdvertiserLink costDataSharingEnabled. + * @member {google.protobuf.IBoolValue|null|undefined} costDataSharingEnabled + * @memberof google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink + * @instance + */ + DisplayVideo360AdvertiserLink.prototype.costDataSharingEnabled = null; + + /** + * Creates a new DisplayVideo360AdvertiserLink instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink + * @static + * @param {google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLink=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink} DisplayVideo360AdvertiserLink instance + */ + DisplayVideo360AdvertiserLink.create = function create(properties) { + return new DisplayVideo360AdvertiserLink(properties); + }; + + /** + * Encodes the specified DisplayVideo360AdvertiserLink message. Does not implicitly {@link google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink + * @static + * @param {google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLink} message DisplayVideo360AdvertiserLink message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DisplayVideo360AdvertiserLink.encode = function encode(message, writer) { + 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.advertiserId != null && Object.hasOwnProperty.call(message, "advertiserId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.advertiserId); + if (message.advertiserDisplayName != null && Object.hasOwnProperty.call(message, "advertiserDisplayName")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.advertiserDisplayName); + if (message.adsPersonalizationEnabled != null && Object.hasOwnProperty.call(message, "adsPersonalizationEnabled")) + $root.google.protobuf.BoolValue.encode(message.adsPersonalizationEnabled, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.campaignDataSharingEnabled != null && Object.hasOwnProperty.call(message, "campaignDataSharingEnabled")) + $root.google.protobuf.BoolValue.encode(message.campaignDataSharingEnabled, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.costDataSharingEnabled != null && Object.hasOwnProperty.call(message, "costDataSharingEnabled")) + $root.google.protobuf.BoolValue.encode(message.costDataSharingEnabled, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified DisplayVideo360AdvertiserLink message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink + * @static + * @param {google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLink} message DisplayVideo360AdvertiserLink message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DisplayVideo360AdvertiserLink.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DisplayVideo360AdvertiserLink message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink} DisplayVideo360AdvertiserLink + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DisplayVideo360AdvertiserLink.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.advertiserId = reader.string(); + break; + } + case 3: { + message.advertiserDisplayName = reader.string(); + break; + } + case 4: { + message.adsPersonalizationEnabled = $root.google.protobuf.BoolValue.decode(reader, reader.uint32()); + break; + } + case 5: { + message.campaignDataSharingEnabled = $root.google.protobuf.BoolValue.decode(reader, reader.uint32()); + break; + } + case 6: { + message.costDataSharingEnabled = $root.google.protobuf.BoolValue.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DisplayVideo360AdvertiserLink message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink} DisplayVideo360AdvertiserLink + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DisplayVideo360AdvertiserLink.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DisplayVideo360AdvertiserLink message. + * @function verify + * @memberof google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DisplayVideo360AdvertiserLink.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.advertiserId != null && message.hasOwnProperty("advertiserId")) + if (!$util.isString(message.advertiserId)) + return "advertiserId: string expected"; + if (message.advertiserDisplayName != null && message.hasOwnProperty("advertiserDisplayName")) + if (!$util.isString(message.advertiserDisplayName)) + return "advertiserDisplayName: string expected"; + if (message.adsPersonalizationEnabled != null && message.hasOwnProperty("adsPersonalizationEnabled")) { + var error = $root.google.protobuf.BoolValue.verify(message.adsPersonalizationEnabled); + if (error) + return "adsPersonalizationEnabled." + error; + } + if (message.campaignDataSharingEnabled != null && message.hasOwnProperty("campaignDataSharingEnabled")) { + var error = $root.google.protobuf.BoolValue.verify(message.campaignDataSharingEnabled); + if (error) + return "campaignDataSharingEnabled." + error; + } + if (message.costDataSharingEnabled != null && message.hasOwnProperty("costDataSharingEnabled")) { + var error = $root.google.protobuf.BoolValue.verify(message.costDataSharingEnabled); + if (error) + return "costDataSharingEnabled." + error; + } + return null; + }; + + /** + * Creates a DisplayVideo360AdvertiserLink message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink} DisplayVideo360AdvertiserLink + */ + DisplayVideo360AdvertiserLink.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink) + return object; + var message = new $root.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink(); + if (object.name != null) + message.name = String(object.name); + if (object.advertiserId != null) + message.advertiserId = String(object.advertiserId); + if (object.advertiserDisplayName != null) + message.advertiserDisplayName = String(object.advertiserDisplayName); + if (object.adsPersonalizationEnabled != null) { + if (typeof object.adsPersonalizationEnabled !== "object") + throw TypeError(".google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink.adsPersonalizationEnabled: object expected"); + message.adsPersonalizationEnabled = $root.google.protobuf.BoolValue.fromObject(object.adsPersonalizationEnabled); + } + if (object.campaignDataSharingEnabled != null) { + if (typeof object.campaignDataSharingEnabled !== "object") + throw TypeError(".google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink.campaignDataSharingEnabled: object expected"); + message.campaignDataSharingEnabled = $root.google.protobuf.BoolValue.fromObject(object.campaignDataSharingEnabled); + } + if (object.costDataSharingEnabled != null) { + if (typeof object.costDataSharingEnabled !== "object") + throw TypeError(".google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink.costDataSharingEnabled: object expected"); + message.costDataSharingEnabled = $root.google.protobuf.BoolValue.fromObject(object.costDataSharingEnabled); + } + return message; + }; + + /** + * Creates a plain object from a DisplayVideo360AdvertiserLink message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink + * @static + * @param {google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink} message DisplayVideo360AdvertiserLink + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DisplayVideo360AdvertiserLink.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.advertiserId = ""; + object.advertiserDisplayName = ""; + object.adsPersonalizationEnabled = null; + object.campaignDataSharingEnabled = null; + object.costDataSharingEnabled = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.advertiserId != null && message.hasOwnProperty("advertiserId")) + object.advertiserId = message.advertiserId; + if (message.advertiserDisplayName != null && message.hasOwnProperty("advertiserDisplayName")) + object.advertiserDisplayName = message.advertiserDisplayName; + if (message.adsPersonalizationEnabled != null && message.hasOwnProperty("adsPersonalizationEnabled")) + object.adsPersonalizationEnabled = $root.google.protobuf.BoolValue.toObject(message.adsPersonalizationEnabled, options); + if (message.campaignDataSharingEnabled != null && message.hasOwnProperty("campaignDataSharingEnabled")) + object.campaignDataSharingEnabled = $root.google.protobuf.BoolValue.toObject(message.campaignDataSharingEnabled, options); + if (message.costDataSharingEnabled != null && message.hasOwnProperty("costDataSharingEnabled")) + object.costDataSharingEnabled = $root.google.protobuf.BoolValue.toObject(message.costDataSharingEnabled, options); + return object; + }; + + /** + * Converts this DisplayVideo360AdvertiserLink to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink + * @instance + * @returns {Object.} JSON object + */ + DisplayVideo360AdvertiserLink.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DisplayVideo360AdvertiserLink + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DisplayVideo360AdvertiserLink.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink"; + }; + + return DisplayVideo360AdvertiserLink; + })(); + + v1alpha.DisplayVideo360AdvertiserLinkProposal = (function() { + + /** + * Properties of a DisplayVideo360AdvertiserLinkProposal. + * @memberof google.analytics.admin.v1alpha + * @interface IDisplayVideo360AdvertiserLinkProposal + * @property {string|null} [name] DisplayVideo360AdvertiserLinkProposal name + * @property {string|null} [advertiserId] DisplayVideo360AdvertiserLinkProposal advertiserId + * @property {google.analytics.admin.v1alpha.ILinkProposalStatusDetails|null} [linkProposalStatusDetails] DisplayVideo360AdvertiserLinkProposal linkProposalStatusDetails + * @property {string|null} [advertiserDisplayName] DisplayVideo360AdvertiserLinkProposal advertiserDisplayName + * @property {string|null} [validationEmail] DisplayVideo360AdvertiserLinkProposal validationEmail + * @property {google.protobuf.IBoolValue|null} [adsPersonalizationEnabled] DisplayVideo360AdvertiserLinkProposal adsPersonalizationEnabled + * @property {google.protobuf.IBoolValue|null} [campaignDataSharingEnabled] DisplayVideo360AdvertiserLinkProposal campaignDataSharingEnabled + * @property {google.protobuf.IBoolValue|null} [costDataSharingEnabled] DisplayVideo360AdvertiserLinkProposal costDataSharingEnabled + */ + + /** + * Constructs a new DisplayVideo360AdvertiserLinkProposal. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents a DisplayVideo360AdvertiserLinkProposal. + * @implements IDisplayVideo360AdvertiserLinkProposal + * @constructor + * @param {google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLinkProposal=} [properties] Properties to set + */ + function DisplayVideo360AdvertiserLinkProposal(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DisplayVideo360AdvertiserLinkProposal name. + * @member {string} name + * @memberof google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal + * @instance + */ + DisplayVideo360AdvertiserLinkProposal.prototype.name = ""; + + /** + * DisplayVideo360AdvertiserLinkProposal advertiserId. + * @member {string} advertiserId + * @memberof google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal + * @instance + */ + DisplayVideo360AdvertiserLinkProposal.prototype.advertiserId = ""; + + /** + * DisplayVideo360AdvertiserLinkProposal linkProposalStatusDetails. + * @member {google.analytics.admin.v1alpha.ILinkProposalStatusDetails|null|undefined} linkProposalStatusDetails + * @memberof google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal + * @instance + */ + DisplayVideo360AdvertiserLinkProposal.prototype.linkProposalStatusDetails = null; + + /** + * DisplayVideo360AdvertiserLinkProposal advertiserDisplayName. + * @member {string} advertiserDisplayName + * @memberof google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal + * @instance + */ + DisplayVideo360AdvertiserLinkProposal.prototype.advertiserDisplayName = ""; + + /** + * DisplayVideo360AdvertiserLinkProposal validationEmail. + * @member {string} validationEmail + * @memberof google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal + * @instance + */ + DisplayVideo360AdvertiserLinkProposal.prototype.validationEmail = ""; + + /** + * DisplayVideo360AdvertiserLinkProposal adsPersonalizationEnabled. + * @member {google.protobuf.IBoolValue|null|undefined} adsPersonalizationEnabled + * @memberof google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal + * @instance + */ + DisplayVideo360AdvertiserLinkProposal.prototype.adsPersonalizationEnabled = null; + + /** + * DisplayVideo360AdvertiserLinkProposal campaignDataSharingEnabled. + * @member {google.protobuf.IBoolValue|null|undefined} campaignDataSharingEnabled + * @memberof google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal + * @instance + */ + DisplayVideo360AdvertiserLinkProposal.prototype.campaignDataSharingEnabled = null; + + /** + * DisplayVideo360AdvertiserLinkProposal costDataSharingEnabled. + * @member {google.protobuf.IBoolValue|null|undefined} costDataSharingEnabled + * @memberof google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal + * @instance + */ + DisplayVideo360AdvertiserLinkProposal.prototype.costDataSharingEnabled = null; + + /** + * Creates a new DisplayVideo360AdvertiserLinkProposal instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal + * @static + * @param {google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLinkProposal=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal} DisplayVideo360AdvertiserLinkProposal instance + */ + DisplayVideo360AdvertiserLinkProposal.create = function create(properties) { + return new DisplayVideo360AdvertiserLinkProposal(properties); + }; + + /** + * Encodes the specified DisplayVideo360AdvertiserLinkProposal message. Does not implicitly {@link google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal + * @static + * @param {google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLinkProposal} message DisplayVideo360AdvertiserLinkProposal message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DisplayVideo360AdvertiserLinkProposal.encode = function encode(message, writer) { + 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.advertiserId != null && Object.hasOwnProperty.call(message, "advertiserId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.advertiserId); + if (message.linkProposalStatusDetails != null && Object.hasOwnProperty.call(message, "linkProposalStatusDetails")) + $root.google.analytics.admin.v1alpha.LinkProposalStatusDetails.encode(message.linkProposalStatusDetails, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.advertiserDisplayName != null && Object.hasOwnProperty.call(message, "advertiserDisplayName")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.advertiserDisplayName); + if (message.validationEmail != null && Object.hasOwnProperty.call(message, "validationEmail")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.validationEmail); + if (message.adsPersonalizationEnabled != null && Object.hasOwnProperty.call(message, "adsPersonalizationEnabled")) + $root.google.protobuf.BoolValue.encode(message.adsPersonalizationEnabled, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.campaignDataSharingEnabled != null && Object.hasOwnProperty.call(message, "campaignDataSharingEnabled")) + $root.google.protobuf.BoolValue.encode(message.campaignDataSharingEnabled, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.costDataSharingEnabled != null && Object.hasOwnProperty.call(message, "costDataSharingEnabled")) + $root.google.protobuf.BoolValue.encode(message.costDataSharingEnabled, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified DisplayVideo360AdvertiserLinkProposal message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal + * @static + * @param {google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLinkProposal} message DisplayVideo360AdvertiserLinkProposal message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DisplayVideo360AdvertiserLinkProposal.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DisplayVideo360AdvertiserLinkProposal message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal} DisplayVideo360AdvertiserLinkProposal + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DisplayVideo360AdvertiserLinkProposal.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.advertiserId = reader.string(); + break; + } + case 3: { + message.linkProposalStatusDetails = $root.google.analytics.admin.v1alpha.LinkProposalStatusDetails.decode(reader, reader.uint32()); + break; + } + case 4: { + message.advertiserDisplayName = reader.string(); + break; + } + case 5: { + message.validationEmail = reader.string(); + break; + } + case 6: { + message.adsPersonalizationEnabled = $root.google.protobuf.BoolValue.decode(reader, reader.uint32()); + break; + } + case 7: { + message.campaignDataSharingEnabled = $root.google.protobuf.BoolValue.decode(reader, reader.uint32()); + break; + } + case 8: { + message.costDataSharingEnabled = $root.google.protobuf.BoolValue.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DisplayVideo360AdvertiserLinkProposal message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal} DisplayVideo360AdvertiserLinkProposal + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DisplayVideo360AdvertiserLinkProposal.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DisplayVideo360AdvertiserLinkProposal message. + * @function verify + * @memberof google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DisplayVideo360AdvertiserLinkProposal.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.advertiserId != null && message.hasOwnProperty("advertiserId")) + if (!$util.isString(message.advertiserId)) + return "advertiserId: string expected"; + if (message.linkProposalStatusDetails != null && message.hasOwnProperty("linkProposalStatusDetails")) { + var error = $root.google.analytics.admin.v1alpha.LinkProposalStatusDetails.verify(message.linkProposalStatusDetails); + if (error) + return "linkProposalStatusDetails." + error; + } + if (message.advertiserDisplayName != null && message.hasOwnProperty("advertiserDisplayName")) + if (!$util.isString(message.advertiserDisplayName)) + return "advertiserDisplayName: string expected"; + if (message.validationEmail != null && message.hasOwnProperty("validationEmail")) + if (!$util.isString(message.validationEmail)) + return "validationEmail: string expected"; + if (message.adsPersonalizationEnabled != null && message.hasOwnProperty("adsPersonalizationEnabled")) { + var error = $root.google.protobuf.BoolValue.verify(message.adsPersonalizationEnabled); + if (error) + return "adsPersonalizationEnabled." + error; + } + if (message.campaignDataSharingEnabled != null && message.hasOwnProperty("campaignDataSharingEnabled")) { + var error = $root.google.protobuf.BoolValue.verify(message.campaignDataSharingEnabled); + if (error) + return "campaignDataSharingEnabled." + error; + } + if (message.costDataSharingEnabled != null && message.hasOwnProperty("costDataSharingEnabled")) { + var error = $root.google.protobuf.BoolValue.verify(message.costDataSharingEnabled); + if (error) + return "costDataSharingEnabled." + error; + } + return null; + }; + + /** + * Creates a DisplayVideo360AdvertiserLinkProposal message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal} DisplayVideo360AdvertiserLinkProposal + */ + DisplayVideo360AdvertiserLinkProposal.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal) + return object; + var message = new $root.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal(); + if (object.name != null) + message.name = String(object.name); + if (object.advertiserId != null) + message.advertiserId = String(object.advertiserId); + if (object.linkProposalStatusDetails != null) { + if (typeof object.linkProposalStatusDetails !== "object") + throw TypeError(".google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal.linkProposalStatusDetails: object expected"); + message.linkProposalStatusDetails = $root.google.analytics.admin.v1alpha.LinkProposalStatusDetails.fromObject(object.linkProposalStatusDetails); + } + if (object.advertiserDisplayName != null) + message.advertiserDisplayName = String(object.advertiserDisplayName); + if (object.validationEmail != null) + message.validationEmail = String(object.validationEmail); + if (object.adsPersonalizationEnabled != null) { + if (typeof object.adsPersonalizationEnabled !== "object") + throw TypeError(".google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal.adsPersonalizationEnabled: object expected"); + message.adsPersonalizationEnabled = $root.google.protobuf.BoolValue.fromObject(object.adsPersonalizationEnabled); + } + if (object.campaignDataSharingEnabled != null) { + if (typeof object.campaignDataSharingEnabled !== "object") + throw TypeError(".google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal.campaignDataSharingEnabled: object expected"); + message.campaignDataSharingEnabled = $root.google.protobuf.BoolValue.fromObject(object.campaignDataSharingEnabled); + } + if (object.costDataSharingEnabled != null) { + if (typeof object.costDataSharingEnabled !== "object") + throw TypeError(".google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal.costDataSharingEnabled: object expected"); + message.costDataSharingEnabled = $root.google.protobuf.BoolValue.fromObject(object.costDataSharingEnabled); + } + return message; + }; + + /** + * Creates a plain object from a DisplayVideo360AdvertiserLinkProposal message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal + * @static + * @param {google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal} message DisplayVideo360AdvertiserLinkProposal + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DisplayVideo360AdvertiserLinkProposal.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.advertiserId = ""; + object.linkProposalStatusDetails = null; + object.advertiserDisplayName = ""; + object.validationEmail = ""; + object.adsPersonalizationEnabled = null; + object.campaignDataSharingEnabled = null; + object.costDataSharingEnabled = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.advertiserId != null && message.hasOwnProperty("advertiserId")) + object.advertiserId = message.advertiserId; + if (message.linkProposalStatusDetails != null && message.hasOwnProperty("linkProposalStatusDetails")) + object.linkProposalStatusDetails = $root.google.analytics.admin.v1alpha.LinkProposalStatusDetails.toObject(message.linkProposalStatusDetails, options); + if (message.advertiserDisplayName != null && message.hasOwnProperty("advertiserDisplayName")) + object.advertiserDisplayName = message.advertiserDisplayName; + if (message.validationEmail != null && message.hasOwnProperty("validationEmail")) + object.validationEmail = message.validationEmail; + if (message.adsPersonalizationEnabled != null && message.hasOwnProperty("adsPersonalizationEnabled")) + object.adsPersonalizationEnabled = $root.google.protobuf.BoolValue.toObject(message.adsPersonalizationEnabled, options); + if (message.campaignDataSharingEnabled != null && message.hasOwnProperty("campaignDataSharingEnabled")) + object.campaignDataSharingEnabled = $root.google.protobuf.BoolValue.toObject(message.campaignDataSharingEnabled, options); + if (message.costDataSharingEnabled != null && message.hasOwnProperty("costDataSharingEnabled")) + object.costDataSharingEnabled = $root.google.protobuf.BoolValue.toObject(message.costDataSharingEnabled, options); + return object; + }; + + /** + * Converts this DisplayVideo360AdvertiserLinkProposal to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal + * @instance + * @returns {Object.} JSON object + */ + DisplayVideo360AdvertiserLinkProposal.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DisplayVideo360AdvertiserLinkProposal + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DisplayVideo360AdvertiserLinkProposal.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal"; + }; + + return DisplayVideo360AdvertiserLinkProposal; + })(); + + v1alpha.LinkProposalStatusDetails = (function() { + + /** + * Properties of a LinkProposalStatusDetails. + * @memberof google.analytics.admin.v1alpha + * @interface ILinkProposalStatusDetails + * @property {google.analytics.admin.v1alpha.LinkProposalInitiatingProduct|null} [linkProposalInitiatingProduct] LinkProposalStatusDetails linkProposalInitiatingProduct + * @property {string|null} [requestorEmail] LinkProposalStatusDetails requestorEmail + * @property {google.analytics.admin.v1alpha.LinkProposalState|null} [linkProposalState] LinkProposalStatusDetails linkProposalState + */ + + /** + * Constructs a new LinkProposalStatusDetails. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents a LinkProposalStatusDetails. + * @implements ILinkProposalStatusDetails + * @constructor + * @param {google.analytics.admin.v1alpha.ILinkProposalStatusDetails=} [properties] Properties to set + */ + function LinkProposalStatusDetails(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LinkProposalStatusDetails linkProposalInitiatingProduct. + * @member {google.analytics.admin.v1alpha.LinkProposalInitiatingProduct} linkProposalInitiatingProduct + * @memberof google.analytics.admin.v1alpha.LinkProposalStatusDetails + * @instance + */ + LinkProposalStatusDetails.prototype.linkProposalInitiatingProduct = 0; + + /** + * LinkProposalStatusDetails requestorEmail. + * @member {string} requestorEmail + * @memberof google.analytics.admin.v1alpha.LinkProposalStatusDetails + * @instance + */ + LinkProposalStatusDetails.prototype.requestorEmail = ""; + + /** + * LinkProposalStatusDetails linkProposalState. + * @member {google.analytics.admin.v1alpha.LinkProposalState} linkProposalState + * @memberof google.analytics.admin.v1alpha.LinkProposalStatusDetails + * @instance + */ + LinkProposalStatusDetails.prototype.linkProposalState = 0; + + /** + * Creates a new LinkProposalStatusDetails instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.LinkProposalStatusDetails + * @static + * @param {google.analytics.admin.v1alpha.ILinkProposalStatusDetails=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.LinkProposalStatusDetails} LinkProposalStatusDetails instance + */ + LinkProposalStatusDetails.create = function create(properties) { + return new LinkProposalStatusDetails(properties); + }; + + /** + * Encodes the specified LinkProposalStatusDetails message. Does not implicitly {@link google.analytics.admin.v1alpha.LinkProposalStatusDetails.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.LinkProposalStatusDetails + * @static + * @param {google.analytics.admin.v1alpha.ILinkProposalStatusDetails} message LinkProposalStatusDetails message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LinkProposalStatusDetails.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.linkProposalInitiatingProduct != null && Object.hasOwnProperty.call(message, "linkProposalInitiatingProduct")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.linkProposalInitiatingProduct); + if (message.requestorEmail != null && Object.hasOwnProperty.call(message, "requestorEmail")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.requestorEmail); + if (message.linkProposalState != null && Object.hasOwnProperty.call(message, "linkProposalState")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.linkProposalState); + return writer; + }; + + /** + * Encodes the specified LinkProposalStatusDetails message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.LinkProposalStatusDetails.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.LinkProposalStatusDetails + * @static + * @param {google.analytics.admin.v1alpha.ILinkProposalStatusDetails} message LinkProposalStatusDetails message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LinkProposalStatusDetails.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LinkProposalStatusDetails message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.LinkProposalStatusDetails + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.LinkProposalStatusDetails} LinkProposalStatusDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LinkProposalStatusDetails.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.LinkProposalStatusDetails(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.linkProposalInitiatingProduct = reader.int32(); + break; + } + case 2: { + message.requestorEmail = reader.string(); + break; + } + case 3: { + message.linkProposalState = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a LinkProposalStatusDetails message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.LinkProposalStatusDetails + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.LinkProposalStatusDetails} LinkProposalStatusDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LinkProposalStatusDetails.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LinkProposalStatusDetails message. + * @function verify + * @memberof google.analytics.admin.v1alpha.LinkProposalStatusDetails + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LinkProposalStatusDetails.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.linkProposalInitiatingProduct != null && message.hasOwnProperty("linkProposalInitiatingProduct")) + switch (message.linkProposalInitiatingProduct) { + default: + return "linkProposalInitiatingProduct: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.requestorEmail != null && message.hasOwnProperty("requestorEmail")) + if (!$util.isString(message.requestorEmail)) + return "requestorEmail: string expected"; + if (message.linkProposalState != null && message.hasOwnProperty("linkProposalState")) + switch (message.linkProposalState) { + default: + return "linkProposalState: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + break; + } + return null; + }; + + /** + * Creates a LinkProposalStatusDetails message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.LinkProposalStatusDetails + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.LinkProposalStatusDetails} LinkProposalStatusDetails + */ + LinkProposalStatusDetails.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.LinkProposalStatusDetails) + return object; + var message = new $root.google.analytics.admin.v1alpha.LinkProposalStatusDetails(); + switch (object.linkProposalInitiatingProduct) { + default: + if (typeof object.linkProposalInitiatingProduct === "number") { + message.linkProposalInitiatingProduct = object.linkProposalInitiatingProduct; + break; + } + break; + case "LINK_PROPOSAL_INITIATING_PRODUCT_UNSPECIFIED": + case 0: + message.linkProposalInitiatingProduct = 0; + break; + case "GOOGLE_ANALYTICS": + case 1: + message.linkProposalInitiatingProduct = 1; + break; + case "LINKED_PRODUCT": + case 2: + message.linkProposalInitiatingProduct = 2; + break; + } + if (object.requestorEmail != null) + message.requestorEmail = String(object.requestorEmail); + switch (object.linkProposalState) { + default: + if (typeof object.linkProposalState === "number") { + message.linkProposalState = object.linkProposalState; + break; + } + break; + case "LINK_PROPOSAL_STATE_UNSPECIFIED": + case 0: + message.linkProposalState = 0; + break; + case "AWAITING_REVIEW_FROM_GOOGLE_ANALYTICS": + case 1: + message.linkProposalState = 1; + break; + case "AWAITING_REVIEW_FROM_LINKED_PRODUCT": + case 2: + message.linkProposalState = 2; + break; + case "WITHDRAWN": + case 3: + message.linkProposalState = 3; + break; + case "DECLINED": + case 4: + message.linkProposalState = 4; + break; + case "EXPIRED": + case 5: + message.linkProposalState = 5; + break; + case "OBSOLETE": + case 6: + message.linkProposalState = 6; + break; + } + return message; + }; + + /** + * Creates a plain object from a LinkProposalStatusDetails message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.LinkProposalStatusDetails + * @static + * @param {google.analytics.admin.v1alpha.LinkProposalStatusDetails} message LinkProposalStatusDetails + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LinkProposalStatusDetails.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.linkProposalInitiatingProduct = options.enums === String ? "LINK_PROPOSAL_INITIATING_PRODUCT_UNSPECIFIED" : 0; + object.requestorEmail = ""; + object.linkProposalState = options.enums === String ? "LINK_PROPOSAL_STATE_UNSPECIFIED" : 0; + } + if (message.linkProposalInitiatingProduct != null && message.hasOwnProperty("linkProposalInitiatingProduct")) + object.linkProposalInitiatingProduct = options.enums === String ? $root.google.analytics.admin.v1alpha.LinkProposalInitiatingProduct[message.linkProposalInitiatingProduct] === undefined ? message.linkProposalInitiatingProduct : $root.google.analytics.admin.v1alpha.LinkProposalInitiatingProduct[message.linkProposalInitiatingProduct] : message.linkProposalInitiatingProduct; + if (message.requestorEmail != null && message.hasOwnProperty("requestorEmail")) + object.requestorEmail = message.requestorEmail; + if (message.linkProposalState != null && message.hasOwnProperty("linkProposalState")) + object.linkProposalState = options.enums === String ? $root.google.analytics.admin.v1alpha.LinkProposalState[message.linkProposalState] === undefined ? message.linkProposalState : $root.google.analytics.admin.v1alpha.LinkProposalState[message.linkProposalState] : message.linkProposalState; + return object; + }; + + /** + * Converts this LinkProposalStatusDetails to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.LinkProposalStatusDetails + * @instance + * @returns {Object.} JSON object + */ + LinkProposalStatusDetails.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LinkProposalStatusDetails + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.LinkProposalStatusDetails + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LinkProposalStatusDetails.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.LinkProposalStatusDetails"; + }; + + return LinkProposalStatusDetails; + })(); + + v1alpha.ConversionEvent = (function() { + + /** + * Properties of a ConversionEvent. + * @memberof google.analytics.admin.v1alpha + * @interface IConversionEvent + * @property {string|null} [name] ConversionEvent name + * @property {string|null} [eventName] ConversionEvent eventName + * @property {google.protobuf.ITimestamp|null} [createTime] ConversionEvent createTime + * @property {boolean|null} [deletable] ConversionEvent deletable + * @property {boolean|null} [custom] ConversionEvent custom + */ + + /** + * Constructs a new ConversionEvent. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents a ConversionEvent. + * @implements IConversionEvent + * @constructor + * @param {google.analytics.admin.v1alpha.IConversionEvent=} [properties] Properties to set + */ + function ConversionEvent(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ConversionEvent name. + * @member {string} name + * @memberof google.analytics.admin.v1alpha.ConversionEvent + * @instance + */ + ConversionEvent.prototype.name = ""; + + /** + * ConversionEvent eventName. + * @member {string} eventName + * @memberof google.analytics.admin.v1alpha.ConversionEvent + * @instance + */ + ConversionEvent.prototype.eventName = ""; + + /** + * ConversionEvent createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.analytics.admin.v1alpha.ConversionEvent + * @instance + */ + ConversionEvent.prototype.createTime = null; + + /** + * ConversionEvent deletable. + * @member {boolean} deletable + * @memberof google.analytics.admin.v1alpha.ConversionEvent + * @instance + */ + ConversionEvent.prototype.deletable = false; + + /** + * ConversionEvent custom. + * @member {boolean} custom + * @memberof google.analytics.admin.v1alpha.ConversionEvent + * @instance + */ + ConversionEvent.prototype.custom = false; + + /** + * Creates a new ConversionEvent instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.ConversionEvent + * @static + * @param {google.analytics.admin.v1alpha.IConversionEvent=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.ConversionEvent} ConversionEvent instance + */ + ConversionEvent.create = function create(properties) { + return new ConversionEvent(properties); + }; + + /** + * Encodes the specified ConversionEvent message. Does not implicitly {@link google.analytics.admin.v1alpha.ConversionEvent.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.ConversionEvent + * @static + * @param {google.analytics.admin.v1alpha.IConversionEvent} message ConversionEvent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConversionEvent.encode = function encode(message, writer) { + 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.eventName != null && Object.hasOwnProperty.call(message, "eventName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.eventName); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.deletable != null && Object.hasOwnProperty.call(message, "deletable")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.deletable); + if (message.custom != null && Object.hasOwnProperty.call(message, "custom")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.custom); + return writer; + }; + + /** + * Encodes the specified ConversionEvent message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.ConversionEvent.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.ConversionEvent + * @static + * @param {google.analytics.admin.v1alpha.IConversionEvent} message ConversionEvent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConversionEvent.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ConversionEvent message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.ConversionEvent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.ConversionEvent} ConversionEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConversionEvent.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.ConversionEvent(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.eventName = reader.string(); + break; + } + case 3: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 4: { + message.deletable = reader.bool(); + break; + } + case 5: { + message.custom = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ConversionEvent message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.ConversionEvent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.ConversionEvent} ConversionEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConversionEvent.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ConversionEvent message. + * @function verify + * @memberof google.analytics.admin.v1alpha.ConversionEvent + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ConversionEvent.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.eventName != null && message.hasOwnProperty("eventName")) + if (!$util.isString(message.eventName)) + return "eventName: string expected"; + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.deletable != null && message.hasOwnProperty("deletable")) + if (typeof message.deletable !== "boolean") + return "deletable: boolean expected"; + if (message.custom != null && message.hasOwnProperty("custom")) + if (typeof message.custom !== "boolean") + return "custom: boolean expected"; + return null; + }; + + /** + * Creates a ConversionEvent message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.ConversionEvent + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.ConversionEvent} ConversionEvent + */ + ConversionEvent.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.ConversionEvent) + return object; + var message = new $root.google.analytics.admin.v1alpha.ConversionEvent(); + if (object.name != null) + message.name = String(object.name); + if (object.eventName != null) + message.eventName = String(object.eventName); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.analytics.admin.v1alpha.ConversionEvent.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.deletable != null) + message.deletable = Boolean(object.deletable); + if (object.custom != null) + message.custom = Boolean(object.custom); + return message; + }; + + /** + * Creates a plain object from a ConversionEvent message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.ConversionEvent + * @static + * @param {google.analytics.admin.v1alpha.ConversionEvent} message ConversionEvent + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ConversionEvent.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.eventName = ""; + object.createTime = null; + object.deletable = false; + object.custom = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.eventName != null && message.hasOwnProperty("eventName")) + object.eventName = message.eventName; + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.deletable != null && message.hasOwnProperty("deletable")) + object.deletable = message.deletable; + if (message.custom != null && message.hasOwnProperty("custom")) + object.custom = message.custom; + return object; + }; + + /** + * Converts this ConversionEvent to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.ConversionEvent + * @instance + * @returns {Object.} JSON object + */ + ConversionEvent.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ConversionEvent + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.ConversionEvent + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ConversionEvent.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.ConversionEvent"; + }; + + return ConversionEvent; + })(); + + v1alpha.GoogleSignalsSettings = (function() { + + /** + * Properties of a GoogleSignalsSettings. + * @memberof google.analytics.admin.v1alpha + * @interface IGoogleSignalsSettings + * @property {string|null} [name] GoogleSignalsSettings name + * @property {google.analytics.admin.v1alpha.GoogleSignalsState|null} [state] GoogleSignalsSettings state + * @property {google.analytics.admin.v1alpha.GoogleSignalsConsent|null} [consent] GoogleSignalsSettings consent + */ + + /** + * Constructs a new GoogleSignalsSettings. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents a GoogleSignalsSettings. + * @implements IGoogleSignalsSettings + * @constructor + * @param {google.analytics.admin.v1alpha.IGoogleSignalsSettings=} [properties] Properties to set + */ + function GoogleSignalsSettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GoogleSignalsSettings name. + * @member {string} name + * @memberof google.analytics.admin.v1alpha.GoogleSignalsSettings + * @instance + */ + GoogleSignalsSettings.prototype.name = ""; + + /** + * GoogleSignalsSettings state. + * @member {google.analytics.admin.v1alpha.GoogleSignalsState} state + * @memberof google.analytics.admin.v1alpha.GoogleSignalsSettings + * @instance + */ + GoogleSignalsSettings.prototype.state = 0; + + /** + * GoogleSignalsSettings consent. + * @member {google.analytics.admin.v1alpha.GoogleSignalsConsent} consent + * @memberof google.analytics.admin.v1alpha.GoogleSignalsSettings + * @instance + */ + GoogleSignalsSettings.prototype.consent = 0; + + /** + * Creates a new GoogleSignalsSettings instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.GoogleSignalsSettings + * @static + * @param {google.analytics.admin.v1alpha.IGoogleSignalsSettings=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.GoogleSignalsSettings} GoogleSignalsSettings instance + */ + GoogleSignalsSettings.create = function create(properties) { + return new GoogleSignalsSettings(properties); + }; + + /** + * Encodes the specified GoogleSignalsSettings message. Does not implicitly {@link google.analytics.admin.v1alpha.GoogleSignalsSettings.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.GoogleSignalsSettings + * @static + * @param {google.analytics.admin.v1alpha.IGoogleSignalsSettings} message GoogleSignalsSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GoogleSignalsSettings.encode = function encode(message, writer) { + 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.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.state); + if (message.consent != null && Object.hasOwnProperty.call(message, "consent")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.consent); + return writer; + }; + + /** + * Encodes the specified GoogleSignalsSettings message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.GoogleSignalsSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.GoogleSignalsSettings + * @static + * @param {google.analytics.admin.v1alpha.IGoogleSignalsSettings} message GoogleSignalsSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GoogleSignalsSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GoogleSignalsSettings message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.GoogleSignalsSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.GoogleSignalsSettings} GoogleSignalsSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GoogleSignalsSettings.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.GoogleSignalsSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 3: { + message.state = reader.int32(); + break; + } + case 4: { + message.consent = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GoogleSignalsSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.GoogleSignalsSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.GoogleSignalsSettings} GoogleSignalsSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GoogleSignalsSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GoogleSignalsSettings message. + * @function verify + * @memberof google.analytics.admin.v1alpha.GoogleSignalsSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GoogleSignalsSettings.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.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.consent != null && message.hasOwnProperty("consent")) + switch (message.consent) { + default: + return "consent: enum value expected"; + case 0: + case 2: + case 1: + break; + } + return null; + }; + + /** + * Creates a GoogleSignalsSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.GoogleSignalsSettings + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.GoogleSignalsSettings} GoogleSignalsSettings + */ + GoogleSignalsSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.GoogleSignalsSettings) + return object; + var message = new $root.google.analytics.admin.v1alpha.GoogleSignalsSettings(); + if (object.name != null) + message.name = String(object.name); + switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; + case "GOOGLE_SIGNALS_STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "GOOGLE_SIGNALS_ENABLED": + case 1: + message.state = 1; + break; + case "GOOGLE_SIGNALS_DISABLED": + case 2: + message.state = 2; + break; + } + switch (object.consent) { + default: + if (typeof object.consent === "number") { + message.consent = object.consent; + break; + } + break; + case "GOOGLE_SIGNALS_CONSENT_UNSPECIFIED": + case 0: + message.consent = 0; + break; + case "GOOGLE_SIGNALS_CONSENT_CONSENTED": + case 2: + message.consent = 2; + break; + case "GOOGLE_SIGNALS_CONSENT_NOT_CONSENTED": + case 1: + message.consent = 1; + break; + } + return message; + }; + + /** + * Creates a plain object from a GoogleSignalsSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.GoogleSignalsSettings + * @static + * @param {google.analytics.admin.v1alpha.GoogleSignalsSettings} message GoogleSignalsSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GoogleSignalsSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.state = options.enums === String ? "GOOGLE_SIGNALS_STATE_UNSPECIFIED" : 0; + object.consent = options.enums === String ? "GOOGLE_SIGNALS_CONSENT_UNSPECIFIED" : 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.analytics.admin.v1alpha.GoogleSignalsState[message.state] === undefined ? message.state : $root.google.analytics.admin.v1alpha.GoogleSignalsState[message.state] : message.state; + if (message.consent != null && message.hasOwnProperty("consent")) + object.consent = options.enums === String ? $root.google.analytics.admin.v1alpha.GoogleSignalsConsent[message.consent] === undefined ? message.consent : $root.google.analytics.admin.v1alpha.GoogleSignalsConsent[message.consent] : message.consent; + return object; + }; + + /** + * Converts this GoogleSignalsSettings to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.GoogleSignalsSettings + * @instance + * @returns {Object.} JSON object + */ + GoogleSignalsSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GoogleSignalsSettings + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.GoogleSignalsSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GoogleSignalsSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.GoogleSignalsSettings"; + }; + + return GoogleSignalsSettings; + })(); + + v1alpha.CustomDimension = (function() { + + /** + * Properties of a CustomDimension. + * @memberof google.analytics.admin.v1alpha + * @interface ICustomDimension + * @property {string|null} [name] CustomDimension name + * @property {string|null} [parameterName] CustomDimension parameterName + * @property {string|null} [displayName] CustomDimension displayName + * @property {string|null} [description] CustomDimension description + * @property {google.analytics.admin.v1alpha.CustomDimension.DimensionScope|null} [scope] CustomDimension scope + * @property {boolean|null} [disallowAdsPersonalization] CustomDimension disallowAdsPersonalization + */ + + /** + * Constructs a new CustomDimension. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents a CustomDimension. + * @implements ICustomDimension + * @constructor + * @param {google.analytics.admin.v1alpha.ICustomDimension=} [properties] Properties to set + */ + function CustomDimension(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CustomDimension name. + * @member {string} name + * @memberof google.analytics.admin.v1alpha.CustomDimension + * @instance + */ + CustomDimension.prototype.name = ""; + + /** + * CustomDimension parameterName. + * @member {string} parameterName + * @memberof google.analytics.admin.v1alpha.CustomDimension + * @instance + */ + CustomDimension.prototype.parameterName = ""; + + /** + * CustomDimension displayName. + * @member {string} displayName + * @memberof google.analytics.admin.v1alpha.CustomDimension + * @instance + */ + CustomDimension.prototype.displayName = ""; + + /** + * CustomDimension description. + * @member {string} description + * @memberof google.analytics.admin.v1alpha.CustomDimension + * @instance + */ + CustomDimension.prototype.description = ""; + + /** + * CustomDimension scope. + * @member {google.analytics.admin.v1alpha.CustomDimension.DimensionScope} scope + * @memberof google.analytics.admin.v1alpha.CustomDimension + * @instance + */ + CustomDimension.prototype.scope = 0; + + /** + * CustomDimension disallowAdsPersonalization. + * @member {boolean} disallowAdsPersonalization + * @memberof google.analytics.admin.v1alpha.CustomDimension + * @instance + */ + CustomDimension.prototype.disallowAdsPersonalization = false; + + /** + * Creates a new CustomDimension instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.CustomDimension + * @static + * @param {google.analytics.admin.v1alpha.ICustomDimension=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.CustomDimension} CustomDimension instance + */ + CustomDimension.create = function create(properties) { + return new CustomDimension(properties); + }; + + /** + * Encodes the specified CustomDimension message. Does not implicitly {@link google.analytics.admin.v1alpha.CustomDimension.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.CustomDimension + * @static + * @param {google.analytics.admin.v1alpha.ICustomDimension} message CustomDimension message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CustomDimension.encode = function encode(message, writer) { + 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.parameterName != null && Object.hasOwnProperty.call(message, "parameterName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.parameterName); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.displayName); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.description); + if (message.scope != null && Object.hasOwnProperty.call(message, "scope")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.scope); + if (message.disallowAdsPersonalization != null && Object.hasOwnProperty.call(message, "disallowAdsPersonalization")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.disallowAdsPersonalization); + return writer; + }; + + /** + * Encodes the specified CustomDimension message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.CustomDimension.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.CustomDimension + * @static + * @param {google.analytics.admin.v1alpha.ICustomDimension} message CustomDimension message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CustomDimension.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CustomDimension message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.CustomDimension + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.CustomDimension} CustomDimension + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CustomDimension.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.CustomDimension(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.parameterName = reader.string(); + break; + } + case 3: { + message.displayName = reader.string(); + break; + } + case 4: { + message.description = reader.string(); + break; + } + case 5: { + message.scope = reader.int32(); + break; + } + case 6: { + message.disallowAdsPersonalization = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CustomDimension message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.CustomDimension + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.CustomDimension} CustomDimension + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CustomDimension.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CustomDimension message. + * @function verify + * @memberof google.analytics.admin.v1alpha.CustomDimension + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CustomDimension.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.parameterName != null && message.hasOwnProperty("parameterName")) + if (!$util.isString(message.parameterName)) + return "parameterName: string expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.scope != null && message.hasOwnProperty("scope")) + switch (message.scope) { + default: + return "scope: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.disallowAdsPersonalization != null && message.hasOwnProperty("disallowAdsPersonalization")) + if (typeof message.disallowAdsPersonalization !== "boolean") + return "disallowAdsPersonalization: boolean expected"; + return null; + }; + + /** + * Creates a CustomDimension message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.CustomDimension + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.CustomDimension} CustomDimension + */ + CustomDimension.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.CustomDimension) + return object; + var message = new $root.google.analytics.admin.v1alpha.CustomDimension(); + if (object.name != null) + message.name = String(object.name); + if (object.parameterName != null) + message.parameterName = String(object.parameterName); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.description != null) + message.description = String(object.description); + switch (object.scope) { + default: + if (typeof object.scope === "number") { + message.scope = object.scope; + break; + } + break; + case "DIMENSION_SCOPE_UNSPECIFIED": + case 0: + message.scope = 0; + break; + case "EVENT": + case 1: + message.scope = 1; + break; + case "USER": + case 2: + message.scope = 2; + break; + } + if (object.disallowAdsPersonalization != null) + message.disallowAdsPersonalization = Boolean(object.disallowAdsPersonalization); + return message; + }; + + /** + * Creates a plain object from a CustomDimension message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.CustomDimension + * @static + * @param {google.analytics.admin.v1alpha.CustomDimension} message CustomDimension + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CustomDimension.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.parameterName = ""; + object.displayName = ""; + object.description = ""; + object.scope = options.enums === String ? "DIMENSION_SCOPE_UNSPECIFIED" : 0; + object.disallowAdsPersonalization = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.parameterName != null && message.hasOwnProperty("parameterName")) + object.parameterName = message.parameterName; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.scope != null && message.hasOwnProperty("scope")) + object.scope = options.enums === String ? $root.google.analytics.admin.v1alpha.CustomDimension.DimensionScope[message.scope] === undefined ? message.scope : $root.google.analytics.admin.v1alpha.CustomDimension.DimensionScope[message.scope] : message.scope; + if (message.disallowAdsPersonalization != null && message.hasOwnProperty("disallowAdsPersonalization")) + object.disallowAdsPersonalization = message.disallowAdsPersonalization; + return object; + }; + + /** + * Converts this CustomDimension to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.CustomDimension + * @instance + * @returns {Object.} JSON object + */ + CustomDimension.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CustomDimension + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.CustomDimension + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CustomDimension.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.CustomDimension"; + }; + + /** + * DimensionScope enum. + * @name google.analytics.admin.v1alpha.CustomDimension.DimensionScope + * @enum {number} + * @property {number} DIMENSION_SCOPE_UNSPECIFIED=0 DIMENSION_SCOPE_UNSPECIFIED value + * @property {number} EVENT=1 EVENT value + * @property {number} USER=2 USER value + */ + CustomDimension.DimensionScope = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DIMENSION_SCOPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "EVENT"] = 1; + values[valuesById[2] = "USER"] = 2; + return values; + })(); + + return CustomDimension; + })(); + + v1alpha.CustomMetric = (function() { + + /** + * Properties of a CustomMetric. + * @memberof google.analytics.admin.v1alpha + * @interface ICustomMetric + * @property {string|null} [name] CustomMetric name + * @property {string|null} [parameterName] CustomMetric parameterName + * @property {string|null} [displayName] CustomMetric displayName + * @property {string|null} [description] CustomMetric description + * @property {google.analytics.admin.v1alpha.CustomMetric.MeasurementUnit|null} [measurementUnit] CustomMetric measurementUnit + * @property {google.analytics.admin.v1alpha.CustomMetric.MetricScope|null} [scope] CustomMetric scope + * @property {Array.|null} [restrictedMetricType] CustomMetric restrictedMetricType + */ + + /** + * Constructs a new CustomMetric. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents a CustomMetric. + * @implements ICustomMetric + * @constructor + * @param {google.analytics.admin.v1alpha.ICustomMetric=} [properties] Properties to set + */ + function CustomMetric(properties) { + this.restrictedMetricType = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CustomMetric name. + * @member {string} name + * @memberof google.analytics.admin.v1alpha.CustomMetric + * @instance + */ + CustomMetric.prototype.name = ""; + + /** + * CustomMetric parameterName. + * @member {string} parameterName + * @memberof google.analytics.admin.v1alpha.CustomMetric + * @instance + */ + CustomMetric.prototype.parameterName = ""; + + /** + * CustomMetric displayName. + * @member {string} displayName + * @memberof google.analytics.admin.v1alpha.CustomMetric + * @instance + */ + CustomMetric.prototype.displayName = ""; + + /** + * CustomMetric description. + * @member {string} description + * @memberof google.analytics.admin.v1alpha.CustomMetric + * @instance + */ + CustomMetric.prototype.description = ""; + + /** + * CustomMetric measurementUnit. + * @member {google.analytics.admin.v1alpha.CustomMetric.MeasurementUnit} measurementUnit + * @memberof google.analytics.admin.v1alpha.CustomMetric + * @instance + */ + CustomMetric.prototype.measurementUnit = 0; + + /** + * CustomMetric scope. + * @member {google.analytics.admin.v1alpha.CustomMetric.MetricScope} scope + * @memberof google.analytics.admin.v1alpha.CustomMetric + * @instance + */ + CustomMetric.prototype.scope = 0; + + /** + * CustomMetric restrictedMetricType. + * @member {Array.} restrictedMetricType + * @memberof google.analytics.admin.v1alpha.CustomMetric + * @instance + */ + CustomMetric.prototype.restrictedMetricType = $util.emptyArray; + + /** + * Creates a new CustomMetric instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.CustomMetric + * @static + * @param {google.analytics.admin.v1alpha.ICustomMetric=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.CustomMetric} CustomMetric instance + */ + CustomMetric.create = function create(properties) { + return new CustomMetric(properties); + }; + + /** + * Encodes the specified CustomMetric message. Does not implicitly {@link google.analytics.admin.v1alpha.CustomMetric.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.CustomMetric + * @static + * @param {google.analytics.admin.v1alpha.ICustomMetric} message CustomMetric message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CustomMetric.encode = function encode(message, writer) { + 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.parameterName != null && Object.hasOwnProperty.call(message, "parameterName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.parameterName); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.displayName); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.description); + if (message.measurementUnit != null && Object.hasOwnProperty.call(message, "measurementUnit")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.measurementUnit); + if (message.scope != null && Object.hasOwnProperty.call(message, "scope")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.scope); + if (message.restrictedMetricType != null && message.restrictedMetricType.length) { + writer.uint32(/* id 8, wireType 2 =*/66).fork(); + for (var i = 0; i < message.restrictedMetricType.length; ++i) + writer.int32(message.restrictedMetricType[i]); + writer.ldelim(); + } + return writer; + }; + + /** + * Encodes the specified CustomMetric message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.CustomMetric.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.CustomMetric + * @static + * @param {google.analytics.admin.v1alpha.ICustomMetric} message CustomMetric message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CustomMetric.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CustomMetric message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.CustomMetric + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.CustomMetric} CustomMetric + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CustomMetric.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.CustomMetric(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.parameterName = reader.string(); + break; + } + case 3: { + message.displayName = reader.string(); + break; + } + case 4: { + message.description = reader.string(); + break; + } + case 5: { + message.measurementUnit = reader.int32(); + break; + } + case 6: { + message.scope = reader.int32(); + break; + } + case 8: { + if (!(message.restrictedMetricType && message.restrictedMetricType.length)) + message.restrictedMetricType = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.restrictedMetricType.push(reader.int32()); + } else + message.restrictedMetricType.push(reader.int32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CustomMetric message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.CustomMetric + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.CustomMetric} CustomMetric + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CustomMetric.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CustomMetric message. + * @function verify + * @memberof google.analytics.admin.v1alpha.CustomMetric + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CustomMetric.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.parameterName != null && message.hasOwnProperty("parameterName")) + if (!$util.isString(message.parameterName)) + return "parameterName: string expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.measurementUnit != null && message.hasOwnProperty("measurementUnit")) + switch (message.measurementUnit) { + default: + return "measurementUnit: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + break; + } + if (message.scope != null && message.hasOwnProperty("scope")) + switch (message.scope) { + default: + return "scope: enum value expected"; + case 0: + case 1: + break; + } + if (message.restrictedMetricType != null && message.hasOwnProperty("restrictedMetricType")) { + if (!Array.isArray(message.restrictedMetricType)) + return "restrictedMetricType: array expected"; + for (var i = 0; i < message.restrictedMetricType.length; ++i) + switch (message.restrictedMetricType[i]) { + default: + return "restrictedMetricType: enum value[] expected"; + case 0: + case 1: + case 2: + break; + } + } + return null; + }; + + /** + * Creates a CustomMetric message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.CustomMetric + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.CustomMetric} CustomMetric + */ + CustomMetric.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.CustomMetric) + return object; + var message = new $root.google.analytics.admin.v1alpha.CustomMetric(); + if (object.name != null) + message.name = String(object.name); + if (object.parameterName != null) + message.parameterName = String(object.parameterName); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.description != null) + message.description = String(object.description); + switch (object.measurementUnit) { + default: + if (typeof object.measurementUnit === "number") { + message.measurementUnit = object.measurementUnit; + break; + } + break; + case "MEASUREMENT_UNIT_UNSPECIFIED": + case 0: + message.measurementUnit = 0; + break; + case "STANDARD": + case 1: + message.measurementUnit = 1; + break; + case "CURRENCY": + case 2: + message.measurementUnit = 2; + break; + case "FEET": + case 3: + message.measurementUnit = 3; + break; + case "METERS": + case 4: + message.measurementUnit = 4; + break; + case "KILOMETERS": + case 5: + message.measurementUnit = 5; + break; + case "MILES": + case 6: + message.measurementUnit = 6; + break; + case "MILLISECONDS": + case 7: + message.measurementUnit = 7; + break; + case "SECONDS": + case 8: + message.measurementUnit = 8; + break; + case "MINUTES": + case 9: + message.measurementUnit = 9; + break; + case "HOURS": + case 10: + message.measurementUnit = 10; + break; + } + switch (object.scope) { + default: + if (typeof object.scope === "number") { + message.scope = object.scope; + break; + } + break; + case "METRIC_SCOPE_UNSPECIFIED": + case 0: + message.scope = 0; + break; + case "EVENT": + case 1: + message.scope = 1; + break; + } + if (object.restrictedMetricType) { + if (!Array.isArray(object.restrictedMetricType)) + throw TypeError(".google.analytics.admin.v1alpha.CustomMetric.restrictedMetricType: array expected"); + message.restrictedMetricType = []; + for (var i = 0; i < object.restrictedMetricType.length; ++i) + switch (object.restrictedMetricType[i]) { + default: + if (typeof object.restrictedMetricType[i] === "number") { + message.restrictedMetricType[i] = object.restrictedMetricType[i]; + break; + } + case "RESTRICTED_METRIC_TYPE_UNSPECIFIED": + case 0: + message.restrictedMetricType[i] = 0; + break; + case "COST_DATA": + case 1: + message.restrictedMetricType[i] = 1; + break; + case "REVENUE_DATA": + case 2: + message.restrictedMetricType[i] = 2; + break; + } + } + return message; + }; + + /** + * Creates a plain object from a CustomMetric message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.CustomMetric + * @static + * @param {google.analytics.admin.v1alpha.CustomMetric} message CustomMetric + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CustomMetric.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.restrictedMetricType = []; + if (options.defaults) { + object.name = ""; + object.parameterName = ""; + object.displayName = ""; + object.description = ""; + object.measurementUnit = options.enums === String ? "MEASUREMENT_UNIT_UNSPECIFIED" : 0; + object.scope = options.enums === String ? "METRIC_SCOPE_UNSPECIFIED" : 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.parameterName != null && message.hasOwnProperty("parameterName")) + object.parameterName = message.parameterName; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.measurementUnit != null && message.hasOwnProperty("measurementUnit")) + object.measurementUnit = options.enums === String ? $root.google.analytics.admin.v1alpha.CustomMetric.MeasurementUnit[message.measurementUnit] === undefined ? message.measurementUnit : $root.google.analytics.admin.v1alpha.CustomMetric.MeasurementUnit[message.measurementUnit] : message.measurementUnit; + if (message.scope != null && message.hasOwnProperty("scope")) + object.scope = options.enums === String ? $root.google.analytics.admin.v1alpha.CustomMetric.MetricScope[message.scope] === undefined ? message.scope : $root.google.analytics.admin.v1alpha.CustomMetric.MetricScope[message.scope] : message.scope; + if (message.restrictedMetricType && message.restrictedMetricType.length) { + object.restrictedMetricType = []; + for (var j = 0; j < message.restrictedMetricType.length; ++j) + object.restrictedMetricType[j] = options.enums === String ? $root.google.analytics.admin.v1alpha.CustomMetric.RestrictedMetricType[message.restrictedMetricType[j]] === undefined ? message.restrictedMetricType[j] : $root.google.analytics.admin.v1alpha.CustomMetric.RestrictedMetricType[message.restrictedMetricType[j]] : message.restrictedMetricType[j]; + } + return object; + }; + + /** + * Converts this CustomMetric to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.CustomMetric + * @instance + * @returns {Object.} JSON object + */ + CustomMetric.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CustomMetric + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.CustomMetric + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CustomMetric.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.CustomMetric"; + }; + + /** + * MeasurementUnit enum. + * @name google.analytics.admin.v1alpha.CustomMetric.MeasurementUnit + * @enum {number} + * @property {number} MEASUREMENT_UNIT_UNSPECIFIED=0 MEASUREMENT_UNIT_UNSPECIFIED value + * @property {number} STANDARD=1 STANDARD value + * @property {number} CURRENCY=2 CURRENCY value + * @property {number} FEET=3 FEET value + * @property {number} METERS=4 METERS value + * @property {number} KILOMETERS=5 KILOMETERS value + * @property {number} MILES=6 MILES value + * @property {number} MILLISECONDS=7 MILLISECONDS value + * @property {number} SECONDS=8 SECONDS value + * @property {number} MINUTES=9 MINUTES value + * @property {number} HOURS=10 HOURS value + */ + CustomMetric.MeasurementUnit = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "MEASUREMENT_UNIT_UNSPECIFIED"] = 0; + values[valuesById[1] = "STANDARD"] = 1; + values[valuesById[2] = "CURRENCY"] = 2; + values[valuesById[3] = "FEET"] = 3; + values[valuesById[4] = "METERS"] = 4; + values[valuesById[5] = "KILOMETERS"] = 5; + values[valuesById[6] = "MILES"] = 6; + values[valuesById[7] = "MILLISECONDS"] = 7; + values[valuesById[8] = "SECONDS"] = 8; + values[valuesById[9] = "MINUTES"] = 9; + values[valuesById[10] = "HOURS"] = 10; + return values; + })(); + + /** + * MetricScope enum. + * @name google.analytics.admin.v1alpha.CustomMetric.MetricScope + * @enum {number} + * @property {number} METRIC_SCOPE_UNSPECIFIED=0 METRIC_SCOPE_UNSPECIFIED value + * @property {number} EVENT=1 EVENT value + */ + CustomMetric.MetricScope = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "METRIC_SCOPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "EVENT"] = 1; + return values; + })(); + + /** + * RestrictedMetricType enum. + * @name google.analytics.admin.v1alpha.CustomMetric.RestrictedMetricType + * @enum {number} + * @property {number} RESTRICTED_METRIC_TYPE_UNSPECIFIED=0 RESTRICTED_METRIC_TYPE_UNSPECIFIED value + * @property {number} COST_DATA=1 COST_DATA value + * @property {number} REVENUE_DATA=2 REVENUE_DATA value + */ + CustomMetric.RestrictedMetricType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "RESTRICTED_METRIC_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "COST_DATA"] = 1; + values[valuesById[2] = "REVENUE_DATA"] = 2; + return values; + })(); + + return CustomMetric; + })(); + + v1alpha.DataRetentionSettings = (function() { + + /** + * Properties of a DataRetentionSettings. + * @memberof google.analytics.admin.v1alpha + * @interface IDataRetentionSettings + * @property {string|null} [name] DataRetentionSettings name + * @property {google.analytics.admin.v1alpha.DataRetentionSettings.RetentionDuration|null} [eventDataRetention] DataRetentionSettings eventDataRetention + * @property {boolean|null} [resetUserDataOnNewActivity] DataRetentionSettings resetUserDataOnNewActivity + */ + + /** + * Constructs a new DataRetentionSettings. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents a DataRetentionSettings. + * @implements IDataRetentionSettings + * @constructor + * @param {google.analytics.admin.v1alpha.IDataRetentionSettings=} [properties] Properties to set + */ + function DataRetentionSettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DataRetentionSettings name. + * @member {string} name + * @memberof google.analytics.admin.v1alpha.DataRetentionSettings + * @instance + */ + DataRetentionSettings.prototype.name = ""; + + /** + * DataRetentionSettings eventDataRetention. + * @member {google.analytics.admin.v1alpha.DataRetentionSettings.RetentionDuration} eventDataRetention + * @memberof google.analytics.admin.v1alpha.DataRetentionSettings + * @instance + */ + DataRetentionSettings.prototype.eventDataRetention = 0; + + /** + * DataRetentionSettings resetUserDataOnNewActivity. + * @member {boolean} resetUserDataOnNewActivity + * @memberof google.analytics.admin.v1alpha.DataRetentionSettings + * @instance + */ + DataRetentionSettings.prototype.resetUserDataOnNewActivity = false; + + /** + * Creates a new DataRetentionSettings instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.DataRetentionSettings + * @static + * @param {google.analytics.admin.v1alpha.IDataRetentionSettings=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.DataRetentionSettings} DataRetentionSettings instance + */ + DataRetentionSettings.create = function create(properties) { + return new DataRetentionSettings(properties); + }; + + /** + * Encodes the specified DataRetentionSettings message. Does not implicitly {@link google.analytics.admin.v1alpha.DataRetentionSettings.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.DataRetentionSettings + * @static + * @param {google.analytics.admin.v1alpha.IDataRetentionSettings} message DataRetentionSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataRetentionSettings.encode = function encode(message, writer) { + 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.eventDataRetention != null && Object.hasOwnProperty.call(message, "eventDataRetention")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.eventDataRetention); + if (message.resetUserDataOnNewActivity != null && Object.hasOwnProperty.call(message, "resetUserDataOnNewActivity")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.resetUserDataOnNewActivity); + return writer; + }; + + /** + * Encodes the specified DataRetentionSettings message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.DataRetentionSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.DataRetentionSettings + * @static + * @param {google.analytics.admin.v1alpha.IDataRetentionSettings} message DataRetentionSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataRetentionSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DataRetentionSettings message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.DataRetentionSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.DataRetentionSettings} DataRetentionSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataRetentionSettings.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.DataRetentionSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.eventDataRetention = reader.int32(); + break; + } + case 3: { + message.resetUserDataOnNewActivity = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DataRetentionSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.DataRetentionSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.DataRetentionSettings} DataRetentionSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataRetentionSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DataRetentionSettings message. + * @function verify + * @memberof google.analytics.admin.v1alpha.DataRetentionSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DataRetentionSettings.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.eventDataRetention != null && message.hasOwnProperty("eventDataRetention")) + switch (message.eventDataRetention) { + default: + return "eventDataRetention: enum value expected"; + case 0: + case 1: + case 3: + case 4: + case 5: + case 6: + break; + } + if (message.resetUserDataOnNewActivity != null && message.hasOwnProperty("resetUserDataOnNewActivity")) + if (typeof message.resetUserDataOnNewActivity !== "boolean") + return "resetUserDataOnNewActivity: boolean expected"; + return null; + }; + + /** + * Creates a DataRetentionSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.DataRetentionSettings + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.DataRetentionSettings} DataRetentionSettings + */ + DataRetentionSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.DataRetentionSettings) + return object; + var message = new $root.google.analytics.admin.v1alpha.DataRetentionSettings(); + if (object.name != null) + message.name = String(object.name); + switch (object.eventDataRetention) { + default: + if (typeof object.eventDataRetention === "number") { + message.eventDataRetention = object.eventDataRetention; + break; + } + break; + case "RETENTION_DURATION_UNSPECIFIED": + case 0: + message.eventDataRetention = 0; + break; + case "TWO_MONTHS": + case 1: + message.eventDataRetention = 1; + break; + case "FOURTEEN_MONTHS": + case 3: + message.eventDataRetention = 3; + break; + case "TWENTY_SIX_MONTHS": + case 4: + message.eventDataRetention = 4; + break; + case "THIRTY_EIGHT_MONTHS": + case 5: + message.eventDataRetention = 5; + break; + case "FIFTY_MONTHS": + case 6: + message.eventDataRetention = 6; + break; + } + if (object.resetUserDataOnNewActivity != null) + message.resetUserDataOnNewActivity = Boolean(object.resetUserDataOnNewActivity); + return message; + }; + + /** + * Creates a plain object from a DataRetentionSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.DataRetentionSettings + * @static + * @param {google.analytics.admin.v1alpha.DataRetentionSettings} message DataRetentionSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DataRetentionSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.eventDataRetention = options.enums === String ? "RETENTION_DURATION_UNSPECIFIED" : 0; + object.resetUserDataOnNewActivity = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.eventDataRetention != null && message.hasOwnProperty("eventDataRetention")) + object.eventDataRetention = options.enums === String ? $root.google.analytics.admin.v1alpha.DataRetentionSettings.RetentionDuration[message.eventDataRetention] === undefined ? message.eventDataRetention : $root.google.analytics.admin.v1alpha.DataRetentionSettings.RetentionDuration[message.eventDataRetention] : message.eventDataRetention; + if (message.resetUserDataOnNewActivity != null && message.hasOwnProperty("resetUserDataOnNewActivity")) + object.resetUserDataOnNewActivity = message.resetUserDataOnNewActivity; + return object; + }; + + /** + * Converts this DataRetentionSettings to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.DataRetentionSettings + * @instance + * @returns {Object.} JSON object + */ + DataRetentionSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DataRetentionSettings + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.DataRetentionSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DataRetentionSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.DataRetentionSettings"; + }; + + /** + * RetentionDuration enum. + * @name google.analytics.admin.v1alpha.DataRetentionSettings.RetentionDuration + * @enum {number} + * @property {number} RETENTION_DURATION_UNSPECIFIED=0 RETENTION_DURATION_UNSPECIFIED value + * @property {number} TWO_MONTHS=1 TWO_MONTHS value + * @property {number} FOURTEEN_MONTHS=3 FOURTEEN_MONTHS value + * @property {number} TWENTY_SIX_MONTHS=4 TWENTY_SIX_MONTHS value + * @property {number} THIRTY_EIGHT_MONTHS=5 THIRTY_EIGHT_MONTHS value + * @property {number} FIFTY_MONTHS=6 FIFTY_MONTHS value + */ + DataRetentionSettings.RetentionDuration = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "RETENTION_DURATION_UNSPECIFIED"] = 0; + values[valuesById[1] = "TWO_MONTHS"] = 1; + values[valuesById[3] = "FOURTEEN_MONTHS"] = 3; + values[valuesById[4] = "TWENTY_SIX_MONTHS"] = 4; + values[valuesById[5] = "THIRTY_EIGHT_MONTHS"] = 5; + values[valuesById[6] = "FIFTY_MONTHS"] = 6; + return values; + })(); + + return DataRetentionSettings; + })(); + + v1alpha.AttributionSettings = (function() { + + /** + * Properties of an AttributionSettings. + * @memberof google.analytics.admin.v1alpha + * @interface IAttributionSettings + * @property {string|null} [name] AttributionSettings name + * @property {google.analytics.admin.v1alpha.AttributionSettings.AcquisitionConversionEventLookbackWindow|null} [acquisitionConversionEventLookbackWindow] AttributionSettings acquisitionConversionEventLookbackWindow + * @property {google.analytics.admin.v1alpha.AttributionSettings.OtherConversionEventLookbackWindow|null} [otherConversionEventLookbackWindow] AttributionSettings otherConversionEventLookbackWindow + * @property {google.analytics.admin.v1alpha.AttributionSettings.ReportingAttributionModel|null} [reportingAttributionModel] AttributionSettings reportingAttributionModel + */ + + /** + * Constructs a new AttributionSettings. + * @memberof google.analytics.admin.v1alpha + * @classdesc Represents an AttributionSettings. + * @implements IAttributionSettings + * @constructor + * @param {google.analytics.admin.v1alpha.IAttributionSettings=} [properties] Properties to set + */ + function AttributionSettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AttributionSettings name. + * @member {string} name + * @memberof google.analytics.admin.v1alpha.AttributionSettings + * @instance + */ + AttributionSettings.prototype.name = ""; + + /** + * AttributionSettings acquisitionConversionEventLookbackWindow. + * @member {google.analytics.admin.v1alpha.AttributionSettings.AcquisitionConversionEventLookbackWindow} acquisitionConversionEventLookbackWindow + * @memberof google.analytics.admin.v1alpha.AttributionSettings + * @instance + */ + AttributionSettings.prototype.acquisitionConversionEventLookbackWindow = 0; + + /** + * AttributionSettings otherConversionEventLookbackWindow. + * @member {google.analytics.admin.v1alpha.AttributionSettings.OtherConversionEventLookbackWindow} otherConversionEventLookbackWindow + * @memberof google.analytics.admin.v1alpha.AttributionSettings + * @instance + */ + AttributionSettings.prototype.otherConversionEventLookbackWindow = 0; + + /** + * AttributionSettings reportingAttributionModel. + * @member {google.analytics.admin.v1alpha.AttributionSettings.ReportingAttributionModel} reportingAttributionModel + * @memberof google.analytics.admin.v1alpha.AttributionSettings + * @instance + */ + AttributionSettings.prototype.reportingAttributionModel = 0; + + /** + * Creates a new AttributionSettings instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1alpha.AttributionSettings + * @static + * @param {google.analytics.admin.v1alpha.IAttributionSettings=} [properties] Properties to set + * @returns {google.analytics.admin.v1alpha.AttributionSettings} AttributionSettings instance + */ + AttributionSettings.create = function create(properties) { + return new AttributionSettings(properties); + }; + + /** + * Encodes the specified AttributionSettings message. Does not implicitly {@link google.analytics.admin.v1alpha.AttributionSettings.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1alpha.AttributionSettings + * @static + * @param {google.analytics.admin.v1alpha.IAttributionSettings} message AttributionSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AttributionSettings.encode = function encode(message, writer) { + 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.acquisitionConversionEventLookbackWindow != null && Object.hasOwnProperty.call(message, "acquisitionConversionEventLookbackWindow")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.acquisitionConversionEventLookbackWindow); + if (message.otherConversionEventLookbackWindow != null && Object.hasOwnProperty.call(message, "otherConversionEventLookbackWindow")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.otherConversionEventLookbackWindow); + if (message.reportingAttributionModel != null && Object.hasOwnProperty.call(message, "reportingAttributionModel")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.reportingAttributionModel); + return writer; + }; + + /** + * Encodes the specified AttributionSettings message, length delimited. Does not implicitly {@link google.analytics.admin.v1alpha.AttributionSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1alpha.AttributionSettings + * @static + * @param {google.analytics.admin.v1alpha.IAttributionSettings} message AttributionSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AttributionSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AttributionSettings message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1alpha.AttributionSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1alpha.AttributionSettings} AttributionSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AttributionSettings.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1alpha.AttributionSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.acquisitionConversionEventLookbackWindow = reader.int32(); + break; + } + case 3: { + message.otherConversionEventLookbackWindow = reader.int32(); + break; + } + case 4: { + message.reportingAttributionModel = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AttributionSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1alpha.AttributionSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1alpha.AttributionSettings} AttributionSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AttributionSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AttributionSettings message. + * @function verify + * @memberof google.analytics.admin.v1alpha.AttributionSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AttributionSettings.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.acquisitionConversionEventLookbackWindow != null && message.hasOwnProperty("acquisitionConversionEventLookbackWindow")) + switch (message.acquisitionConversionEventLookbackWindow) { + default: + return "acquisitionConversionEventLookbackWindow: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.otherConversionEventLookbackWindow != null && message.hasOwnProperty("otherConversionEventLookbackWindow")) + switch (message.otherConversionEventLookbackWindow) { + default: + return "otherConversionEventLookbackWindow: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.reportingAttributionModel != null && message.hasOwnProperty("reportingAttributionModel")) + switch (message.reportingAttributionModel) { + default: + return "reportingAttributionModel: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + break; + } + return null; + }; + + /** + * Creates an AttributionSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1alpha.AttributionSettings + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1alpha.AttributionSettings} AttributionSettings + */ + AttributionSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1alpha.AttributionSettings) + return object; + var message = new $root.google.analytics.admin.v1alpha.AttributionSettings(); + if (object.name != null) + message.name = String(object.name); + switch (object.acquisitionConversionEventLookbackWindow) { + default: + if (typeof object.acquisitionConversionEventLookbackWindow === "number") { + message.acquisitionConversionEventLookbackWindow = object.acquisitionConversionEventLookbackWindow; + break; + } + break; + case "ACQUISITION_CONVERSION_EVENT_LOOKBACK_WINDOW_UNSPECIFIED": + case 0: + message.acquisitionConversionEventLookbackWindow = 0; + break; + case "ACQUISITION_CONVERSION_EVENT_LOOKBACK_WINDOW_7_DAYS": + case 1: + message.acquisitionConversionEventLookbackWindow = 1; + break; + case "ACQUISITION_CONVERSION_EVENT_LOOKBACK_WINDOW_30_DAYS": + case 2: + message.acquisitionConversionEventLookbackWindow = 2; + break; + } + switch (object.otherConversionEventLookbackWindow) { + default: + if (typeof object.otherConversionEventLookbackWindow === "number") { + message.otherConversionEventLookbackWindow = object.otherConversionEventLookbackWindow; + break; + } + break; + case "OTHER_CONVERSION_EVENT_LOOKBACK_WINDOW_UNSPECIFIED": + case 0: + message.otherConversionEventLookbackWindow = 0; + break; + case "OTHER_CONVERSION_EVENT_LOOKBACK_WINDOW_30_DAYS": + case 1: + message.otherConversionEventLookbackWindow = 1; + break; + case "OTHER_CONVERSION_EVENT_LOOKBACK_WINDOW_60_DAYS": + case 2: + message.otherConversionEventLookbackWindow = 2; + break; + case "OTHER_CONVERSION_EVENT_LOOKBACK_WINDOW_90_DAYS": + case 3: + message.otherConversionEventLookbackWindow = 3; + break; + } + switch (object.reportingAttributionModel) { + default: + if (typeof object.reportingAttributionModel === "number") { + message.reportingAttributionModel = object.reportingAttributionModel; + break; + } + break; + case "REPORTING_ATTRIBUTION_MODEL_UNSPECIFIED": + case 0: + message.reportingAttributionModel = 0; + break; + case "CROSS_CHANNEL_DATA_DRIVEN": + case 1: + message.reportingAttributionModel = 1; + break; + case "CROSS_CHANNEL_LAST_CLICK": + case 2: + message.reportingAttributionModel = 2; + break; + case "CROSS_CHANNEL_FIRST_CLICK": + case 3: + message.reportingAttributionModel = 3; + break; + case "CROSS_CHANNEL_LINEAR": + case 4: + message.reportingAttributionModel = 4; + break; + case "CROSS_CHANNEL_POSITION_BASED": + case 5: + message.reportingAttributionModel = 5; + break; + case "CROSS_CHANNEL_TIME_DECAY": + case 6: + message.reportingAttributionModel = 6; + break; + case "ADS_PREFERRED_LAST_CLICK": + case 7: + message.reportingAttributionModel = 7; + break; + } + return message; + }; + + /** + * Creates a plain object from an AttributionSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1alpha.AttributionSettings + * @static + * @param {google.analytics.admin.v1alpha.AttributionSettings} message AttributionSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AttributionSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.acquisitionConversionEventLookbackWindow = options.enums === String ? "ACQUISITION_CONVERSION_EVENT_LOOKBACK_WINDOW_UNSPECIFIED" : 0; + object.otherConversionEventLookbackWindow = options.enums === String ? "OTHER_CONVERSION_EVENT_LOOKBACK_WINDOW_UNSPECIFIED" : 0; + object.reportingAttributionModel = options.enums === String ? "REPORTING_ATTRIBUTION_MODEL_UNSPECIFIED" : 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.acquisitionConversionEventLookbackWindow != null && message.hasOwnProperty("acquisitionConversionEventLookbackWindow")) + object.acquisitionConversionEventLookbackWindow = options.enums === String ? $root.google.analytics.admin.v1alpha.AttributionSettings.AcquisitionConversionEventLookbackWindow[message.acquisitionConversionEventLookbackWindow] === undefined ? message.acquisitionConversionEventLookbackWindow : $root.google.analytics.admin.v1alpha.AttributionSettings.AcquisitionConversionEventLookbackWindow[message.acquisitionConversionEventLookbackWindow] : message.acquisitionConversionEventLookbackWindow; + if (message.otherConversionEventLookbackWindow != null && message.hasOwnProperty("otherConversionEventLookbackWindow")) + object.otherConversionEventLookbackWindow = options.enums === String ? $root.google.analytics.admin.v1alpha.AttributionSettings.OtherConversionEventLookbackWindow[message.otherConversionEventLookbackWindow] === undefined ? message.otherConversionEventLookbackWindow : $root.google.analytics.admin.v1alpha.AttributionSettings.OtherConversionEventLookbackWindow[message.otherConversionEventLookbackWindow] : message.otherConversionEventLookbackWindow; + if (message.reportingAttributionModel != null && message.hasOwnProperty("reportingAttributionModel")) + object.reportingAttributionModel = options.enums === String ? $root.google.analytics.admin.v1alpha.AttributionSettings.ReportingAttributionModel[message.reportingAttributionModel] === undefined ? message.reportingAttributionModel : $root.google.analytics.admin.v1alpha.AttributionSettings.ReportingAttributionModel[message.reportingAttributionModel] : message.reportingAttributionModel; + return object; + }; + + /** + * Converts this AttributionSettings to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1alpha.AttributionSettings + * @instance + * @returns {Object.} JSON object + */ + AttributionSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AttributionSettings + * @function getTypeUrl + * @memberof google.analytics.admin.v1alpha.AttributionSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AttributionSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1alpha.AttributionSettings"; + }; + + /** + * AcquisitionConversionEventLookbackWindow enum. + * @name google.analytics.admin.v1alpha.AttributionSettings.AcquisitionConversionEventLookbackWindow + * @enum {number} + * @property {number} ACQUISITION_CONVERSION_EVENT_LOOKBACK_WINDOW_UNSPECIFIED=0 ACQUISITION_CONVERSION_EVENT_LOOKBACK_WINDOW_UNSPECIFIED value + * @property {number} ACQUISITION_CONVERSION_EVENT_LOOKBACK_WINDOW_7_DAYS=1 ACQUISITION_CONVERSION_EVENT_LOOKBACK_WINDOW_7_DAYS value + * @property {number} ACQUISITION_CONVERSION_EVENT_LOOKBACK_WINDOW_30_DAYS=2 ACQUISITION_CONVERSION_EVENT_LOOKBACK_WINDOW_30_DAYS value + */ + AttributionSettings.AcquisitionConversionEventLookbackWindow = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ACQUISITION_CONVERSION_EVENT_LOOKBACK_WINDOW_UNSPECIFIED"] = 0; + values[valuesById[1] = "ACQUISITION_CONVERSION_EVENT_LOOKBACK_WINDOW_7_DAYS"] = 1; + values[valuesById[2] = "ACQUISITION_CONVERSION_EVENT_LOOKBACK_WINDOW_30_DAYS"] = 2; + return values; + })(); + + /** + * OtherConversionEventLookbackWindow enum. + * @name google.analytics.admin.v1alpha.AttributionSettings.OtherConversionEventLookbackWindow + * @enum {number} + * @property {number} OTHER_CONVERSION_EVENT_LOOKBACK_WINDOW_UNSPECIFIED=0 OTHER_CONVERSION_EVENT_LOOKBACK_WINDOW_UNSPECIFIED value + * @property {number} OTHER_CONVERSION_EVENT_LOOKBACK_WINDOW_30_DAYS=1 OTHER_CONVERSION_EVENT_LOOKBACK_WINDOW_30_DAYS value + * @property {number} OTHER_CONVERSION_EVENT_LOOKBACK_WINDOW_60_DAYS=2 OTHER_CONVERSION_EVENT_LOOKBACK_WINDOW_60_DAYS value + * @property {number} OTHER_CONVERSION_EVENT_LOOKBACK_WINDOW_90_DAYS=3 OTHER_CONVERSION_EVENT_LOOKBACK_WINDOW_90_DAYS value + */ + AttributionSettings.OtherConversionEventLookbackWindow = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "OTHER_CONVERSION_EVENT_LOOKBACK_WINDOW_UNSPECIFIED"] = 0; + values[valuesById[1] = "OTHER_CONVERSION_EVENT_LOOKBACK_WINDOW_30_DAYS"] = 1; + values[valuesById[2] = "OTHER_CONVERSION_EVENT_LOOKBACK_WINDOW_60_DAYS"] = 2; + values[valuesById[3] = "OTHER_CONVERSION_EVENT_LOOKBACK_WINDOW_90_DAYS"] = 3; + return values; + })(); + + /** + * ReportingAttributionModel enum. + * @name google.analytics.admin.v1alpha.AttributionSettings.ReportingAttributionModel + * @enum {number} + * @property {number} REPORTING_ATTRIBUTION_MODEL_UNSPECIFIED=0 REPORTING_ATTRIBUTION_MODEL_UNSPECIFIED value + * @property {number} CROSS_CHANNEL_DATA_DRIVEN=1 CROSS_CHANNEL_DATA_DRIVEN value + * @property {number} CROSS_CHANNEL_LAST_CLICK=2 CROSS_CHANNEL_LAST_CLICK value + * @property {number} CROSS_CHANNEL_FIRST_CLICK=3 CROSS_CHANNEL_FIRST_CLICK value + * @property {number} CROSS_CHANNEL_LINEAR=4 CROSS_CHANNEL_LINEAR value + * @property {number} CROSS_CHANNEL_POSITION_BASED=5 CROSS_CHANNEL_POSITION_BASED value + * @property {number} CROSS_CHANNEL_TIME_DECAY=6 CROSS_CHANNEL_TIME_DECAY value + * @property {number} ADS_PREFERRED_LAST_CLICK=7 ADS_PREFERRED_LAST_CLICK value + */ + AttributionSettings.ReportingAttributionModel = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "REPORTING_ATTRIBUTION_MODEL_UNSPECIFIED"] = 0; + values[valuesById[1] = "CROSS_CHANNEL_DATA_DRIVEN"] = 1; + values[valuesById[2] = "CROSS_CHANNEL_LAST_CLICK"] = 2; + values[valuesById[3] = "CROSS_CHANNEL_FIRST_CLICK"] = 3; + values[valuesById[4] = "CROSS_CHANNEL_LINEAR"] = 4; + values[valuesById[5] = "CROSS_CHANNEL_POSITION_BASED"] = 5; + values[valuesById[6] = "CROSS_CHANNEL_TIME_DECAY"] = 6; + values[valuesById[7] = "ADS_PREFERRED_LAST_CLICK"] = 7; + return values; + })(); + + return AttributionSettings; + })(); + + return v1alpha; + })(); + + admin.v1beta = (function() { + + /** + * Namespace v1beta. + * @memberof google.analytics.admin + * @namespace + */ + var v1beta = {}; + + v1beta.AnalyticsAdminService = (function() { + + /** + * Constructs a new AnalyticsAdminService service. + * @memberof google.analytics.admin.v1beta + * @classdesc Represents an AnalyticsAdminService + * @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 AnalyticsAdminService(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (AnalyticsAdminService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = AnalyticsAdminService; + + /** + * Creates new AnalyticsAdminService service using the specified rpc implementation. + * @function create + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @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 {AnalyticsAdminService} RPC service. Useful where requests and/or responses are streamed. + */ + AnalyticsAdminService.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|getAccount}. + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @typedef GetAccountCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.admin.v1beta.Account} [response] Account + */ + + /** + * Calls GetAccount. + * @function getAccount + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.IGetAccountRequest} request GetAccountRequest message or plain object + * @param {google.analytics.admin.v1beta.AnalyticsAdminService.GetAccountCallback} callback Node-style callback called with the error, if any, and Account + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.getAccount = function getAccount(request, callback) { + return this.rpcCall(getAccount, $root.google.analytics.admin.v1beta.GetAccountRequest, $root.google.analytics.admin.v1beta.Account, request, callback); + }, "name", { value: "GetAccount" }); + + /** + * Calls GetAccount. + * @function getAccount + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.IGetAccountRequest} request GetAccountRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|listAccounts}. + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @typedef ListAccountsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.admin.v1beta.ListAccountsResponse} [response] ListAccountsResponse + */ + + /** + * Calls ListAccounts. + * @function listAccounts + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.IListAccountsRequest} request ListAccountsRequest message or plain object + * @param {google.analytics.admin.v1beta.AnalyticsAdminService.ListAccountsCallback} callback Node-style callback called with the error, if any, and ListAccountsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.listAccounts = function listAccounts(request, callback) { + return this.rpcCall(listAccounts, $root.google.analytics.admin.v1beta.ListAccountsRequest, $root.google.analytics.admin.v1beta.ListAccountsResponse, request, callback); + }, "name", { value: "ListAccounts" }); + + /** + * Calls ListAccounts. + * @function listAccounts + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.IListAccountsRequest} request ListAccountsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|deleteAccount}. + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @typedef DeleteAccountCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteAccount. + * @function deleteAccount + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.IDeleteAccountRequest} request DeleteAccountRequest message or plain object + * @param {google.analytics.admin.v1beta.AnalyticsAdminService.DeleteAccountCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.deleteAccount = function deleteAccount(request, callback) { + return this.rpcCall(deleteAccount, $root.google.analytics.admin.v1beta.DeleteAccountRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteAccount" }); + + /** + * Calls DeleteAccount. + * @function deleteAccount + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.IDeleteAccountRequest} request DeleteAccountRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|updateAccount}. + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @typedef UpdateAccountCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.admin.v1beta.Account} [response] Account + */ + + /** + * Calls UpdateAccount. + * @function updateAccount + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.IUpdateAccountRequest} request UpdateAccountRequest message or plain object + * @param {google.analytics.admin.v1beta.AnalyticsAdminService.UpdateAccountCallback} callback Node-style callback called with the error, if any, and Account + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.updateAccount = function updateAccount(request, callback) { + return this.rpcCall(updateAccount, $root.google.analytics.admin.v1beta.UpdateAccountRequest, $root.google.analytics.admin.v1beta.Account, request, callback); + }, "name", { value: "UpdateAccount" }); + + /** + * Calls UpdateAccount. + * @function updateAccount + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.IUpdateAccountRequest} request UpdateAccountRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|provisionAccountTicket}. + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @typedef ProvisionAccountTicketCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.admin.v1beta.ProvisionAccountTicketResponse} [response] ProvisionAccountTicketResponse + */ + + /** + * Calls ProvisionAccountTicket. + * @function provisionAccountTicket + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.IProvisionAccountTicketRequest} request ProvisionAccountTicketRequest message or plain object + * @param {google.analytics.admin.v1beta.AnalyticsAdminService.ProvisionAccountTicketCallback} callback Node-style callback called with the error, if any, and ProvisionAccountTicketResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.provisionAccountTicket = function provisionAccountTicket(request, callback) { + return this.rpcCall(provisionAccountTicket, $root.google.analytics.admin.v1beta.ProvisionAccountTicketRequest, $root.google.analytics.admin.v1beta.ProvisionAccountTicketResponse, request, callback); + }, "name", { value: "ProvisionAccountTicket" }); + + /** + * Calls ProvisionAccountTicket. + * @function provisionAccountTicket + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.IProvisionAccountTicketRequest} request ProvisionAccountTicketRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|listAccountSummaries}. + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @typedef ListAccountSummariesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.admin.v1beta.ListAccountSummariesResponse} [response] ListAccountSummariesResponse + */ + + /** + * Calls ListAccountSummaries. + * @function listAccountSummaries + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.IListAccountSummariesRequest} request ListAccountSummariesRequest message or plain object + * @param {google.analytics.admin.v1beta.AnalyticsAdminService.ListAccountSummariesCallback} callback Node-style callback called with the error, if any, and ListAccountSummariesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.listAccountSummaries = function listAccountSummaries(request, callback) { + return this.rpcCall(listAccountSummaries, $root.google.analytics.admin.v1beta.ListAccountSummariesRequest, $root.google.analytics.admin.v1beta.ListAccountSummariesResponse, request, callback); + }, "name", { value: "ListAccountSummaries" }); + + /** + * Calls ListAccountSummaries. + * @function listAccountSummaries + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.IListAccountSummariesRequest} request ListAccountSummariesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|getProperty}. + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @typedef GetPropertyCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.admin.v1beta.Property} [response] Property + */ + + /** + * Calls GetProperty. + * @function getProperty + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.IGetPropertyRequest} request GetPropertyRequest message or plain object + * @param {google.analytics.admin.v1beta.AnalyticsAdminService.GetPropertyCallback} callback Node-style callback called with the error, if any, and Property + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.getProperty = function getProperty(request, callback) { + return this.rpcCall(getProperty, $root.google.analytics.admin.v1beta.GetPropertyRequest, $root.google.analytics.admin.v1beta.Property, request, callback); + }, "name", { value: "GetProperty" }); + + /** + * Calls GetProperty. + * @function getProperty + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.IGetPropertyRequest} request GetPropertyRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|listProperties}. + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @typedef ListPropertiesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.admin.v1beta.ListPropertiesResponse} [response] ListPropertiesResponse + */ + + /** + * Calls ListProperties. + * @function listProperties + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.IListPropertiesRequest} request ListPropertiesRequest message or plain object + * @param {google.analytics.admin.v1beta.AnalyticsAdminService.ListPropertiesCallback} callback Node-style callback called with the error, if any, and ListPropertiesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.listProperties = function listProperties(request, callback) { + return this.rpcCall(listProperties, $root.google.analytics.admin.v1beta.ListPropertiesRequest, $root.google.analytics.admin.v1beta.ListPropertiesResponse, request, callback); + }, "name", { value: "ListProperties" }); + + /** + * Calls ListProperties. + * @function listProperties + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.IListPropertiesRequest} request ListPropertiesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|createProperty}. + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @typedef CreatePropertyCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.admin.v1beta.Property} [response] Property + */ + + /** + * Calls CreateProperty. + * @function createProperty + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.ICreatePropertyRequest} request CreatePropertyRequest message or plain object + * @param {google.analytics.admin.v1beta.AnalyticsAdminService.CreatePropertyCallback} callback Node-style callback called with the error, if any, and Property + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.createProperty = function createProperty(request, callback) { + return this.rpcCall(createProperty, $root.google.analytics.admin.v1beta.CreatePropertyRequest, $root.google.analytics.admin.v1beta.Property, request, callback); + }, "name", { value: "CreateProperty" }); + + /** + * Calls CreateProperty. + * @function createProperty + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.ICreatePropertyRequest} request CreatePropertyRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|deleteProperty}. + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @typedef DeletePropertyCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.admin.v1beta.Property} [response] Property + */ + + /** + * Calls DeleteProperty. + * @function deleteProperty + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.IDeletePropertyRequest} request DeletePropertyRequest message or plain object + * @param {google.analytics.admin.v1beta.AnalyticsAdminService.DeletePropertyCallback} callback Node-style callback called with the error, if any, and Property + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.deleteProperty = function deleteProperty(request, callback) { + return this.rpcCall(deleteProperty, $root.google.analytics.admin.v1beta.DeletePropertyRequest, $root.google.analytics.admin.v1beta.Property, request, callback); + }, "name", { value: "DeleteProperty" }); + + /** + * Calls DeleteProperty. + * @function deleteProperty + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.IDeletePropertyRequest} request DeletePropertyRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|updateProperty}. + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @typedef UpdatePropertyCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.admin.v1beta.Property} [response] Property + */ + + /** + * Calls UpdateProperty. + * @function updateProperty + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.IUpdatePropertyRequest} request UpdatePropertyRequest message or plain object + * @param {google.analytics.admin.v1beta.AnalyticsAdminService.UpdatePropertyCallback} callback Node-style callback called with the error, if any, and Property + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.updateProperty = function updateProperty(request, callback) { + return this.rpcCall(updateProperty, $root.google.analytics.admin.v1beta.UpdatePropertyRequest, $root.google.analytics.admin.v1beta.Property, request, callback); + }, "name", { value: "UpdateProperty" }); + + /** + * Calls UpdateProperty. + * @function updateProperty + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.IUpdatePropertyRequest} request UpdatePropertyRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|createFirebaseLink}. + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @typedef CreateFirebaseLinkCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.admin.v1beta.FirebaseLink} [response] FirebaseLink + */ + + /** + * Calls CreateFirebaseLink. + * @function createFirebaseLink + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.ICreateFirebaseLinkRequest} request CreateFirebaseLinkRequest message or plain object + * @param {google.analytics.admin.v1beta.AnalyticsAdminService.CreateFirebaseLinkCallback} callback Node-style callback called with the error, if any, and FirebaseLink + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.createFirebaseLink = function createFirebaseLink(request, callback) { + return this.rpcCall(createFirebaseLink, $root.google.analytics.admin.v1beta.CreateFirebaseLinkRequest, $root.google.analytics.admin.v1beta.FirebaseLink, request, callback); + }, "name", { value: "CreateFirebaseLink" }); + + /** + * Calls CreateFirebaseLink. + * @function createFirebaseLink + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.ICreateFirebaseLinkRequest} request CreateFirebaseLinkRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|deleteFirebaseLink}. + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @typedef DeleteFirebaseLinkCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteFirebaseLink. + * @function deleteFirebaseLink + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.IDeleteFirebaseLinkRequest} request DeleteFirebaseLinkRequest message or plain object + * @param {google.analytics.admin.v1beta.AnalyticsAdminService.DeleteFirebaseLinkCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.deleteFirebaseLink = function deleteFirebaseLink(request, callback) { + return this.rpcCall(deleteFirebaseLink, $root.google.analytics.admin.v1beta.DeleteFirebaseLinkRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteFirebaseLink" }); + + /** + * Calls DeleteFirebaseLink. + * @function deleteFirebaseLink + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.IDeleteFirebaseLinkRequest} request DeleteFirebaseLinkRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|listFirebaseLinks}. + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @typedef ListFirebaseLinksCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.admin.v1beta.ListFirebaseLinksResponse} [response] ListFirebaseLinksResponse + */ + + /** + * Calls ListFirebaseLinks. + * @function listFirebaseLinks + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.IListFirebaseLinksRequest} request ListFirebaseLinksRequest message or plain object + * @param {google.analytics.admin.v1beta.AnalyticsAdminService.ListFirebaseLinksCallback} callback Node-style callback called with the error, if any, and ListFirebaseLinksResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.listFirebaseLinks = function listFirebaseLinks(request, callback) { + return this.rpcCall(listFirebaseLinks, $root.google.analytics.admin.v1beta.ListFirebaseLinksRequest, $root.google.analytics.admin.v1beta.ListFirebaseLinksResponse, request, callback); + }, "name", { value: "ListFirebaseLinks" }); + + /** + * Calls ListFirebaseLinks. + * @function listFirebaseLinks + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.IListFirebaseLinksRequest} request ListFirebaseLinksRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|createGoogleAdsLink}. + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @typedef CreateGoogleAdsLinkCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.admin.v1beta.GoogleAdsLink} [response] GoogleAdsLink + */ + + /** + * Calls CreateGoogleAdsLink. + * @function createGoogleAdsLink + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.ICreateGoogleAdsLinkRequest} request CreateGoogleAdsLinkRequest message or plain object + * @param {google.analytics.admin.v1beta.AnalyticsAdminService.CreateGoogleAdsLinkCallback} callback Node-style callback called with the error, if any, and GoogleAdsLink + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.createGoogleAdsLink = function createGoogleAdsLink(request, callback) { + return this.rpcCall(createGoogleAdsLink, $root.google.analytics.admin.v1beta.CreateGoogleAdsLinkRequest, $root.google.analytics.admin.v1beta.GoogleAdsLink, request, callback); + }, "name", { value: "CreateGoogleAdsLink" }); + + /** + * Calls CreateGoogleAdsLink. + * @function createGoogleAdsLink + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.ICreateGoogleAdsLinkRequest} request CreateGoogleAdsLinkRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|updateGoogleAdsLink}. + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @typedef UpdateGoogleAdsLinkCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.admin.v1beta.GoogleAdsLink} [response] GoogleAdsLink + */ + + /** + * Calls UpdateGoogleAdsLink. + * @function updateGoogleAdsLink + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.IUpdateGoogleAdsLinkRequest} request UpdateGoogleAdsLinkRequest message or plain object + * @param {google.analytics.admin.v1beta.AnalyticsAdminService.UpdateGoogleAdsLinkCallback} callback Node-style callback called with the error, if any, and GoogleAdsLink + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.updateGoogleAdsLink = function updateGoogleAdsLink(request, callback) { + return this.rpcCall(updateGoogleAdsLink, $root.google.analytics.admin.v1beta.UpdateGoogleAdsLinkRequest, $root.google.analytics.admin.v1beta.GoogleAdsLink, request, callback); + }, "name", { value: "UpdateGoogleAdsLink" }); + + /** + * Calls UpdateGoogleAdsLink. + * @function updateGoogleAdsLink + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.IUpdateGoogleAdsLinkRequest} request UpdateGoogleAdsLinkRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|deleteGoogleAdsLink}. + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @typedef DeleteGoogleAdsLinkCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteGoogleAdsLink. + * @function deleteGoogleAdsLink + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.IDeleteGoogleAdsLinkRequest} request DeleteGoogleAdsLinkRequest message or plain object + * @param {google.analytics.admin.v1beta.AnalyticsAdminService.DeleteGoogleAdsLinkCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.deleteGoogleAdsLink = function deleteGoogleAdsLink(request, callback) { + return this.rpcCall(deleteGoogleAdsLink, $root.google.analytics.admin.v1beta.DeleteGoogleAdsLinkRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteGoogleAdsLink" }); + + /** + * Calls DeleteGoogleAdsLink. + * @function deleteGoogleAdsLink + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.IDeleteGoogleAdsLinkRequest} request DeleteGoogleAdsLinkRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|listGoogleAdsLinks}. + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @typedef ListGoogleAdsLinksCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.admin.v1beta.ListGoogleAdsLinksResponse} [response] ListGoogleAdsLinksResponse + */ + + /** + * Calls ListGoogleAdsLinks. + * @function listGoogleAdsLinks + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.IListGoogleAdsLinksRequest} request ListGoogleAdsLinksRequest message or plain object + * @param {google.analytics.admin.v1beta.AnalyticsAdminService.ListGoogleAdsLinksCallback} callback Node-style callback called with the error, if any, and ListGoogleAdsLinksResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.listGoogleAdsLinks = function listGoogleAdsLinks(request, callback) { + return this.rpcCall(listGoogleAdsLinks, $root.google.analytics.admin.v1beta.ListGoogleAdsLinksRequest, $root.google.analytics.admin.v1beta.ListGoogleAdsLinksResponse, request, callback); + }, "name", { value: "ListGoogleAdsLinks" }); + + /** + * Calls ListGoogleAdsLinks. + * @function listGoogleAdsLinks + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.IListGoogleAdsLinksRequest} request ListGoogleAdsLinksRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|getDataSharingSettings}. + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @typedef GetDataSharingSettingsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.admin.v1beta.DataSharingSettings} [response] DataSharingSettings + */ + + /** + * Calls GetDataSharingSettings. + * @function getDataSharingSettings + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.IGetDataSharingSettingsRequest} request GetDataSharingSettingsRequest message or plain object + * @param {google.analytics.admin.v1beta.AnalyticsAdminService.GetDataSharingSettingsCallback} callback Node-style callback called with the error, if any, and DataSharingSettings + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.getDataSharingSettings = function getDataSharingSettings(request, callback) { + return this.rpcCall(getDataSharingSettings, $root.google.analytics.admin.v1beta.GetDataSharingSettingsRequest, $root.google.analytics.admin.v1beta.DataSharingSettings, request, callback); + }, "name", { value: "GetDataSharingSettings" }); + + /** + * Calls GetDataSharingSettings. + * @function getDataSharingSettings + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.IGetDataSharingSettingsRequest} request GetDataSharingSettingsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|getMeasurementProtocolSecret}. + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @typedef GetMeasurementProtocolSecretCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.admin.v1beta.MeasurementProtocolSecret} [response] MeasurementProtocolSecret + */ + + /** + * Calls GetMeasurementProtocolSecret. + * @function getMeasurementProtocolSecret + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.IGetMeasurementProtocolSecretRequest} request GetMeasurementProtocolSecretRequest message or plain object + * @param {google.analytics.admin.v1beta.AnalyticsAdminService.GetMeasurementProtocolSecretCallback} callback Node-style callback called with the error, if any, and MeasurementProtocolSecret + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.getMeasurementProtocolSecret = function getMeasurementProtocolSecret(request, callback) { + return this.rpcCall(getMeasurementProtocolSecret, $root.google.analytics.admin.v1beta.GetMeasurementProtocolSecretRequest, $root.google.analytics.admin.v1beta.MeasurementProtocolSecret, request, callback); + }, "name", { value: "GetMeasurementProtocolSecret" }); + + /** + * Calls GetMeasurementProtocolSecret. + * @function getMeasurementProtocolSecret + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.IGetMeasurementProtocolSecretRequest} request GetMeasurementProtocolSecretRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|listMeasurementProtocolSecrets}. + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @typedef ListMeasurementProtocolSecretsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.admin.v1beta.ListMeasurementProtocolSecretsResponse} [response] ListMeasurementProtocolSecretsResponse + */ + + /** + * Calls ListMeasurementProtocolSecrets. + * @function listMeasurementProtocolSecrets + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.IListMeasurementProtocolSecretsRequest} request ListMeasurementProtocolSecretsRequest message or plain object + * @param {google.analytics.admin.v1beta.AnalyticsAdminService.ListMeasurementProtocolSecretsCallback} callback Node-style callback called with the error, if any, and ListMeasurementProtocolSecretsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.listMeasurementProtocolSecrets = function listMeasurementProtocolSecrets(request, callback) { + return this.rpcCall(listMeasurementProtocolSecrets, $root.google.analytics.admin.v1beta.ListMeasurementProtocolSecretsRequest, $root.google.analytics.admin.v1beta.ListMeasurementProtocolSecretsResponse, request, callback); + }, "name", { value: "ListMeasurementProtocolSecrets" }); + + /** + * Calls ListMeasurementProtocolSecrets. + * @function listMeasurementProtocolSecrets + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.IListMeasurementProtocolSecretsRequest} request ListMeasurementProtocolSecretsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|createMeasurementProtocolSecret}. + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @typedef CreateMeasurementProtocolSecretCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.admin.v1beta.MeasurementProtocolSecret} [response] MeasurementProtocolSecret + */ + + /** + * Calls CreateMeasurementProtocolSecret. + * @function createMeasurementProtocolSecret + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.ICreateMeasurementProtocolSecretRequest} request CreateMeasurementProtocolSecretRequest message or plain object + * @param {google.analytics.admin.v1beta.AnalyticsAdminService.CreateMeasurementProtocolSecretCallback} callback Node-style callback called with the error, if any, and MeasurementProtocolSecret + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.createMeasurementProtocolSecret = function createMeasurementProtocolSecret(request, callback) { + return this.rpcCall(createMeasurementProtocolSecret, $root.google.analytics.admin.v1beta.CreateMeasurementProtocolSecretRequest, $root.google.analytics.admin.v1beta.MeasurementProtocolSecret, request, callback); + }, "name", { value: "CreateMeasurementProtocolSecret" }); + + /** + * Calls CreateMeasurementProtocolSecret. + * @function createMeasurementProtocolSecret + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.ICreateMeasurementProtocolSecretRequest} request CreateMeasurementProtocolSecretRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|deleteMeasurementProtocolSecret}. + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @typedef DeleteMeasurementProtocolSecretCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteMeasurementProtocolSecret. + * @function deleteMeasurementProtocolSecret + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.IDeleteMeasurementProtocolSecretRequest} request DeleteMeasurementProtocolSecretRequest message or plain object + * @param {google.analytics.admin.v1beta.AnalyticsAdminService.DeleteMeasurementProtocolSecretCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.deleteMeasurementProtocolSecret = function deleteMeasurementProtocolSecret(request, callback) { + return this.rpcCall(deleteMeasurementProtocolSecret, $root.google.analytics.admin.v1beta.DeleteMeasurementProtocolSecretRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteMeasurementProtocolSecret" }); + + /** + * Calls DeleteMeasurementProtocolSecret. + * @function deleteMeasurementProtocolSecret + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.IDeleteMeasurementProtocolSecretRequest} request DeleteMeasurementProtocolSecretRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|updateMeasurementProtocolSecret}. + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @typedef UpdateMeasurementProtocolSecretCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.admin.v1beta.MeasurementProtocolSecret} [response] MeasurementProtocolSecret + */ + + /** + * Calls UpdateMeasurementProtocolSecret. + * @function updateMeasurementProtocolSecret + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.IUpdateMeasurementProtocolSecretRequest} request UpdateMeasurementProtocolSecretRequest message or plain object + * @param {google.analytics.admin.v1beta.AnalyticsAdminService.UpdateMeasurementProtocolSecretCallback} callback Node-style callback called with the error, if any, and MeasurementProtocolSecret + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.updateMeasurementProtocolSecret = function updateMeasurementProtocolSecret(request, callback) { + return this.rpcCall(updateMeasurementProtocolSecret, $root.google.analytics.admin.v1beta.UpdateMeasurementProtocolSecretRequest, $root.google.analytics.admin.v1beta.MeasurementProtocolSecret, request, callback); + }, "name", { value: "UpdateMeasurementProtocolSecret" }); + + /** + * Calls UpdateMeasurementProtocolSecret. + * @function updateMeasurementProtocolSecret + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.IUpdateMeasurementProtocolSecretRequest} request UpdateMeasurementProtocolSecretRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|acknowledgeUserDataCollection}. + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @typedef AcknowledgeUserDataCollectionCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.admin.v1beta.AcknowledgeUserDataCollectionResponse} [response] AcknowledgeUserDataCollectionResponse + */ + + /** + * Calls AcknowledgeUserDataCollection. + * @function acknowledgeUserDataCollection + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.IAcknowledgeUserDataCollectionRequest} request AcknowledgeUserDataCollectionRequest message or plain object + * @param {google.analytics.admin.v1beta.AnalyticsAdminService.AcknowledgeUserDataCollectionCallback} callback Node-style callback called with the error, if any, and AcknowledgeUserDataCollectionResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.acknowledgeUserDataCollection = function acknowledgeUserDataCollection(request, callback) { + return this.rpcCall(acknowledgeUserDataCollection, $root.google.analytics.admin.v1beta.AcknowledgeUserDataCollectionRequest, $root.google.analytics.admin.v1beta.AcknowledgeUserDataCollectionResponse, request, callback); + }, "name", { value: "AcknowledgeUserDataCollection" }); + + /** + * Calls AcknowledgeUserDataCollection. + * @function acknowledgeUserDataCollection + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.IAcknowledgeUserDataCollectionRequest} request AcknowledgeUserDataCollectionRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|searchChangeHistoryEvents}. + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @typedef SearchChangeHistoryEventsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.admin.v1beta.SearchChangeHistoryEventsResponse} [response] SearchChangeHistoryEventsResponse + */ + + /** + * Calls SearchChangeHistoryEvents. + * @function searchChangeHistoryEvents + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.ISearchChangeHistoryEventsRequest} request SearchChangeHistoryEventsRequest message or plain object + * @param {google.analytics.admin.v1beta.AnalyticsAdminService.SearchChangeHistoryEventsCallback} callback Node-style callback called with the error, if any, and SearchChangeHistoryEventsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.searchChangeHistoryEvents = function searchChangeHistoryEvents(request, callback) { + return this.rpcCall(searchChangeHistoryEvents, $root.google.analytics.admin.v1beta.SearchChangeHistoryEventsRequest, $root.google.analytics.admin.v1beta.SearchChangeHistoryEventsResponse, request, callback); + }, "name", { value: "SearchChangeHistoryEvents" }); + + /** + * Calls SearchChangeHistoryEvents. + * @function searchChangeHistoryEvents + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.ISearchChangeHistoryEventsRequest} request SearchChangeHistoryEventsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|createConversionEvent}. + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @typedef CreateConversionEventCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.admin.v1beta.ConversionEvent} [response] ConversionEvent + */ + + /** + * Calls CreateConversionEvent. + * @function createConversionEvent + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.ICreateConversionEventRequest} request CreateConversionEventRequest message or plain object + * @param {google.analytics.admin.v1beta.AnalyticsAdminService.CreateConversionEventCallback} callback Node-style callback called with the error, if any, and ConversionEvent + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.createConversionEvent = function createConversionEvent(request, callback) { + return this.rpcCall(createConversionEvent, $root.google.analytics.admin.v1beta.CreateConversionEventRequest, $root.google.analytics.admin.v1beta.ConversionEvent, request, callback); + }, "name", { value: "CreateConversionEvent" }); + + /** + * Calls CreateConversionEvent. + * @function createConversionEvent + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.ICreateConversionEventRequest} request CreateConversionEventRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|getConversionEvent}. + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @typedef GetConversionEventCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.admin.v1beta.ConversionEvent} [response] ConversionEvent + */ + + /** + * Calls GetConversionEvent. + * @function getConversionEvent + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.IGetConversionEventRequest} request GetConversionEventRequest message or plain object + * @param {google.analytics.admin.v1beta.AnalyticsAdminService.GetConversionEventCallback} callback Node-style callback called with the error, if any, and ConversionEvent + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.getConversionEvent = function getConversionEvent(request, callback) { + return this.rpcCall(getConversionEvent, $root.google.analytics.admin.v1beta.GetConversionEventRequest, $root.google.analytics.admin.v1beta.ConversionEvent, request, callback); + }, "name", { value: "GetConversionEvent" }); + + /** + * Calls GetConversionEvent. + * @function getConversionEvent + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.IGetConversionEventRequest} request GetConversionEventRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|deleteConversionEvent}. + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @typedef DeleteConversionEventCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteConversionEvent. + * @function deleteConversionEvent + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.IDeleteConversionEventRequest} request DeleteConversionEventRequest message or plain object + * @param {google.analytics.admin.v1beta.AnalyticsAdminService.DeleteConversionEventCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.deleteConversionEvent = function deleteConversionEvent(request, callback) { + return this.rpcCall(deleteConversionEvent, $root.google.analytics.admin.v1beta.DeleteConversionEventRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteConversionEvent" }); + + /** + * Calls DeleteConversionEvent. + * @function deleteConversionEvent + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.IDeleteConversionEventRequest} request DeleteConversionEventRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|listConversionEvents}. + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @typedef ListConversionEventsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.admin.v1beta.ListConversionEventsResponse} [response] ListConversionEventsResponse + */ + + /** + * Calls ListConversionEvents. + * @function listConversionEvents + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.IListConversionEventsRequest} request ListConversionEventsRequest message or plain object + * @param {google.analytics.admin.v1beta.AnalyticsAdminService.ListConversionEventsCallback} callback Node-style callback called with the error, if any, and ListConversionEventsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.listConversionEvents = function listConversionEvents(request, callback) { + return this.rpcCall(listConversionEvents, $root.google.analytics.admin.v1beta.ListConversionEventsRequest, $root.google.analytics.admin.v1beta.ListConversionEventsResponse, request, callback); + }, "name", { value: "ListConversionEvents" }); + + /** + * Calls ListConversionEvents. + * @function listConversionEvents + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.IListConversionEventsRequest} request ListConversionEventsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|createCustomDimension}. + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @typedef CreateCustomDimensionCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.admin.v1beta.CustomDimension} [response] CustomDimension + */ + + /** + * Calls CreateCustomDimension. + * @function createCustomDimension + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.ICreateCustomDimensionRequest} request CreateCustomDimensionRequest message or plain object + * @param {google.analytics.admin.v1beta.AnalyticsAdminService.CreateCustomDimensionCallback} callback Node-style callback called with the error, if any, and CustomDimension + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.createCustomDimension = function createCustomDimension(request, callback) { + return this.rpcCall(createCustomDimension, $root.google.analytics.admin.v1beta.CreateCustomDimensionRequest, $root.google.analytics.admin.v1beta.CustomDimension, request, callback); + }, "name", { value: "CreateCustomDimension" }); + + /** + * Calls CreateCustomDimension. + * @function createCustomDimension + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.ICreateCustomDimensionRequest} request CreateCustomDimensionRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|updateCustomDimension}. + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @typedef UpdateCustomDimensionCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.admin.v1beta.CustomDimension} [response] CustomDimension + */ + + /** + * Calls UpdateCustomDimension. + * @function updateCustomDimension + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.IUpdateCustomDimensionRequest} request UpdateCustomDimensionRequest message or plain object + * @param {google.analytics.admin.v1beta.AnalyticsAdminService.UpdateCustomDimensionCallback} callback Node-style callback called with the error, if any, and CustomDimension + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.updateCustomDimension = function updateCustomDimension(request, callback) { + return this.rpcCall(updateCustomDimension, $root.google.analytics.admin.v1beta.UpdateCustomDimensionRequest, $root.google.analytics.admin.v1beta.CustomDimension, request, callback); + }, "name", { value: "UpdateCustomDimension" }); + + /** + * Calls UpdateCustomDimension. + * @function updateCustomDimension + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.IUpdateCustomDimensionRequest} request UpdateCustomDimensionRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|listCustomDimensions}. + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @typedef ListCustomDimensionsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.admin.v1beta.ListCustomDimensionsResponse} [response] ListCustomDimensionsResponse + */ + + /** + * Calls ListCustomDimensions. + * @function listCustomDimensions + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.IListCustomDimensionsRequest} request ListCustomDimensionsRequest message or plain object + * @param {google.analytics.admin.v1beta.AnalyticsAdminService.ListCustomDimensionsCallback} callback Node-style callback called with the error, if any, and ListCustomDimensionsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.listCustomDimensions = function listCustomDimensions(request, callback) { + return this.rpcCall(listCustomDimensions, $root.google.analytics.admin.v1beta.ListCustomDimensionsRequest, $root.google.analytics.admin.v1beta.ListCustomDimensionsResponse, request, callback); + }, "name", { value: "ListCustomDimensions" }); + + /** + * Calls ListCustomDimensions. + * @function listCustomDimensions + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.IListCustomDimensionsRequest} request ListCustomDimensionsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|archiveCustomDimension}. + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @typedef ArchiveCustomDimensionCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls ArchiveCustomDimension. + * @function archiveCustomDimension + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.IArchiveCustomDimensionRequest} request ArchiveCustomDimensionRequest message or plain object + * @param {google.analytics.admin.v1beta.AnalyticsAdminService.ArchiveCustomDimensionCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.archiveCustomDimension = function archiveCustomDimension(request, callback) { + return this.rpcCall(archiveCustomDimension, $root.google.analytics.admin.v1beta.ArchiveCustomDimensionRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "ArchiveCustomDimension" }); + + /** + * Calls ArchiveCustomDimension. + * @function archiveCustomDimension + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.IArchiveCustomDimensionRequest} request ArchiveCustomDimensionRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|getCustomDimension}. + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @typedef GetCustomDimensionCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.admin.v1beta.CustomDimension} [response] CustomDimension + */ + + /** + * Calls GetCustomDimension. + * @function getCustomDimension + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.IGetCustomDimensionRequest} request GetCustomDimensionRequest message or plain object + * @param {google.analytics.admin.v1beta.AnalyticsAdminService.GetCustomDimensionCallback} callback Node-style callback called with the error, if any, and CustomDimension + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.getCustomDimension = function getCustomDimension(request, callback) { + return this.rpcCall(getCustomDimension, $root.google.analytics.admin.v1beta.GetCustomDimensionRequest, $root.google.analytics.admin.v1beta.CustomDimension, request, callback); + }, "name", { value: "GetCustomDimension" }); + + /** + * Calls GetCustomDimension. + * @function getCustomDimension + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.IGetCustomDimensionRequest} request GetCustomDimensionRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|createCustomMetric}. + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @typedef CreateCustomMetricCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.admin.v1beta.CustomMetric} [response] CustomMetric + */ + + /** + * Calls CreateCustomMetric. + * @function createCustomMetric + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.ICreateCustomMetricRequest} request CreateCustomMetricRequest message or plain object + * @param {google.analytics.admin.v1beta.AnalyticsAdminService.CreateCustomMetricCallback} callback Node-style callback called with the error, if any, and CustomMetric + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.createCustomMetric = function createCustomMetric(request, callback) { + return this.rpcCall(createCustomMetric, $root.google.analytics.admin.v1beta.CreateCustomMetricRequest, $root.google.analytics.admin.v1beta.CustomMetric, request, callback); + }, "name", { value: "CreateCustomMetric" }); + + /** + * Calls CreateCustomMetric. + * @function createCustomMetric + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.ICreateCustomMetricRequest} request CreateCustomMetricRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|updateCustomMetric}. + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @typedef UpdateCustomMetricCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.admin.v1beta.CustomMetric} [response] CustomMetric + */ + + /** + * Calls UpdateCustomMetric. + * @function updateCustomMetric + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.IUpdateCustomMetricRequest} request UpdateCustomMetricRequest message or plain object + * @param {google.analytics.admin.v1beta.AnalyticsAdminService.UpdateCustomMetricCallback} callback Node-style callback called with the error, if any, and CustomMetric + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.updateCustomMetric = function updateCustomMetric(request, callback) { + return this.rpcCall(updateCustomMetric, $root.google.analytics.admin.v1beta.UpdateCustomMetricRequest, $root.google.analytics.admin.v1beta.CustomMetric, request, callback); + }, "name", { value: "UpdateCustomMetric" }); + + /** + * Calls UpdateCustomMetric. + * @function updateCustomMetric + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.IUpdateCustomMetricRequest} request UpdateCustomMetricRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|listCustomMetrics}. + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @typedef ListCustomMetricsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.admin.v1beta.ListCustomMetricsResponse} [response] ListCustomMetricsResponse + */ + + /** + * Calls ListCustomMetrics. + * @function listCustomMetrics + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.IListCustomMetricsRequest} request ListCustomMetricsRequest message or plain object + * @param {google.analytics.admin.v1beta.AnalyticsAdminService.ListCustomMetricsCallback} callback Node-style callback called with the error, if any, and ListCustomMetricsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.listCustomMetrics = function listCustomMetrics(request, callback) { + return this.rpcCall(listCustomMetrics, $root.google.analytics.admin.v1beta.ListCustomMetricsRequest, $root.google.analytics.admin.v1beta.ListCustomMetricsResponse, request, callback); + }, "name", { value: "ListCustomMetrics" }); + + /** + * Calls ListCustomMetrics. + * @function listCustomMetrics + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.IListCustomMetricsRequest} request ListCustomMetricsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|archiveCustomMetric}. + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @typedef ArchiveCustomMetricCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls ArchiveCustomMetric. + * @function archiveCustomMetric + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.IArchiveCustomMetricRequest} request ArchiveCustomMetricRequest message or plain object + * @param {google.analytics.admin.v1beta.AnalyticsAdminService.ArchiveCustomMetricCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.archiveCustomMetric = function archiveCustomMetric(request, callback) { + return this.rpcCall(archiveCustomMetric, $root.google.analytics.admin.v1beta.ArchiveCustomMetricRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "ArchiveCustomMetric" }); + + /** + * Calls ArchiveCustomMetric. + * @function archiveCustomMetric + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.IArchiveCustomMetricRequest} request ArchiveCustomMetricRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|getCustomMetric}. + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @typedef GetCustomMetricCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.admin.v1beta.CustomMetric} [response] CustomMetric + */ + + /** + * Calls GetCustomMetric. + * @function getCustomMetric + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.IGetCustomMetricRequest} request GetCustomMetricRequest message or plain object + * @param {google.analytics.admin.v1beta.AnalyticsAdminService.GetCustomMetricCallback} callback Node-style callback called with the error, if any, and CustomMetric + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.getCustomMetric = function getCustomMetric(request, callback) { + return this.rpcCall(getCustomMetric, $root.google.analytics.admin.v1beta.GetCustomMetricRequest, $root.google.analytics.admin.v1beta.CustomMetric, request, callback); + }, "name", { value: "GetCustomMetric" }); + + /** + * Calls GetCustomMetric. + * @function getCustomMetric + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.IGetCustomMetricRequest} request GetCustomMetricRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|getDataRetentionSettings}. + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @typedef GetDataRetentionSettingsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.admin.v1beta.DataRetentionSettings} [response] DataRetentionSettings + */ + + /** + * Calls GetDataRetentionSettings. + * @function getDataRetentionSettings + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.IGetDataRetentionSettingsRequest} request GetDataRetentionSettingsRequest message or plain object + * @param {google.analytics.admin.v1beta.AnalyticsAdminService.GetDataRetentionSettingsCallback} callback Node-style callback called with the error, if any, and DataRetentionSettings + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.getDataRetentionSettings = function getDataRetentionSettings(request, callback) { + return this.rpcCall(getDataRetentionSettings, $root.google.analytics.admin.v1beta.GetDataRetentionSettingsRequest, $root.google.analytics.admin.v1beta.DataRetentionSettings, request, callback); + }, "name", { value: "GetDataRetentionSettings" }); + + /** + * Calls GetDataRetentionSettings. + * @function getDataRetentionSettings + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.IGetDataRetentionSettingsRequest} request GetDataRetentionSettingsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|updateDataRetentionSettings}. + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @typedef UpdateDataRetentionSettingsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.admin.v1beta.DataRetentionSettings} [response] DataRetentionSettings + */ + + /** + * Calls UpdateDataRetentionSettings. + * @function updateDataRetentionSettings + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.IUpdateDataRetentionSettingsRequest} request UpdateDataRetentionSettingsRequest message or plain object + * @param {google.analytics.admin.v1beta.AnalyticsAdminService.UpdateDataRetentionSettingsCallback} callback Node-style callback called with the error, if any, and DataRetentionSettings + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.updateDataRetentionSettings = function updateDataRetentionSettings(request, callback) { + return this.rpcCall(updateDataRetentionSettings, $root.google.analytics.admin.v1beta.UpdateDataRetentionSettingsRequest, $root.google.analytics.admin.v1beta.DataRetentionSettings, request, callback); + }, "name", { value: "UpdateDataRetentionSettings" }); + + /** + * Calls UpdateDataRetentionSettings. + * @function updateDataRetentionSettings + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.IUpdateDataRetentionSettingsRequest} request UpdateDataRetentionSettingsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|createDataStream}. + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @typedef CreateDataStreamCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.admin.v1beta.DataStream} [response] DataStream + */ + + /** + * Calls CreateDataStream. + * @function createDataStream + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.ICreateDataStreamRequest} request CreateDataStreamRequest message or plain object + * @param {google.analytics.admin.v1beta.AnalyticsAdminService.CreateDataStreamCallback} callback Node-style callback called with the error, if any, and DataStream + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.createDataStream = function createDataStream(request, callback) { + return this.rpcCall(createDataStream, $root.google.analytics.admin.v1beta.CreateDataStreamRequest, $root.google.analytics.admin.v1beta.DataStream, request, callback); + }, "name", { value: "CreateDataStream" }); + + /** + * Calls CreateDataStream. + * @function createDataStream + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.ICreateDataStreamRequest} request CreateDataStreamRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|deleteDataStream}. + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @typedef DeleteDataStreamCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteDataStream. + * @function deleteDataStream + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.IDeleteDataStreamRequest} request DeleteDataStreamRequest message or plain object + * @param {google.analytics.admin.v1beta.AnalyticsAdminService.DeleteDataStreamCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.deleteDataStream = function deleteDataStream(request, callback) { + return this.rpcCall(deleteDataStream, $root.google.analytics.admin.v1beta.DeleteDataStreamRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteDataStream" }); + + /** + * Calls DeleteDataStream. + * @function deleteDataStream + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.IDeleteDataStreamRequest} request DeleteDataStreamRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|updateDataStream}. + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @typedef UpdateDataStreamCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.admin.v1beta.DataStream} [response] DataStream + */ + + /** + * Calls UpdateDataStream. + * @function updateDataStream + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.IUpdateDataStreamRequest} request UpdateDataStreamRequest message or plain object + * @param {google.analytics.admin.v1beta.AnalyticsAdminService.UpdateDataStreamCallback} callback Node-style callback called with the error, if any, and DataStream + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.updateDataStream = function updateDataStream(request, callback) { + return this.rpcCall(updateDataStream, $root.google.analytics.admin.v1beta.UpdateDataStreamRequest, $root.google.analytics.admin.v1beta.DataStream, request, callback); + }, "name", { value: "UpdateDataStream" }); + + /** + * Calls UpdateDataStream. + * @function updateDataStream + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.IUpdateDataStreamRequest} request UpdateDataStreamRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|listDataStreams}. + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @typedef ListDataStreamsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.admin.v1beta.ListDataStreamsResponse} [response] ListDataStreamsResponse + */ + + /** + * Calls ListDataStreams. + * @function listDataStreams + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.IListDataStreamsRequest} request ListDataStreamsRequest message or plain object + * @param {google.analytics.admin.v1beta.AnalyticsAdminService.ListDataStreamsCallback} callback Node-style callback called with the error, if any, and ListDataStreamsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.listDataStreams = function listDataStreams(request, callback) { + return this.rpcCall(listDataStreams, $root.google.analytics.admin.v1beta.ListDataStreamsRequest, $root.google.analytics.admin.v1beta.ListDataStreamsResponse, request, callback); + }, "name", { value: "ListDataStreams" }); + + /** + * Calls ListDataStreams. + * @function listDataStreams + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.IListDataStreamsRequest} request ListDataStreamsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.analytics.admin.v1beta.AnalyticsAdminService|getDataStream}. + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @typedef GetDataStreamCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.analytics.admin.v1beta.DataStream} [response] DataStream + */ + + /** + * Calls GetDataStream. + * @function getDataStream + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.IGetDataStreamRequest} request GetDataStreamRequest message or plain object + * @param {google.analytics.admin.v1beta.AnalyticsAdminService.GetDataStreamCallback} callback Node-style callback called with the error, if any, and DataStream + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(AnalyticsAdminService.prototype.getDataStream = function getDataStream(request, callback) { + return this.rpcCall(getDataStream, $root.google.analytics.admin.v1beta.GetDataStreamRequest, $root.google.analytics.admin.v1beta.DataStream, request, callback); + }, "name", { value: "GetDataStream" }); + + /** + * Calls GetDataStream. + * @function getDataStream + * @memberof google.analytics.admin.v1beta.AnalyticsAdminService + * @instance + * @param {google.analytics.admin.v1beta.IGetDataStreamRequest} request GetDataStreamRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return AnalyticsAdminService; + })(); + + v1beta.GetAccountRequest = (function() { + + /** + * Properties of a GetAccountRequest. + * @memberof google.analytics.admin.v1beta + * @interface IGetAccountRequest + * @property {string|null} [name] GetAccountRequest name + */ + + /** + * Constructs a new GetAccountRequest. + * @memberof google.analytics.admin.v1beta + * @classdesc Represents a GetAccountRequest. + * @implements IGetAccountRequest + * @constructor + * @param {google.analytics.admin.v1beta.IGetAccountRequest=} [properties] Properties to set + */ + function GetAccountRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetAccountRequest name. + * @member {string} name + * @memberof google.analytics.admin.v1beta.GetAccountRequest + * @instance + */ + GetAccountRequest.prototype.name = ""; + + /** + * Creates a new GetAccountRequest instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1beta.GetAccountRequest + * @static + * @param {google.analytics.admin.v1beta.IGetAccountRequest=} [properties] Properties to set + * @returns {google.analytics.admin.v1beta.GetAccountRequest} GetAccountRequest instance + */ + GetAccountRequest.create = function create(properties) { + return new GetAccountRequest(properties); + }; + + /** + * Encodes the specified GetAccountRequest message. Does not implicitly {@link google.analytics.admin.v1beta.GetAccountRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1beta.GetAccountRequest + * @static + * @param {google.analytics.admin.v1beta.IGetAccountRequest} message GetAccountRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetAccountRequest.encode = function encode(message, writer) { + 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 GetAccountRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.GetAccountRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1beta.GetAccountRequest + * @static + * @param {google.analytics.admin.v1beta.IGetAccountRequest} message GetAccountRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetAccountRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetAccountRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1beta.GetAccountRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1beta.GetAccountRequest} GetAccountRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetAccountRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1beta.GetAccountRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetAccountRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1beta.GetAccountRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1beta.GetAccountRequest} GetAccountRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetAccountRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetAccountRequest message. + * @function verify + * @memberof google.analytics.admin.v1beta.GetAccountRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetAccountRequest.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 GetAccountRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1beta.GetAccountRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1beta.GetAccountRequest} GetAccountRequest + */ + GetAccountRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1beta.GetAccountRequest) + return object; + var message = new $root.google.analytics.admin.v1beta.GetAccountRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetAccountRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1beta.GetAccountRequest + * @static + * @param {google.analytics.admin.v1beta.GetAccountRequest} message GetAccountRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetAccountRequest.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 GetAccountRequest to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1beta.GetAccountRequest + * @instance + * @returns {Object.} JSON object + */ + GetAccountRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetAccountRequest + * @function getTypeUrl + * @memberof google.analytics.admin.v1beta.GetAccountRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetAccountRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1beta.GetAccountRequest"; + }; + + return GetAccountRequest; + })(); + + v1beta.ListAccountsRequest = (function() { + + /** + * Properties of a ListAccountsRequest. + * @memberof google.analytics.admin.v1beta + * @interface IListAccountsRequest + * @property {number|null} [pageSize] ListAccountsRequest pageSize + * @property {string|null} [pageToken] ListAccountsRequest pageToken + * @property {boolean|null} [showDeleted] ListAccountsRequest showDeleted + */ + + /** + * Constructs a new ListAccountsRequest. + * @memberof google.analytics.admin.v1beta + * @classdesc Represents a ListAccountsRequest. + * @implements IListAccountsRequest + * @constructor + * @param {google.analytics.admin.v1beta.IListAccountsRequest=} [properties] Properties to set + */ + function ListAccountsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListAccountsRequest pageSize. + * @member {number} pageSize + * @memberof google.analytics.admin.v1beta.ListAccountsRequest + * @instance + */ + ListAccountsRequest.prototype.pageSize = 0; + + /** + * ListAccountsRequest pageToken. + * @member {string} pageToken + * @memberof google.analytics.admin.v1beta.ListAccountsRequest + * @instance + */ + ListAccountsRequest.prototype.pageToken = ""; + + /** + * ListAccountsRequest showDeleted. + * @member {boolean} showDeleted + * @memberof google.analytics.admin.v1beta.ListAccountsRequest + * @instance + */ + ListAccountsRequest.prototype.showDeleted = false; + + /** + * Creates a new ListAccountsRequest instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1beta.ListAccountsRequest + * @static + * @param {google.analytics.admin.v1beta.IListAccountsRequest=} [properties] Properties to set + * @returns {google.analytics.admin.v1beta.ListAccountsRequest} ListAccountsRequest instance + */ + ListAccountsRequest.create = function create(properties) { + return new ListAccountsRequest(properties); + }; + + /** + * Encodes the specified ListAccountsRequest message. Does not implicitly {@link google.analytics.admin.v1beta.ListAccountsRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1beta.ListAccountsRequest + * @static + * @param {google.analytics.admin.v1beta.IListAccountsRequest} message ListAccountsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListAccountsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.pageToken); + if (message.showDeleted != null && Object.hasOwnProperty.call(message, "showDeleted")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.showDeleted); + return writer; + }; + + /** + * Encodes the specified ListAccountsRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.ListAccountsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1beta.ListAccountsRequest + * @static + * @param {google.analytics.admin.v1beta.IListAccountsRequest} message ListAccountsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListAccountsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListAccountsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1beta.ListAccountsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1beta.ListAccountsRequest} ListAccountsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListAccountsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1beta.ListAccountsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.pageSize = reader.int32(); + break; + } + case 2: { + message.pageToken = reader.string(); + break; + } + case 3: { + message.showDeleted = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListAccountsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1beta.ListAccountsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1beta.ListAccountsRequest} ListAccountsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListAccountsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListAccountsRequest message. + * @function verify + * @memberof google.analytics.admin.v1beta.ListAccountsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListAccountsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object 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.showDeleted != null && message.hasOwnProperty("showDeleted")) + if (typeof message.showDeleted !== "boolean") + return "showDeleted: boolean expected"; + return null; + }; + + /** + * Creates a ListAccountsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1beta.ListAccountsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1beta.ListAccountsRequest} ListAccountsRequest + */ + ListAccountsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1beta.ListAccountsRequest) + return object; + var message = new $root.google.analytics.admin.v1beta.ListAccountsRequest(); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.showDeleted != null) + message.showDeleted = Boolean(object.showDeleted); + return message; + }; + + /** + * Creates a plain object from a ListAccountsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1beta.ListAccountsRequest + * @static + * @param {google.analytics.admin.v1beta.ListAccountsRequest} message ListAccountsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListAccountsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.pageSize = 0; + object.pageToken = ""; + object.showDeleted = false; + } + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.showDeleted != null && message.hasOwnProperty("showDeleted")) + object.showDeleted = message.showDeleted; + return object; + }; + + /** + * Converts this ListAccountsRequest to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1beta.ListAccountsRequest + * @instance + * @returns {Object.} JSON object + */ + ListAccountsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListAccountsRequest + * @function getTypeUrl + * @memberof google.analytics.admin.v1beta.ListAccountsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListAccountsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1beta.ListAccountsRequest"; + }; + + return ListAccountsRequest; + })(); + + v1beta.ListAccountsResponse = (function() { + + /** + * Properties of a ListAccountsResponse. + * @memberof google.analytics.admin.v1beta + * @interface IListAccountsResponse + * @property {Array.|null} [accounts] ListAccountsResponse accounts + * @property {string|null} [nextPageToken] ListAccountsResponse nextPageToken + */ + + /** + * Constructs a new ListAccountsResponse. + * @memberof google.analytics.admin.v1beta + * @classdesc Represents a ListAccountsResponse. + * @implements IListAccountsResponse + * @constructor + * @param {google.analytics.admin.v1beta.IListAccountsResponse=} [properties] Properties to set + */ + function ListAccountsResponse(properties) { + this.accounts = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListAccountsResponse accounts. + * @member {Array.} accounts + * @memberof google.analytics.admin.v1beta.ListAccountsResponse + * @instance + */ + ListAccountsResponse.prototype.accounts = $util.emptyArray; + + /** + * ListAccountsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.analytics.admin.v1beta.ListAccountsResponse + * @instance + */ + ListAccountsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListAccountsResponse instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1beta.ListAccountsResponse + * @static + * @param {google.analytics.admin.v1beta.IListAccountsResponse=} [properties] Properties to set + * @returns {google.analytics.admin.v1beta.ListAccountsResponse} ListAccountsResponse instance + */ + ListAccountsResponse.create = function create(properties) { + return new ListAccountsResponse(properties); + }; + + /** + * Encodes the specified ListAccountsResponse message. Does not implicitly {@link google.analytics.admin.v1beta.ListAccountsResponse.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1beta.ListAccountsResponse + * @static + * @param {google.analytics.admin.v1beta.IListAccountsResponse} message ListAccountsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListAccountsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.accounts != null && message.accounts.length) + for (var i = 0; i < message.accounts.length; ++i) + $root.google.analytics.admin.v1beta.Account.encode(message.accounts[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 ListAccountsResponse message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.ListAccountsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1beta.ListAccountsResponse + * @static + * @param {google.analytics.admin.v1beta.IListAccountsResponse} message ListAccountsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListAccountsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListAccountsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1beta.ListAccountsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1beta.ListAccountsResponse} ListAccountsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListAccountsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1beta.ListAccountsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.accounts && message.accounts.length)) + message.accounts = []; + message.accounts.push($root.google.analytics.admin.v1beta.Account.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListAccountsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1beta.ListAccountsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1beta.ListAccountsResponse} ListAccountsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListAccountsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListAccountsResponse message. + * @function verify + * @memberof google.analytics.admin.v1beta.ListAccountsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListAccountsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.accounts != null && message.hasOwnProperty("accounts")) { + if (!Array.isArray(message.accounts)) + return "accounts: array expected"; + for (var i = 0; i < message.accounts.length; ++i) { + var error = $root.google.analytics.admin.v1beta.Account.verify(message.accounts[i]); + if (error) + return "accounts." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListAccountsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1beta.ListAccountsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1beta.ListAccountsResponse} ListAccountsResponse + */ + ListAccountsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1beta.ListAccountsResponse) + return object; + var message = new $root.google.analytics.admin.v1beta.ListAccountsResponse(); + if (object.accounts) { + if (!Array.isArray(object.accounts)) + throw TypeError(".google.analytics.admin.v1beta.ListAccountsResponse.accounts: array expected"); + message.accounts = []; + for (var i = 0; i < object.accounts.length; ++i) { + if (typeof object.accounts[i] !== "object") + throw TypeError(".google.analytics.admin.v1beta.ListAccountsResponse.accounts: object expected"); + message.accounts[i] = $root.google.analytics.admin.v1beta.Account.fromObject(object.accounts[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListAccountsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1beta.ListAccountsResponse + * @static + * @param {google.analytics.admin.v1beta.ListAccountsResponse} message ListAccountsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListAccountsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.accounts = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.accounts && message.accounts.length) { + object.accounts = []; + for (var j = 0; j < message.accounts.length; ++j) + object.accounts[j] = $root.google.analytics.admin.v1beta.Account.toObject(message.accounts[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListAccountsResponse to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1beta.ListAccountsResponse + * @instance + * @returns {Object.} JSON object + */ + ListAccountsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListAccountsResponse + * @function getTypeUrl + * @memberof google.analytics.admin.v1beta.ListAccountsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListAccountsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1beta.ListAccountsResponse"; + }; + + return ListAccountsResponse; + })(); + + v1beta.DeleteAccountRequest = (function() { + + /** + * Properties of a DeleteAccountRequest. + * @memberof google.analytics.admin.v1beta + * @interface IDeleteAccountRequest + * @property {string|null} [name] DeleteAccountRequest name + */ + + /** + * Constructs a new DeleteAccountRequest. + * @memberof google.analytics.admin.v1beta + * @classdesc Represents a DeleteAccountRequest. + * @implements IDeleteAccountRequest + * @constructor + * @param {google.analytics.admin.v1beta.IDeleteAccountRequest=} [properties] Properties to set + */ + function DeleteAccountRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteAccountRequest name. + * @member {string} name + * @memberof google.analytics.admin.v1beta.DeleteAccountRequest + * @instance + */ + DeleteAccountRequest.prototype.name = ""; + + /** + * Creates a new DeleteAccountRequest instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1beta.DeleteAccountRequest + * @static + * @param {google.analytics.admin.v1beta.IDeleteAccountRequest=} [properties] Properties to set + * @returns {google.analytics.admin.v1beta.DeleteAccountRequest} DeleteAccountRequest instance + */ + DeleteAccountRequest.create = function create(properties) { + return new DeleteAccountRequest(properties); + }; + + /** + * Encodes the specified DeleteAccountRequest message. Does not implicitly {@link google.analytics.admin.v1beta.DeleteAccountRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1beta.DeleteAccountRequest + * @static + * @param {google.analytics.admin.v1beta.IDeleteAccountRequest} message DeleteAccountRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteAccountRequest.encode = function encode(message, writer) { + 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 DeleteAccountRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.DeleteAccountRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1beta.DeleteAccountRequest + * @static + * @param {google.analytics.admin.v1beta.IDeleteAccountRequest} message DeleteAccountRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteAccountRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteAccountRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1beta.DeleteAccountRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1beta.DeleteAccountRequest} DeleteAccountRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteAccountRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1beta.DeleteAccountRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteAccountRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1beta.DeleteAccountRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1beta.DeleteAccountRequest} DeleteAccountRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteAccountRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteAccountRequest message. + * @function verify + * @memberof google.analytics.admin.v1beta.DeleteAccountRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteAccountRequest.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 DeleteAccountRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1beta.DeleteAccountRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1beta.DeleteAccountRequest} DeleteAccountRequest + */ + DeleteAccountRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1beta.DeleteAccountRequest) + return object; + var message = new $root.google.analytics.admin.v1beta.DeleteAccountRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteAccountRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1beta.DeleteAccountRequest + * @static + * @param {google.analytics.admin.v1beta.DeleteAccountRequest} message DeleteAccountRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteAccountRequest.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 DeleteAccountRequest to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1beta.DeleteAccountRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteAccountRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteAccountRequest + * @function getTypeUrl + * @memberof google.analytics.admin.v1beta.DeleteAccountRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteAccountRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1beta.DeleteAccountRequest"; + }; + + return DeleteAccountRequest; + })(); + + v1beta.UpdateAccountRequest = (function() { + + /** + * Properties of an UpdateAccountRequest. + * @memberof google.analytics.admin.v1beta + * @interface IUpdateAccountRequest + * @property {google.analytics.admin.v1beta.IAccount|null} [account] UpdateAccountRequest account + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateAccountRequest updateMask + */ + + /** + * Constructs a new UpdateAccountRequest. + * @memberof google.analytics.admin.v1beta + * @classdesc Represents an UpdateAccountRequest. + * @implements IUpdateAccountRequest + * @constructor + * @param {google.analytics.admin.v1beta.IUpdateAccountRequest=} [properties] Properties to set + */ + function UpdateAccountRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateAccountRequest account. + * @member {google.analytics.admin.v1beta.IAccount|null|undefined} account + * @memberof google.analytics.admin.v1beta.UpdateAccountRequest + * @instance + */ + UpdateAccountRequest.prototype.account = null; + + /** + * UpdateAccountRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.analytics.admin.v1beta.UpdateAccountRequest + * @instance + */ + UpdateAccountRequest.prototype.updateMask = null; + + /** + * Creates a new UpdateAccountRequest instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1beta.UpdateAccountRequest + * @static + * @param {google.analytics.admin.v1beta.IUpdateAccountRequest=} [properties] Properties to set + * @returns {google.analytics.admin.v1beta.UpdateAccountRequest} UpdateAccountRequest instance + */ + UpdateAccountRequest.create = function create(properties) { + return new UpdateAccountRequest(properties); + }; + + /** + * Encodes the specified UpdateAccountRequest message. Does not implicitly {@link google.analytics.admin.v1beta.UpdateAccountRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1beta.UpdateAccountRequest + * @static + * @param {google.analytics.admin.v1beta.IUpdateAccountRequest} message UpdateAccountRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateAccountRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.account != null && Object.hasOwnProperty.call(message, "account")) + $root.google.analytics.admin.v1beta.Account.encode(message.account, 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 UpdateAccountRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.UpdateAccountRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1beta.UpdateAccountRequest + * @static + * @param {google.analytics.admin.v1beta.IUpdateAccountRequest} message UpdateAccountRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateAccountRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateAccountRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1beta.UpdateAccountRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1beta.UpdateAccountRequest} UpdateAccountRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateAccountRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1beta.UpdateAccountRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.account = $root.google.analytics.admin.v1beta.Account.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 UpdateAccountRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1beta.UpdateAccountRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1beta.UpdateAccountRequest} UpdateAccountRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateAccountRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateAccountRequest message. + * @function verify + * @memberof google.analytics.admin.v1beta.UpdateAccountRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateAccountRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.account != null && message.hasOwnProperty("account")) { + var error = $root.google.analytics.admin.v1beta.Account.verify(message.account); + if (error) + return "account." + 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 UpdateAccountRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1beta.UpdateAccountRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1beta.UpdateAccountRequest} UpdateAccountRequest + */ + UpdateAccountRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1beta.UpdateAccountRequest) + return object; + var message = new $root.google.analytics.admin.v1beta.UpdateAccountRequest(); + if (object.account != null) { + if (typeof object.account !== "object") + throw TypeError(".google.analytics.admin.v1beta.UpdateAccountRequest.account: object expected"); + message.account = $root.google.analytics.admin.v1beta.Account.fromObject(object.account); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.analytics.admin.v1beta.UpdateAccountRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + return message; + }; + + /** + * Creates a plain object from an UpdateAccountRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1beta.UpdateAccountRequest + * @static + * @param {google.analytics.admin.v1beta.UpdateAccountRequest} message UpdateAccountRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateAccountRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.account = null; + object.updateMask = null; + } + if (message.account != null && message.hasOwnProperty("account")) + object.account = $root.google.analytics.admin.v1beta.Account.toObject(message.account, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + return object; + }; + + /** + * Converts this UpdateAccountRequest to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1beta.UpdateAccountRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateAccountRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateAccountRequest + * @function getTypeUrl + * @memberof google.analytics.admin.v1beta.UpdateAccountRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateAccountRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1beta.UpdateAccountRequest"; + }; + + return UpdateAccountRequest; + })(); + + v1beta.ProvisionAccountTicketRequest = (function() { + + /** + * Properties of a ProvisionAccountTicketRequest. + * @memberof google.analytics.admin.v1beta + * @interface IProvisionAccountTicketRequest + * @property {google.analytics.admin.v1beta.IAccount|null} [account] ProvisionAccountTicketRequest account + * @property {string|null} [redirectUri] ProvisionAccountTicketRequest redirectUri + */ + + /** + * Constructs a new ProvisionAccountTicketRequest. + * @memberof google.analytics.admin.v1beta + * @classdesc Represents a ProvisionAccountTicketRequest. + * @implements IProvisionAccountTicketRequest + * @constructor + * @param {google.analytics.admin.v1beta.IProvisionAccountTicketRequest=} [properties] Properties to set + */ + function ProvisionAccountTicketRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ProvisionAccountTicketRequest account. + * @member {google.analytics.admin.v1beta.IAccount|null|undefined} account + * @memberof google.analytics.admin.v1beta.ProvisionAccountTicketRequest + * @instance + */ + ProvisionAccountTicketRequest.prototype.account = null; + + /** + * ProvisionAccountTicketRequest redirectUri. + * @member {string} redirectUri + * @memberof google.analytics.admin.v1beta.ProvisionAccountTicketRequest + * @instance + */ + ProvisionAccountTicketRequest.prototype.redirectUri = ""; + + /** + * Creates a new ProvisionAccountTicketRequest instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1beta.ProvisionAccountTicketRequest + * @static + * @param {google.analytics.admin.v1beta.IProvisionAccountTicketRequest=} [properties] Properties to set + * @returns {google.analytics.admin.v1beta.ProvisionAccountTicketRequest} ProvisionAccountTicketRequest instance + */ + ProvisionAccountTicketRequest.create = function create(properties) { + return new ProvisionAccountTicketRequest(properties); + }; + + /** + * Encodes the specified ProvisionAccountTicketRequest message. Does not implicitly {@link google.analytics.admin.v1beta.ProvisionAccountTicketRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1beta.ProvisionAccountTicketRequest + * @static + * @param {google.analytics.admin.v1beta.IProvisionAccountTicketRequest} message ProvisionAccountTicketRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ProvisionAccountTicketRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.account != null && Object.hasOwnProperty.call(message, "account")) + $root.google.analytics.admin.v1beta.Account.encode(message.account, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.redirectUri != null && Object.hasOwnProperty.call(message, "redirectUri")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.redirectUri); + return writer; + }; + + /** + * Encodes the specified ProvisionAccountTicketRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.ProvisionAccountTicketRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1beta.ProvisionAccountTicketRequest + * @static + * @param {google.analytics.admin.v1beta.IProvisionAccountTicketRequest} message ProvisionAccountTicketRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ProvisionAccountTicketRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ProvisionAccountTicketRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1beta.ProvisionAccountTicketRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1beta.ProvisionAccountTicketRequest} ProvisionAccountTicketRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ProvisionAccountTicketRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1beta.ProvisionAccountTicketRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.account = $root.google.analytics.admin.v1beta.Account.decode(reader, reader.uint32()); + break; + } + case 2: { + message.redirectUri = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ProvisionAccountTicketRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1beta.ProvisionAccountTicketRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1beta.ProvisionAccountTicketRequest} ProvisionAccountTicketRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ProvisionAccountTicketRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ProvisionAccountTicketRequest message. + * @function verify + * @memberof google.analytics.admin.v1beta.ProvisionAccountTicketRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ProvisionAccountTicketRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.account != null && message.hasOwnProperty("account")) { + var error = $root.google.analytics.admin.v1beta.Account.verify(message.account); + if (error) + return "account." + error; + } + if (message.redirectUri != null && message.hasOwnProperty("redirectUri")) + if (!$util.isString(message.redirectUri)) + return "redirectUri: string expected"; + return null; + }; + + /** + * Creates a ProvisionAccountTicketRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1beta.ProvisionAccountTicketRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1beta.ProvisionAccountTicketRequest} ProvisionAccountTicketRequest + */ + ProvisionAccountTicketRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1beta.ProvisionAccountTicketRequest) + return object; + var message = new $root.google.analytics.admin.v1beta.ProvisionAccountTicketRequest(); + if (object.account != null) { + if (typeof object.account !== "object") + throw TypeError(".google.analytics.admin.v1beta.ProvisionAccountTicketRequest.account: object expected"); + message.account = $root.google.analytics.admin.v1beta.Account.fromObject(object.account); + } + if (object.redirectUri != null) + message.redirectUri = String(object.redirectUri); + return message; + }; + + /** + * Creates a plain object from a ProvisionAccountTicketRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1beta.ProvisionAccountTicketRequest + * @static + * @param {google.analytics.admin.v1beta.ProvisionAccountTicketRequest} message ProvisionAccountTicketRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ProvisionAccountTicketRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.account = null; + object.redirectUri = ""; + } + if (message.account != null && message.hasOwnProperty("account")) + object.account = $root.google.analytics.admin.v1beta.Account.toObject(message.account, options); + if (message.redirectUri != null && message.hasOwnProperty("redirectUri")) + object.redirectUri = message.redirectUri; + return object; + }; + + /** + * Converts this ProvisionAccountTicketRequest to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1beta.ProvisionAccountTicketRequest + * @instance + * @returns {Object.} JSON object + */ + ProvisionAccountTicketRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ProvisionAccountTicketRequest + * @function getTypeUrl + * @memberof google.analytics.admin.v1beta.ProvisionAccountTicketRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ProvisionAccountTicketRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1beta.ProvisionAccountTicketRequest"; + }; + + return ProvisionAccountTicketRequest; + })(); + + v1beta.ProvisionAccountTicketResponse = (function() { + + /** + * Properties of a ProvisionAccountTicketResponse. + * @memberof google.analytics.admin.v1beta + * @interface IProvisionAccountTicketResponse + * @property {string|null} [accountTicketId] ProvisionAccountTicketResponse accountTicketId + */ + + /** + * Constructs a new ProvisionAccountTicketResponse. + * @memberof google.analytics.admin.v1beta + * @classdesc Represents a ProvisionAccountTicketResponse. + * @implements IProvisionAccountTicketResponse + * @constructor + * @param {google.analytics.admin.v1beta.IProvisionAccountTicketResponse=} [properties] Properties to set + */ + function ProvisionAccountTicketResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ProvisionAccountTicketResponse accountTicketId. + * @member {string} accountTicketId + * @memberof google.analytics.admin.v1beta.ProvisionAccountTicketResponse + * @instance + */ + ProvisionAccountTicketResponse.prototype.accountTicketId = ""; + + /** + * Creates a new ProvisionAccountTicketResponse instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1beta.ProvisionAccountTicketResponse + * @static + * @param {google.analytics.admin.v1beta.IProvisionAccountTicketResponse=} [properties] Properties to set + * @returns {google.analytics.admin.v1beta.ProvisionAccountTicketResponse} ProvisionAccountTicketResponse instance + */ + ProvisionAccountTicketResponse.create = function create(properties) { + return new ProvisionAccountTicketResponse(properties); + }; + + /** + * Encodes the specified ProvisionAccountTicketResponse message. Does not implicitly {@link google.analytics.admin.v1beta.ProvisionAccountTicketResponse.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1beta.ProvisionAccountTicketResponse + * @static + * @param {google.analytics.admin.v1beta.IProvisionAccountTicketResponse} message ProvisionAccountTicketResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ProvisionAccountTicketResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.accountTicketId != null && Object.hasOwnProperty.call(message, "accountTicketId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.accountTicketId); + return writer; + }; + + /** + * Encodes the specified ProvisionAccountTicketResponse message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.ProvisionAccountTicketResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1beta.ProvisionAccountTicketResponse + * @static + * @param {google.analytics.admin.v1beta.IProvisionAccountTicketResponse} message ProvisionAccountTicketResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ProvisionAccountTicketResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ProvisionAccountTicketResponse message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1beta.ProvisionAccountTicketResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1beta.ProvisionAccountTicketResponse} ProvisionAccountTicketResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ProvisionAccountTicketResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1beta.ProvisionAccountTicketResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.accountTicketId = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ProvisionAccountTicketResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1beta.ProvisionAccountTicketResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1beta.ProvisionAccountTicketResponse} ProvisionAccountTicketResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ProvisionAccountTicketResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ProvisionAccountTicketResponse message. + * @function verify + * @memberof google.analytics.admin.v1beta.ProvisionAccountTicketResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ProvisionAccountTicketResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.accountTicketId != null && message.hasOwnProperty("accountTicketId")) + if (!$util.isString(message.accountTicketId)) + return "accountTicketId: string expected"; + return null; + }; + + /** + * Creates a ProvisionAccountTicketResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1beta.ProvisionAccountTicketResponse + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1beta.ProvisionAccountTicketResponse} ProvisionAccountTicketResponse + */ + ProvisionAccountTicketResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1beta.ProvisionAccountTicketResponse) + return object; + var message = new $root.google.analytics.admin.v1beta.ProvisionAccountTicketResponse(); + if (object.accountTicketId != null) + message.accountTicketId = String(object.accountTicketId); + return message; + }; + + /** + * Creates a plain object from a ProvisionAccountTicketResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1beta.ProvisionAccountTicketResponse + * @static + * @param {google.analytics.admin.v1beta.ProvisionAccountTicketResponse} message ProvisionAccountTicketResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ProvisionAccountTicketResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.accountTicketId = ""; + if (message.accountTicketId != null && message.hasOwnProperty("accountTicketId")) + object.accountTicketId = message.accountTicketId; + return object; + }; + + /** + * Converts this ProvisionAccountTicketResponse to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1beta.ProvisionAccountTicketResponse + * @instance + * @returns {Object.} JSON object + */ + ProvisionAccountTicketResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ProvisionAccountTicketResponse + * @function getTypeUrl + * @memberof google.analytics.admin.v1beta.ProvisionAccountTicketResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ProvisionAccountTicketResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1beta.ProvisionAccountTicketResponse"; + }; + + return ProvisionAccountTicketResponse; + })(); + + v1beta.GetPropertyRequest = (function() { + + /** + * Properties of a GetPropertyRequest. + * @memberof google.analytics.admin.v1beta + * @interface IGetPropertyRequest + * @property {string|null} [name] GetPropertyRequest name + */ + + /** + * Constructs a new GetPropertyRequest. + * @memberof google.analytics.admin.v1beta + * @classdesc Represents a GetPropertyRequest. + * @implements IGetPropertyRequest + * @constructor + * @param {google.analytics.admin.v1beta.IGetPropertyRequest=} [properties] Properties to set + */ + function GetPropertyRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetPropertyRequest name. + * @member {string} name + * @memberof google.analytics.admin.v1beta.GetPropertyRequest + * @instance + */ + GetPropertyRequest.prototype.name = ""; + + /** + * Creates a new GetPropertyRequest instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1beta.GetPropertyRequest + * @static + * @param {google.analytics.admin.v1beta.IGetPropertyRequest=} [properties] Properties to set + * @returns {google.analytics.admin.v1beta.GetPropertyRequest} GetPropertyRequest instance + */ + GetPropertyRequest.create = function create(properties) { + return new GetPropertyRequest(properties); + }; + + /** + * Encodes the specified GetPropertyRequest message. Does not implicitly {@link google.analytics.admin.v1beta.GetPropertyRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1beta.GetPropertyRequest + * @static + * @param {google.analytics.admin.v1beta.IGetPropertyRequest} message GetPropertyRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetPropertyRequest.encode = function encode(message, writer) { + 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 GetPropertyRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.GetPropertyRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1beta.GetPropertyRequest + * @static + * @param {google.analytics.admin.v1beta.IGetPropertyRequest} message GetPropertyRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetPropertyRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetPropertyRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1beta.GetPropertyRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1beta.GetPropertyRequest} GetPropertyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetPropertyRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1beta.GetPropertyRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetPropertyRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1beta.GetPropertyRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1beta.GetPropertyRequest} GetPropertyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetPropertyRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetPropertyRequest message. + * @function verify + * @memberof google.analytics.admin.v1beta.GetPropertyRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetPropertyRequest.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 GetPropertyRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1beta.GetPropertyRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1beta.GetPropertyRequest} GetPropertyRequest + */ + GetPropertyRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1beta.GetPropertyRequest) + return object; + var message = new $root.google.analytics.admin.v1beta.GetPropertyRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetPropertyRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1beta.GetPropertyRequest + * @static + * @param {google.analytics.admin.v1beta.GetPropertyRequest} message GetPropertyRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetPropertyRequest.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 GetPropertyRequest to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1beta.GetPropertyRequest + * @instance + * @returns {Object.} JSON object + */ + GetPropertyRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetPropertyRequest + * @function getTypeUrl + * @memberof google.analytics.admin.v1beta.GetPropertyRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetPropertyRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1beta.GetPropertyRequest"; + }; + + return GetPropertyRequest; + })(); + + v1beta.ListPropertiesRequest = (function() { + + /** + * Properties of a ListPropertiesRequest. + * @memberof google.analytics.admin.v1beta + * @interface IListPropertiesRequest + * @property {string|null} [filter] ListPropertiesRequest filter + * @property {number|null} [pageSize] ListPropertiesRequest pageSize + * @property {string|null} [pageToken] ListPropertiesRequest pageToken + * @property {boolean|null} [showDeleted] ListPropertiesRequest showDeleted + */ + + /** + * Constructs a new ListPropertiesRequest. + * @memberof google.analytics.admin.v1beta + * @classdesc Represents a ListPropertiesRequest. + * @implements IListPropertiesRequest + * @constructor + * @param {google.analytics.admin.v1beta.IListPropertiesRequest=} [properties] Properties to set + */ + function ListPropertiesRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListPropertiesRequest filter. + * @member {string} filter + * @memberof google.analytics.admin.v1beta.ListPropertiesRequest + * @instance + */ + ListPropertiesRequest.prototype.filter = ""; + + /** + * ListPropertiesRequest pageSize. + * @member {number} pageSize + * @memberof google.analytics.admin.v1beta.ListPropertiesRequest + * @instance + */ + ListPropertiesRequest.prototype.pageSize = 0; + + /** + * ListPropertiesRequest pageToken. + * @member {string} pageToken + * @memberof google.analytics.admin.v1beta.ListPropertiesRequest + * @instance + */ + ListPropertiesRequest.prototype.pageToken = ""; + + /** + * ListPropertiesRequest showDeleted. + * @member {boolean} showDeleted + * @memberof google.analytics.admin.v1beta.ListPropertiesRequest + * @instance + */ + ListPropertiesRequest.prototype.showDeleted = false; + + /** + * Creates a new ListPropertiesRequest instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1beta.ListPropertiesRequest + * @static + * @param {google.analytics.admin.v1beta.IListPropertiesRequest=} [properties] Properties to set + * @returns {google.analytics.admin.v1beta.ListPropertiesRequest} ListPropertiesRequest instance + */ + ListPropertiesRequest.create = function create(properties) { + return new ListPropertiesRequest(properties); + }; + + /** + * Encodes the specified ListPropertiesRequest message. Does not implicitly {@link google.analytics.admin.v1beta.ListPropertiesRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1beta.ListPropertiesRequest + * @static + * @param {google.analytics.admin.v1beta.IListPropertiesRequest} message ListPropertiesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListPropertiesRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.filter); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.showDeleted != null && Object.hasOwnProperty.call(message, "showDeleted")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.showDeleted); + return writer; + }; + + /** + * Encodes the specified ListPropertiesRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.ListPropertiesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1beta.ListPropertiesRequest + * @static + * @param {google.analytics.admin.v1beta.IListPropertiesRequest} message ListPropertiesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListPropertiesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListPropertiesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1beta.ListPropertiesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1beta.ListPropertiesRequest} ListPropertiesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListPropertiesRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1beta.ListPropertiesRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.filter = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + case 4: { + message.showDeleted = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListPropertiesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1beta.ListPropertiesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1beta.ListPropertiesRequest} ListPropertiesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListPropertiesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListPropertiesRequest message. + * @function verify + * @memberof google.analytics.admin.v1beta.ListPropertiesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListPropertiesRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.showDeleted != null && message.hasOwnProperty("showDeleted")) + if (typeof message.showDeleted !== "boolean") + return "showDeleted: boolean expected"; + return null; + }; + + /** + * Creates a ListPropertiesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1beta.ListPropertiesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1beta.ListPropertiesRequest} ListPropertiesRequest + */ + ListPropertiesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1beta.ListPropertiesRequest) + return object; + var message = new $root.google.analytics.admin.v1beta.ListPropertiesRequest(); + if (object.filter != null) + message.filter = String(object.filter); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.showDeleted != null) + message.showDeleted = Boolean(object.showDeleted); + return message; + }; + + /** + * Creates a plain object from a ListPropertiesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1beta.ListPropertiesRequest + * @static + * @param {google.analytics.admin.v1beta.ListPropertiesRequest} message ListPropertiesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListPropertiesRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.filter = ""; + object.pageSize = 0; + object.pageToken = ""; + object.showDeleted = false; + } + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.showDeleted != null && message.hasOwnProperty("showDeleted")) + object.showDeleted = message.showDeleted; + return object; + }; + + /** + * Converts this ListPropertiesRequest to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1beta.ListPropertiesRequest + * @instance + * @returns {Object.} JSON object + */ + ListPropertiesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListPropertiesRequest + * @function getTypeUrl + * @memberof google.analytics.admin.v1beta.ListPropertiesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListPropertiesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1beta.ListPropertiesRequest"; + }; + + return ListPropertiesRequest; + })(); + + v1beta.ListPropertiesResponse = (function() { + + /** + * Properties of a ListPropertiesResponse. + * @memberof google.analytics.admin.v1beta + * @interface IListPropertiesResponse + * @property {Array.|null} [properties] ListPropertiesResponse properties + * @property {string|null} [nextPageToken] ListPropertiesResponse nextPageToken + */ + + /** + * Constructs a new ListPropertiesResponse. + * @memberof google.analytics.admin.v1beta + * @classdesc Represents a ListPropertiesResponse. + * @implements IListPropertiesResponse + * @constructor + * @param {google.analytics.admin.v1beta.IListPropertiesResponse=} [properties] Properties to set + */ + function ListPropertiesResponse(properties) { + this.properties = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListPropertiesResponse properties. + * @member {Array.} properties + * @memberof google.analytics.admin.v1beta.ListPropertiesResponse + * @instance + */ + ListPropertiesResponse.prototype.properties = $util.emptyArray; + + /** + * ListPropertiesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.analytics.admin.v1beta.ListPropertiesResponse + * @instance + */ + ListPropertiesResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListPropertiesResponse instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1beta.ListPropertiesResponse + * @static + * @param {google.analytics.admin.v1beta.IListPropertiesResponse=} [properties] Properties to set + * @returns {google.analytics.admin.v1beta.ListPropertiesResponse} ListPropertiesResponse instance + */ + ListPropertiesResponse.create = function create(properties) { + return new ListPropertiesResponse(properties); + }; + + /** + * Encodes the specified ListPropertiesResponse message. Does not implicitly {@link google.analytics.admin.v1beta.ListPropertiesResponse.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1beta.ListPropertiesResponse + * @static + * @param {google.analytics.admin.v1beta.IListPropertiesResponse} message ListPropertiesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListPropertiesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.properties != null && message.properties.length) + for (var i = 0; i < message.properties.length; ++i) + $root.google.analytics.admin.v1beta.Property.encode(message.properties[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 ListPropertiesResponse message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.ListPropertiesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1beta.ListPropertiesResponse + * @static + * @param {google.analytics.admin.v1beta.IListPropertiesResponse} message ListPropertiesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListPropertiesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListPropertiesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1beta.ListPropertiesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1beta.ListPropertiesResponse} ListPropertiesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListPropertiesResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1beta.ListPropertiesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.properties && message.properties.length)) + message.properties = []; + message.properties.push($root.google.analytics.admin.v1beta.Property.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListPropertiesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1beta.ListPropertiesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1beta.ListPropertiesResponse} ListPropertiesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListPropertiesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListPropertiesResponse message. + * @function verify + * @memberof google.analytics.admin.v1beta.ListPropertiesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListPropertiesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.properties != null && message.hasOwnProperty("properties")) { + if (!Array.isArray(message.properties)) + return "properties: array expected"; + for (var i = 0; i < message.properties.length; ++i) { + var error = $root.google.analytics.admin.v1beta.Property.verify(message.properties[i]); + if (error) + return "properties." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListPropertiesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1beta.ListPropertiesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1beta.ListPropertiesResponse} ListPropertiesResponse + */ + ListPropertiesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1beta.ListPropertiesResponse) + return object; + var message = new $root.google.analytics.admin.v1beta.ListPropertiesResponse(); + if (object.properties) { + if (!Array.isArray(object.properties)) + throw TypeError(".google.analytics.admin.v1beta.ListPropertiesResponse.properties: array expected"); + message.properties = []; + for (var i = 0; i < object.properties.length; ++i) { + if (typeof object.properties[i] !== "object") + throw TypeError(".google.analytics.admin.v1beta.ListPropertiesResponse.properties: object expected"); + message.properties[i] = $root.google.analytics.admin.v1beta.Property.fromObject(object.properties[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListPropertiesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1beta.ListPropertiesResponse + * @static + * @param {google.analytics.admin.v1beta.ListPropertiesResponse} message ListPropertiesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListPropertiesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.properties = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.properties && message.properties.length) { + object.properties = []; + for (var j = 0; j < message.properties.length; ++j) + object.properties[j] = $root.google.analytics.admin.v1beta.Property.toObject(message.properties[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListPropertiesResponse to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1beta.ListPropertiesResponse + * @instance + * @returns {Object.} JSON object + */ + ListPropertiesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListPropertiesResponse + * @function getTypeUrl + * @memberof google.analytics.admin.v1beta.ListPropertiesResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListPropertiesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1beta.ListPropertiesResponse"; + }; + + return ListPropertiesResponse; + })(); + + v1beta.UpdatePropertyRequest = (function() { + + /** + * Properties of an UpdatePropertyRequest. + * @memberof google.analytics.admin.v1beta + * @interface IUpdatePropertyRequest + * @property {google.analytics.admin.v1beta.IProperty|null} [property] UpdatePropertyRequest property + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdatePropertyRequest updateMask + */ + + /** + * Constructs a new UpdatePropertyRequest. + * @memberof google.analytics.admin.v1beta + * @classdesc Represents an UpdatePropertyRequest. + * @implements IUpdatePropertyRequest + * @constructor + * @param {google.analytics.admin.v1beta.IUpdatePropertyRequest=} [properties] Properties to set + */ + function UpdatePropertyRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdatePropertyRequest property. + * @member {google.analytics.admin.v1beta.IProperty|null|undefined} property + * @memberof google.analytics.admin.v1beta.UpdatePropertyRequest + * @instance + */ + UpdatePropertyRequest.prototype.property = null; + + /** + * UpdatePropertyRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.analytics.admin.v1beta.UpdatePropertyRequest + * @instance + */ + UpdatePropertyRequest.prototype.updateMask = null; + + /** + * Creates a new UpdatePropertyRequest instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1beta.UpdatePropertyRequest + * @static + * @param {google.analytics.admin.v1beta.IUpdatePropertyRequest=} [properties] Properties to set + * @returns {google.analytics.admin.v1beta.UpdatePropertyRequest} UpdatePropertyRequest instance + */ + UpdatePropertyRequest.create = function create(properties) { + return new UpdatePropertyRequest(properties); + }; + + /** + * Encodes the specified UpdatePropertyRequest message. Does not implicitly {@link google.analytics.admin.v1beta.UpdatePropertyRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1beta.UpdatePropertyRequest + * @static + * @param {google.analytics.admin.v1beta.IUpdatePropertyRequest} message UpdatePropertyRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdatePropertyRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.property != null && Object.hasOwnProperty.call(message, "property")) + $root.google.analytics.admin.v1beta.Property.encode(message.property, 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 UpdatePropertyRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.UpdatePropertyRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1beta.UpdatePropertyRequest + * @static + * @param {google.analytics.admin.v1beta.IUpdatePropertyRequest} message UpdatePropertyRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdatePropertyRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdatePropertyRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1beta.UpdatePropertyRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1beta.UpdatePropertyRequest} UpdatePropertyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdatePropertyRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1beta.UpdatePropertyRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.property = $root.google.analytics.admin.v1beta.Property.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 UpdatePropertyRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1beta.UpdatePropertyRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1beta.UpdatePropertyRequest} UpdatePropertyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdatePropertyRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdatePropertyRequest message. + * @function verify + * @memberof google.analytics.admin.v1beta.UpdatePropertyRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdatePropertyRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.property != null && message.hasOwnProperty("property")) { + var error = $root.google.analytics.admin.v1beta.Property.verify(message.property); + if (error) + return "property." + 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 UpdatePropertyRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1beta.UpdatePropertyRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1beta.UpdatePropertyRequest} UpdatePropertyRequest + */ + UpdatePropertyRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1beta.UpdatePropertyRequest) + return object; + var message = new $root.google.analytics.admin.v1beta.UpdatePropertyRequest(); + if (object.property != null) { + if (typeof object.property !== "object") + throw TypeError(".google.analytics.admin.v1beta.UpdatePropertyRequest.property: object expected"); + message.property = $root.google.analytics.admin.v1beta.Property.fromObject(object.property); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.analytics.admin.v1beta.UpdatePropertyRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + return message; + }; + + /** + * Creates a plain object from an UpdatePropertyRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1beta.UpdatePropertyRequest + * @static + * @param {google.analytics.admin.v1beta.UpdatePropertyRequest} message UpdatePropertyRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdatePropertyRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.property = null; + object.updateMask = null; + } + if (message.property != null && message.hasOwnProperty("property")) + object.property = $root.google.analytics.admin.v1beta.Property.toObject(message.property, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + return object; + }; + + /** + * Converts this UpdatePropertyRequest to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1beta.UpdatePropertyRequest + * @instance + * @returns {Object.} JSON object + */ + UpdatePropertyRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdatePropertyRequest + * @function getTypeUrl + * @memberof google.analytics.admin.v1beta.UpdatePropertyRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdatePropertyRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1beta.UpdatePropertyRequest"; + }; + + return UpdatePropertyRequest; + })(); + + v1beta.CreatePropertyRequest = (function() { + + /** + * Properties of a CreatePropertyRequest. + * @memberof google.analytics.admin.v1beta + * @interface ICreatePropertyRequest + * @property {google.analytics.admin.v1beta.IProperty|null} [property] CreatePropertyRequest property + */ + + /** + * Constructs a new CreatePropertyRequest. + * @memberof google.analytics.admin.v1beta + * @classdesc Represents a CreatePropertyRequest. + * @implements ICreatePropertyRequest + * @constructor + * @param {google.analytics.admin.v1beta.ICreatePropertyRequest=} [properties] Properties to set + */ + function CreatePropertyRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreatePropertyRequest property. + * @member {google.analytics.admin.v1beta.IProperty|null|undefined} property + * @memberof google.analytics.admin.v1beta.CreatePropertyRequest + * @instance + */ + CreatePropertyRequest.prototype.property = null; + + /** + * Creates a new CreatePropertyRequest instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1beta.CreatePropertyRequest + * @static + * @param {google.analytics.admin.v1beta.ICreatePropertyRequest=} [properties] Properties to set + * @returns {google.analytics.admin.v1beta.CreatePropertyRequest} CreatePropertyRequest instance + */ + CreatePropertyRequest.create = function create(properties) { + return new CreatePropertyRequest(properties); + }; + + /** + * Encodes the specified CreatePropertyRequest message. Does not implicitly {@link google.analytics.admin.v1beta.CreatePropertyRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1beta.CreatePropertyRequest + * @static + * @param {google.analytics.admin.v1beta.ICreatePropertyRequest} message CreatePropertyRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreatePropertyRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.property != null && Object.hasOwnProperty.call(message, "property")) + $root.google.analytics.admin.v1beta.Property.encode(message.property, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CreatePropertyRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.CreatePropertyRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1beta.CreatePropertyRequest + * @static + * @param {google.analytics.admin.v1beta.ICreatePropertyRequest} message CreatePropertyRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreatePropertyRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreatePropertyRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1beta.CreatePropertyRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1beta.CreatePropertyRequest} CreatePropertyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreatePropertyRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1beta.CreatePropertyRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.property = $root.google.analytics.admin.v1beta.Property.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreatePropertyRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1beta.CreatePropertyRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1beta.CreatePropertyRequest} CreatePropertyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreatePropertyRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreatePropertyRequest message. + * @function verify + * @memberof google.analytics.admin.v1beta.CreatePropertyRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreatePropertyRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.property != null && message.hasOwnProperty("property")) { + var error = $root.google.analytics.admin.v1beta.Property.verify(message.property); + if (error) + return "property." + error; + } + return null; + }; + + /** + * Creates a CreatePropertyRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1beta.CreatePropertyRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1beta.CreatePropertyRequest} CreatePropertyRequest + */ + CreatePropertyRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1beta.CreatePropertyRequest) + return object; + var message = new $root.google.analytics.admin.v1beta.CreatePropertyRequest(); + if (object.property != null) { + if (typeof object.property !== "object") + throw TypeError(".google.analytics.admin.v1beta.CreatePropertyRequest.property: object expected"); + message.property = $root.google.analytics.admin.v1beta.Property.fromObject(object.property); + } + return message; + }; + + /** + * Creates a plain object from a CreatePropertyRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1beta.CreatePropertyRequest + * @static + * @param {google.analytics.admin.v1beta.CreatePropertyRequest} message CreatePropertyRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreatePropertyRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.property = null; + if (message.property != null && message.hasOwnProperty("property")) + object.property = $root.google.analytics.admin.v1beta.Property.toObject(message.property, options); + return object; + }; + + /** + * Converts this CreatePropertyRequest to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1beta.CreatePropertyRequest + * @instance + * @returns {Object.} JSON object + */ + CreatePropertyRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreatePropertyRequest + * @function getTypeUrl + * @memberof google.analytics.admin.v1beta.CreatePropertyRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreatePropertyRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1beta.CreatePropertyRequest"; + }; + + return CreatePropertyRequest; + })(); + + v1beta.DeletePropertyRequest = (function() { + + /** + * Properties of a DeletePropertyRequest. + * @memberof google.analytics.admin.v1beta + * @interface IDeletePropertyRequest + * @property {string|null} [name] DeletePropertyRequest name + */ + + /** + * Constructs a new DeletePropertyRequest. + * @memberof google.analytics.admin.v1beta + * @classdesc Represents a DeletePropertyRequest. + * @implements IDeletePropertyRequest + * @constructor + * @param {google.analytics.admin.v1beta.IDeletePropertyRequest=} [properties] Properties to set + */ + function DeletePropertyRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeletePropertyRequest name. + * @member {string} name + * @memberof google.analytics.admin.v1beta.DeletePropertyRequest + * @instance + */ + DeletePropertyRequest.prototype.name = ""; + + /** + * Creates a new DeletePropertyRequest instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1beta.DeletePropertyRequest + * @static + * @param {google.analytics.admin.v1beta.IDeletePropertyRequest=} [properties] Properties to set + * @returns {google.analytics.admin.v1beta.DeletePropertyRequest} DeletePropertyRequest instance + */ + DeletePropertyRequest.create = function create(properties) { + return new DeletePropertyRequest(properties); + }; + + /** + * Encodes the specified DeletePropertyRequest message. Does not implicitly {@link google.analytics.admin.v1beta.DeletePropertyRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1beta.DeletePropertyRequest + * @static + * @param {google.analytics.admin.v1beta.IDeletePropertyRequest} message DeletePropertyRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeletePropertyRequest.encode = function encode(message, writer) { + 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 DeletePropertyRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.DeletePropertyRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1beta.DeletePropertyRequest + * @static + * @param {google.analytics.admin.v1beta.IDeletePropertyRequest} message DeletePropertyRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeletePropertyRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeletePropertyRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1beta.DeletePropertyRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1beta.DeletePropertyRequest} DeletePropertyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeletePropertyRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1beta.DeletePropertyRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeletePropertyRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1beta.DeletePropertyRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1beta.DeletePropertyRequest} DeletePropertyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeletePropertyRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeletePropertyRequest message. + * @function verify + * @memberof google.analytics.admin.v1beta.DeletePropertyRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeletePropertyRequest.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 DeletePropertyRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1beta.DeletePropertyRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1beta.DeletePropertyRequest} DeletePropertyRequest + */ + DeletePropertyRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1beta.DeletePropertyRequest) + return object; + var message = new $root.google.analytics.admin.v1beta.DeletePropertyRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeletePropertyRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1beta.DeletePropertyRequest + * @static + * @param {google.analytics.admin.v1beta.DeletePropertyRequest} message DeletePropertyRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeletePropertyRequest.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 DeletePropertyRequest to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1beta.DeletePropertyRequest + * @instance + * @returns {Object.} JSON object + */ + DeletePropertyRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeletePropertyRequest + * @function getTypeUrl + * @memberof google.analytics.admin.v1beta.DeletePropertyRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeletePropertyRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1beta.DeletePropertyRequest"; + }; + + return DeletePropertyRequest; + })(); + + v1beta.CreateFirebaseLinkRequest = (function() { + + /** + * Properties of a CreateFirebaseLinkRequest. + * @memberof google.analytics.admin.v1beta + * @interface ICreateFirebaseLinkRequest + * @property {string|null} [parent] CreateFirebaseLinkRequest parent + * @property {google.analytics.admin.v1beta.IFirebaseLink|null} [firebaseLink] CreateFirebaseLinkRequest firebaseLink + */ + + /** + * Constructs a new CreateFirebaseLinkRequest. + * @memberof google.analytics.admin.v1beta + * @classdesc Represents a CreateFirebaseLinkRequest. + * @implements ICreateFirebaseLinkRequest + * @constructor + * @param {google.analytics.admin.v1beta.ICreateFirebaseLinkRequest=} [properties] Properties to set + */ + function CreateFirebaseLinkRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateFirebaseLinkRequest parent. + * @member {string} parent + * @memberof google.analytics.admin.v1beta.CreateFirebaseLinkRequest + * @instance + */ + CreateFirebaseLinkRequest.prototype.parent = ""; + + /** + * CreateFirebaseLinkRequest firebaseLink. + * @member {google.analytics.admin.v1beta.IFirebaseLink|null|undefined} firebaseLink + * @memberof google.analytics.admin.v1beta.CreateFirebaseLinkRequest + * @instance + */ + CreateFirebaseLinkRequest.prototype.firebaseLink = null; + + /** + * Creates a new CreateFirebaseLinkRequest instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1beta.CreateFirebaseLinkRequest + * @static + * @param {google.analytics.admin.v1beta.ICreateFirebaseLinkRequest=} [properties] Properties to set + * @returns {google.analytics.admin.v1beta.CreateFirebaseLinkRequest} CreateFirebaseLinkRequest instance + */ + CreateFirebaseLinkRequest.create = function create(properties) { + return new CreateFirebaseLinkRequest(properties); + }; + + /** + * Encodes the specified CreateFirebaseLinkRequest message. Does not implicitly {@link google.analytics.admin.v1beta.CreateFirebaseLinkRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1beta.CreateFirebaseLinkRequest + * @static + * @param {google.analytics.admin.v1beta.ICreateFirebaseLinkRequest} message CreateFirebaseLinkRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateFirebaseLinkRequest.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.firebaseLink != null && Object.hasOwnProperty.call(message, "firebaseLink")) + $root.google.analytics.admin.v1beta.FirebaseLink.encode(message.firebaseLink, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CreateFirebaseLinkRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.CreateFirebaseLinkRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1beta.CreateFirebaseLinkRequest + * @static + * @param {google.analytics.admin.v1beta.ICreateFirebaseLinkRequest} message CreateFirebaseLinkRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateFirebaseLinkRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateFirebaseLinkRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1beta.CreateFirebaseLinkRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1beta.CreateFirebaseLinkRequest} CreateFirebaseLinkRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateFirebaseLinkRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1beta.CreateFirebaseLinkRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.firebaseLink = $root.google.analytics.admin.v1beta.FirebaseLink.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateFirebaseLinkRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1beta.CreateFirebaseLinkRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1beta.CreateFirebaseLinkRequest} CreateFirebaseLinkRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateFirebaseLinkRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateFirebaseLinkRequest message. + * @function verify + * @memberof google.analytics.admin.v1beta.CreateFirebaseLinkRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateFirebaseLinkRequest.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.firebaseLink != null && message.hasOwnProperty("firebaseLink")) { + var error = $root.google.analytics.admin.v1beta.FirebaseLink.verify(message.firebaseLink); + if (error) + return "firebaseLink." + error; + } + return null; + }; + + /** + * Creates a CreateFirebaseLinkRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1beta.CreateFirebaseLinkRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1beta.CreateFirebaseLinkRequest} CreateFirebaseLinkRequest + */ + CreateFirebaseLinkRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1beta.CreateFirebaseLinkRequest) + return object; + var message = new $root.google.analytics.admin.v1beta.CreateFirebaseLinkRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.firebaseLink != null) { + if (typeof object.firebaseLink !== "object") + throw TypeError(".google.analytics.admin.v1beta.CreateFirebaseLinkRequest.firebaseLink: object expected"); + message.firebaseLink = $root.google.analytics.admin.v1beta.FirebaseLink.fromObject(object.firebaseLink); + } + return message; + }; + + /** + * Creates a plain object from a CreateFirebaseLinkRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1beta.CreateFirebaseLinkRequest + * @static + * @param {google.analytics.admin.v1beta.CreateFirebaseLinkRequest} message CreateFirebaseLinkRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateFirebaseLinkRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.firebaseLink = null; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.firebaseLink != null && message.hasOwnProperty("firebaseLink")) + object.firebaseLink = $root.google.analytics.admin.v1beta.FirebaseLink.toObject(message.firebaseLink, options); + return object; + }; + + /** + * Converts this CreateFirebaseLinkRequest to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1beta.CreateFirebaseLinkRequest + * @instance + * @returns {Object.} JSON object + */ + CreateFirebaseLinkRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateFirebaseLinkRequest + * @function getTypeUrl + * @memberof google.analytics.admin.v1beta.CreateFirebaseLinkRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateFirebaseLinkRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1beta.CreateFirebaseLinkRequest"; + }; + + return CreateFirebaseLinkRequest; + })(); + + v1beta.DeleteFirebaseLinkRequest = (function() { + + /** + * Properties of a DeleteFirebaseLinkRequest. + * @memberof google.analytics.admin.v1beta + * @interface IDeleteFirebaseLinkRequest + * @property {string|null} [name] DeleteFirebaseLinkRequest name + */ + + /** + * Constructs a new DeleteFirebaseLinkRequest. + * @memberof google.analytics.admin.v1beta + * @classdesc Represents a DeleteFirebaseLinkRequest. + * @implements IDeleteFirebaseLinkRequest + * @constructor + * @param {google.analytics.admin.v1beta.IDeleteFirebaseLinkRequest=} [properties] Properties to set + */ + function DeleteFirebaseLinkRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteFirebaseLinkRequest name. + * @member {string} name + * @memberof google.analytics.admin.v1beta.DeleteFirebaseLinkRequest + * @instance + */ + DeleteFirebaseLinkRequest.prototype.name = ""; + + /** + * Creates a new DeleteFirebaseLinkRequest instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1beta.DeleteFirebaseLinkRequest + * @static + * @param {google.analytics.admin.v1beta.IDeleteFirebaseLinkRequest=} [properties] Properties to set + * @returns {google.analytics.admin.v1beta.DeleteFirebaseLinkRequest} DeleteFirebaseLinkRequest instance + */ + DeleteFirebaseLinkRequest.create = function create(properties) { + return new DeleteFirebaseLinkRequest(properties); + }; + + /** + * Encodes the specified DeleteFirebaseLinkRequest message. Does not implicitly {@link google.analytics.admin.v1beta.DeleteFirebaseLinkRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1beta.DeleteFirebaseLinkRequest + * @static + * @param {google.analytics.admin.v1beta.IDeleteFirebaseLinkRequest} message DeleteFirebaseLinkRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteFirebaseLinkRequest.encode = function encode(message, writer) { + 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 DeleteFirebaseLinkRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.DeleteFirebaseLinkRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1beta.DeleteFirebaseLinkRequest + * @static + * @param {google.analytics.admin.v1beta.IDeleteFirebaseLinkRequest} message DeleteFirebaseLinkRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteFirebaseLinkRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteFirebaseLinkRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1beta.DeleteFirebaseLinkRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1beta.DeleteFirebaseLinkRequest} DeleteFirebaseLinkRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteFirebaseLinkRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1beta.DeleteFirebaseLinkRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteFirebaseLinkRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1beta.DeleteFirebaseLinkRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1beta.DeleteFirebaseLinkRequest} DeleteFirebaseLinkRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteFirebaseLinkRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteFirebaseLinkRequest message. + * @function verify + * @memberof google.analytics.admin.v1beta.DeleteFirebaseLinkRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteFirebaseLinkRequest.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 DeleteFirebaseLinkRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1beta.DeleteFirebaseLinkRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1beta.DeleteFirebaseLinkRequest} DeleteFirebaseLinkRequest + */ + DeleteFirebaseLinkRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1beta.DeleteFirebaseLinkRequest) + return object; + var message = new $root.google.analytics.admin.v1beta.DeleteFirebaseLinkRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteFirebaseLinkRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1beta.DeleteFirebaseLinkRequest + * @static + * @param {google.analytics.admin.v1beta.DeleteFirebaseLinkRequest} message DeleteFirebaseLinkRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteFirebaseLinkRequest.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 DeleteFirebaseLinkRequest to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1beta.DeleteFirebaseLinkRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteFirebaseLinkRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteFirebaseLinkRequest + * @function getTypeUrl + * @memberof google.analytics.admin.v1beta.DeleteFirebaseLinkRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteFirebaseLinkRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1beta.DeleteFirebaseLinkRequest"; + }; + + return DeleteFirebaseLinkRequest; + })(); + + v1beta.ListFirebaseLinksRequest = (function() { + + /** + * Properties of a ListFirebaseLinksRequest. + * @memberof google.analytics.admin.v1beta + * @interface IListFirebaseLinksRequest + * @property {string|null} [parent] ListFirebaseLinksRequest parent + * @property {number|null} [pageSize] ListFirebaseLinksRequest pageSize + * @property {string|null} [pageToken] ListFirebaseLinksRequest pageToken + */ + + /** + * Constructs a new ListFirebaseLinksRequest. + * @memberof google.analytics.admin.v1beta + * @classdesc Represents a ListFirebaseLinksRequest. + * @implements IListFirebaseLinksRequest + * @constructor + * @param {google.analytics.admin.v1beta.IListFirebaseLinksRequest=} [properties] Properties to set + */ + function ListFirebaseLinksRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListFirebaseLinksRequest parent. + * @member {string} parent + * @memberof google.analytics.admin.v1beta.ListFirebaseLinksRequest + * @instance + */ + ListFirebaseLinksRequest.prototype.parent = ""; + + /** + * ListFirebaseLinksRequest pageSize. + * @member {number} pageSize + * @memberof google.analytics.admin.v1beta.ListFirebaseLinksRequest + * @instance + */ + ListFirebaseLinksRequest.prototype.pageSize = 0; + + /** + * ListFirebaseLinksRequest pageToken. + * @member {string} pageToken + * @memberof google.analytics.admin.v1beta.ListFirebaseLinksRequest + * @instance + */ + ListFirebaseLinksRequest.prototype.pageToken = ""; + + /** + * Creates a new ListFirebaseLinksRequest instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1beta.ListFirebaseLinksRequest + * @static + * @param {google.analytics.admin.v1beta.IListFirebaseLinksRequest=} [properties] Properties to set + * @returns {google.analytics.admin.v1beta.ListFirebaseLinksRequest} ListFirebaseLinksRequest instance + */ + ListFirebaseLinksRequest.create = function create(properties) { + return new ListFirebaseLinksRequest(properties); + }; + + /** + * Encodes the specified ListFirebaseLinksRequest message. Does not implicitly {@link google.analytics.admin.v1beta.ListFirebaseLinksRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1beta.ListFirebaseLinksRequest + * @static + * @param {google.analytics.admin.v1beta.IListFirebaseLinksRequest} message ListFirebaseLinksRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListFirebaseLinksRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + return writer; + }; + + /** + * Encodes the specified ListFirebaseLinksRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.ListFirebaseLinksRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1beta.ListFirebaseLinksRequest + * @static + * @param {google.analytics.admin.v1beta.IListFirebaseLinksRequest} message ListFirebaseLinksRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListFirebaseLinksRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListFirebaseLinksRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1beta.ListFirebaseLinksRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1beta.ListFirebaseLinksRequest} ListFirebaseLinksRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListFirebaseLinksRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1beta.ListFirebaseLinksRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListFirebaseLinksRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1beta.ListFirebaseLinksRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1beta.ListFirebaseLinksRequest} ListFirebaseLinksRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListFirebaseLinksRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListFirebaseLinksRequest message. + * @function verify + * @memberof google.analytics.admin.v1beta.ListFirebaseLinksRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListFirebaseLinksRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + return null; + }; + + /** + * Creates a ListFirebaseLinksRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1beta.ListFirebaseLinksRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1beta.ListFirebaseLinksRequest} ListFirebaseLinksRequest + */ + ListFirebaseLinksRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1beta.ListFirebaseLinksRequest) + return object; + var message = new $root.google.analytics.admin.v1beta.ListFirebaseLinksRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + return message; + }; + + /** + * Creates a plain object from a ListFirebaseLinksRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1beta.ListFirebaseLinksRequest + * @static + * @param {google.analytics.admin.v1beta.ListFirebaseLinksRequest} message ListFirebaseLinksRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListFirebaseLinksRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + return object; + }; + + /** + * Converts this ListFirebaseLinksRequest to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1beta.ListFirebaseLinksRequest + * @instance + * @returns {Object.} JSON object + */ + ListFirebaseLinksRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListFirebaseLinksRequest + * @function getTypeUrl + * @memberof google.analytics.admin.v1beta.ListFirebaseLinksRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListFirebaseLinksRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1beta.ListFirebaseLinksRequest"; + }; + + return ListFirebaseLinksRequest; + })(); + + v1beta.ListFirebaseLinksResponse = (function() { + + /** + * Properties of a ListFirebaseLinksResponse. + * @memberof google.analytics.admin.v1beta + * @interface IListFirebaseLinksResponse + * @property {Array.|null} [firebaseLinks] ListFirebaseLinksResponse firebaseLinks + * @property {string|null} [nextPageToken] ListFirebaseLinksResponse nextPageToken + */ + + /** + * Constructs a new ListFirebaseLinksResponse. + * @memberof google.analytics.admin.v1beta + * @classdesc Represents a ListFirebaseLinksResponse. + * @implements IListFirebaseLinksResponse + * @constructor + * @param {google.analytics.admin.v1beta.IListFirebaseLinksResponse=} [properties] Properties to set + */ + function ListFirebaseLinksResponse(properties) { + this.firebaseLinks = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListFirebaseLinksResponse firebaseLinks. + * @member {Array.} firebaseLinks + * @memberof google.analytics.admin.v1beta.ListFirebaseLinksResponse + * @instance + */ + ListFirebaseLinksResponse.prototype.firebaseLinks = $util.emptyArray; + + /** + * ListFirebaseLinksResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.analytics.admin.v1beta.ListFirebaseLinksResponse + * @instance + */ + ListFirebaseLinksResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListFirebaseLinksResponse instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1beta.ListFirebaseLinksResponse + * @static + * @param {google.analytics.admin.v1beta.IListFirebaseLinksResponse=} [properties] Properties to set + * @returns {google.analytics.admin.v1beta.ListFirebaseLinksResponse} ListFirebaseLinksResponse instance + */ + ListFirebaseLinksResponse.create = function create(properties) { + return new ListFirebaseLinksResponse(properties); + }; + + /** + * Encodes the specified ListFirebaseLinksResponse message. Does not implicitly {@link google.analytics.admin.v1beta.ListFirebaseLinksResponse.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1beta.ListFirebaseLinksResponse + * @static + * @param {google.analytics.admin.v1beta.IListFirebaseLinksResponse} message ListFirebaseLinksResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListFirebaseLinksResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.firebaseLinks != null && message.firebaseLinks.length) + for (var i = 0; i < message.firebaseLinks.length; ++i) + $root.google.analytics.admin.v1beta.FirebaseLink.encode(message.firebaseLinks[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 ListFirebaseLinksResponse message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.ListFirebaseLinksResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1beta.ListFirebaseLinksResponse + * @static + * @param {google.analytics.admin.v1beta.IListFirebaseLinksResponse} message ListFirebaseLinksResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListFirebaseLinksResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListFirebaseLinksResponse message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1beta.ListFirebaseLinksResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1beta.ListFirebaseLinksResponse} ListFirebaseLinksResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListFirebaseLinksResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1beta.ListFirebaseLinksResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.firebaseLinks && message.firebaseLinks.length)) + message.firebaseLinks = []; + message.firebaseLinks.push($root.google.analytics.admin.v1beta.FirebaseLink.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListFirebaseLinksResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1beta.ListFirebaseLinksResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1beta.ListFirebaseLinksResponse} ListFirebaseLinksResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListFirebaseLinksResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListFirebaseLinksResponse message. + * @function verify + * @memberof google.analytics.admin.v1beta.ListFirebaseLinksResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListFirebaseLinksResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.firebaseLinks != null && message.hasOwnProperty("firebaseLinks")) { + if (!Array.isArray(message.firebaseLinks)) + return "firebaseLinks: array expected"; + for (var i = 0; i < message.firebaseLinks.length; ++i) { + var error = $root.google.analytics.admin.v1beta.FirebaseLink.verify(message.firebaseLinks[i]); + if (error) + return "firebaseLinks." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListFirebaseLinksResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1beta.ListFirebaseLinksResponse + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1beta.ListFirebaseLinksResponse} ListFirebaseLinksResponse + */ + ListFirebaseLinksResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1beta.ListFirebaseLinksResponse) + return object; + var message = new $root.google.analytics.admin.v1beta.ListFirebaseLinksResponse(); + if (object.firebaseLinks) { + if (!Array.isArray(object.firebaseLinks)) + throw TypeError(".google.analytics.admin.v1beta.ListFirebaseLinksResponse.firebaseLinks: array expected"); + message.firebaseLinks = []; + for (var i = 0; i < object.firebaseLinks.length; ++i) { + if (typeof object.firebaseLinks[i] !== "object") + throw TypeError(".google.analytics.admin.v1beta.ListFirebaseLinksResponse.firebaseLinks: object expected"); + message.firebaseLinks[i] = $root.google.analytics.admin.v1beta.FirebaseLink.fromObject(object.firebaseLinks[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListFirebaseLinksResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1beta.ListFirebaseLinksResponse + * @static + * @param {google.analytics.admin.v1beta.ListFirebaseLinksResponse} message ListFirebaseLinksResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListFirebaseLinksResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.firebaseLinks = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.firebaseLinks && message.firebaseLinks.length) { + object.firebaseLinks = []; + for (var j = 0; j < message.firebaseLinks.length; ++j) + object.firebaseLinks[j] = $root.google.analytics.admin.v1beta.FirebaseLink.toObject(message.firebaseLinks[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListFirebaseLinksResponse to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1beta.ListFirebaseLinksResponse + * @instance + * @returns {Object.} JSON object + */ + ListFirebaseLinksResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListFirebaseLinksResponse + * @function getTypeUrl + * @memberof google.analytics.admin.v1beta.ListFirebaseLinksResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListFirebaseLinksResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1beta.ListFirebaseLinksResponse"; + }; + + return ListFirebaseLinksResponse; + })(); + + v1beta.CreateGoogleAdsLinkRequest = (function() { + + /** + * Properties of a CreateGoogleAdsLinkRequest. + * @memberof google.analytics.admin.v1beta + * @interface ICreateGoogleAdsLinkRequest + * @property {string|null} [parent] CreateGoogleAdsLinkRequest parent + * @property {google.analytics.admin.v1beta.IGoogleAdsLink|null} [googleAdsLink] CreateGoogleAdsLinkRequest googleAdsLink + */ + + /** + * Constructs a new CreateGoogleAdsLinkRequest. + * @memberof google.analytics.admin.v1beta + * @classdesc Represents a CreateGoogleAdsLinkRequest. + * @implements ICreateGoogleAdsLinkRequest + * @constructor + * @param {google.analytics.admin.v1beta.ICreateGoogleAdsLinkRequest=} [properties] Properties to set + */ + function CreateGoogleAdsLinkRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateGoogleAdsLinkRequest parent. + * @member {string} parent + * @memberof google.analytics.admin.v1beta.CreateGoogleAdsLinkRequest + * @instance + */ + CreateGoogleAdsLinkRequest.prototype.parent = ""; + + /** + * CreateGoogleAdsLinkRequest googleAdsLink. + * @member {google.analytics.admin.v1beta.IGoogleAdsLink|null|undefined} googleAdsLink + * @memberof google.analytics.admin.v1beta.CreateGoogleAdsLinkRequest + * @instance + */ + CreateGoogleAdsLinkRequest.prototype.googleAdsLink = null; + + /** + * Creates a new CreateGoogleAdsLinkRequest instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1beta.CreateGoogleAdsLinkRequest + * @static + * @param {google.analytics.admin.v1beta.ICreateGoogleAdsLinkRequest=} [properties] Properties to set + * @returns {google.analytics.admin.v1beta.CreateGoogleAdsLinkRequest} CreateGoogleAdsLinkRequest instance + */ + CreateGoogleAdsLinkRequest.create = function create(properties) { + return new CreateGoogleAdsLinkRequest(properties); + }; + + /** + * Encodes the specified CreateGoogleAdsLinkRequest message. Does not implicitly {@link google.analytics.admin.v1beta.CreateGoogleAdsLinkRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1beta.CreateGoogleAdsLinkRequest + * @static + * @param {google.analytics.admin.v1beta.ICreateGoogleAdsLinkRequest} message CreateGoogleAdsLinkRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateGoogleAdsLinkRequest.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.googleAdsLink != null && Object.hasOwnProperty.call(message, "googleAdsLink")) + $root.google.analytics.admin.v1beta.GoogleAdsLink.encode(message.googleAdsLink, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CreateGoogleAdsLinkRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.CreateGoogleAdsLinkRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1beta.CreateGoogleAdsLinkRequest + * @static + * @param {google.analytics.admin.v1beta.ICreateGoogleAdsLinkRequest} message CreateGoogleAdsLinkRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateGoogleAdsLinkRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateGoogleAdsLinkRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1beta.CreateGoogleAdsLinkRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1beta.CreateGoogleAdsLinkRequest} CreateGoogleAdsLinkRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateGoogleAdsLinkRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1beta.CreateGoogleAdsLinkRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.googleAdsLink = $root.google.analytics.admin.v1beta.GoogleAdsLink.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateGoogleAdsLinkRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1beta.CreateGoogleAdsLinkRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1beta.CreateGoogleAdsLinkRequest} CreateGoogleAdsLinkRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateGoogleAdsLinkRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateGoogleAdsLinkRequest message. + * @function verify + * @memberof google.analytics.admin.v1beta.CreateGoogleAdsLinkRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateGoogleAdsLinkRequest.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.googleAdsLink != null && message.hasOwnProperty("googleAdsLink")) { + var error = $root.google.analytics.admin.v1beta.GoogleAdsLink.verify(message.googleAdsLink); + if (error) + return "googleAdsLink." + error; + } + return null; + }; + + /** + * Creates a CreateGoogleAdsLinkRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1beta.CreateGoogleAdsLinkRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1beta.CreateGoogleAdsLinkRequest} CreateGoogleAdsLinkRequest + */ + CreateGoogleAdsLinkRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1beta.CreateGoogleAdsLinkRequest) + return object; + var message = new $root.google.analytics.admin.v1beta.CreateGoogleAdsLinkRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.googleAdsLink != null) { + if (typeof object.googleAdsLink !== "object") + throw TypeError(".google.analytics.admin.v1beta.CreateGoogleAdsLinkRequest.googleAdsLink: object expected"); + message.googleAdsLink = $root.google.analytics.admin.v1beta.GoogleAdsLink.fromObject(object.googleAdsLink); + } + return message; + }; + + /** + * Creates a plain object from a CreateGoogleAdsLinkRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1beta.CreateGoogleAdsLinkRequest + * @static + * @param {google.analytics.admin.v1beta.CreateGoogleAdsLinkRequest} message CreateGoogleAdsLinkRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateGoogleAdsLinkRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.googleAdsLink = null; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.googleAdsLink != null && message.hasOwnProperty("googleAdsLink")) + object.googleAdsLink = $root.google.analytics.admin.v1beta.GoogleAdsLink.toObject(message.googleAdsLink, options); + return object; + }; + + /** + * Converts this CreateGoogleAdsLinkRequest to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1beta.CreateGoogleAdsLinkRequest + * @instance + * @returns {Object.} JSON object + */ + CreateGoogleAdsLinkRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateGoogleAdsLinkRequest + * @function getTypeUrl + * @memberof google.analytics.admin.v1beta.CreateGoogleAdsLinkRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateGoogleAdsLinkRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1beta.CreateGoogleAdsLinkRequest"; + }; + + return CreateGoogleAdsLinkRequest; + })(); + + v1beta.UpdateGoogleAdsLinkRequest = (function() { + + /** + * Properties of an UpdateGoogleAdsLinkRequest. + * @memberof google.analytics.admin.v1beta + * @interface IUpdateGoogleAdsLinkRequest + * @property {google.analytics.admin.v1beta.IGoogleAdsLink|null} [googleAdsLink] UpdateGoogleAdsLinkRequest googleAdsLink + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateGoogleAdsLinkRequest updateMask + */ + + /** + * Constructs a new UpdateGoogleAdsLinkRequest. + * @memberof google.analytics.admin.v1beta + * @classdesc Represents an UpdateGoogleAdsLinkRequest. + * @implements IUpdateGoogleAdsLinkRequest + * @constructor + * @param {google.analytics.admin.v1beta.IUpdateGoogleAdsLinkRequest=} [properties] Properties to set + */ + function UpdateGoogleAdsLinkRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateGoogleAdsLinkRequest googleAdsLink. + * @member {google.analytics.admin.v1beta.IGoogleAdsLink|null|undefined} googleAdsLink + * @memberof google.analytics.admin.v1beta.UpdateGoogleAdsLinkRequest + * @instance + */ + UpdateGoogleAdsLinkRequest.prototype.googleAdsLink = null; + + /** + * UpdateGoogleAdsLinkRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.analytics.admin.v1beta.UpdateGoogleAdsLinkRequest + * @instance + */ + UpdateGoogleAdsLinkRequest.prototype.updateMask = null; + + /** + * Creates a new UpdateGoogleAdsLinkRequest instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1beta.UpdateGoogleAdsLinkRequest + * @static + * @param {google.analytics.admin.v1beta.IUpdateGoogleAdsLinkRequest=} [properties] Properties to set + * @returns {google.analytics.admin.v1beta.UpdateGoogleAdsLinkRequest} UpdateGoogleAdsLinkRequest instance + */ + UpdateGoogleAdsLinkRequest.create = function create(properties) { + return new UpdateGoogleAdsLinkRequest(properties); + }; + + /** + * Encodes the specified UpdateGoogleAdsLinkRequest message. Does not implicitly {@link google.analytics.admin.v1beta.UpdateGoogleAdsLinkRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1beta.UpdateGoogleAdsLinkRequest + * @static + * @param {google.analytics.admin.v1beta.IUpdateGoogleAdsLinkRequest} message UpdateGoogleAdsLinkRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateGoogleAdsLinkRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.googleAdsLink != null && Object.hasOwnProperty.call(message, "googleAdsLink")) + $root.google.analytics.admin.v1beta.GoogleAdsLink.encode(message.googleAdsLink, 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 UpdateGoogleAdsLinkRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.UpdateGoogleAdsLinkRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1beta.UpdateGoogleAdsLinkRequest + * @static + * @param {google.analytics.admin.v1beta.IUpdateGoogleAdsLinkRequest} message UpdateGoogleAdsLinkRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateGoogleAdsLinkRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateGoogleAdsLinkRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1beta.UpdateGoogleAdsLinkRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1beta.UpdateGoogleAdsLinkRequest} UpdateGoogleAdsLinkRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateGoogleAdsLinkRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1beta.UpdateGoogleAdsLinkRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.googleAdsLink = $root.google.analytics.admin.v1beta.GoogleAdsLink.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 UpdateGoogleAdsLinkRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1beta.UpdateGoogleAdsLinkRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1beta.UpdateGoogleAdsLinkRequest} UpdateGoogleAdsLinkRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateGoogleAdsLinkRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateGoogleAdsLinkRequest message. + * @function verify + * @memberof google.analytics.admin.v1beta.UpdateGoogleAdsLinkRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateGoogleAdsLinkRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.googleAdsLink != null && message.hasOwnProperty("googleAdsLink")) { + var error = $root.google.analytics.admin.v1beta.GoogleAdsLink.verify(message.googleAdsLink); + if (error) + return "googleAdsLink." + 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 UpdateGoogleAdsLinkRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1beta.UpdateGoogleAdsLinkRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1beta.UpdateGoogleAdsLinkRequest} UpdateGoogleAdsLinkRequest + */ + UpdateGoogleAdsLinkRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1beta.UpdateGoogleAdsLinkRequest) + return object; + var message = new $root.google.analytics.admin.v1beta.UpdateGoogleAdsLinkRequest(); + if (object.googleAdsLink != null) { + if (typeof object.googleAdsLink !== "object") + throw TypeError(".google.analytics.admin.v1beta.UpdateGoogleAdsLinkRequest.googleAdsLink: object expected"); + message.googleAdsLink = $root.google.analytics.admin.v1beta.GoogleAdsLink.fromObject(object.googleAdsLink); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.analytics.admin.v1beta.UpdateGoogleAdsLinkRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + return message; + }; + + /** + * Creates a plain object from an UpdateGoogleAdsLinkRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1beta.UpdateGoogleAdsLinkRequest + * @static + * @param {google.analytics.admin.v1beta.UpdateGoogleAdsLinkRequest} message UpdateGoogleAdsLinkRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateGoogleAdsLinkRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.googleAdsLink = null; + object.updateMask = null; + } + if (message.googleAdsLink != null && message.hasOwnProperty("googleAdsLink")) + object.googleAdsLink = $root.google.analytics.admin.v1beta.GoogleAdsLink.toObject(message.googleAdsLink, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + return object; + }; + + /** + * Converts this UpdateGoogleAdsLinkRequest to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1beta.UpdateGoogleAdsLinkRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateGoogleAdsLinkRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateGoogleAdsLinkRequest + * @function getTypeUrl + * @memberof google.analytics.admin.v1beta.UpdateGoogleAdsLinkRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateGoogleAdsLinkRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1beta.UpdateGoogleAdsLinkRequest"; + }; + + return UpdateGoogleAdsLinkRequest; + })(); + + v1beta.DeleteGoogleAdsLinkRequest = (function() { + + /** + * Properties of a DeleteGoogleAdsLinkRequest. + * @memberof google.analytics.admin.v1beta + * @interface IDeleteGoogleAdsLinkRequest + * @property {string|null} [name] DeleteGoogleAdsLinkRequest name + */ + + /** + * Constructs a new DeleteGoogleAdsLinkRequest. + * @memberof google.analytics.admin.v1beta + * @classdesc Represents a DeleteGoogleAdsLinkRequest. + * @implements IDeleteGoogleAdsLinkRequest + * @constructor + * @param {google.analytics.admin.v1beta.IDeleteGoogleAdsLinkRequest=} [properties] Properties to set + */ + function DeleteGoogleAdsLinkRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteGoogleAdsLinkRequest name. + * @member {string} name + * @memberof google.analytics.admin.v1beta.DeleteGoogleAdsLinkRequest + * @instance + */ + DeleteGoogleAdsLinkRequest.prototype.name = ""; + + /** + * Creates a new DeleteGoogleAdsLinkRequest instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1beta.DeleteGoogleAdsLinkRequest + * @static + * @param {google.analytics.admin.v1beta.IDeleteGoogleAdsLinkRequest=} [properties] Properties to set + * @returns {google.analytics.admin.v1beta.DeleteGoogleAdsLinkRequest} DeleteGoogleAdsLinkRequest instance + */ + DeleteGoogleAdsLinkRequest.create = function create(properties) { + return new DeleteGoogleAdsLinkRequest(properties); + }; + + /** + * Encodes the specified DeleteGoogleAdsLinkRequest message. Does not implicitly {@link google.analytics.admin.v1beta.DeleteGoogleAdsLinkRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1beta.DeleteGoogleAdsLinkRequest + * @static + * @param {google.analytics.admin.v1beta.IDeleteGoogleAdsLinkRequest} message DeleteGoogleAdsLinkRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteGoogleAdsLinkRequest.encode = function encode(message, writer) { + 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 DeleteGoogleAdsLinkRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.DeleteGoogleAdsLinkRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1beta.DeleteGoogleAdsLinkRequest + * @static + * @param {google.analytics.admin.v1beta.IDeleteGoogleAdsLinkRequest} message DeleteGoogleAdsLinkRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteGoogleAdsLinkRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteGoogleAdsLinkRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1beta.DeleteGoogleAdsLinkRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1beta.DeleteGoogleAdsLinkRequest} DeleteGoogleAdsLinkRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteGoogleAdsLinkRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1beta.DeleteGoogleAdsLinkRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteGoogleAdsLinkRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1beta.DeleteGoogleAdsLinkRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1beta.DeleteGoogleAdsLinkRequest} DeleteGoogleAdsLinkRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteGoogleAdsLinkRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteGoogleAdsLinkRequest message. + * @function verify + * @memberof google.analytics.admin.v1beta.DeleteGoogleAdsLinkRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteGoogleAdsLinkRequest.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 DeleteGoogleAdsLinkRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1beta.DeleteGoogleAdsLinkRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1beta.DeleteGoogleAdsLinkRequest} DeleteGoogleAdsLinkRequest + */ + DeleteGoogleAdsLinkRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1beta.DeleteGoogleAdsLinkRequest) + return object; + var message = new $root.google.analytics.admin.v1beta.DeleteGoogleAdsLinkRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteGoogleAdsLinkRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1beta.DeleteGoogleAdsLinkRequest + * @static + * @param {google.analytics.admin.v1beta.DeleteGoogleAdsLinkRequest} message DeleteGoogleAdsLinkRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteGoogleAdsLinkRequest.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 DeleteGoogleAdsLinkRequest to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1beta.DeleteGoogleAdsLinkRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteGoogleAdsLinkRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteGoogleAdsLinkRequest + * @function getTypeUrl + * @memberof google.analytics.admin.v1beta.DeleteGoogleAdsLinkRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteGoogleAdsLinkRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1beta.DeleteGoogleAdsLinkRequest"; + }; + + return DeleteGoogleAdsLinkRequest; + })(); + + v1beta.ListGoogleAdsLinksRequest = (function() { + + /** + * Properties of a ListGoogleAdsLinksRequest. + * @memberof google.analytics.admin.v1beta + * @interface IListGoogleAdsLinksRequest + * @property {string|null} [parent] ListGoogleAdsLinksRequest parent + * @property {number|null} [pageSize] ListGoogleAdsLinksRequest pageSize + * @property {string|null} [pageToken] ListGoogleAdsLinksRequest pageToken + */ + + /** + * Constructs a new ListGoogleAdsLinksRequest. + * @memberof google.analytics.admin.v1beta + * @classdesc Represents a ListGoogleAdsLinksRequest. + * @implements IListGoogleAdsLinksRequest + * @constructor + * @param {google.analytics.admin.v1beta.IListGoogleAdsLinksRequest=} [properties] Properties to set + */ + function ListGoogleAdsLinksRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListGoogleAdsLinksRequest parent. + * @member {string} parent + * @memberof google.analytics.admin.v1beta.ListGoogleAdsLinksRequest + * @instance + */ + ListGoogleAdsLinksRequest.prototype.parent = ""; + + /** + * ListGoogleAdsLinksRequest pageSize. + * @member {number} pageSize + * @memberof google.analytics.admin.v1beta.ListGoogleAdsLinksRequest + * @instance + */ + ListGoogleAdsLinksRequest.prototype.pageSize = 0; + + /** + * ListGoogleAdsLinksRequest pageToken. + * @member {string} pageToken + * @memberof google.analytics.admin.v1beta.ListGoogleAdsLinksRequest + * @instance + */ + ListGoogleAdsLinksRequest.prototype.pageToken = ""; + + /** + * Creates a new ListGoogleAdsLinksRequest instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1beta.ListGoogleAdsLinksRequest + * @static + * @param {google.analytics.admin.v1beta.IListGoogleAdsLinksRequest=} [properties] Properties to set + * @returns {google.analytics.admin.v1beta.ListGoogleAdsLinksRequest} ListGoogleAdsLinksRequest instance + */ + ListGoogleAdsLinksRequest.create = function create(properties) { + return new ListGoogleAdsLinksRequest(properties); + }; + + /** + * Encodes the specified ListGoogleAdsLinksRequest message. Does not implicitly {@link google.analytics.admin.v1beta.ListGoogleAdsLinksRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1beta.ListGoogleAdsLinksRequest + * @static + * @param {google.analytics.admin.v1beta.IListGoogleAdsLinksRequest} message ListGoogleAdsLinksRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListGoogleAdsLinksRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + return writer; + }; + + /** + * Encodes the specified ListGoogleAdsLinksRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.ListGoogleAdsLinksRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1beta.ListGoogleAdsLinksRequest + * @static + * @param {google.analytics.admin.v1beta.IListGoogleAdsLinksRequest} message ListGoogleAdsLinksRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListGoogleAdsLinksRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListGoogleAdsLinksRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1beta.ListGoogleAdsLinksRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1beta.ListGoogleAdsLinksRequest} ListGoogleAdsLinksRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListGoogleAdsLinksRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1beta.ListGoogleAdsLinksRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListGoogleAdsLinksRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1beta.ListGoogleAdsLinksRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1beta.ListGoogleAdsLinksRequest} ListGoogleAdsLinksRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListGoogleAdsLinksRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListGoogleAdsLinksRequest message. + * @function verify + * @memberof google.analytics.admin.v1beta.ListGoogleAdsLinksRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListGoogleAdsLinksRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + return null; + }; + + /** + * Creates a ListGoogleAdsLinksRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1beta.ListGoogleAdsLinksRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1beta.ListGoogleAdsLinksRequest} ListGoogleAdsLinksRequest + */ + ListGoogleAdsLinksRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1beta.ListGoogleAdsLinksRequest) + return object; + var message = new $root.google.analytics.admin.v1beta.ListGoogleAdsLinksRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + return message; + }; + + /** + * Creates a plain object from a ListGoogleAdsLinksRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1beta.ListGoogleAdsLinksRequest + * @static + * @param {google.analytics.admin.v1beta.ListGoogleAdsLinksRequest} message ListGoogleAdsLinksRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListGoogleAdsLinksRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + return object; + }; + + /** + * Converts this ListGoogleAdsLinksRequest to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1beta.ListGoogleAdsLinksRequest + * @instance + * @returns {Object.} JSON object + */ + ListGoogleAdsLinksRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListGoogleAdsLinksRequest + * @function getTypeUrl + * @memberof google.analytics.admin.v1beta.ListGoogleAdsLinksRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListGoogleAdsLinksRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1beta.ListGoogleAdsLinksRequest"; + }; + + return ListGoogleAdsLinksRequest; + })(); + + v1beta.ListGoogleAdsLinksResponse = (function() { + + /** + * Properties of a ListGoogleAdsLinksResponse. + * @memberof google.analytics.admin.v1beta + * @interface IListGoogleAdsLinksResponse + * @property {Array.|null} [googleAdsLinks] ListGoogleAdsLinksResponse googleAdsLinks + * @property {string|null} [nextPageToken] ListGoogleAdsLinksResponse nextPageToken + */ + + /** + * Constructs a new ListGoogleAdsLinksResponse. + * @memberof google.analytics.admin.v1beta + * @classdesc Represents a ListGoogleAdsLinksResponse. + * @implements IListGoogleAdsLinksResponse + * @constructor + * @param {google.analytics.admin.v1beta.IListGoogleAdsLinksResponse=} [properties] Properties to set + */ + function ListGoogleAdsLinksResponse(properties) { + this.googleAdsLinks = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListGoogleAdsLinksResponse googleAdsLinks. + * @member {Array.} googleAdsLinks + * @memberof google.analytics.admin.v1beta.ListGoogleAdsLinksResponse + * @instance + */ + ListGoogleAdsLinksResponse.prototype.googleAdsLinks = $util.emptyArray; + + /** + * ListGoogleAdsLinksResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.analytics.admin.v1beta.ListGoogleAdsLinksResponse + * @instance + */ + ListGoogleAdsLinksResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListGoogleAdsLinksResponse instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1beta.ListGoogleAdsLinksResponse + * @static + * @param {google.analytics.admin.v1beta.IListGoogleAdsLinksResponse=} [properties] Properties to set + * @returns {google.analytics.admin.v1beta.ListGoogleAdsLinksResponse} ListGoogleAdsLinksResponse instance + */ + ListGoogleAdsLinksResponse.create = function create(properties) { + return new ListGoogleAdsLinksResponse(properties); + }; + + /** + * Encodes the specified ListGoogleAdsLinksResponse message. Does not implicitly {@link google.analytics.admin.v1beta.ListGoogleAdsLinksResponse.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1beta.ListGoogleAdsLinksResponse + * @static + * @param {google.analytics.admin.v1beta.IListGoogleAdsLinksResponse} message ListGoogleAdsLinksResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListGoogleAdsLinksResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.googleAdsLinks != null && message.googleAdsLinks.length) + for (var i = 0; i < message.googleAdsLinks.length; ++i) + $root.google.analytics.admin.v1beta.GoogleAdsLink.encode(message.googleAdsLinks[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 ListGoogleAdsLinksResponse message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.ListGoogleAdsLinksResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1beta.ListGoogleAdsLinksResponse + * @static + * @param {google.analytics.admin.v1beta.IListGoogleAdsLinksResponse} message ListGoogleAdsLinksResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListGoogleAdsLinksResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListGoogleAdsLinksResponse message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1beta.ListGoogleAdsLinksResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1beta.ListGoogleAdsLinksResponse} ListGoogleAdsLinksResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListGoogleAdsLinksResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1beta.ListGoogleAdsLinksResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.googleAdsLinks && message.googleAdsLinks.length)) + message.googleAdsLinks = []; + message.googleAdsLinks.push($root.google.analytics.admin.v1beta.GoogleAdsLink.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListGoogleAdsLinksResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1beta.ListGoogleAdsLinksResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1beta.ListGoogleAdsLinksResponse} ListGoogleAdsLinksResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListGoogleAdsLinksResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListGoogleAdsLinksResponse message. + * @function verify + * @memberof google.analytics.admin.v1beta.ListGoogleAdsLinksResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListGoogleAdsLinksResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.googleAdsLinks != null && message.hasOwnProperty("googleAdsLinks")) { + if (!Array.isArray(message.googleAdsLinks)) + return "googleAdsLinks: array expected"; + for (var i = 0; i < message.googleAdsLinks.length; ++i) { + var error = $root.google.analytics.admin.v1beta.GoogleAdsLink.verify(message.googleAdsLinks[i]); + if (error) + return "googleAdsLinks." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListGoogleAdsLinksResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1beta.ListGoogleAdsLinksResponse + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1beta.ListGoogleAdsLinksResponse} ListGoogleAdsLinksResponse + */ + ListGoogleAdsLinksResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1beta.ListGoogleAdsLinksResponse) + return object; + var message = new $root.google.analytics.admin.v1beta.ListGoogleAdsLinksResponse(); + if (object.googleAdsLinks) { + if (!Array.isArray(object.googleAdsLinks)) + throw TypeError(".google.analytics.admin.v1beta.ListGoogleAdsLinksResponse.googleAdsLinks: array expected"); + message.googleAdsLinks = []; + for (var i = 0; i < object.googleAdsLinks.length; ++i) { + if (typeof object.googleAdsLinks[i] !== "object") + throw TypeError(".google.analytics.admin.v1beta.ListGoogleAdsLinksResponse.googleAdsLinks: object expected"); + message.googleAdsLinks[i] = $root.google.analytics.admin.v1beta.GoogleAdsLink.fromObject(object.googleAdsLinks[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListGoogleAdsLinksResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1beta.ListGoogleAdsLinksResponse + * @static + * @param {google.analytics.admin.v1beta.ListGoogleAdsLinksResponse} message ListGoogleAdsLinksResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListGoogleAdsLinksResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.googleAdsLinks = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.googleAdsLinks && message.googleAdsLinks.length) { + object.googleAdsLinks = []; + for (var j = 0; j < message.googleAdsLinks.length; ++j) + object.googleAdsLinks[j] = $root.google.analytics.admin.v1beta.GoogleAdsLink.toObject(message.googleAdsLinks[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListGoogleAdsLinksResponse to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1beta.ListGoogleAdsLinksResponse + * @instance + * @returns {Object.} JSON object + */ + ListGoogleAdsLinksResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListGoogleAdsLinksResponse + * @function getTypeUrl + * @memberof google.analytics.admin.v1beta.ListGoogleAdsLinksResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListGoogleAdsLinksResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1beta.ListGoogleAdsLinksResponse"; + }; + + return ListGoogleAdsLinksResponse; + })(); + + v1beta.GetDataSharingSettingsRequest = (function() { + + /** + * Properties of a GetDataSharingSettingsRequest. + * @memberof google.analytics.admin.v1beta + * @interface IGetDataSharingSettingsRequest + * @property {string|null} [name] GetDataSharingSettingsRequest name + */ + + /** + * Constructs a new GetDataSharingSettingsRequest. + * @memberof google.analytics.admin.v1beta + * @classdesc Represents a GetDataSharingSettingsRequest. + * @implements IGetDataSharingSettingsRequest + * @constructor + * @param {google.analytics.admin.v1beta.IGetDataSharingSettingsRequest=} [properties] Properties to set + */ + function GetDataSharingSettingsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetDataSharingSettingsRequest name. + * @member {string} name + * @memberof google.analytics.admin.v1beta.GetDataSharingSettingsRequest + * @instance + */ + GetDataSharingSettingsRequest.prototype.name = ""; + + /** + * Creates a new GetDataSharingSettingsRequest instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1beta.GetDataSharingSettingsRequest + * @static + * @param {google.analytics.admin.v1beta.IGetDataSharingSettingsRequest=} [properties] Properties to set + * @returns {google.analytics.admin.v1beta.GetDataSharingSettingsRequest} GetDataSharingSettingsRequest instance + */ + GetDataSharingSettingsRequest.create = function create(properties) { + return new GetDataSharingSettingsRequest(properties); + }; + + /** + * Encodes the specified GetDataSharingSettingsRequest message. Does not implicitly {@link google.analytics.admin.v1beta.GetDataSharingSettingsRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1beta.GetDataSharingSettingsRequest + * @static + * @param {google.analytics.admin.v1beta.IGetDataSharingSettingsRequest} message GetDataSharingSettingsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetDataSharingSettingsRequest.encode = function encode(message, writer) { + 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 GetDataSharingSettingsRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.GetDataSharingSettingsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1beta.GetDataSharingSettingsRequest + * @static + * @param {google.analytics.admin.v1beta.IGetDataSharingSettingsRequest} message GetDataSharingSettingsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetDataSharingSettingsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetDataSharingSettingsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1beta.GetDataSharingSettingsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1beta.GetDataSharingSettingsRequest} GetDataSharingSettingsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetDataSharingSettingsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1beta.GetDataSharingSettingsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetDataSharingSettingsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1beta.GetDataSharingSettingsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1beta.GetDataSharingSettingsRequest} GetDataSharingSettingsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetDataSharingSettingsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetDataSharingSettingsRequest message. + * @function verify + * @memberof google.analytics.admin.v1beta.GetDataSharingSettingsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetDataSharingSettingsRequest.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 GetDataSharingSettingsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1beta.GetDataSharingSettingsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1beta.GetDataSharingSettingsRequest} GetDataSharingSettingsRequest + */ + GetDataSharingSettingsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1beta.GetDataSharingSettingsRequest) + return object; + var message = new $root.google.analytics.admin.v1beta.GetDataSharingSettingsRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetDataSharingSettingsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1beta.GetDataSharingSettingsRequest + * @static + * @param {google.analytics.admin.v1beta.GetDataSharingSettingsRequest} message GetDataSharingSettingsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetDataSharingSettingsRequest.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 GetDataSharingSettingsRequest to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1beta.GetDataSharingSettingsRequest + * @instance + * @returns {Object.} JSON object + */ + GetDataSharingSettingsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetDataSharingSettingsRequest + * @function getTypeUrl + * @memberof google.analytics.admin.v1beta.GetDataSharingSettingsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetDataSharingSettingsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1beta.GetDataSharingSettingsRequest"; + }; + + return GetDataSharingSettingsRequest; + })(); + + v1beta.ListAccountSummariesRequest = (function() { + + /** + * Properties of a ListAccountSummariesRequest. + * @memberof google.analytics.admin.v1beta + * @interface IListAccountSummariesRequest + * @property {number|null} [pageSize] ListAccountSummariesRequest pageSize + * @property {string|null} [pageToken] ListAccountSummariesRequest pageToken + */ + + /** + * Constructs a new ListAccountSummariesRequest. + * @memberof google.analytics.admin.v1beta + * @classdesc Represents a ListAccountSummariesRequest. + * @implements IListAccountSummariesRequest + * @constructor + * @param {google.analytics.admin.v1beta.IListAccountSummariesRequest=} [properties] Properties to set + */ + function ListAccountSummariesRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListAccountSummariesRequest pageSize. + * @member {number} pageSize + * @memberof google.analytics.admin.v1beta.ListAccountSummariesRequest + * @instance + */ + ListAccountSummariesRequest.prototype.pageSize = 0; + + /** + * ListAccountSummariesRequest pageToken. + * @member {string} pageToken + * @memberof google.analytics.admin.v1beta.ListAccountSummariesRequest + * @instance + */ + ListAccountSummariesRequest.prototype.pageToken = ""; + + /** + * Creates a new ListAccountSummariesRequest instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1beta.ListAccountSummariesRequest + * @static + * @param {google.analytics.admin.v1beta.IListAccountSummariesRequest=} [properties] Properties to set + * @returns {google.analytics.admin.v1beta.ListAccountSummariesRequest} ListAccountSummariesRequest instance + */ + ListAccountSummariesRequest.create = function create(properties) { + return new ListAccountSummariesRequest(properties); + }; + + /** + * Encodes the specified ListAccountSummariesRequest message. Does not implicitly {@link google.analytics.admin.v1beta.ListAccountSummariesRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1beta.ListAccountSummariesRequest + * @static + * @param {google.analytics.admin.v1beta.IListAccountSummariesRequest} message ListAccountSummariesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListAccountSummariesRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.pageToken); + return writer; + }; + + /** + * Encodes the specified ListAccountSummariesRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.ListAccountSummariesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1beta.ListAccountSummariesRequest + * @static + * @param {google.analytics.admin.v1beta.IListAccountSummariesRequest} message ListAccountSummariesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListAccountSummariesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListAccountSummariesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1beta.ListAccountSummariesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1beta.ListAccountSummariesRequest} ListAccountSummariesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListAccountSummariesRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1beta.ListAccountSummariesRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.pageSize = reader.int32(); + break; + } + case 2: { + message.pageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListAccountSummariesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1beta.ListAccountSummariesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1beta.ListAccountSummariesRequest} ListAccountSummariesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListAccountSummariesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListAccountSummariesRequest message. + * @function verify + * @memberof google.analytics.admin.v1beta.ListAccountSummariesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListAccountSummariesRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object 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 ListAccountSummariesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1beta.ListAccountSummariesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1beta.ListAccountSummariesRequest} ListAccountSummariesRequest + */ + ListAccountSummariesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1beta.ListAccountSummariesRequest) + return object; + var message = new $root.google.analytics.admin.v1beta.ListAccountSummariesRequest(); + 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 ListAccountSummariesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1beta.ListAccountSummariesRequest + * @static + * @param {google.analytics.admin.v1beta.ListAccountSummariesRequest} message ListAccountSummariesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListAccountSummariesRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.pageSize = 0; + object.pageToken = ""; + } + 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 ListAccountSummariesRequest to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1beta.ListAccountSummariesRequest + * @instance + * @returns {Object.} JSON object + */ + ListAccountSummariesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListAccountSummariesRequest + * @function getTypeUrl + * @memberof google.analytics.admin.v1beta.ListAccountSummariesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListAccountSummariesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1beta.ListAccountSummariesRequest"; + }; + + return ListAccountSummariesRequest; + })(); + + v1beta.ListAccountSummariesResponse = (function() { + + /** + * Properties of a ListAccountSummariesResponse. + * @memberof google.analytics.admin.v1beta + * @interface IListAccountSummariesResponse + * @property {Array.|null} [accountSummaries] ListAccountSummariesResponse accountSummaries + * @property {string|null} [nextPageToken] ListAccountSummariesResponse nextPageToken + */ + + /** + * Constructs a new ListAccountSummariesResponse. + * @memberof google.analytics.admin.v1beta + * @classdesc Represents a ListAccountSummariesResponse. + * @implements IListAccountSummariesResponse + * @constructor + * @param {google.analytics.admin.v1beta.IListAccountSummariesResponse=} [properties] Properties to set + */ + function ListAccountSummariesResponse(properties) { + this.accountSummaries = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListAccountSummariesResponse accountSummaries. + * @member {Array.} accountSummaries + * @memberof google.analytics.admin.v1beta.ListAccountSummariesResponse + * @instance + */ + ListAccountSummariesResponse.prototype.accountSummaries = $util.emptyArray; + + /** + * ListAccountSummariesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.analytics.admin.v1beta.ListAccountSummariesResponse + * @instance + */ + ListAccountSummariesResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListAccountSummariesResponse instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1beta.ListAccountSummariesResponse + * @static + * @param {google.analytics.admin.v1beta.IListAccountSummariesResponse=} [properties] Properties to set + * @returns {google.analytics.admin.v1beta.ListAccountSummariesResponse} ListAccountSummariesResponse instance + */ + ListAccountSummariesResponse.create = function create(properties) { + return new ListAccountSummariesResponse(properties); + }; + + /** + * Encodes the specified ListAccountSummariesResponse message. Does not implicitly {@link google.analytics.admin.v1beta.ListAccountSummariesResponse.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1beta.ListAccountSummariesResponse + * @static + * @param {google.analytics.admin.v1beta.IListAccountSummariesResponse} message ListAccountSummariesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListAccountSummariesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.accountSummaries != null && message.accountSummaries.length) + for (var i = 0; i < message.accountSummaries.length; ++i) + $root.google.analytics.admin.v1beta.AccountSummary.encode(message.accountSummaries[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 ListAccountSummariesResponse message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.ListAccountSummariesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1beta.ListAccountSummariesResponse + * @static + * @param {google.analytics.admin.v1beta.IListAccountSummariesResponse} message ListAccountSummariesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListAccountSummariesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListAccountSummariesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1beta.ListAccountSummariesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1beta.ListAccountSummariesResponse} ListAccountSummariesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListAccountSummariesResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1beta.ListAccountSummariesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.accountSummaries && message.accountSummaries.length)) + message.accountSummaries = []; + message.accountSummaries.push($root.google.analytics.admin.v1beta.AccountSummary.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListAccountSummariesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1beta.ListAccountSummariesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1beta.ListAccountSummariesResponse} ListAccountSummariesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListAccountSummariesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListAccountSummariesResponse message. + * @function verify + * @memberof google.analytics.admin.v1beta.ListAccountSummariesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListAccountSummariesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.accountSummaries != null && message.hasOwnProperty("accountSummaries")) { + if (!Array.isArray(message.accountSummaries)) + return "accountSummaries: array expected"; + for (var i = 0; i < message.accountSummaries.length; ++i) { + var error = $root.google.analytics.admin.v1beta.AccountSummary.verify(message.accountSummaries[i]); + if (error) + return "accountSummaries." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListAccountSummariesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1beta.ListAccountSummariesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1beta.ListAccountSummariesResponse} ListAccountSummariesResponse + */ + ListAccountSummariesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1beta.ListAccountSummariesResponse) + return object; + var message = new $root.google.analytics.admin.v1beta.ListAccountSummariesResponse(); + if (object.accountSummaries) { + if (!Array.isArray(object.accountSummaries)) + throw TypeError(".google.analytics.admin.v1beta.ListAccountSummariesResponse.accountSummaries: array expected"); + message.accountSummaries = []; + for (var i = 0; i < object.accountSummaries.length; ++i) { + if (typeof object.accountSummaries[i] !== "object") + throw TypeError(".google.analytics.admin.v1beta.ListAccountSummariesResponse.accountSummaries: object expected"); + message.accountSummaries[i] = $root.google.analytics.admin.v1beta.AccountSummary.fromObject(object.accountSummaries[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListAccountSummariesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1beta.ListAccountSummariesResponse + * @static + * @param {google.analytics.admin.v1beta.ListAccountSummariesResponse} message ListAccountSummariesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListAccountSummariesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.accountSummaries = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.accountSummaries && message.accountSummaries.length) { + object.accountSummaries = []; + for (var j = 0; j < message.accountSummaries.length; ++j) + object.accountSummaries[j] = $root.google.analytics.admin.v1beta.AccountSummary.toObject(message.accountSummaries[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListAccountSummariesResponse to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1beta.ListAccountSummariesResponse + * @instance + * @returns {Object.} JSON object + */ + ListAccountSummariesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListAccountSummariesResponse + * @function getTypeUrl + * @memberof google.analytics.admin.v1beta.ListAccountSummariesResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListAccountSummariesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1beta.ListAccountSummariesResponse"; + }; + + return ListAccountSummariesResponse; + })(); + + v1beta.AcknowledgeUserDataCollectionRequest = (function() { + + /** + * Properties of an AcknowledgeUserDataCollectionRequest. + * @memberof google.analytics.admin.v1beta + * @interface IAcknowledgeUserDataCollectionRequest + * @property {string|null} [property] AcknowledgeUserDataCollectionRequest property + * @property {string|null} [acknowledgement] AcknowledgeUserDataCollectionRequest acknowledgement + */ + + /** + * Constructs a new AcknowledgeUserDataCollectionRequest. + * @memberof google.analytics.admin.v1beta + * @classdesc Represents an AcknowledgeUserDataCollectionRequest. + * @implements IAcknowledgeUserDataCollectionRequest + * @constructor + * @param {google.analytics.admin.v1beta.IAcknowledgeUserDataCollectionRequest=} [properties] Properties to set + */ + function AcknowledgeUserDataCollectionRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AcknowledgeUserDataCollectionRequest property. + * @member {string} property + * @memberof google.analytics.admin.v1beta.AcknowledgeUserDataCollectionRequest + * @instance + */ + AcknowledgeUserDataCollectionRequest.prototype.property = ""; + + /** + * AcknowledgeUserDataCollectionRequest acknowledgement. + * @member {string} acknowledgement + * @memberof google.analytics.admin.v1beta.AcknowledgeUserDataCollectionRequest + * @instance + */ + AcknowledgeUserDataCollectionRequest.prototype.acknowledgement = ""; + + /** + * Creates a new AcknowledgeUserDataCollectionRequest instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1beta.AcknowledgeUserDataCollectionRequest + * @static + * @param {google.analytics.admin.v1beta.IAcknowledgeUserDataCollectionRequest=} [properties] Properties to set + * @returns {google.analytics.admin.v1beta.AcknowledgeUserDataCollectionRequest} AcknowledgeUserDataCollectionRequest instance + */ + AcknowledgeUserDataCollectionRequest.create = function create(properties) { + return new AcknowledgeUserDataCollectionRequest(properties); + }; + + /** + * Encodes the specified AcknowledgeUserDataCollectionRequest message. Does not implicitly {@link google.analytics.admin.v1beta.AcknowledgeUserDataCollectionRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1beta.AcknowledgeUserDataCollectionRequest + * @static + * @param {google.analytics.admin.v1beta.IAcknowledgeUserDataCollectionRequest} message AcknowledgeUserDataCollectionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AcknowledgeUserDataCollectionRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.property != null && Object.hasOwnProperty.call(message, "property")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.property); + if (message.acknowledgement != null && Object.hasOwnProperty.call(message, "acknowledgement")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.acknowledgement); + return writer; + }; + + /** + * Encodes the specified AcknowledgeUserDataCollectionRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.AcknowledgeUserDataCollectionRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1beta.AcknowledgeUserDataCollectionRequest + * @static + * @param {google.analytics.admin.v1beta.IAcknowledgeUserDataCollectionRequest} message AcknowledgeUserDataCollectionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AcknowledgeUserDataCollectionRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AcknowledgeUserDataCollectionRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1beta.AcknowledgeUserDataCollectionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1beta.AcknowledgeUserDataCollectionRequest} AcknowledgeUserDataCollectionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AcknowledgeUserDataCollectionRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1beta.AcknowledgeUserDataCollectionRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.property = reader.string(); + break; + } + case 2: { + message.acknowledgement = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AcknowledgeUserDataCollectionRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1beta.AcknowledgeUserDataCollectionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1beta.AcknowledgeUserDataCollectionRequest} AcknowledgeUserDataCollectionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AcknowledgeUserDataCollectionRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AcknowledgeUserDataCollectionRequest message. + * @function verify + * @memberof google.analytics.admin.v1beta.AcknowledgeUserDataCollectionRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AcknowledgeUserDataCollectionRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.property != null && message.hasOwnProperty("property")) + if (!$util.isString(message.property)) + return "property: string expected"; + if (message.acknowledgement != null && message.hasOwnProperty("acknowledgement")) + if (!$util.isString(message.acknowledgement)) + return "acknowledgement: string expected"; + return null; + }; + + /** + * Creates an AcknowledgeUserDataCollectionRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1beta.AcknowledgeUserDataCollectionRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1beta.AcknowledgeUserDataCollectionRequest} AcknowledgeUserDataCollectionRequest + */ + AcknowledgeUserDataCollectionRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1beta.AcknowledgeUserDataCollectionRequest) + return object; + var message = new $root.google.analytics.admin.v1beta.AcknowledgeUserDataCollectionRequest(); + if (object.property != null) + message.property = String(object.property); + if (object.acknowledgement != null) + message.acknowledgement = String(object.acknowledgement); + return message; + }; + + /** + * Creates a plain object from an AcknowledgeUserDataCollectionRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1beta.AcknowledgeUserDataCollectionRequest + * @static + * @param {google.analytics.admin.v1beta.AcknowledgeUserDataCollectionRequest} message AcknowledgeUserDataCollectionRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AcknowledgeUserDataCollectionRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.property = ""; + object.acknowledgement = ""; + } + if (message.property != null && message.hasOwnProperty("property")) + object.property = message.property; + if (message.acknowledgement != null && message.hasOwnProperty("acknowledgement")) + object.acknowledgement = message.acknowledgement; + return object; + }; + + /** + * Converts this AcknowledgeUserDataCollectionRequest to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1beta.AcknowledgeUserDataCollectionRequest + * @instance + * @returns {Object.} JSON object + */ + AcknowledgeUserDataCollectionRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AcknowledgeUserDataCollectionRequest + * @function getTypeUrl + * @memberof google.analytics.admin.v1beta.AcknowledgeUserDataCollectionRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AcknowledgeUserDataCollectionRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1beta.AcknowledgeUserDataCollectionRequest"; + }; + + return AcknowledgeUserDataCollectionRequest; + })(); + + v1beta.AcknowledgeUserDataCollectionResponse = (function() { + + /** + * Properties of an AcknowledgeUserDataCollectionResponse. + * @memberof google.analytics.admin.v1beta + * @interface IAcknowledgeUserDataCollectionResponse + */ + + /** + * Constructs a new AcknowledgeUserDataCollectionResponse. + * @memberof google.analytics.admin.v1beta + * @classdesc Represents an AcknowledgeUserDataCollectionResponse. + * @implements IAcknowledgeUserDataCollectionResponse + * @constructor + * @param {google.analytics.admin.v1beta.IAcknowledgeUserDataCollectionResponse=} [properties] Properties to set + */ + function AcknowledgeUserDataCollectionResponse(properties) { + if (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 AcknowledgeUserDataCollectionResponse instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1beta.AcknowledgeUserDataCollectionResponse + * @static + * @param {google.analytics.admin.v1beta.IAcknowledgeUserDataCollectionResponse=} [properties] Properties to set + * @returns {google.analytics.admin.v1beta.AcknowledgeUserDataCollectionResponse} AcknowledgeUserDataCollectionResponse instance + */ + AcknowledgeUserDataCollectionResponse.create = function create(properties) { + return new AcknowledgeUserDataCollectionResponse(properties); + }; + + /** + * Encodes the specified AcknowledgeUserDataCollectionResponse message. Does not implicitly {@link google.analytics.admin.v1beta.AcknowledgeUserDataCollectionResponse.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1beta.AcknowledgeUserDataCollectionResponse + * @static + * @param {google.analytics.admin.v1beta.IAcknowledgeUserDataCollectionResponse} message AcknowledgeUserDataCollectionResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AcknowledgeUserDataCollectionResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified AcknowledgeUserDataCollectionResponse message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.AcknowledgeUserDataCollectionResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1beta.AcknowledgeUserDataCollectionResponse + * @static + * @param {google.analytics.admin.v1beta.IAcknowledgeUserDataCollectionResponse} message AcknowledgeUserDataCollectionResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AcknowledgeUserDataCollectionResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AcknowledgeUserDataCollectionResponse message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1beta.AcknowledgeUserDataCollectionResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1beta.AcknowledgeUserDataCollectionResponse} AcknowledgeUserDataCollectionResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AcknowledgeUserDataCollectionResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1beta.AcknowledgeUserDataCollectionResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AcknowledgeUserDataCollectionResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1beta.AcknowledgeUserDataCollectionResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1beta.AcknowledgeUserDataCollectionResponse} AcknowledgeUserDataCollectionResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AcknowledgeUserDataCollectionResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AcknowledgeUserDataCollectionResponse message. + * @function verify + * @memberof google.analytics.admin.v1beta.AcknowledgeUserDataCollectionResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AcknowledgeUserDataCollectionResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates an AcknowledgeUserDataCollectionResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1beta.AcknowledgeUserDataCollectionResponse + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1beta.AcknowledgeUserDataCollectionResponse} AcknowledgeUserDataCollectionResponse + */ + AcknowledgeUserDataCollectionResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1beta.AcknowledgeUserDataCollectionResponse) + return object; + return new $root.google.analytics.admin.v1beta.AcknowledgeUserDataCollectionResponse(); + }; + + /** + * Creates a plain object from an AcknowledgeUserDataCollectionResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1beta.AcknowledgeUserDataCollectionResponse + * @static + * @param {google.analytics.admin.v1beta.AcknowledgeUserDataCollectionResponse} message AcknowledgeUserDataCollectionResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AcknowledgeUserDataCollectionResponse.toObject = function toObject() { + return {}; + }; + + /** + * Converts this AcknowledgeUserDataCollectionResponse to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1beta.AcknowledgeUserDataCollectionResponse + * @instance + * @returns {Object.} JSON object + */ + AcknowledgeUserDataCollectionResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AcknowledgeUserDataCollectionResponse + * @function getTypeUrl + * @memberof google.analytics.admin.v1beta.AcknowledgeUserDataCollectionResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AcknowledgeUserDataCollectionResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1beta.AcknowledgeUserDataCollectionResponse"; + }; + + return AcknowledgeUserDataCollectionResponse; + })(); + + v1beta.SearchChangeHistoryEventsRequest = (function() { + + /** + * Properties of a SearchChangeHistoryEventsRequest. + * @memberof google.analytics.admin.v1beta + * @interface ISearchChangeHistoryEventsRequest + * @property {string|null} [account] SearchChangeHistoryEventsRequest account + * @property {string|null} [property] SearchChangeHistoryEventsRequest property + * @property {Array.|null} [resourceType] SearchChangeHistoryEventsRequest resourceType + * @property {Array.|null} [action] SearchChangeHistoryEventsRequest action + * @property {Array.|null} [actorEmail] SearchChangeHistoryEventsRequest actorEmail + * @property {google.protobuf.ITimestamp|null} [earliestChangeTime] SearchChangeHistoryEventsRequest earliestChangeTime + * @property {google.protobuf.ITimestamp|null} [latestChangeTime] SearchChangeHistoryEventsRequest latestChangeTime + * @property {number|null} [pageSize] SearchChangeHistoryEventsRequest pageSize + * @property {string|null} [pageToken] SearchChangeHistoryEventsRequest pageToken + */ + + /** + * Constructs a new SearchChangeHistoryEventsRequest. + * @memberof google.analytics.admin.v1beta + * @classdesc Represents a SearchChangeHistoryEventsRequest. + * @implements ISearchChangeHistoryEventsRequest + * @constructor + * @param {google.analytics.admin.v1beta.ISearchChangeHistoryEventsRequest=} [properties] Properties to set + */ + function SearchChangeHistoryEventsRequest(properties) { + this.resourceType = []; + this.action = []; + this.actorEmail = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SearchChangeHistoryEventsRequest account. + * @member {string} account + * @memberof google.analytics.admin.v1beta.SearchChangeHistoryEventsRequest + * @instance + */ + SearchChangeHistoryEventsRequest.prototype.account = ""; + + /** + * SearchChangeHistoryEventsRequest property. + * @member {string} property + * @memberof google.analytics.admin.v1beta.SearchChangeHistoryEventsRequest + * @instance + */ + SearchChangeHistoryEventsRequest.prototype.property = ""; + + /** + * SearchChangeHistoryEventsRequest resourceType. + * @member {Array.} resourceType + * @memberof google.analytics.admin.v1beta.SearchChangeHistoryEventsRequest + * @instance + */ + SearchChangeHistoryEventsRequest.prototype.resourceType = $util.emptyArray; + + /** + * SearchChangeHistoryEventsRequest action. + * @member {Array.} action + * @memberof google.analytics.admin.v1beta.SearchChangeHistoryEventsRequest + * @instance + */ + SearchChangeHistoryEventsRequest.prototype.action = $util.emptyArray; + + /** + * SearchChangeHistoryEventsRequest actorEmail. + * @member {Array.} actorEmail + * @memberof google.analytics.admin.v1beta.SearchChangeHistoryEventsRequest + * @instance + */ + SearchChangeHistoryEventsRequest.prototype.actorEmail = $util.emptyArray; + + /** + * SearchChangeHistoryEventsRequest earliestChangeTime. + * @member {google.protobuf.ITimestamp|null|undefined} earliestChangeTime + * @memberof google.analytics.admin.v1beta.SearchChangeHistoryEventsRequest + * @instance + */ + SearchChangeHistoryEventsRequest.prototype.earliestChangeTime = null; + + /** + * SearchChangeHistoryEventsRequest latestChangeTime. + * @member {google.protobuf.ITimestamp|null|undefined} latestChangeTime + * @memberof google.analytics.admin.v1beta.SearchChangeHistoryEventsRequest + * @instance + */ + SearchChangeHistoryEventsRequest.prototype.latestChangeTime = null; + + /** + * SearchChangeHistoryEventsRequest pageSize. + * @member {number} pageSize + * @memberof google.analytics.admin.v1beta.SearchChangeHistoryEventsRequest + * @instance + */ + SearchChangeHistoryEventsRequest.prototype.pageSize = 0; + + /** + * SearchChangeHistoryEventsRequest pageToken. + * @member {string} pageToken + * @memberof google.analytics.admin.v1beta.SearchChangeHistoryEventsRequest + * @instance + */ + SearchChangeHistoryEventsRequest.prototype.pageToken = ""; + + /** + * Creates a new SearchChangeHistoryEventsRequest instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1beta.SearchChangeHistoryEventsRequest + * @static + * @param {google.analytics.admin.v1beta.ISearchChangeHistoryEventsRequest=} [properties] Properties to set + * @returns {google.analytics.admin.v1beta.SearchChangeHistoryEventsRequest} SearchChangeHistoryEventsRequest instance + */ + SearchChangeHistoryEventsRequest.create = function create(properties) { + return new SearchChangeHistoryEventsRequest(properties); + }; + + /** + * Encodes the specified SearchChangeHistoryEventsRequest message. Does not implicitly {@link google.analytics.admin.v1beta.SearchChangeHistoryEventsRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1beta.SearchChangeHistoryEventsRequest + * @static + * @param {google.analytics.admin.v1beta.ISearchChangeHistoryEventsRequest} message SearchChangeHistoryEventsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SearchChangeHistoryEventsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.account != null && Object.hasOwnProperty.call(message, "account")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.account); + if (message.property != null && Object.hasOwnProperty.call(message, "property")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.property); + if (message.resourceType != null && message.resourceType.length) { + writer.uint32(/* id 3, wireType 2 =*/26).fork(); + for (var i = 0; i < message.resourceType.length; ++i) + writer.int32(message.resourceType[i]); + writer.ldelim(); + } + if (message.action != null && message.action.length) { + writer.uint32(/* id 4, wireType 2 =*/34).fork(); + for (var i = 0; i < message.action.length; ++i) + writer.int32(message.action[i]); + writer.ldelim(); + } + if (message.actorEmail != null && message.actorEmail.length) + for (var i = 0; i < message.actorEmail.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.actorEmail[i]); + if (message.earliestChangeTime != null && Object.hasOwnProperty.call(message, "earliestChangeTime")) + $root.google.protobuf.Timestamp.encode(message.earliestChangeTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.latestChangeTime != null && Object.hasOwnProperty.call(message, "latestChangeTime")) + $root.google.protobuf.Timestamp.encode(message.latestChangeTime, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 8, wireType 0 =*/64).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.pageToken); + return writer; + }; + + /** + * Encodes the specified SearchChangeHistoryEventsRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.SearchChangeHistoryEventsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1beta.SearchChangeHistoryEventsRequest + * @static + * @param {google.analytics.admin.v1beta.ISearchChangeHistoryEventsRequest} message SearchChangeHistoryEventsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SearchChangeHistoryEventsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SearchChangeHistoryEventsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1beta.SearchChangeHistoryEventsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1beta.SearchChangeHistoryEventsRequest} SearchChangeHistoryEventsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SearchChangeHistoryEventsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1beta.SearchChangeHistoryEventsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.account = reader.string(); + break; + } + case 2: { + message.property = reader.string(); + break; + } + case 3: { + if (!(message.resourceType && message.resourceType.length)) + message.resourceType = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.resourceType.push(reader.int32()); + } else + message.resourceType.push(reader.int32()); + break; + } + case 4: { + if (!(message.action && message.action.length)) + message.action = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.action.push(reader.int32()); + } else + message.action.push(reader.int32()); + break; + } + case 5: { + if (!(message.actorEmail && message.actorEmail.length)) + message.actorEmail = []; + message.actorEmail.push(reader.string()); + break; + } + case 6: { + message.earliestChangeTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 7: { + message.latestChangeTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 8: { + message.pageSize = reader.int32(); + break; + } + case 9: { + message.pageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SearchChangeHistoryEventsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1beta.SearchChangeHistoryEventsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1beta.SearchChangeHistoryEventsRequest} SearchChangeHistoryEventsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SearchChangeHistoryEventsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SearchChangeHistoryEventsRequest message. + * @function verify + * @memberof google.analytics.admin.v1beta.SearchChangeHistoryEventsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SearchChangeHistoryEventsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.account != null && message.hasOwnProperty("account")) + if (!$util.isString(message.account)) + return "account: string expected"; + if (message.property != null && message.hasOwnProperty("property")) + if (!$util.isString(message.property)) + return "property: string expected"; + if (message.resourceType != null && message.hasOwnProperty("resourceType")) { + if (!Array.isArray(message.resourceType)) + return "resourceType: array expected"; + for (var i = 0; i < message.resourceType.length; ++i) + switch (message.resourceType[i]) { + default: + return "resourceType: enum value[] expected"; + case 0: + case 1: + case 2: + case 6: + case 7: + case 8: + case 9: + case 10: + case 13: + case 14: + case 15: + case 18: + case 20: + break; + } + } + if (message.action != null && message.hasOwnProperty("action")) { + if (!Array.isArray(message.action)) + return "action: array expected"; + for (var i = 0; i < message.action.length; ++i) + switch (message.action[i]) { + default: + return "action: enum value[] expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + } + if (message.actorEmail != null && message.hasOwnProperty("actorEmail")) { + if (!Array.isArray(message.actorEmail)) + return "actorEmail: array expected"; + for (var i = 0; i < message.actorEmail.length; ++i) + if (!$util.isString(message.actorEmail[i])) + return "actorEmail: string[] expected"; + } + if (message.earliestChangeTime != null && message.hasOwnProperty("earliestChangeTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.earliestChangeTime); + if (error) + return "earliestChangeTime." + error; + } + if (message.latestChangeTime != null && message.hasOwnProperty("latestChangeTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.latestChangeTime); + if (error) + return "latestChangeTime." + error; + } + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + return null; + }; + + /** + * Creates a SearchChangeHistoryEventsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1beta.SearchChangeHistoryEventsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1beta.SearchChangeHistoryEventsRequest} SearchChangeHistoryEventsRequest + */ + SearchChangeHistoryEventsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1beta.SearchChangeHistoryEventsRequest) + return object; + var message = new $root.google.analytics.admin.v1beta.SearchChangeHistoryEventsRequest(); + if (object.account != null) + message.account = String(object.account); + if (object.property != null) + message.property = String(object.property); + if (object.resourceType) { + if (!Array.isArray(object.resourceType)) + throw TypeError(".google.analytics.admin.v1beta.SearchChangeHistoryEventsRequest.resourceType: array expected"); + message.resourceType = []; + for (var i = 0; i < object.resourceType.length; ++i) + switch (object.resourceType[i]) { + default: + if (typeof object.resourceType[i] === "number") { + message.resourceType[i] = object.resourceType[i]; + break; + } + case "CHANGE_HISTORY_RESOURCE_TYPE_UNSPECIFIED": + case 0: + message.resourceType[i] = 0; + break; + case "ACCOUNT": + case 1: + message.resourceType[i] = 1; + break; + case "PROPERTY": + case 2: + message.resourceType[i] = 2; + break; + case "FIREBASE_LINK": + case 6: + message.resourceType[i] = 6; + break; + case "GOOGLE_ADS_LINK": + case 7: + message.resourceType[i] = 7; + break; + case "GOOGLE_SIGNALS_SETTINGS": + case 8: + message.resourceType[i] = 8; + break; + case "CONVERSION_EVENT": + case 9: + message.resourceType[i] = 9; + break; + case "MEASUREMENT_PROTOCOL_SECRET": + case 10: + message.resourceType[i] = 10; + break; + case "DATA_RETENTION_SETTINGS": + case 13: + message.resourceType[i] = 13; + break; + case "DISPLAY_VIDEO_360_ADVERTISER_LINK": + case 14: + message.resourceType[i] = 14; + break; + case "DISPLAY_VIDEO_360_ADVERTISER_LINK_PROPOSAL": + case 15: + message.resourceType[i] = 15; + break; + case "DATA_STREAM": + case 18: + message.resourceType[i] = 18; + break; + case "ATTRIBUTION_SETTINGS": + case 20: + message.resourceType[i] = 20; + break; + } + } + if (object.action) { + if (!Array.isArray(object.action)) + throw TypeError(".google.analytics.admin.v1beta.SearchChangeHistoryEventsRequest.action: array expected"); + message.action = []; + for (var i = 0; i < object.action.length; ++i) + switch (object.action[i]) { + default: + if (typeof object.action[i] === "number") { + message.action[i] = object.action[i]; + break; + } + case "ACTION_TYPE_UNSPECIFIED": + case 0: + message.action[i] = 0; + break; + case "CREATED": + case 1: + message.action[i] = 1; + break; + case "UPDATED": + case 2: + message.action[i] = 2; + break; + case "DELETED": + case 3: + message.action[i] = 3; + break; + } + } + if (object.actorEmail) { + if (!Array.isArray(object.actorEmail)) + throw TypeError(".google.analytics.admin.v1beta.SearchChangeHistoryEventsRequest.actorEmail: array expected"); + message.actorEmail = []; + for (var i = 0; i < object.actorEmail.length; ++i) + message.actorEmail[i] = String(object.actorEmail[i]); + } + if (object.earliestChangeTime != null) { + if (typeof object.earliestChangeTime !== "object") + throw TypeError(".google.analytics.admin.v1beta.SearchChangeHistoryEventsRequest.earliestChangeTime: object expected"); + message.earliestChangeTime = $root.google.protobuf.Timestamp.fromObject(object.earliestChangeTime); + } + if (object.latestChangeTime != null) { + if (typeof object.latestChangeTime !== "object") + throw TypeError(".google.analytics.admin.v1beta.SearchChangeHistoryEventsRequest.latestChangeTime: object expected"); + message.latestChangeTime = $root.google.protobuf.Timestamp.fromObject(object.latestChangeTime); + } + 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 SearchChangeHistoryEventsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1beta.SearchChangeHistoryEventsRequest + * @static + * @param {google.analytics.admin.v1beta.SearchChangeHistoryEventsRequest} message SearchChangeHistoryEventsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SearchChangeHistoryEventsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.resourceType = []; + object.action = []; + object.actorEmail = []; + } + if (options.defaults) { + object.account = ""; + object.property = ""; + object.earliestChangeTime = null; + object.latestChangeTime = null; + object.pageSize = 0; + object.pageToken = ""; + } + if (message.account != null && message.hasOwnProperty("account")) + object.account = message.account; + if (message.property != null && message.hasOwnProperty("property")) + object.property = message.property; + if (message.resourceType && message.resourceType.length) { + object.resourceType = []; + for (var j = 0; j < message.resourceType.length; ++j) + object.resourceType[j] = options.enums === String ? $root.google.analytics.admin.v1beta.ChangeHistoryResourceType[message.resourceType[j]] === undefined ? message.resourceType[j] : $root.google.analytics.admin.v1beta.ChangeHistoryResourceType[message.resourceType[j]] : message.resourceType[j]; + } + if (message.action && message.action.length) { + object.action = []; + for (var j = 0; j < message.action.length; ++j) + object.action[j] = options.enums === String ? $root.google.analytics.admin.v1beta.ActionType[message.action[j]] === undefined ? message.action[j] : $root.google.analytics.admin.v1beta.ActionType[message.action[j]] : message.action[j]; + } + if (message.actorEmail && message.actorEmail.length) { + object.actorEmail = []; + for (var j = 0; j < message.actorEmail.length; ++j) + object.actorEmail[j] = message.actorEmail[j]; + } + if (message.earliestChangeTime != null && message.hasOwnProperty("earliestChangeTime")) + object.earliestChangeTime = $root.google.protobuf.Timestamp.toObject(message.earliestChangeTime, options); + if (message.latestChangeTime != null && message.hasOwnProperty("latestChangeTime")) + object.latestChangeTime = $root.google.protobuf.Timestamp.toObject(message.latestChangeTime, options); + 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 SearchChangeHistoryEventsRequest to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1beta.SearchChangeHistoryEventsRequest + * @instance + * @returns {Object.} JSON object + */ + SearchChangeHistoryEventsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SearchChangeHistoryEventsRequest + * @function getTypeUrl + * @memberof google.analytics.admin.v1beta.SearchChangeHistoryEventsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SearchChangeHistoryEventsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1beta.SearchChangeHistoryEventsRequest"; + }; + + return SearchChangeHistoryEventsRequest; + })(); + + v1beta.SearchChangeHistoryEventsResponse = (function() { + + /** + * Properties of a SearchChangeHistoryEventsResponse. + * @memberof google.analytics.admin.v1beta + * @interface ISearchChangeHistoryEventsResponse + * @property {Array.|null} [changeHistoryEvents] SearchChangeHistoryEventsResponse changeHistoryEvents + * @property {string|null} [nextPageToken] SearchChangeHistoryEventsResponse nextPageToken + */ + + /** + * Constructs a new SearchChangeHistoryEventsResponse. + * @memberof google.analytics.admin.v1beta + * @classdesc Represents a SearchChangeHistoryEventsResponse. + * @implements ISearchChangeHistoryEventsResponse + * @constructor + * @param {google.analytics.admin.v1beta.ISearchChangeHistoryEventsResponse=} [properties] Properties to set + */ + function SearchChangeHistoryEventsResponse(properties) { + this.changeHistoryEvents = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SearchChangeHistoryEventsResponse changeHistoryEvents. + * @member {Array.} changeHistoryEvents + * @memberof google.analytics.admin.v1beta.SearchChangeHistoryEventsResponse + * @instance + */ + SearchChangeHistoryEventsResponse.prototype.changeHistoryEvents = $util.emptyArray; + + /** + * SearchChangeHistoryEventsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.analytics.admin.v1beta.SearchChangeHistoryEventsResponse + * @instance + */ + SearchChangeHistoryEventsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new SearchChangeHistoryEventsResponse instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1beta.SearchChangeHistoryEventsResponse + * @static + * @param {google.analytics.admin.v1beta.ISearchChangeHistoryEventsResponse=} [properties] Properties to set + * @returns {google.analytics.admin.v1beta.SearchChangeHistoryEventsResponse} SearchChangeHistoryEventsResponse instance + */ + SearchChangeHistoryEventsResponse.create = function create(properties) { + return new SearchChangeHistoryEventsResponse(properties); + }; + + /** + * Encodes the specified SearchChangeHistoryEventsResponse message. Does not implicitly {@link google.analytics.admin.v1beta.SearchChangeHistoryEventsResponse.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1beta.SearchChangeHistoryEventsResponse + * @static + * @param {google.analytics.admin.v1beta.ISearchChangeHistoryEventsResponse} message SearchChangeHistoryEventsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SearchChangeHistoryEventsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.changeHistoryEvents != null && message.changeHistoryEvents.length) + for (var i = 0; i < message.changeHistoryEvents.length; ++i) + $root.google.analytics.admin.v1beta.ChangeHistoryEvent.encode(message.changeHistoryEvents[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 SearchChangeHistoryEventsResponse message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.SearchChangeHistoryEventsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1beta.SearchChangeHistoryEventsResponse + * @static + * @param {google.analytics.admin.v1beta.ISearchChangeHistoryEventsResponse} message SearchChangeHistoryEventsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SearchChangeHistoryEventsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SearchChangeHistoryEventsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1beta.SearchChangeHistoryEventsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1beta.SearchChangeHistoryEventsResponse} SearchChangeHistoryEventsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SearchChangeHistoryEventsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1beta.SearchChangeHistoryEventsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.changeHistoryEvents && message.changeHistoryEvents.length)) + message.changeHistoryEvents = []; + message.changeHistoryEvents.push($root.google.analytics.admin.v1beta.ChangeHistoryEvent.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SearchChangeHistoryEventsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1beta.SearchChangeHistoryEventsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1beta.SearchChangeHistoryEventsResponse} SearchChangeHistoryEventsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SearchChangeHistoryEventsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SearchChangeHistoryEventsResponse message. + * @function verify + * @memberof google.analytics.admin.v1beta.SearchChangeHistoryEventsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SearchChangeHistoryEventsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.changeHistoryEvents != null && message.hasOwnProperty("changeHistoryEvents")) { + if (!Array.isArray(message.changeHistoryEvents)) + return "changeHistoryEvents: array expected"; + for (var i = 0; i < message.changeHistoryEvents.length; ++i) { + var error = $root.google.analytics.admin.v1beta.ChangeHistoryEvent.verify(message.changeHistoryEvents[i]); + if (error) + return "changeHistoryEvents." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a SearchChangeHistoryEventsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1beta.SearchChangeHistoryEventsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1beta.SearchChangeHistoryEventsResponse} SearchChangeHistoryEventsResponse + */ + SearchChangeHistoryEventsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1beta.SearchChangeHistoryEventsResponse) + return object; + var message = new $root.google.analytics.admin.v1beta.SearchChangeHistoryEventsResponse(); + if (object.changeHistoryEvents) { + if (!Array.isArray(object.changeHistoryEvents)) + throw TypeError(".google.analytics.admin.v1beta.SearchChangeHistoryEventsResponse.changeHistoryEvents: array expected"); + message.changeHistoryEvents = []; + for (var i = 0; i < object.changeHistoryEvents.length; ++i) { + if (typeof object.changeHistoryEvents[i] !== "object") + throw TypeError(".google.analytics.admin.v1beta.SearchChangeHistoryEventsResponse.changeHistoryEvents: object expected"); + message.changeHistoryEvents[i] = $root.google.analytics.admin.v1beta.ChangeHistoryEvent.fromObject(object.changeHistoryEvents[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a SearchChangeHistoryEventsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1beta.SearchChangeHistoryEventsResponse + * @static + * @param {google.analytics.admin.v1beta.SearchChangeHistoryEventsResponse} message SearchChangeHistoryEventsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SearchChangeHistoryEventsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.changeHistoryEvents = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.changeHistoryEvents && message.changeHistoryEvents.length) { + object.changeHistoryEvents = []; + for (var j = 0; j < message.changeHistoryEvents.length; ++j) + object.changeHistoryEvents[j] = $root.google.analytics.admin.v1beta.ChangeHistoryEvent.toObject(message.changeHistoryEvents[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this SearchChangeHistoryEventsResponse to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1beta.SearchChangeHistoryEventsResponse + * @instance + * @returns {Object.} JSON object + */ + SearchChangeHistoryEventsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SearchChangeHistoryEventsResponse + * @function getTypeUrl + * @memberof google.analytics.admin.v1beta.SearchChangeHistoryEventsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SearchChangeHistoryEventsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1beta.SearchChangeHistoryEventsResponse"; + }; + + return SearchChangeHistoryEventsResponse; + })(); + + v1beta.GetMeasurementProtocolSecretRequest = (function() { + + /** + * Properties of a GetMeasurementProtocolSecretRequest. + * @memberof google.analytics.admin.v1beta + * @interface IGetMeasurementProtocolSecretRequest + * @property {string|null} [name] GetMeasurementProtocolSecretRequest name + */ + + /** + * Constructs a new GetMeasurementProtocolSecretRequest. + * @memberof google.analytics.admin.v1beta + * @classdesc Represents a GetMeasurementProtocolSecretRequest. + * @implements IGetMeasurementProtocolSecretRequest + * @constructor + * @param {google.analytics.admin.v1beta.IGetMeasurementProtocolSecretRequest=} [properties] Properties to set + */ + function GetMeasurementProtocolSecretRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetMeasurementProtocolSecretRequest name. + * @member {string} name + * @memberof google.analytics.admin.v1beta.GetMeasurementProtocolSecretRequest + * @instance + */ + GetMeasurementProtocolSecretRequest.prototype.name = ""; + + /** + * Creates a new GetMeasurementProtocolSecretRequest instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1beta.GetMeasurementProtocolSecretRequest + * @static + * @param {google.analytics.admin.v1beta.IGetMeasurementProtocolSecretRequest=} [properties] Properties to set + * @returns {google.analytics.admin.v1beta.GetMeasurementProtocolSecretRequest} GetMeasurementProtocolSecretRequest instance + */ + GetMeasurementProtocolSecretRequest.create = function create(properties) { + return new GetMeasurementProtocolSecretRequest(properties); + }; + + /** + * Encodes the specified GetMeasurementProtocolSecretRequest message. Does not implicitly {@link google.analytics.admin.v1beta.GetMeasurementProtocolSecretRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1beta.GetMeasurementProtocolSecretRequest + * @static + * @param {google.analytics.admin.v1beta.IGetMeasurementProtocolSecretRequest} message GetMeasurementProtocolSecretRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetMeasurementProtocolSecretRequest.encode = function encode(message, writer) { + 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 GetMeasurementProtocolSecretRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.GetMeasurementProtocolSecretRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1beta.GetMeasurementProtocolSecretRequest + * @static + * @param {google.analytics.admin.v1beta.IGetMeasurementProtocolSecretRequest} message GetMeasurementProtocolSecretRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetMeasurementProtocolSecretRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetMeasurementProtocolSecretRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1beta.GetMeasurementProtocolSecretRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1beta.GetMeasurementProtocolSecretRequest} GetMeasurementProtocolSecretRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetMeasurementProtocolSecretRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1beta.GetMeasurementProtocolSecretRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetMeasurementProtocolSecretRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1beta.GetMeasurementProtocolSecretRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1beta.GetMeasurementProtocolSecretRequest} GetMeasurementProtocolSecretRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetMeasurementProtocolSecretRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetMeasurementProtocolSecretRequest message. + * @function verify + * @memberof google.analytics.admin.v1beta.GetMeasurementProtocolSecretRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetMeasurementProtocolSecretRequest.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 GetMeasurementProtocolSecretRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1beta.GetMeasurementProtocolSecretRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1beta.GetMeasurementProtocolSecretRequest} GetMeasurementProtocolSecretRequest + */ + GetMeasurementProtocolSecretRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1beta.GetMeasurementProtocolSecretRequest) + return object; + var message = new $root.google.analytics.admin.v1beta.GetMeasurementProtocolSecretRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetMeasurementProtocolSecretRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1beta.GetMeasurementProtocolSecretRequest + * @static + * @param {google.analytics.admin.v1beta.GetMeasurementProtocolSecretRequest} message GetMeasurementProtocolSecretRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetMeasurementProtocolSecretRequest.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 GetMeasurementProtocolSecretRequest to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1beta.GetMeasurementProtocolSecretRequest + * @instance + * @returns {Object.} JSON object + */ + GetMeasurementProtocolSecretRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetMeasurementProtocolSecretRequest + * @function getTypeUrl + * @memberof google.analytics.admin.v1beta.GetMeasurementProtocolSecretRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetMeasurementProtocolSecretRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1beta.GetMeasurementProtocolSecretRequest"; + }; + + return GetMeasurementProtocolSecretRequest; + })(); + + v1beta.CreateMeasurementProtocolSecretRequest = (function() { + + /** + * Properties of a CreateMeasurementProtocolSecretRequest. + * @memberof google.analytics.admin.v1beta + * @interface ICreateMeasurementProtocolSecretRequest + * @property {string|null} [parent] CreateMeasurementProtocolSecretRequest parent + * @property {google.analytics.admin.v1beta.IMeasurementProtocolSecret|null} [measurementProtocolSecret] CreateMeasurementProtocolSecretRequest measurementProtocolSecret + */ + + /** + * Constructs a new CreateMeasurementProtocolSecretRequest. + * @memberof google.analytics.admin.v1beta + * @classdesc Represents a CreateMeasurementProtocolSecretRequest. + * @implements ICreateMeasurementProtocolSecretRequest + * @constructor + * @param {google.analytics.admin.v1beta.ICreateMeasurementProtocolSecretRequest=} [properties] Properties to set + */ + function CreateMeasurementProtocolSecretRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateMeasurementProtocolSecretRequest parent. + * @member {string} parent + * @memberof google.analytics.admin.v1beta.CreateMeasurementProtocolSecretRequest + * @instance + */ + CreateMeasurementProtocolSecretRequest.prototype.parent = ""; + + /** + * CreateMeasurementProtocolSecretRequest measurementProtocolSecret. + * @member {google.analytics.admin.v1beta.IMeasurementProtocolSecret|null|undefined} measurementProtocolSecret + * @memberof google.analytics.admin.v1beta.CreateMeasurementProtocolSecretRequest + * @instance + */ + CreateMeasurementProtocolSecretRequest.prototype.measurementProtocolSecret = null; + + /** + * Creates a new CreateMeasurementProtocolSecretRequest instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1beta.CreateMeasurementProtocolSecretRequest + * @static + * @param {google.analytics.admin.v1beta.ICreateMeasurementProtocolSecretRequest=} [properties] Properties to set + * @returns {google.analytics.admin.v1beta.CreateMeasurementProtocolSecretRequest} CreateMeasurementProtocolSecretRequest instance + */ + CreateMeasurementProtocolSecretRequest.create = function create(properties) { + return new CreateMeasurementProtocolSecretRequest(properties); + }; + + /** + * Encodes the specified CreateMeasurementProtocolSecretRequest message. Does not implicitly {@link google.analytics.admin.v1beta.CreateMeasurementProtocolSecretRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1beta.CreateMeasurementProtocolSecretRequest + * @static + * @param {google.analytics.admin.v1beta.ICreateMeasurementProtocolSecretRequest} message CreateMeasurementProtocolSecretRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateMeasurementProtocolSecretRequest.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.measurementProtocolSecret != null && Object.hasOwnProperty.call(message, "measurementProtocolSecret")) + $root.google.analytics.admin.v1beta.MeasurementProtocolSecret.encode(message.measurementProtocolSecret, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CreateMeasurementProtocolSecretRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.CreateMeasurementProtocolSecretRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1beta.CreateMeasurementProtocolSecretRequest + * @static + * @param {google.analytics.admin.v1beta.ICreateMeasurementProtocolSecretRequest} message CreateMeasurementProtocolSecretRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateMeasurementProtocolSecretRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateMeasurementProtocolSecretRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1beta.CreateMeasurementProtocolSecretRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1beta.CreateMeasurementProtocolSecretRequest} CreateMeasurementProtocolSecretRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateMeasurementProtocolSecretRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1beta.CreateMeasurementProtocolSecretRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.measurementProtocolSecret = $root.google.analytics.admin.v1beta.MeasurementProtocolSecret.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateMeasurementProtocolSecretRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1beta.CreateMeasurementProtocolSecretRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1beta.CreateMeasurementProtocolSecretRequest} CreateMeasurementProtocolSecretRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateMeasurementProtocolSecretRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateMeasurementProtocolSecretRequest message. + * @function verify + * @memberof google.analytics.admin.v1beta.CreateMeasurementProtocolSecretRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateMeasurementProtocolSecretRequest.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.measurementProtocolSecret != null && message.hasOwnProperty("measurementProtocolSecret")) { + var error = $root.google.analytics.admin.v1beta.MeasurementProtocolSecret.verify(message.measurementProtocolSecret); + if (error) + return "measurementProtocolSecret." + error; + } + return null; + }; + + /** + * Creates a CreateMeasurementProtocolSecretRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1beta.CreateMeasurementProtocolSecretRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1beta.CreateMeasurementProtocolSecretRequest} CreateMeasurementProtocolSecretRequest + */ + CreateMeasurementProtocolSecretRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1beta.CreateMeasurementProtocolSecretRequest) + return object; + var message = new $root.google.analytics.admin.v1beta.CreateMeasurementProtocolSecretRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.measurementProtocolSecret != null) { + if (typeof object.measurementProtocolSecret !== "object") + throw TypeError(".google.analytics.admin.v1beta.CreateMeasurementProtocolSecretRequest.measurementProtocolSecret: object expected"); + message.measurementProtocolSecret = $root.google.analytics.admin.v1beta.MeasurementProtocolSecret.fromObject(object.measurementProtocolSecret); + } + return message; + }; + + /** + * Creates a plain object from a CreateMeasurementProtocolSecretRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1beta.CreateMeasurementProtocolSecretRequest + * @static + * @param {google.analytics.admin.v1beta.CreateMeasurementProtocolSecretRequest} message CreateMeasurementProtocolSecretRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateMeasurementProtocolSecretRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.measurementProtocolSecret = null; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.measurementProtocolSecret != null && message.hasOwnProperty("measurementProtocolSecret")) + object.measurementProtocolSecret = $root.google.analytics.admin.v1beta.MeasurementProtocolSecret.toObject(message.measurementProtocolSecret, options); + return object; + }; + + /** + * Converts this CreateMeasurementProtocolSecretRequest to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1beta.CreateMeasurementProtocolSecretRequest + * @instance + * @returns {Object.} JSON object + */ + CreateMeasurementProtocolSecretRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateMeasurementProtocolSecretRequest + * @function getTypeUrl + * @memberof google.analytics.admin.v1beta.CreateMeasurementProtocolSecretRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateMeasurementProtocolSecretRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1beta.CreateMeasurementProtocolSecretRequest"; + }; + + return CreateMeasurementProtocolSecretRequest; + })(); + + v1beta.DeleteMeasurementProtocolSecretRequest = (function() { + + /** + * Properties of a DeleteMeasurementProtocolSecretRequest. + * @memberof google.analytics.admin.v1beta + * @interface IDeleteMeasurementProtocolSecretRequest + * @property {string|null} [name] DeleteMeasurementProtocolSecretRequest name + */ + + /** + * Constructs a new DeleteMeasurementProtocolSecretRequest. + * @memberof google.analytics.admin.v1beta + * @classdesc Represents a DeleteMeasurementProtocolSecretRequest. + * @implements IDeleteMeasurementProtocolSecretRequest + * @constructor + * @param {google.analytics.admin.v1beta.IDeleteMeasurementProtocolSecretRequest=} [properties] Properties to set + */ + function DeleteMeasurementProtocolSecretRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteMeasurementProtocolSecretRequest name. + * @member {string} name + * @memberof google.analytics.admin.v1beta.DeleteMeasurementProtocolSecretRequest + * @instance + */ + DeleteMeasurementProtocolSecretRequest.prototype.name = ""; + + /** + * Creates a new DeleteMeasurementProtocolSecretRequest instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1beta.DeleteMeasurementProtocolSecretRequest + * @static + * @param {google.analytics.admin.v1beta.IDeleteMeasurementProtocolSecretRequest=} [properties] Properties to set + * @returns {google.analytics.admin.v1beta.DeleteMeasurementProtocolSecretRequest} DeleteMeasurementProtocolSecretRequest instance + */ + DeleteMeasurementProtocolSecretRequest.create = function create(properties) { + return new DeleteMeasurementProtocolSecretRequest(properties); + }; + + /** + * Encodes the specified DeleteMeasurementProtocolSecretRequest message. Does not implicitly {@link google.analytics.admin.v1beta.DeleteMeasurementProtocolSecretRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1beta.DeleteMeasurementProtocolSecretRequest + * @static + * @param {google.analytics.admin.v1beta.IDeleteMeasurementProtocolSecretRequest} message DeleteMeasurementProtocolSecretRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteMeasurementProtocolSecretRequest.encode = function encode(message, writer) { + 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 DeleteMeasurementProtocolSecretRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.DeleteMeasurementProtocolSecretRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1beta.DeleteMeasurementProtocolSecretRequest + * @static + * @param {google.analytics.admin.v1beta.IDeleteMeasurementProtocolSecretRequest} message DeleteMeasurementProtocolSecretRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteMeasurementProtocolSecretRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteMeasurementProtocolSecretRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1beta.DeleteMeasurementProtocolSecretRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1beta.DeleteMeasurementProtocolSecretRequest} DeleteMeasurementProtocolSecretRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteMeasurementProtocolSecretRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1beta.DeleteMeasurementProtocolSecretRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteMeasurementProtocolSecretRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1beta.DeleteMeasurementProtocolSecretRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1beta.DeleteMeasurementProtocolSecretRequest} DeleteMeasurementProtocolSecretRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteMeasurementProtocolSecretRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteMeasurementProtocolSecretRequest message. + * @function verify + * @memberof google.analytics.admin.v1beta.DeleteMeasurementProtocolSecretRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteMeasurementProtocolSecretRequest.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 DeleteMeasurementProtocolSecretRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1beta.DeleteMeasurementProtocolSecretRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1beta.DeleteMeasurementProtocolSecretRequest} DeleteMeasurementProtocolSecretRequest + */ + DeleteMeasurementProtocolSecretRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1beta.DeleteMeasurementProtocolSecretRequest) + return object; + var message = new $root.google.analytics.admin.v1beta.DeleteMeasurementProtocolSecretRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteMeasurementProtocolSecretRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1beta.DeleteMeasurementProtocolSecretRequest + * @static + * @param {google.analytics.admin.v1beta.DeleteMeasurementProtocolSecretRequest} message DeleteMeasurementProtocolSecretRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteMeasurementProtocolSecretRequest.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 DeleteMeasurementProtocolSecretRequest to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1beta.DeleteMeasurementProtocolSecretRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteMeasurementProtocolSecretRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteMeasurementProtocolSecretRequest + * @function getTypeUrl + * @memberof google.analytics.admin.v1beta.DeleteMeasurementProtocolSecretRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteMeasurementProtocolSecretRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1beta.DeleteMeasurementProtocolSecretRequest"; + }; + + return DeleteMeasurementProtocolSecretRequest; + })(); + + v1beta.UpdateMeasurementProtocolSecretRequest = (function() { + + /** + * Properties of an UpdateMeasurementProtocolSecretRequest. + * @memberof google.analytics.admin.v1beta + * @interface IUpdateMeasurementProtocolSecretRequest + * @property {google.analytics.admin.v1beta.IMeasurementProtocolSecret|null} [measurementProtocolSecret] UpdateMeasurementProtocolSecretRequest measurementProtocolSecret + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateMeasurementProtocolSecretRequest updateMask + */ + + /** + * Constructs a new UpdateMeasurementProtocolSecretRequest. + * @memberof google.analytics.admin.v1beta + * @classdesc Represents an UpdateMeasurementProtocolSecretRequest. + * @implements IUpdateMeasurementProtocolSecretRequest + * @constructor + * @param {google.analytics.admin.v1beta.IUpdateMeasurementProtocolSecretRequest=} [properties] Properties to set + */ + function UpdateMeasurementProtocolSecretRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateMeasurementProtocolSecretRequest measurementProtocolSecret. + * @member {google.analytics.admin.v1beta.IMeasurementProtocolSecret|null|undefined} measurementProtocolSecret + * @memberof google.analytics.admin.v1beta.UpdateMeasurementProtocolSecretRequest + * @instance + */ + UpdateMeasurementProtocolSecretRequest.prototype.measurementProtocolSecret = null; + + /** + * UpdateMeasurementProtocolSecretRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.analytics.admin.v1beta.UpdateMeasurementProtocolSecretRequest + * @instance + */ + UpdateMeasurementProtocolSecretRequest.prototype.updateMask = null; + + /** + * Creates a new UpdateMeasurementProtocolSecretRequest instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1beta.UpdateMeasurementProtocolSecretRequest + * @static + * @param {google.analytics.admin.v1beta.IUpdateMeasurementProtocolSecretRequest=} [properties] Properties to set + * @returns {google.analytics.admin.v1beta.UpdateMeasurementProtocolSecretRequest} UpdateMeasurementProtocolSecretRequest instance + */ + UpdateMeasurementProtocolSecretRequest.create = function create(properties) { + return new UpdateMeasurementProtocolSecretRequest(properties); + }; + + /** + * Encodes the specified UpdateMeasurementProtocolSecretRequest message. Does not implicitly {@link google.analytics.admin.v1beta.UpdateMeasurementProtocolSecretRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1beta.UpdateMeasurementProtocolSecretRequest + * @static + * @param {google.analytics.admin.v1beta.IUpdateMeasurementProtocolSecretRequest} message UpdateMeasurementProtocolSecretRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateMeasurementProtocolSecretRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.measurementProtocolSecret != null && Object.hasOwnProperty.call(message, "measurementProtocolSecret")) + $root.google.analytics.admin.v1beta.MeasurementProtocolSecret.encode(message.measurementProtocolSecret, 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 UpdateMeasurementProtocolSecretRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.UpdateMeasurementProtocolSecretRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1beta.UpdateMeasurementProtocolSecretRequest + * @static + * @param {google.analytics.admin.v1beta.IUpdateMeasurementProtocolSecretRequest} message UpdateMeasurementProtocolSecretRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateMeasurementProtocolSecretRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateMeasurementProtocolSecretRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1beta.UpdateMeasurementProtocolSecretRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1beta.UpdateMeasurementProtocolSecretRequest} UpdateMeasurementProtocolSecretRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateMeasurementProtocolSecretRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1beta.UpdateMeasurementProtocolSecretRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.measurementProtocolSecret = $root.google.analytics.admin.v1beta.MeasurementProtocolSecret.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 UpdateMeasurementProtocolSecretRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1beta.UpdateMeasurementProtocolSecretRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1beta.UpdateMeasurementProtocolSecretRequest} UpdateMeasurementProtocolSecretRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateMeasurementProtocolSecretRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateMeasurementProtocolSecretRequest message. + * @function verify + * @memberof google.analytics.admin.v1beta.UpdateMeasurementProtocolSecretRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateMeasurementProtocolSecretRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.measurementProtocolSecret != null && message.hasOwnProperty("measurementProtocolSecret")) { + var error = $root.google.analytics.admin.v1beta.MeasurementProtocolSecret.verify(message.measurementProtocolSecret); + if (error) + return "measurementProtocolSecret." + 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 UpdateMeasurementProtocolSecretRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1beta.UpdateMeasurementProtocolSecretRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1beta.UpdateMeasurementProtocolSecretRequest} UpdateMeasurementProtocolSecretRequest + */ + UpdateMeasurementProtocolSecretRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1beta.UpdateMeasurementProtocolSecretRequest) + return object; + var message = new $root.google.analytics.admin.v1beta.UpdateMeasurementProtocolSecretRequest(); + if (object.measurementProtocolSecret != null) { + if (typeof object.measurementProtocolSecret !== "object") + throw TypeError(".google.analytics.admin.v1beta.UpdateMeasurementProtocolSecretRequest.measurementProtocolSecret: object expected"); + message.measurementProtocolSecret = $root.google.analytics.admin.v1beta.MeasurementProtocolSecret.fromObject(object.measurementProtocolSecret); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.analytics.admin.v1beta.UpdateMeasurementProtocolSecretRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + return message; + }; + + /** + * Creates a plain object from an UpdateMeasurementProtocolSecretRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1beta.UpdateMeasurementProtocolSecretRequest + * @static + * @param {google.analytics.admin.v1beta.UpdateMeasurementProtocolSecretRequest} message UpdateMeasurementProtocolSecretRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateMeasurementProtocolSecretRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.measurementProtocolSecret = null; + object.updateMask = null; + } + if (message.measurementProtocolSecret != null && message.hasOwnProperty("measurementProtocolSecret")) + object.measurementProtocolSecret = $root.google.analytics.admin.v1beta.MeasurementProtocolSecret.toObject(message.measurementProtocolSecret, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + return object; + }; + + /** + * Converts this UpdateMeasurementProtocolSecretRequest to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1beta.UpdateMeasurementProtocolSecretRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateMeasurementProtocolSecretRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateMeasurementProtocolSecretRequest + * @function getTypeUrl + * @memberof google.analytics.admin.v1beta.UpdateMeasurementProtocolSecretRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateMeasurementProtocolSecretRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1beta.UpdateMeasurementProtocolSecretRequest"; + }; + + return UpdateMeasurementProtocolSecretRequest; + })(); + + v1beta.ListMeasurementProtocolSecretsRequest = (function() { + + /** + * Properties of a ListMeasurementProtocolSecretsRequest. + * @memberof google.analytics.admin.v1beta + * @interface IListMeasurementProtocolSecretsRequest + * @property {string|null} [parent] ListMeasurementProtocolSecretsRequest parent + * @property {number|null} [pageSize] ListMeasurementProtocolSecretsRequest pageSize + * @property {string|null} [pageToken] ListMeasurementProtocolSecretsRequest pageToken + */ + + /** + * Constructs a new ListMeasurementProtocolSecretsRequest. + * @memberof google.analytics.admin.v1beta + * @classdesc Represents a ListMeasurementProtocolSecretsRequest. + * @implements IListMeasurementProtocolSecretsRequest + * @constructor + * @param {google.analytics.admin.v1beta.IListMeasurementProtocolSecretsRequest=} [properties] Properties to set + */ + function ListMeasurementProtocolSecretsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListMeasurementProtocolSecretsRequest parent. + * @member {string} parent + * @memberof google.analytics.admin.v1beta.ListMeasurementProtocolSecretsRequest + * @instance + */ + ListMeasurementProtocolSecretsRequest.prototype.parent = ""; + + /** + * ListMeasurementProtocolSecretsRequest pageSize. + * @member {number} pageSize + * @memberof google.analytics.admin.v1beta.ListMeasurementProtocolSecretsRequest + * @instance + */ + ListMeasurementProtocolSecretsRequest.prototype.pageSize = 0; + + /** + * ListMeasurementProtocolSecretsRequest pageToken. + * @member {string} pageToken + * @memberof google.analytics.admin.v1beta.ListMeasurementProtocolSecretsRequest + * @instance + */ + ListMeasurementProtocolSecretsRequest.prototype.pageToken = ""; + + /** + * Creates a new ListMeasurementProtocolSecretsRequest instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1beta.ListMeasurementProtocolSecretsRequest + * @static + * @param {google.analytics.admin.v1beta.IListMeasurementProtocolSecretsRequest=} [properties] Properties to set + * @returns {google.analytics.admin.v1beta.ListMeasurementProtocolSecretsRequest} ListMeasurementProtocolSecretsRequest instance + */ + ListMeasurementProtocolSecretsRequest.create = function create(properties) { + return new ListMeasurementProtocolSecretsRequest(properties); + }; + + /** + * Encodes the specified ListMeasurementProtocolSecretsRequest message. Does not implicitly {@link google.analytics.admin.v1beta.ListMeasurementProtocolSecretsRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1beta.ListMeasurementProtocolSecretsRequest + * @static + * @param {google.analytics.admin.v1beta.IListMeasurementProtocolSecretsRequest} message ListMeasurementProtocolSecretsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListMeasurementProtocolSecretsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + return writer; + }; + + /** + * Encodes the specified ListMeasurementProtocolSecretsRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.ListMeasurementProtocolSecretsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1beta.ListMeasurementProtocolSecretsRequest + * @static + * @param {google.analytics.admin.v1beta.IListMeasurementProtocolSecretsRequest} message ListMeasurementProtocolSecretsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListMeasurementProtocolSecretsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListMeasurementProtocolSecretsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1beta.ListMeasurementProtocolSecretsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1beta.ListMeasurementProtocolSecretsRequest} ListMeasurementProtocolSecretsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListMeasurementProtocolSecretsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1beta.ListMeasurementProtocolSecretsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListMeasurementProtocolSecretsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1beta.ListMeasurementProtocolSecretsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1beta.ListMeasurementProtocolSecretsRequest} ListMeasurementProtocolSecretsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListMeasurementProtocolSecretsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListMeasurementProtocolSecretsRequest message. + * @function verify + * @memberof google.analytics.admin.v1beta.ListMeasurementProtocolSecretsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListMeasurementProtocolSecretsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + return null; + }; + + /** + * Creates a ListMeasurementProtocolSecretsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1beta.ListMeasurementProtocolSecretsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1beta.ListMeasurementProtocolSecretsRequest} ListMeasurementProtocolSecretsRequest + */ + ListMeasurementProtocolSecretsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1beta.ListMeasurementProtocolSecretsRequest) + return object; + var message = new $root.google.analytics.admin.v1beta.ListMeasurementProtocolSecretsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + return message; + }; + + /** + * Creates a plain object from a ListMeasurementProtocolSecretsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1beta.ListMeasurementProtocolSecretsRequest + * @static + * @param {google.analytics.admin.v1beta.ListMeasurementProtocolSecretsRequest} message ListMeasurementProtocolSecretsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListMeasurementProtocolSecretsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + return object; + }; + + /** + * Converts this ListMeasurementProtocolSecretsRequest to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1beta.ListMeasurementProtocolSecretsRequest + * @instance + * @returns {Object.} JSON object + */ + ListMeasurementProtocolSecretsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListMeasurementProtocolSecretsRequest + * @function getTypeUrl + * @memberof google.analytics.admin.v1beta.ListMeasurementProtocolSecretsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListMeasurementProtocolSecretsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1beta.ListMeasurementProtocolSecretsRequest"; + }; + + return ListMeasurementProtocolSecretsRequest; + })(); + + v1beta.ListMeasurementProtocolSecretsResponse = (function() { + + /** + * Properties of a ListMeasurementProtocolSecretsResponse. + * @memberof google.analytics.admin.v1beta + * @interface IListMeasurementProtocolSecretsResponse + * @property {Array.|null} [measurementProtocolSecrets] ListMeasurementProtocolSecretsResponse measurementProtocolSecrets + * @property {string|null} [nextPageToken] ListMeasurementProtocolSecretsResponse nextPageToken + */ + + /** + * Constructs a new ListMeasurementProtocolSecretsResponse. + * @memberof google.analytics.admin.v1beta + * @classdesc Represents a ListMeasurementProtocolSecretsResponse. + * @implements IListMeasurementProtocolSecretsResponse + * @constructor + * @param {google.analytics.admin.v1beta.IListMeasurementProtocolSecretsResponse=} [properties] Properties to set + */ + function ListMeasurementProtocolSecretsResponse(properties) { + this.measurementProtocolSecrets = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListMeasurementProtocolSecretsResponse measurementProtocolSecrets. + * @member {Array.} measurementProtocolSecrets + * @memberof google.analytics.admin.v1beta.ListMeasurementProtocolSecretsResponse + * @instance + */ + ListMeasurementProtocolSecretsResponse.prototype.measurementProtocolSecrets = $util.emptyArray; + + /** + * ListMeasurementProtocolSecretsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.analytics.admin.v1beta.ListMeasurementProtocolSecretsResponse + * @instance + */ + ListMeasurementProtocolSecretsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListMeasurementProtocolSecretsResponse instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1beta.ListMeasurementProtocolSecretsResponse + * @static + * @param {google.analytics.admin.v1beta.IListMeasurementProtocolSecretsResponse=} [properties] Properties to set + * @returns {google.analytics.admin.v1beta.ListMeasurementProtocolSecretsResponse} ListMeasurementProtocolSecretsResponse instance + */ + ListMeasurementProtocolSecretsResponse.create = function create(properties) { + return new ListMeasurementProtocolSecretsResponse(properties); + }; + + /** + * Encodes the specified ListMeasurementProtocolSecretsResponse message. Does not implicitly {@link google.analytics.admin.v1beta.ListMeasurementProtocolSecretsResponse.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1beta.ListMeasurementProtocolSecretsResponse + * @static + * @param {google.analytics.admin.v1beta.IListMeasurementProtocolSecretsResponse} message ListMeasurementProtocolSecretsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListMeasurementProtocolSecretsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.measurementProtocolSecrets != null && message.measurementProtocolSecrets.length) + for (var i = 0; i < message.measurementProtocolSecrets.length; ++i) + $root.google.analytics.admin.v1beta.MeasurementProtocolSecret.encode(message.measurementProtocolSecrets[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 ListMeasurementProtocolSecretsResponse message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.ListMeasurementProtocolSecretsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1beta.ListMeasurementProtocolSecretsResponse + * @static + * @param {google.analytics.admin.v1beta.IListMeasurementProtocolSecretsResponse} message ListMeasurementProtocolSecretsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListMeasurementProtocolSecretsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListMeasurementProtocolSecretsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1beta.ListMeasurementProtocolSecretsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1beta.ListMeasurementProtocolSecretsResponse} ListMeasurementProtocolSecretsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListMeasurementProtocolSecretsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1beta.ListMeasurementProtocolSecretsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.measurementProtocolSecrets && message.measurementProtocolSecrets.length)) + message.measurementProtocolSecrets = []; + message.measurementProtocolSecrets.push($root.google.analytics.admin.v1beta.MeasurementProtocolSecret.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListMeasurementProtocolSecretsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1beta.ListMeasurementProtocolSecretsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1beta.ListMeasurementProtocolSecretsResponse} ListMeasurementProtocolSecretsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListMeasurementProtocolSecretsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListMeasurementProtocolSecretsResponse message. + * @function verify + * @memberof google.analytics.admin.v1beta.ListMeasurementProtocolSecretsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListMeasurementProtocolSecretsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.measurementProtocolSecrets != null && message.hasOwnProperty("measurementProtocolSecrets")) { + if (!Array.isArray(message.measurementProtocolSecrets)) + return "measurementProtocolSecrets: array expected"; + for (var i = 0; i < message.measurementProtocolSecrets.length; ++i) { + var error = $root.google.analytics.admin.v1beta.MeasurementProtocolSecret.verify(message.measurementProtocolSecrets[i]); + if (error) + return "measurementProtocolSecrets." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListMeasurementProtocolSecretsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1beta.ListMeasurementProtocolSecretsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1beta.ListMeasurementProtocolSecretsResponse} ListMeasurementProtocolSecretsResponse + */ + ListMeasurementProtocolSecretsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1beta.ListMeasurementProtocolSecretsResponse) + return object; + var message = new $root.google.analytics.admin.v1beta.ListMeasurementProtocolSecretsResponse(); + if (object.measurementProtocolSecrets) { + if (!Array.isArray(object.measurementProtocolSecrets)) + throw TypeError(".google.analytics.admin.v1beta.ListMeasurementProtocolSecretsResponse.measurementProtocolSecrets: array expected"); + message.measurementProtocolSecrets = []; + for (var i = 0; i < object.measurementProtocolSecrets.length; ++i) { + if (typeof object.measurementProtocolSecrets[i] !== "object") + throw TypeError(".google.analytics.admin.v1beta.ListMeasurementProtocolSecretsResponse.measurementProtocolSecrets: object expected"); + message.measurementProtocolSecrets[i] = $root.google.analytics.admin.v1beta.MeasurementProtocolSecret.fromObject(object.measurementProtocolSecrets[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListMeasurementProtocolSecretsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1beta.ListMeasurementProtocolSecretsResponse + * @static + * @param {google.analytics.admin.v1beta.ListMeasurementProtocolSecretsResponse} message ListMeasurementProtocolSecretsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListMeasurementProtocolSecretsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.measurementProtocolSecrets = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.measurementProtocolSecrets && message.measurementProtocolSecrets.length) { + object.measurementProtocolSecrets = []; + for (var j = 0; j < message.measurementProtocolSecrets.length; ++j) + object.measurementProtocolSecrets[j] = $root.google.analytics.admin.v1beta.MeasurementProtocolSecret.toObject(message.measurementProtocolSecrets[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListMeasurementProtocolSecretsResponse to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1beta.ListMeasurementProtocolSecretsResponse + * @instance + * @returns {Object.} JSON object + */ + ListMeasurementProtocolSecretsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListMeasurementProtocolSecretsResponse + * @function getTypeUrl + * @memberof google.analytics.admin.v1beta.ListMeasurementProtocolSecretsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListMeasurementProtocolSecretsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1beta.ListMeasurementProtocolSecretsResponse"; + }; + + return ListMeasurementProtocolSecretsResponse; + })(); + + v1beta.CreateConversionEventRequest = (function() { + + /** + * Properties of a CreateConversionEventRequest. + * @memberof google.analytics.admin.v1beta + * @interface ICreateConversionEventRequest + * @property {google.analytics.admin.v1beta.IConversionEvent|null} [conversionEvent] CreateConversionEventRequest conversionEvent + * @property {string|null} [parent] CreateConversionEventRequest parent + */ + + /** + * Constructs a new CreateConversionEventRequest. + * @memberof google.analytics.admin.v1beta + * @classdesc Represents a CreateConversionEventRequest. + * @implements ICreateConversionEventRequest + * @constructor + * @param {google.analytics.admin.v1beta.ICreateConversionEventRequest=} [properties] Properties to set + */ + function CreateConversionEventRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateConversionEventRequest conversionEvent. + * @member {google.analytics.admin.v1beta.IConversionEvent|null|undefined} conversionEvent + * @memberof google.analytics.admin.v1beta.CreateConversionEventRequest + * @instance + */ + CreateConversionEventRequest.prototype.conversionEvent = null; + + /** + * CreateConversionEventRequest parent. + * @member {string} parent + * @memberof google.analytics.admin.v1beta.CreateConversionEventRequest + * @instance + */ + CreateConversionEventRequest.prototype.parent = ""; + + /** + * Creates a new CreateConversionEventRequest instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1beta.CreateConversionEventRequest + * @static + * @param {google.analytics.admin.v1beta.ICreateConversionEventRequest=} [properties] Properties to set + * @returns {google.analytics.admin.v1beta.CreateConversionEventRequest} CreateConversionEventRequest instance + */ + CreateConversionEventRequest.create = function create(properties) { + return new CreateConversionEventRequest(properties); + }; + + /** + * Encodes the specified CreateConversionEventRequest message. Does not implicitly {@link google.analytics.admin.v1beta.CreateConversionEventRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1beta.CreateConversionEventRequest + * @static + * @param {google.analytics.admin.v1beta.ICreateConversionEventRequest} message CreateConversionEventRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateConversionEventRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.conversionEvent != null && Object.hasOwnProperty.call(message, "conversionEvent")) + $root.google.analytics.admin.v1beta.ConversionEvent.encode(message.conversionEvent, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.parent); + return writer; + }; + + /** + * Encodes the specified CreateConversionEventRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.CreateConversionEventRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1beta.CreateConversionEventRequest + * @static + * @param {google.analytics.admin.v1beta.ICreateConversionEventRequest} message CreateConversionEventRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateConversionEventRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateConversionEventRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1beta.CreateConversionEventRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1beta.CreateConversionEventRequest} CreateConversionEventRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateConversionEventRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1beta.CreateConversionEventRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.conversionEvent = $root.google.analytics.admin.v1beta.ConversionEvent.decode(reader, reader.uint32()); + break; + } + case 2: { + message.parent = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateConversionEventRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1beta.CreateConversionEventRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1beta.CreateConversionEventRequest} CreateConversionEventRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateConversionEventRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateConversionEventRequest message. + * @function verify + * @memberof google.analytics.admin.v1beta.CreateConversionEventRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateConversionEventRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.conversionEvent != null && message.hasOwnProperty("conversionEvent")) { + var error = $root.google.analytics.admin.v1beta.ConversionEvent.verify(message.conversionEvent); + if (error) + return "conversionEvent." + error; + } + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + return null; + }; + + /** + * Creates a CreateConversionEventRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1beta.CreateConversionEventRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1beta.CreateConversionEventRequest} CreateConversionEventRequest + */ + CreateConversionEventRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1beta.CreateConversionEventRequest) + return object; + var message = new $root.google.analytics.admin.v1beta.CreateConversionEventRequest(); + if (object.conversionEvent != null) { + if (typeof object.conversionEvent !== "object") + throw TypeError(".google.analytics.admin.v1beta.CreateConversionEventRequest.conversionEvent: object expected"); + message.conversionEvent = $root.google.analytics.admin.v1beta.ConversionEvent.fromObject(object.conversionEvent); + } + if (object.parent != null) + message.parent = String(object.parent); + return message; + }; + + /** + * Creates a plain object from a CreateConversionEventRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1beta.CreateConversionEventRequest + * @static + * @param {google.analytics.admin.v1beta.CreateConversionEventRequest} message CreateConversionEventRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateConversionEventRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.conversionEvent = null; + object.parent = ""; + } + if (message.conversionEvent != null && message.hasOwnProperty("conversionEvent")) + object.conversionEvent = $root.google.analytics.admin.v1beta.ConversionEvent.toObject(message.conversionEvent, options); + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + return object; + }; + + /** + * Converts this CreateConversionEventRequest to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1beta.CreateConversionEventRequest + * @instance + * @returns {Object.} JSON object + */ + CreateConversionEventRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateConversionEventRequest + * @function getTypeUrl + * @memberof google.analytics.admin.v1beta.CreateConversionEventRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateConversionEventRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1beta.CreateConversionEventRequest"; + }; + + return CreateConversionEventRequest; + })(); + + v1beta.GetConversionEventRequest = (function() { + + /** + * Properties of a GetConversionEventRequest. + * @memberof google.analytics.admin.v1beta + * @interface IGetConversionEventRequest + * @property {string|null} [name] GetConversionEventRequest name + */ + + /** + * Constructs a new GetConversionEventRequest. + * @memberof google.analytics.admin.v1beta + * @classdesc Represents a GetConversionEventRequest. + * @implements IGetConversionEventRequest + * @constructor + * @param {google.analytics.admin.v1beta.IGetConversionEventRequest=} [properties] Properties to set + */ + function GetConversionEventRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetConversionEventRequest name. + * @member {string} name + * @memberof google.analytics.admin.v1beta.GetConversionEventRequest + * @instance + */ + GetConversionEventRequest.prototype.name = ""; + + /** + * Creates a new GetConversionEventRequest instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1beta.GetConversionEventRequest + * @static + * @param {google.analytics.admin.v1beta.IGetConversionEventRequest=} [properties] Properties to set + * @returns {google.analytics.admin.v1beta.GetConversionEventRequest} GetConversionEventRequest instance + */ + GetConversionEventRequest.create = function create(properties) { + return new GetConversionEventRequest(properties); + }; + + /** + * Encodes the specified GetConversionEventRequest message. Does not implicitly {@link google.analytics.admin.v1beta.GetConversionEventRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1beta.GetConversionEventRequest + * @static + * @param {google.analytics.admin.v1beta.IGetConversionEventRequest} message GetConversionEventRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetConversionEventRequest.encode = function encode(message, writer) { + 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 GetConversionEventRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.GetConversionEventRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1beta.GetConversionEventRequest + * @static + * @param {google.analytics.admin.v1beta.IGetConversionEventRequest} message GetConversionEventRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetConversionEventRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetConversionEventRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1beta.GetConversionEventRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1beta.GetConversionEventRequest} GetConversionEventRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetConversionEventRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1beta.GetConversionEventRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetConversionEventRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1beta.GetConversionEventRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1beta.GetConversionEventRequest} GetConversionEventRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetConversionEventRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetConversionEventRequest message. + * @function verify + * @memberof google.analytics.admin.v1beta.GetConversionEventRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetConversionEventRequest.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 GetConversionEventRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1beta.GetConversionEventRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1beta.GetConversionEventRequest} GetConversionEventRequest + */ + GetConversionEventRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1beta.GetConversionEventRequest) + return object; + var message = new $root.google.analytics.admin.v1beta.GetConversionEventRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetConversionEventRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1beta.GetConversionEventRequest + * @static + * @param {google.analytics.admin.v1beta.GetConversionEventRequest} message GetConversionEventRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetConversionEventRequest.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 GetConversionEventRequest to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1beta.GetConversionEventRequest + * @instance + * @returns {Object.} JSON object + */ + GetConversionEventRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetConversionEventRequest + * @function getTypeUrl + * @memberof google.analytics.admin.v1beta.GetConversionEventRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetConversionEventRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1beta.GetConversionEventRequest"; + }; + + return GetConversionEventRequest; + })(); + + v1beta.DeleteConversionEventRequest = (function() { + + /** + * Properties of a DeleteConversionEventRequest. + * @memberof google.analytics.admin.v1beta + * @interface IDeleteConversionEventRequest + * @property {string|null} [name] DeleteConversionEventRequest name + */ + + /** + * Constructs a new DeleteConversionEventRequest. + * @memberof google.analytics.admin.v1beta + * @classdesc Represents a DeleteConversionEventRequest. + * @implements IDeleteConversionEventRequest + * @constructor + * @param {google.analytics.admin.v1beta.IDeleteConversionEventRequest=} [properties] Properties to set + */ + function DeleteConversionEventRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteConversionEventRequest name. + * @member {string} name + * @memberof google.analytics.admin.v1beta.DeleteConversionEventRequest + * @instance + */ + DeleteConversionEventRequest.prototype.name = ""; + + /** + * Creates a new DeleteConversionEventRequest instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1beta.DeleteConversionEventRequest + * @static + * @param {google.analytics.admin.v1beta.IDeleteConversionEventRequest=} [properties] Properties to set + * @returns {google.analytics.admin.v1beta.DeleteConversionEventRequest} DeleteConversionEventRequest instance + */ + DeleteConversionEventRequest.create = function create(properties) { + return new DeleteConversionEventRequest(properties); + }; + + /** + * Encodes the specified DeleteConversionEventRequest message. Does not implicitly {@link google.analytics.admin.v1beta.DeleteConversionEventRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1beta.DeleteConversionEventRequest + * @static + * @param {google.analytics.admin.v1beta.IDeleteConversionEventRequest} message DeleteConversionEventRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteConversionEventRequest.encode = function encode(message, writer) { + 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 DeleteConversionEventRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.DeleteConversionEventRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1beta.DeleteConversionEventRequest + * @static + * @param {google.analytics.admin.v1beta.IDeleteConversionEventRequest} message DeleteConversionEventRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteConversionEventRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteConversionEventRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1beta.DeleteConversionEventRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1beta.DeleteConversionEventRequest} DeleteConversionEventRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteConversionEventRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1beta.DeleteConversionEventRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteConversionEventRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1beta.DeleteConversionEventRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1beta.DeleteConversionEventRequest} DeleteConversionEventRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteConversionEventRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteConversionEventRequest message. + * @function verify + * @memberof google.analytics.admin.v1beta.DeleteConversionEventRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteConversionEventRequest.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 DeleteConversionEventRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1beta.DeleteConversionEventRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1beta.DeleteConversionEventRequest} DeleteConversionEventRequest + */ + DeleteConversionEventRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1beta.DeleteConversionEventRequest) + return object; + var message = new $root.google.analytics.admin.v1beta.DeleteConversionEventRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteConversionEventRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1beta.DeleteConversionEventRequest + * @static + * @param {google.analytics.admin.v1beta.DeleteConversionEventRequest} message DeleteConversionEventRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteConversionEventRequest.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 DeleteConversionEventRequest to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1beta.DeleteConversionEventRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteConversionEventRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteConversionEventRequest + * @function getTypeUrl + * @memberof google.analytics.admin.v1beta.DeleteConversionEventRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteConversionEventRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1beta.DeleteConversionEventRequest"; + }; + + return DeleteConversionEventRequest; + })(); + + v1beta.ListConversionEventsRequest = (function() { + + /** + * Properties of a ListConversionEventsRequest. + * @memberof google.analytics.admin.v1beta + * @interface IListConversionEventsRequest + * @property {string|null} [parent] ListConversionEventsRequest parent + * @property {number|null} [pageSize] ListConversionEventsRequest pageSize + * @property {string|null} [pageToken] ListConversionEventsRequest pageToken + */ + + /** + * Constructs a new ListConversionEventsRequest. + * @memberof google.analytics.admin.v1beta + * @classdesc Represents a ListConversionEventsRequest. + * @implements IListConversionEventsRequest + * @constructor + * @param {google.analytics.admin.v1beta.IListConversionEventsRequest=} [properties] Properties to set + */ + function ListConversionEventsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListConversionEventsRequest parent. + * @member {string} parent + * @memberof google.analytics.admin.v1beta.ListConversionEventsRequest + * @instance + */ + ListConversionEventsRequest.prototype.parent = ""; + + /** + * ListConversionEventsRequest pageSize. + * @member {number} pageSize + * @memberof google.analytics.admin.v1beta.ListConversionEventsRequest + * @instance + */ + ListConversionEventsRequest.prototype.pageSize = 0; + + /** + * ListConversionEventsRequest pageToken. + * @member {string} pageToken + * @memberof google.analytics.admin.v1beta.ListConversionEventsRequest + * @instance + */ + ListConversionEventsRequest.prototype.pageToken = ""; + + /** + * Creates a new ListConversionEventsRequest instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1beta.ListConversionEventsRequest + * @static + * @param {google.analytics.admin.v1beta.IListConversionEventsRequest=} [properties] Properties to set + * @returns {google.analytics.admin.v1beta.ListConversionEventsRequest} ListConversionEventsRequest instance + */ + ListConversionEventsRequest.create = function create(properties) { + return new ListConversionEventsRequest(properties); + }; + + /** + * Encodes the specified ListConversionEventsRequest message. Does not implicitly {@link google.analytics.admin.v1beta.ListConversionEventsRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1beta.ListConversionEventsRequest + * @static + * @param {google.analytics.admin.v1beta.IListConversionEventsRequest} message ListConversionEventsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListConversionEventsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + return writer; + }; + + /** + * Encodes the specified ListConversionEventsRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.ListConversionEventsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1beta.ListConversionEventsRequest + * @static + * @param {google.analytics.admin.v1beta.IListConversionEventsRequest} message ListConversionEventsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListConversionEventsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListConversionEventsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1beta.ListConversionEventsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1beta.ListConversionEventsRequest} ListConversionEventsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListConversionEventsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1beta.ListConversionEventsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListConversionEventsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1beta.ListConversionEventsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1beta.ListConversionEventsRequest} ListConversionEventsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListConversionEventsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListConversionEventsRequest message. + * @function verify + * @memberof google.analytics.admin.v1beta.ListConversionEventsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListConversionEventsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + return null; + }; + + /** + * Creates a ListConversionEventsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1beta.ListConversionEventsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1beta.ListConversionEventsRequest} ListConversionEventsRequest + */ + ListConversionEventsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1beta.ListConversionEventsRequest) + return object; + var message = new $root.google.analytics.admin.v1beta.ListConversionEventsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + return message; + }; + + /** + * Creates a plain object from a ListConversionEventsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1beta.ListConversionEventsRequest + * @static + * @param {google.analytics.admin.v1beta.ListConversionEventsRequest} message ListConversionEventsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListConversionEventsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + return object; + }; + + /** + * Converts this ListConversionEventsRequest to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1beta.ListConversionEventsRequest + * @instance + * @returns {Object.} JSON object + */ + ListConversionEventsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListConversionEventsRequest + * @function getTypeUrl + * @memberof google.analytics.admin.v1beta.ListConversionEventsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListConversionEventsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1beta.ListConversionEventsRequest"; + }; + + return ListConversionEventsRequest; + })(); + + v1beta.ListConversionEventsResponse = (function() { + + /** + * Properties of a ListConversionEventsResponse. + * @memberof google.analytics.admin.v1beta + * @interface IListConversionEventsResponse + * @property {Array.|null} [conversionEvents] ListConversionEventsResponse conversionEvents + * @property {string|null} [nextPageToken] ListConversionEventsResponse nextPageToken + */ + + /** + * Constructs a new ListConversionEventsResponse. + * @memberof google.analytics.admin.v1beta + * @classdesc Represents a ListConversionEventsResponse. + * @implements IListConversionEventsResponse + * @constructor + * @param {google.analytics.admin.v1beta.IListConversionEventsResponse=} [properties] Properties to set + */ + function ListConversionEventsResponse(properties) { + this.conversionEvents = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListConversionEventsResponse conversionEvents. + * @member {Array.} conversionEvents + * @memberof google.analytics.admin.v1beta.ListConversionEventsResponse + * @instance + */ + ListConversionEventsResponse.prototype.conversionEvents = $util.emptyArray; + + /** + * ListConversionEventsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.analytics.admin.v1beta.ListConversionEventsResponse + * @instance + */ + ListConversionEventsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListConversionEventsResponse instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1beta.ListConversionEventsResponse + * @static + * @param {google.analytics.admin.v1beta.IListConversionEventsResponse=} [properties] Properties to set + * @returns {google.analytics.admin.v1beta.ListConversionEventsResponse} ListConversionEventsResponse instance + */ + ListConversionEventsResponse.create = function create(properties) { + return new ListConversionEventsResponse(properties); + }; + + /** + * Encodes the specified ListConversionEventsResponse message. Does not implicitly {@link google.analytics.admin.v1beta.ListConversionEventsResponse.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1beta.ListConversionEventsResponse + * @static + * @param {google.analytics.admin.v1beta.IListConversionEventsResponse} message ListConversionEventsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListConversionEventsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.conversionEvents != null && message.conversionEvents.length) + for (var i = 0; i < message.conversionEvents.length; ++i) + $root.google.analytics.admin.v1beta.ConversionEvent.encode(message.conversionEvents[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 ListConversionEventsResponse message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.ListConversionEventsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1beta.ListConversionEventsResponse + * @static + * @param {google.analytics.admin.v1beta.IListConversionEventsResponse} message ListConversionEventsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListConversionEventsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListConversionEventsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1beta.ListConversionEventsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1beta.ListConversionEventsResponse} ListConversionEventsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListConversionEventsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1beta.ListConversionEventsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.conversionEvents && message.conversionEvents.length)) + message.conversionEvents = []; + message.conversionEvents.push($root.google.analytics.admin.v1beta.ConversionEvent.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListConversionEventsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1beta.ListConversionEventsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1beta.ListConversionEventsResponse} ListConversionEventsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListConversionEventsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListConversionEventsResponse message. + * @function verify + * @memberof google.analytics.admin.v1beta.ListConversionEventsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListConversionEventsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.conversionEvents != null && message.hasOwnProperty("conversionEvents")) { + if (!Array.isArray(message.conversionEvents)) + return "conversionEvents: array expected"; + for (var i = 0; i < message.conversionEvents.length; ++i) { + var error = $root.google.analytics.admin.v1beta.ConversionEvent.verify(message.conversionEvents[i]); + if (error) + return "conversionEvents." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListConversionEventsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1beta.ListConversionEventsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1beta.ListConversionEventsResponse} ListConversionEventsResponse + */ + ListConversionEventsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1beta.ListConversionEventsResponse) + return object; + var message = new $root.google.analytics.admin.v1beta.ListConversionEventsResponse(); + if (object.conversionEvents) { + if (!Array.isArray(object.conversionEvents)) + throw TypeError(".google.analytics.admin.v1beta.ListConversionEventsResponse.conversionEvents: array expected"); + message.conversionEvents = []; + for (var i = 0; i < object.conversionEvents.length; ++i) { + if (typeof object.conversionEvents[i] !== "object") + throw TypeError(".google.analytics.admin.v1beta.ListConversionEventsResponse.conversionEvents: object expected"); + message.conversionEvents[i] = $root.google.analytics.admin.v1beta.ConversionEvent.fromObject(object.conversionEvents[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListConversionEventsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1beta.ListConversionEventsResponse + * @static + * @param {google.analytics.admin.v1beta.ListConversionEventsResponse} message ListConversionEventsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListConversionEventsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.conversionEvents = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.conversionEvents && message.conversionEvents.length) { + object.conversionEvents = []; + for (var j = 0; j < message.conversionEvents.length; ++j) + object.conversionEvents[j] = $root.google.analytics.admin.v1beta.ConversionEvent.toObject(message.conversionEvents[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListConversionEventsResponse to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1beta.ListConversionEventsResponse + * @instance + * @returns {Object.} JSON object + */ + ListConversionEventsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListConversionEventsResponse + * @function getTypeUrl + * @memberof google.analytics.admin.v1beta.ListConversionEventsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListConversionEventsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1beta.ListConversionEventsResponse"; + }; + + return ListConversionEventsResponse; + })(); + + v1beta.CreateCustomDimensionRequest = (function() { + + /** + * Properties of a CreateCustomDimensionRequest. + * @memberof google.analytics.admin.v1beta + * @interface ICreateCustomDimensionRequest + * @property {string|null} [parent] CreateCustomDimensionRequest parent + * @property {google.analytics.admin.v1beta.ICustomDimension|null} [customDimension] CreateCustomDimensionRequest customDimension + */ + + /** + * Constructs a new CreateCustomDimensionRequest. + * @memberof google.analytics.admin.v1beta + * @classdesc Represents a CreateCustomDimensionRequest. + * @implements ICreateCustomDimensionRequest + * @constructor + * @param {google.analytics.admin.v1beta.ICreateCustomDimensionRequest=} [properties] Properties to set + */ + function CreateCustomDimensionRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateCustomDimensionRequest parent. + * @member {string} parent + * @memberof google.analytics.admin.v1beta.CreateCustomDimensionRequest + * @instance + */ + CreateCustomDimensionRequest.prototype.parent = ""; + + /** + * CreateCustomDimensionRequest customDimension. + * @member {google.analytics.admin.v1beta.ICustomDimension|null|undefined} customDimension + * @memberof google.analytics.admin.v1beta.CreateCustomDimensionRequest + * @instance + */ + CreateCustomDimensionRequest.prototype.customDimension = null; + + /** + * Creates a new CreateCustomDimensionRequest instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1beta.CreateCustomDimensionRequest + * @static + * @param {google.analytics.admin.v1beta.ICreateCustomDimensionRequest=} [properties] Properties to set + * @returns {google.analytics.admin.v1beta.CreateCustomDimensionRequest} CreateCustomDimensionRequest instance + */ + CreateCustomDimensionRequest.create = function create(properties) { + return new CreateCustomDimensionRequest(properties); + }; + + /** + * Encodes the specified CreateCustomDimensionRequest message. Does not implicitly {@link google.analytics.admin.v1beta.CreateCustomDimensionRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1beta.CreateCustomDimensionRequest + * @static + * @param {google.analytics.admin.v1beta.ICreateCustomDimensionRequest} message CreateCustomDimensionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateCustomDimensionRequest.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.customDimension != null && Object.hasOwnProperty.call(message, "customDimension")) + $root.google.analytics.admin.v1beta.CustomDimension.encode(message.customDimension, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CreateCustomDimensionRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.CreateCustomDimensionRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1beta.CreateCustomDimensionRequest + * @static + * @param {google.analytics.admin.v1beta.ICreateCustomDimensionRequest} message CreateCustomDimensionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateCustomDimensionRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateCustomDimensionRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1beta.CreateCustomDimensionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1beta.CreateCustomDimensionRequest} CreateCustomDimensionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateCustomDimensionRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1beta.CreateCustomDimensionRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.customDimension = $root.google.analytics.admin.v1beta.CustomDimension.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateCustomDimensionRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1beta.CreateCustomDimensionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1beta.CreateCustomDimensionRequest} CreateCustomDimensionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateCustomDimensionRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateCustomDimensionRequest message. + * @function verify + * @memberof google.analytics.admin.v1beta.CreateCustomDimensionRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateCustomDimensionRequest.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.customDimension != null && message.hasOwnProperty("customDimension")) { + var error = $root.google.analytics.admin.v1beta.CustomDimension.verify(message.customDimension); + if (error) + return "customDimension." + error; + } + return null; + }; + + /** + * Creates a CreateCustomDimensionRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1beta.CreateCustomDimensionRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1beta.CreateCustomDimensionRequest} CreateCustomDimensionRequest + */ + CreateCustomDimensionRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1beta.CreateCustomDimensionRequest) + return object; + var message = new $root.google.analytics.admin.v1beta.CreateCustomDimensionRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.customDimension != null) { + if (typeof object.customDimension !== "object") + throw TypeError(".google.analytics.admin.v1beta.CreateCustomDimensionRequest.customDimension: object expected"); + message.customDimension = $root.google.analytics.admin.v1beta.CustomDimension.fromObject(object.customDimension); + } + return message; + }; + + /** + * Creates a plain object from a CreateCustomDimensionRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1beta.CreateCustomDimensionRequest + * @static + * @param {google.analytics.admin.v1beta.CreateCustomDimensionRequest} message CreateCustomDimensionRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateCustomDimensionRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.customDimension = null; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.customDimension != null && message.hasOwnProperty("customDimension")) + object.customDimension = $root.google.analytics.admin.v1beta.CustomDimension.toObject(message.customDimension, options); + return object; + }; + + /** + * Converts this CreateCustomDimensionRequest to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1beta.CreateCustomDimensionRequest + * @instance + * @returns {Object.} JSON object + */ + CreateCustomDimensionRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateCustomDimensionRequest + * @function getTypeUrl + * @memberof google.analytics.admin.v1beta.CreateCustomDimensionRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateCustomDimensionRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1beta.CreateCustomDimensionRequest"; + }; + + return CreateCustomDimensionRequest; + })(); + + v1beta.UpdateCustomDimensionRequest = (function() { + + /** + * Properties of an UpdateCustomDimensionRequest. + * @memberof google.analytics.admin.v1beta + * @interface IUpdateCustomDimensionRequest + * @property {google.analytics.admin.v1beta.ICustomDimension|null} [customDimension] UpdateCustomDimensionRequest customDimension + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateCustomDimensionRequest updateMask + */ + + /** + * Constructs a new UpdateCustomDimensionRequest. + * @memberof google.analytics.admin.v1beta + * @classdesc Represents an UpdateCustomDimensionRequest. + * @implements IUpdateCustomDimensionRequest + * @constructor + * @param {google.analytics.admin.v1beta.IUpdateCustomDimensionRequest=} [properties] Properties to set + */ + function UpdateCustomDimensionRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateCustomDimensionRequest customDimension. + * @member {google.analytics.admin.v1beta.ICustomDimension|null|undefined} customDimension + * @memberof google.analytics.admin.v1beta.UpdateCustomDimensionRequest + * @instance + */ + UpdateCustomDimensionRequest.prototype.customDimension = null; + + /** + * UpdateCustomDimensionRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.analytics.admin.v1beta.UpdateCustomDimensionRequest + * @instance + */ + UpdateCustomDimensionRequest.prototype.updateMask = null; + + /** + * Creates a new UpdateCustomDimensionRequest instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1beta.UpdateCustomDimensionRequest + * @static + * @param {google.analytics.admin.v1beta.IUpdateCustomDimensionRequest=} [properties] Properties to set + * @returns {google.analytics.admin.v1beta.UpdateCustomDimensionRequest} UpdateCustomDimensionRequest instance + */ + UpdateCustomDimensionRequest.create = function create(properties) { + return new UpdateCustomDimensionRequest(properties); + }; + + /** + * Encodes the specified UpdateCustomDimensionRequest message. Does not implicitly {@link google.analytics.admin.v1beta.UpdateCustomDimensionRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1beta.UpdateCustomDimensionRequest + * @static + * @param {google.analytics.admin.v1beta.IUpdateCustomDimensionRequest} message UpdateCustomDimensionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateCustomDimensionRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.customDimension != null && Object.hasOwnProperty.call(message, "customDimension")) + $root.google.analytics.admin.v1beta.CustomDimension.encode(message.customDimension, 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 UpdateCustomDimensionRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.UpdateCustomDimensionRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1beta.UpdateCustomDimensionRequest + * @static + * @param {google.analytics.admin.v1beta.IUpdateCustomDimensionRequest} message UpdateCustomDimensionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateCustomDimensionRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateCustomDimensionRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1beta.UpdateCustomDimensionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1beta.UpdateCustomDimensionRequest} UpdateCustomDimensionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateCustomDimensionRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1beta.UpdateCustomDimensionRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.customDimension = $root.google.analytics.admin.v1beta.CustomDimension.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 UpdateCustomDimensionRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1beta.UpdateCustomDimensionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1beta.UpdateCustomDimensionRequest} UpdateCustomDimensionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateCustomDimensionRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateCustomDimensionRequest message. + * @function verify + * @memberof google.analytics.admin.v1beta.UpdateCustomDimensionRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateCustomDimensionRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.customDimension != null && message.hasOwnProperty("customDimension")) { + var error = $root.google.analytics.admin.v1beta.CustomDimension.verify(message.customDimension); + if (error) + return "customDimension." + 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 UpdateCustomDimensionRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1beta.UpdateCustomDimensionRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1beta.UpdateCustomDimensionRequest} UpdateCustomDimensionRequest + */ + UpdateCustomDimensionRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1beta.UpdateCustomDimensionRequest) + return object; + var message = new $root.google.analytics.admin.v1beta.UpdateCustomDimensionRequest(); + if (object.customDimension != null) { + if (typeof object.customDimension !== "object") + throw TypeError(".google.analytics.admin.v1beta.UpdateCustomDimensionRequest.customDimension: object expected"); + message.customDimension = $root.google.analytics.admin.v1beta.CustomDimension.fromObject(object.customDimension); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.analytics.admin.v1beta.UpdateCustomDimensionRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + return message; + }; + + /** + * Creates a plain object from an UpdateCustomDimensionRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1beta.UpdateCustomDimensionRequest + * @static + * @param {google.analytics.admin.v1beta.UpdateCustomDimensionRequest} message UpdateCustomDimensionRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateCustomDimensionRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.customDimension = null; + object.updateMask = null; + } + if (message.customDimension != null && message.hasOwnProperty("customDimension")) + object.customDimension = $root.google.analytics.admin.v1beta.CustomDimension.toObject(message.customDimension, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + return object; + }; + + /** + * Converts this UpdateCustomDimensionRequest to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1beta.UpdateCustomDimensionRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateCustomDimensionRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateCustomDimensionRequest + * @function getTypeUrl + * @memberof google.analytics.admin.v1beta.UpdateCustomDimensionRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateCustomDimensionRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1beta.UpdateCustomDimensionRequest"; + }; + + return UpdateCustomDimensionRequest; + })(); + + v1beta.ListCustomDimensionsRequest = (function() { + + /** + * Properties of a ListCustomDimensionsRequest. + * @memberof google.analytics.admin.v1beta + * @interface IListCustomDimensionsRequest + * @property {string|null} [parent] ListCustomDimensionsRequest parent + * @property {number|null} [pageSize] ListCustomDimensionsRequest pageSize + * @property {string|null} [pageToken] ListCustomDimensionsRequest pageToken + */ + + /** + * Constructs a new ListCustomDimensionsRequest. + * @memberof google.analytics.admin.v1beta + * @classdesc Represents a ListCustomDimensionsRequest. + * @implements IListCustomDimensionsRequest + * @constructor + * @param {google.analytics.admin.v1beta.IListCustomDimensionsRequest=} [properties] Properties to set + */ + function ListCustomDimensionsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListCustomDimensionsRequest parent. + * @member {string} parent + * @memberof google.analytics.admin.v1beta.ListCustomDimensionsRequest + * @instance + */ + ListCustomDimensionsRequest.prototype.parent = ""; + + /** + * ListCustomDimensionsRequest pageSize. + * @member {number} pageSize + * @memberof google.analytics.admin.v1beta.ListCustomDimensionsRequest + * @instance + */ + ListCustomDimensionsRequest.prototype.pageSize = 0; + + /** + * ListCustomDimensionsRequest pageToken. + * @member {string} pageToken + * @memberof google.analytics.admin.v1beta.ListCustomDimensionsRequest + * @instance + */ + ListCustomDimensionsRequest.prototype.pageToken = ""; + + /** + * Creates a new ListCustomDimensionsRequest instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1beta.ListCustomDimensionsRequest + * @static + * @param {google.analytics.admin.v1beta.IListCustomDimensionsRequest=} [properties] Properties to set + * @returns {google.analytics.admin.v1beta.ListCustomDimensionsRequest} ListCustomDimensionsRequest instance + */ + ListCustomDimensionsRequest.create = function create(properties) { + return new ListCustomDimensionsRequest(properties); + }; + + /** + * Encodes the specified ListCustomDimensionsRequest message. Does not implicitly {@link google.analytics.admin.v1beta.ListCustomDimensionsRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1beta.ListCustomDimensionsRequest + * @static + * @param {google.analytics.admin.v1beta.IListCustomDimensionsRequest} message ListCustomDimensionsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListCustomDimensionsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + return writer; + }; + + /** + * Encodes the specified ListCustomDimensionsRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.ListCustomDimensionsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1beta.ListCustomDimensionsRequest + * @static + * @param {google.analytics.admin.v1beta.IListCustomDimensionsRequest} message ListCustomDimensionsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListCustomDimensionsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListCustomDimensionsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1beta.ListCustomDimensionsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1beta.ListCustomDimensionsRequest} ListCustomDimensionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListCustomDimensionsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1beta.ListCustomDimensionsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListCustomDimensionsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1beta.ListCustomDimensionsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1beta.ListCustomDimensionsRequest} ListCustomDimensionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListCustomDimensionsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListCustomDimensionsRequest message. + * @function verify + * @memberof google.analytics.admin.v1beta.ListCustomDimensionsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListCustomDimensionsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + return null; + }; + + /** + * Creates a ListCustomDimensionsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1beta.ListCustomDimensionsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1beta.ListCustomDimensionsRequest} ListCustomDimensionsRequest + */ + ListCustomDimensionsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1beta.ListCustomDimensionsRequest) + return object; + var message = new $root.google.analytics.admin.v1beta.ListCustomDimensionsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + return message; + }; + + /** + * Creates a plain object from a ListCustomDimensionsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1beta.ListCustomDimensionsRequest + * @static + * @param {google.analytics.admin.v1beta.ListCustomDimensionsRequest} message ListCustomDimensionsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListCustomDimensionsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + return object; + }; + + /** + * Converts this ListCustomDimensionsRequest to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1beta.ListCustomDimensionsRequest + * @instance + * @returns {Object.} JSON object + */ + ListCustomDimensionsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListCustomDimensionsRequest + * @function getTypeUrl + * @memberof google.analytics.admin.v1beta.ListCustomDimensionsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListCustomDimensionsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1beta.ListCustomDimensionsRequest"; + }; + + return ListCustomDimensionsRequest; + })(); + + v1beta.ListCustomDimensionsResponse = (function() { + + /** + * Properties of a ListCustomDimensionsResponse. + * @memberof google.analytics.admin.v1beta + * @interface IListCustomDimensionsResponse + * @property {Array.|null} [customDimensions] ListCustomDimensionsResponse customDimensions + * @property {string|null} [nextPageToken] ListCustomDimensionsResponse nextPageToken + */ + + /** + * Constructs a new ListCustomDimensionsResponse. + * @memberof google.analytics.admin.v1beta + * @classdesc Represents a ListCustomDimensionsResponse. + * @implements IListCustomDimensionsResponse + * @constructor + * @param {google.analytics.admin.v1beta.IListCustomDimensionsResponse=} [properties] Properties to set + */ + function ListCustomDimensionsResponse(properties) { + this.customDimensions = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListCustomDimensionsResponse customDimensions. + * @member {Array.} customDimensions + * @memberof google.analytics.admin.v1beta.ListCustomDimensionsResponse + * @instance + */ + ListCustomDimensionsResponse.prototype.customDimensions = $util.emptyArray; + + /** + * ListCustomDimensionsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.analytics.admin.v1beta.ListCustomDimensionsResponse + * @instance + */ + ListCustomDimensionsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListCustomDimensionsResponse instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1beta.ListCustomDimensionsResponse + * @static + * @param {google.analytics.admin.v1beta.IListCustomDimensionsResponse=} [properties] Properties to set + * @returns {google.analytics.admin.v1beta.ListCustomDimensionsResponse} ListCustomDimensionsResponse instance + */ + ListCustomDimensionsResponse.create = function create(properties) { + return new ListCustomDimensionsResponse(properties); + }; + + /** + * Encodes the specified ListCustomDimensionsResponse message. Does not implicitly {@link google.analytics.admin.v1beta.ListCustomDimensionsResponse.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1beta.ListCustomDimensionsResponse + * @static + * @param {google.analytics.admin.v1beta.IListCustomDimensionsResponse} message ListCustomDimensionsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListCustomDimensionsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.customDimensions != null && message.customDimensions.length) + for (var i = 0; i < message.customDimensions.length; ++i) + $root.google.analytics.admin.v1beta.CustomDimension.encode(message.customDimensions[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 ListCustomDimensionsResponse message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.ListCustomDimensionsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1beta.ListCustomDimensionsResponse + * @static + * @param {google.analytics.admin.v1beta.IListCustomDimensionsResponse} message ListCustomDimensionsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListCustomDimensionsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListCustomDimensionsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1beta.ListCustomDimensionsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1beta.ListCustomDimensionsResponse} ListCustomDimensionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListCustomDimensionsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1beta.ListCustomDimensionsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.customDimensions && message.customDimensions.length)) + message.customDimensions = []; + message.customDimensions.push($root.google.analytics.admin.v1beta.CustomDimension.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListCustomDimensionsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1beta.ListCustomDimensionsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1beta.ListCustomDimensionsResponse} ListCustomDimensionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListCustomDimensionsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListCustomDimensionsResponse message. + * @function verify + * @memberof google.analytics.admin.v1beta.ListCustomDimensionsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListCustomDimensionsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.customDimensions != null && message.hasOwnProperty("customDimensions")) { + if (!Array.isArray(message.customDimensions)) + return "customDimensions: array expected"; + for (var i = 0; i < message.customDimensions.length; ++i) { + var error = $root.google.analytics.admin.v1beta.CustomDimension.verify(message.customDimensions[i]); + if (error) + return "customDimensions." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListCustomDimensionsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1beta.ListCustomDimensionsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1beta.ListCustomDimensionsResponse} ListCustomDimensionsResponse + */ + ListCustomDimensionsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1beta.ListCustomDimensionsResponse) + return object; + var message = new $root.google.analytics.admin.v1beta.ListCustomDimensionsResponse(); + if (object.customDimensions) { + if (!Array.isArray(object.customDimensions)) + throw TypeError(".google.analytics.admin.v1beta.ListCustomDimensionsResponse.customDimensions: array expected"); + message.customDimensions = []; + for (var i = 0; i < object.customDimensions.length; ++i) { + if (typeof object.customDimensions[i] !== "object") + throw TypeError(".google.analytics.admin.v1beta.ListCustomDimensionsResponse.customDimensions: object expected"); + message.customDimensions[i] = $root.google.analytics.admin.v1beta.CustomDimension.fromObject(object.customDimensions[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListCustomDimensionsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1beta.ListCustomDimensionsResponse + * @static + * @param {google.analytics.admin.v1beta.ListCustomDimensionsResponse} message ListCustomDimensionsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListCustomDimensionsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.customDimensions = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.customDimensions && message.customDimensions.length) { + object.customDimensions = []; + for (var j = 0; j < message.customDimensions.length; ++j) + object.customDimensions[j] = $root.google.analytics.admin.v1beta.CustomDimension.toObject(message.customDimensions[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListCustomDimensionsResponse to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1beta.ListCustomDimensionsResponse + * @instance + * @returns {Object.} JSON object + */ + ListCustomDimensionsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListCustomDimensionsResponse + * @function getTypeUrl + * @memberof google.analytics.admin.v1beta.ListCustomDimensionsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListCustomDimensionsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1beta.ListCustomDimensionsResponse"; + }; + + return ListCustomDimensionsResponse; + })(); + + v1beta.ArchiveCustomDimensionRequest = (function() { + + /** + * Properties of an ArchiveCustomDimensionRequest. + * @memberof google.analytics.admin.v1beta + * @interface IArchiveCustomDimensionRequest + * @property {string|null} [name] ArchiveCustomDimensionRequest name + */ + + /** + * Constructs a new ArchiveCustomDimensionRequest. + * @memberof google.analytics.admin.v1beta + * @classdesc Represents an ArchiveCustomDimensionRequest. + * @implements IArchiveCustomDimensionRequest + * @constructor + * @param {google.analytics.admin.v1beta.IArchiveCustomDimensionRequest=} [properties] Properties to set + */ + function ArchiveCustomDimensionRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ArchiveCustomDimensionRequest name. + * @member {string} name + * @memberof google.analytics.admin.v1beta.ArchiveCustomDimensionRequest + * @instance + */ + ArchiveCustomDimensionRequest.prototype.name = ""; + + /** + * Creates a new ArchiveCustomDimensionRequest instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1beta.ArchiveCustomDimensionRequest + * @static + * @param {google.analytics.admin.v1beta.IArchiveCustomDimensionRequest=} [properties] Properties to set + * @returns {google.analytics.admin.v1beta.ArchiveCustomDimensionRequest} ArchiveCustomDimensionRequest instance + */ + ArchiveCustomDimensionRequest.create = function create(properties) { + return new ArchiveCustomDimensionRequest(properties); + }; + + /** + * Encodes the specified ArchiveCustomDimensionRequest message. Does not implicitly {@link google.analytics.admin.v1beta.ArchiveCustomDimensionRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1beta.ArchiveCustomDimensionRequest + * @static + * @param {google.analytics.admin.v1beta.IArchiveCustomDimensionRequest} message ArchiveCustomDimensionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ArchiveCustomDimensionRequest.encode = function encode(message, writer) { + 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 ArchiveCustomDimensionRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.ArchiveCustomDimensionRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1beta.ArchiveCustomDimensionRequest + * @static + * @param {google.analytics.admin.v1beta.IArchiveCustomDimensionRequest} message ArchiveCustomDimensionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ArchiveCustomDimensionRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ArchiveCustomDimensionRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1beta.ArchiveCustomDimensionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1beta.ArchiveCustomDimensionRequest} ArchiveCustomDimensionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ArchiveCustomDimensionRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1beta.ArchiveCustomDimensionRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ArchiveCustomDimensionRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1beta.ArchiveCustomDimensionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1beta.ArchiveCustomDimensionRequest} ArchiveCustomDimensionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ArchiveCustomDimensionRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ArchiveCustomDimensionRequest message. + * @function verify + * @memberof google.analytics.admin.v1beta.ArchiveCustomDimensionRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ArchiveCustomDimensionRequest.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 an ArchiveCustomDimensionRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1beta.ArchiveCustomDimensionRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1beta.ArchiveCustomDimensionRequest} ArchiveCustomDimensionRequest + */ + ArchiveCustomDimensionRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1beta.ArchiveCustomDimensionRequest) + return object; + var message = new $root.google.analytics.admin.v1beta.ArchiveCustomDimensionRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from an ArchiveCustomDimensionRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1beta.ArchiveCustomDimensionRequest + * @static + * @param {google.analytics.admin.v1beta.ArchiveCustomDimensionRequest} message ArchiveCustomDimensionRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ArchiveCustomDimensionRequest.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 ArchiveCustomDimensionRequest to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1beta.ArchiveCustomDimensionRequest + * @instance + * @returns {Object.} JSON object + */ + ArchiveCustomDimensionRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ArchiveCustomDimensionRequest + * @function getTypeUrl + * @memberof google.analytics.admin.v1beta.ArchiveCustomDimensionRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ArchiveCustomDimensionRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1beta.ArchiveCustomDimensionRequest"; + }; + + return ArchiveCustomDimensionRequest; + })(); + + v1beta.GetCustomDimensionRequest = (function() { + + /** + * Properties of a GetCustomDimensionRequest. + * @memberof google.analytics.admin.v1beta + * @interface IGetCustomDimensionRequest + * @property {string|null} [name] GetCustomDimensionRequest name + */ + + /** + * Constructs a new GetCustomDimensionRequest. + * @memberof google.analytics.admin.v1beta + * @classdesc Represents a GetCustomDimensionRequest. + * @implements IGetCustomDimensionRequest + * @constructor + * @param {google.analytics.admin.v1beta.IGetCustomDimensionRequest=} [properties] Properties to set + */ + function GetCustomDimensionRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetCustomDimensionRequest name. + * @member {string} name + * @memberof google.analytics.admin.v1beta.GetCustomDimensionRequest + * @instance + */ + GetCustomDimensionRequest.prototype.name = ""; + + /** + * Creates a new GetCustomDimensionRequest instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1beta.GetCustomDimensionRequest + * @static + * @param {google.analytics.admin.v1beta.IGetCustomDimensionRequest=} [properties] Properties to set + * @returns {google.analytics.admin.v1beta.GetCustomDimensionRequest} GetCustomDimensionRequest instance + */ + GetCustomDimensionRequest.create = function create(properties) { + return new GetCustomDimensionRequest(properties); + }; + + /** + * Encodes the specified GetCustomDimensionRequest message. Does not implicitly {@link google.analytics.admin.v1beta.GetCustomDimensionRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1beta.GetCustomDimensionRequest + * @static + * @param {google.analytics.admin.v1beta.IGetCustomDimensionRequest} message GetCustomDimensionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetCustomDimensionRequest.encode = function encode(message, writer) { + 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 GetCustomDimensionRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.GetCustomDimensionRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1beta.GetCustomDimensionRequest + * @static + * @param {google.analytics.admin.v1beta.IGetCustomDimensionRequest} message GetCustomDimensionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetCustomDimensionRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetCustomDimensionRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1beta.GetCustomDimensionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1beta.GetCustomDimensionRequest} GetCustomDimensionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetCustomDimensionRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1beta.GetCustomDimensionRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetCustomDimensionRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1beta.GetCustomDimensionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1beta.GetCustomDimensionRequest} GetCustomDimensionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetCustomDimensionRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetCustomDimensionRequest message. + * @function verify + * @memberof google.analytics.admin.v1beta.GetCustomDimensionRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetCustomDimensionRequest.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 GetCustomDimensionRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1beta.GetCustomDimensionRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1beta.GetCustomDimensionRequest} GetCustomDimensionRequest + */ + GetCustomDimensionRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1beta.GetCustomDimensionRequest) + return object; + var message = new $root.google.analytics.admin.v1beta.GetCustomDimensionRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetCustomDimensionRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1beta.GetCustomDimensionRequest + * @static + * @param {google.analytics.admin.v1beta.GetCustomDimensionRequest} message GetCustomDimensionRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetCustomDimensionRequest.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 GetCustomDimensionRequest to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1beta.GetCustomDimensionRequest + * @instance + * @returns {Object.} JSON object + */ + GetCustomDimensionRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetCustomDimensionRequest + * @function getTypeUrl + * @memberof google.analytics.admin.v1beta.GetCustomDimensionRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetCustomDimensionRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1beta.GetCustomDimensionRequest"; + }; + + return GetCustomDimensionRequest; + })(); + + v1beta.CreateCustomMetricRequest = (function() { + + /** + * Properties of a CreateCustomMetricRequest. + * @memberof google.analytics.admin.v1beta + * @interface ICreateCustomMetricRequest + * @property {string|null} [parent] CreateCustomMetricRequest parent + * @property {google.analytics.admin.v1beta.ICustomMetric|null} [customMetric] CreateCustomMetricRequest customMetric + */ + + /** + * Constructs a new CreateCustomMetricRequest. + * @memberof google.analytics.admin.v1beta + * @classdesc Represents a CreateCustomMetricRequest. + * @implements ICreateCustomMetricRequest + * @constructor + * @param {google.analytics.admin.v1beta.ICreateCustomMetricRequest=} [properties] Properties to set + */ + function CreateCustomMetricRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateCustomMetricRequest parent. + * @member {string} parent + * @memberof google.analytics.admin.v1beta.CreateCustomMetricRequest + * @instance + */ + CreateCustomMetricRequest.prototype.parent = ""; + + /** + * CreateCustomMetricRequest customMetric. + * @member {google.analytics.admin.v1beta.ICustomMetric|null|undefined} customMetric + * @memberof google.analytics.admin.v1beta.CreateCustomMetricRequest + * @instance + */ + CreateCustomMetricRequest.prototype.customMetric = null; + + /** + * Creates a new CreateCustomMetricRequest instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1beta.CreateCustomMetricRequest + * @static + * @param {google.analytics.admin.v1beta.ICreateCustomMetricRequest=} [properties] Properties to set + * @returns {google.analytics.admin.v1beta.CreateCustomMetricRequest} CreateCustomMetricRequest instance + */ + CreateCustomMetricRequest.create = function create(properties) { + return new CreateCustomMetricRequest(properties); + }; + + /** + * Encodes the specified CreateCustomMetricRequest message. Does not implicitly {@link google.analytics.admin.v1beta.CreateCustomMetricRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1beta.CreateCustomMetricRequest + * @static + * @param {google.analytics.admin.v1beta.ICreateCustomMetricRequest} message CreateCustomMetricRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateCustomMetricRequest.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.customMetric != null && Object.hasOwnProperty.call(message, "customMetric")) + $root.google.analytics.admin.v1beta.CustomMetric.encode(message.customMetric, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CreateCustomMetricRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.CreateCustomMetricRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1beta.CreateCustomMetricRequest + * @static + * @param {google.analytics.admin.v1beta.ICreateCustomMetricRequest} message CreateCustomMetricRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateCustomMetricRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateCustomMetricRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1beta.CreateCustomMetricRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1beta.CreateCustomMetricRequest} CreateCustomMetricRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateCustomMetricRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1beta.CreateCustomMetricRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.customMetric = $root.google.analytics.admin.v1beta.CustomMetric.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateCustomMetricRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1beta.CreateCustomMetricRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1beta.CreateCustomMetricRequest} CreateCustomMetricRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateCustomMetricRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateCustomMetricRequest message. + * @function verify + * @memberof google.analytics.admin.v1beta.CreateCustomMetricRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateCustomMetricRequest.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.customMetric != null && message.hasOwnProperty("customMetric")) { + var error = $root.google.analytics.admin.v1beta.CustomMetric.verify(message.customMetric); + if (error) + return "customMetric." + error; + } + return null; + }; + + /** + * Creates a CreateCustomMetricRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1beta.CreateCustomMetricRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1beta.CreateCustomMetricRequest} CreateCustomMetricRequest + */ + CreateCustomMetricRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1beta.CreateCustomMetricRequest) + return object; + var message = new $root.google.analytics.admin.v1beta.CreateCustomMetricRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.customMetric != null) { + if (typeof object.customMetric !== "object") + throw TypeError(".google.analytics.admin.v1beta.CreateCustomMetricRequest.customMetric: object expected"); + message.customMetric = $root.google.analytics.admin.v1beta.CustomMetric.fromObject(object.customMetric); + } + return message; + }; + + /** + * Creates a plain object from a CreateCustomMetricRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1beta.CreateCustomMetricRequest + * @static + * @param {google.analytics.admin.v1beta.CreateCustomMetricRequest} message CreateCustomMetricRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateCustomMetricRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.customMetric = null; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.customMetric != null && message.hasOwnProperty("customMetric")) + object.customMetric = $root.google.analytics.admin.v1beta.CustomMetric.toObject(message.customMetric, options); + return object; + }; + + /** + * Converts this CreateCustomMetricRequest to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1beta.CreateCustomMetricRequest + * @instance + * @returns {Object.} JSON object + */ + CreateCustomMetricRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateCustomMetricRequest + * @function getTypeUrl + * @memberof google.analytics.admin.v1beta.CreateCustomMetricRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateCustomMetricRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1beta.CreateCustomMetricRequest"; + }; + + return CreateCustomMetricRequest; + })(); + + v1beta.UpdateCustomMetricRequest = (function() { + + /** + * Properties of an UpdateCustomMetricRequest. + * @memberof google.analytics.admin.v1beta + * @interface IUpdateCustomMetricRequest + * @property {google.analytics.admin.v1beta.ICustomMetric|null} [customMetric] UpdateCustomMetricRequest customMetric + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateCustomMetricRequest updateMask + */ + + /** + * Constructs a new UpdateCustomMetricRequest. + * @memberof google.analytics.admin.v1beta + * @classdesc Represents an UpdateCustomMetricRequest. + * @implements IUpdateCustomMetricRequest + * @constructor + * @param {google.analytics.admin.v1beta.IUpdateCustomMetricRequest=} [properties] Properties to set + */ + function UpdateCustomMetricRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateCustomMetricRequest customMetric. + * @member {google.analytics.admin.v1beta.ICustomMetric|null|undefined} customMetric + * @memberof google.analytics.admin.v1beta.UpdateCustomMetricRequest + * @instance + */ + UpdateCustomMetricRequest.prototype.customMetric = null; + + /** + * UpdateCustomMetricRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.analytics.admin.v1beta.UpdateCustomMetricRequest + * @instance + */ + UpdateCustomMetricRequest.prototype.updateMask = null; + + /** + * Creates a new UpdateCustomMetricRequest instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1beta.UpdateCustomMetricRequest + * @static + * @param {google.analytics.admin.v1beta.IUpdateCustomMetricRequest=} [properties] Properties to set + * @returns {google.analytics.admin.v1beta.UpdateCustomMetricRequest} UpdateCustomMetricRequest instance + */ + UpdateCustomMetricRequest.create = function create(properties) { + return new UpdateCustomMetricRequest(properties); + }; + + /** + * Encodes the specified UpdateCustomMetricRequest message. Does not implicitly {@link google.analytics.admin.v1beta.UpdateCustomMetricRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1beta.UpdateCustomMetricRequest + * @static + * @param {google.analytics.admin.v1beta.IUpdateCustomMetricRequest} message UpdateCustomMetricRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateCustomMetricRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.customMetric != null && Object.hasOwnProperty.call(message, "customMetric")) + $root.google.analytics.admin.v1beta.CustomMetric.encode(message.customMetric, 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 UpdateCustomMetricRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.UpdateCustomMetricRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1beta.UpdateCustomMetricRequest + * @static + * @param {google.analytics.admin.v1beta.IUpdateCustomMetricRequest} message UpdateCustomMetricRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateCustomMetricRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateCustomMetricRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1beta.UpdateCustomMetricRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1beta.UpdateCustomMetricRequest} UpdateCustomMetricRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateCustomMetricRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1beta.UpdateCustomMetricRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.customMetric = $root.google.analytics.admin.v1beta.CustomMetric.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 UpdateCustomMetricRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1beta.UpdateCustomMetricRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1beta.UpdateCustomMetricRequest} UpdateCustomMetricRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateCustomMetricRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateCustomMetricRequest message. + * @function verify + * @memberof google.analytics.admin.v1beta.UpdateCustomMetricRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateCustomMetricRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.customMetric != null && message.hasOwnProperty("customMetric")) { + var error = $root.google.analytics.admin.v1beta.CustomMetric.verify(message.customMetric); + if (error) + return "customMetric." + 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 UpdateCustomMetricRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1beta.UpdateCustomMetricRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1beta.UpdateCustomMetricRequest} UpdateCustomMetricRequest + */ + UpdateCustomMetricRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1beta.UpdateCustomMetricRequest) + return object; + var message = new $root.google.analytics.admin.v1beta.UpdateCustomMetricRequest(); + if (object.customMetric != null) { + if (typeof object.customMetric !== "object") + throw TypeError(".google.analytics.admin.v1beta.UpdateCustomMetricRequest.customMetric: object expected"); + message.customMetric = $root.google.analytics.admin.v1beta.CustomMetric.fromObject(object.customMetric); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.analytics.admin.v1beta.UpdateCustomMetricRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + return message; + }; + + /** + * Creates a plain object from an UpdateCustomMetricRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1beta.UpdateCustomMetricRequest + * @static + * @param {google.analytics.admin.v1beta.UpdateCustomMetricRequest} message UpdateCustomMetricRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateCustomMetricRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.customMetric = null; + object.updateMask = null; + } + if (message.customMetric != null && message.hasOwnProperty("customMetric")) + object.customMetric = $root.google.analytics.admin.v1beta.CustomMetric.toObject(message.customMetric, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + return object; + }; + + /** + * Converts this UpdateCustomMetricRequest to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1beta.UpdateCustomMetricRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateCustomMetricRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateCustomMetricRequest + * @function getTypeUrl + * @memberof google.analytics.admin.v1beta.UpdateCustomMetricRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateCustomMetricRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1beta.UpdateCustomMetricRequest"; + }; + + return UpdateCustomMetricRequest; + })(); + + v1beta.ListCustomMetricsRequest = (function() { + + /** + * Properties of a ListCustomMetricsRequest. + * @memberof google.analytics.admin.v1beta + * @interface IListCustomMetricsRequest + * @property {string|null} [parent] ListCustomMetricsRequest parent + * @property {number|null} [pageSize] ListCustomMetricsRequest pageSize + * @property {string|null} [pageToken] ListCustomMetricsRequest pageToken + */ + + /** + * Constructs a new ListCustomMetricsRequest. + * @memberof google.analytics.admin.v1beta + * @classdesc Represents a ListCustomMetricsRequest. + * @implements IListCustomMetricsRequest + * @constructor + * @param {google.analytics.admin.v1beta.IListCustomMetricsRequest=} [properties] Properties to set + */ + function ListCustomMetricsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListCustomMetricsRequest parent. + * @member {string} parent + * @memberof google.analytics.admin.v1beta.ListCustomMetricsRequest + * @instance + */ + ListCustomMetricsRequest.prototype.parent = ""; + + /** + * ListCustomMetricsRequest pageSize. + * @member {number} pageSize + * @memberof google.analytics.admin.v1beta.ListCustomMetricsRequest + * @instance + */ + ListCustomMetricsRequest.prototype.pageSize = 0; + + /** + * ListCustomMetricsRequest pageToken. + * @member {string} pageToken + * @memberof google.analytics.admin.v1beta.ListCustomMetricsRequest + * @instance + */ + ListCustomMetricsRequest.prototype.pageToken = ""; + + /** + * Creates a new ListCustomMetricsRequest instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1beta.ListCustomMetricsRequest + * @static + * @param {google.analytics.admin.v1beta.IListCustomMetricsRequest=} [properties] Properties to set + * @returns {google.analytics.admin.v1beta.ListCustomMetricsRequest} ListCustomMetricsRequest instance + */ + ListCustomMetricsRequest.create = function create(properties) { + return new ListCustomMetricsRequest(properties); + }; + + /** + * Encodes the specified ListCustomMetricsRequest message. Does not implicitly {@link google.analytics.admin.v1beta.ListCustomMetricsRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1beta.ListCustomMetricsRequest + * @static + * @param {google.analytics.admin.v1beta.IListCustomMetricsRequest} message ListCustomMetricsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListCustomMetricsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + return writer; + }; + + /** + * Encodes the specified ListCustomMetricsRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.ListCustomMetricsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1beta.ListCustomMetricsRequest + * @static + * @param {google.analytics.admin.v1beta.IListCustomMetricsRequest} message ListCustomMetricsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListCustomMetricsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListCustomMetricsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1beta.ListCustomMetricsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1beta.ListCustomMetricsRequest} ListCustomMetricsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListCustomMetricsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1beta.ListCustomMetricsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListCustomMetricsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1beta.ListCustomMetricsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1beta.ListCustomMetricsRequest} ListCustomMetricsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListCustomMetricsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListCustomMetricsRequest message. + * @function verify + * @memberof google.analytics.admin.v1beta.ListCustomMetricsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListCustomMetricsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + return null; + }; + + /** + * Creates a ListCustomMetricsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1beta.ListCustomMetricsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1beta.ListCustomMetricsRequest} ListCustomMetricsRequest + */ + ListCustomMetricsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1beta.ListCustomMetricsRequest) + return object; + var message = new $root.google.analytics.admin.v1beta.ListCustomMetricsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + return message; + }; + + /** + * Creates a plain object from a ListCustomMetricsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1beta.ListCustomMetricsRequest + * @static + * @param {google.analytics.admin.v1beta.ListCustomMetricsRequest} message ListCustomMetricsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListCustomMetricsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + return object; + }; + + /** + * Converts this ListCustomMetricsRequest to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1beta.ListCustomMetricsRequest + * @instance + * @returns {Object.} JSON object + */ + ListCustomMetricsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListCustomMetricsRequest + * @function getTypeUrl + * @memberof google.analytics.admin.v1beta.ListCustomMetricsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListCustomMetricsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1beta.ListCustomMetricsRequest"; + }; + + return ListCustomMetricsRequest; + })(); + + v1beta.ListCustomMetricsResponse = (function() { + + /** + * Properties of a ListCustomMetricsResponse. + * @memberof google.analytics.admin.v1beta + * @interface IListCustomMetricsResponse + * @property {Array.|null} [customMetrics] ListCustomMetricsResponse customMetrics + * @property {string|null} [nextPageToken] ListCustomMetricsResponse nextPageToken + */ + + /** + * Constructs a new ListCustomMetricsResponse. + * @memberof google.analytics.admin.v1beta + * @classdesc Represents a ListCustomMetricsResponse. + * @implements IListCustomMetricsResponse + * @constructor + * @param {google.analytics.admin.v1beta.IListCustomMetricsResponse=} [properties] Properties to set + */ + function ListCustomMetricsResponse(properties) { + this.customMetrics = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListCustomMetricsResponse customMetrics. + * @member {Array.} customMetrics + * @memberof google.analytics.admin.v1beta.ListCustomMetricsResponse + * @instance + */ + ListCustomMetricsResponse.prototype.customMetrics = $util.emptyArray; + + /** + * ListCustomMetricsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.analytics.admin.v1beta.ListCustomMetricsResponse + * @instance + */ + ListCustomMetricsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListCustomMetricsResponse instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1beta.ListCustomMetricsResponse + * @static + * @param {google.analytics.admin.v1beta.IListCustomMetricsResponse=} [properties] Properties to set + * @returns {google.analytics.admin.v1beta.ListCustomMetricsResponse} ListCustomMetricsResponse instance + */ + ListCustomMetricsResponse.create = function create(properties) { + return new ListCustomMetricsResponse(properties); + }; + + /** + * Encodes the specified ListCustomMetricsResponse message. Does not implicitly {@link google.analytics.admin.v1beta.ListCustomMetricsResponse.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1beta.ListCustomMetricsResponse + * @static + * @param {google.analytics.admin.v1beta.IListCustomMetricsResponse} message ListCustomMetricsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListCustomMetricsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.customMetrics != null && message.customMetrics.length) + for (var i = 0; i < message.customMetrics.length; ++i) + $root.google.analytics.admin.v1beta.CustomMetric.encode(message.customMetrics[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 ListCustomMetricsResponse message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.ListCustomMetricsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1beta.ListCustomMetricsResponse + * @static + * @param {google.analytics.admin.v1beta.IListCustomMetricsResponse} message ListCustomMetricsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListCustomMetricsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListCustomMetricsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1beta.ListCustomMetricsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1beta.ListCustomMetricsResponse} ListCustomMetricsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListCustomMetricsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1beta.ListCustomMetricsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.customMetrics && message.customMetrics.length)) + message.customMetrics = []; + message.customMetrics.push($root.google.analytics.admin.v1beta.CustomMetric.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListCustomMetricsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1beta.ListCustomMetricsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1beta.ListCustomMetricsResponse} ListCustomMetricsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListCustomMetricsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListCustomMetricsResponse message. + * @function verify + * @memberof google.analytics.admin.v1beta.ListCustomMetricsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListCustomMetricsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.customMetrics != null && message.hasOwnProperty("customMetrics")) { + if (!Array.isArray(message.customMetrics)) + return "customMetrics: array expected"; + for (var i = 0; i < message.customMetrics.length; ++i) { + var error = $root.google.analytics.admin.v1beta.CustomMetric.verify(message.customMetrics[i]); + if (error) + return "customMetrics." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListCustomMetricsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1beta.ListCustomMetricsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1beta.ListCustomMetricsResponse} ListCustomMetricsResponse + */ + ListCustomMetricsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1beta.ListCustomMetricsResponse) + return object; + var message = new $root.google.analytics.admin.v1beta.ListCustomMetricsResponse(); + if (object.customMetrics) { + if (!Array.isArray(object.customMetrics)) + throw TypeError(".google.analytics.admin.v1beta.ListCustomMetricsResponse.customMetrics: array expected"); + message.customMetrics = []; + for (var i = 0; i < object.customMetrics.length; ++i) { + if (typeof object.customMetrics[i] !== "object") + throw TypeError(".google.analytics.admin.v1beta.ListCustomMetricsResponse.customMetrics: object expected"); + message.customMetrics[i] = $root.google.analytics.admin.v1beta.CustomMetric.fromObject(object.customMetrics[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListCustomMetricsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1beta.ListCustomMetricsResponse + * @static + * @param {google.analytics.admin.v1beta.ListCustomMetricsResponse} message ListCustomMetricsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListCustomMetricsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.customMetrics = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.customMetrics && message.customMetrics.length) { + object.customMetrics = []; + for (var j = 0; j < message.customMetrics.length; ++j) + object.customMetrics[j] = $root.google.analytics.admin.v1beta.CustomMetric.toObject(message.customMetrics[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListCustomMetricsResponse to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1beta.ListCustomMetricsResponse + * @instance + * @returns {Object.} JSON object + */ + ListCustomMetricsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListCustomMetricsResponse + * @function getTypeUrl + * @memberof google.analytics.admin.v1beta.ListCustomMetricsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListCustomMetricsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1beta.ListCustomMetricsResponse"; + }; + + return ListCustomMetricsResponse; + })(); + + v1beta.ArchiveCustomMetricRequest = (function() { + + /** + * Properties of an ArchiveCustomMetricRequest. + * @memberof google.analytics.admin.v1beta + * @interface IArchiveCustomMetricRequest + * @property {string|null} [name] ArchiveCustomMetricRequest name + */ + + /** + * Constructs a new ArchiveCustomMetricRequest. + * @memberof google.analytics.admin.v1beta + * @classdesc Represents an ArchiveCustomMetricRequest. + * @implements IArchiveCustomMetricRequest + * @constructor + * @param {google.analytics.admin.v1beta.IArchiveCustomMetricRequest=} [properties] Properties to set + */ + function ArchiveCustomMetricRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ArchiveCustomMetricRequest name. + * @member {string} name + * @memberof google.analytics.admin.v1beta.ArchiveCustomMetricRequest + * @instance + */ + ArchiveCustomMetricRequest.prototype.name = ""; + + /** + * Creates a new ArchiveCustomMetricRequest instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1beta.ArchiveCustomMetricRequest + * @static + * @param {google.analytics.admin.v1beta.IArchiveCustomMetricRequest=} [properties] Properties to set + * @returns {google.analytics.admin.v1beta.ArchiveCustomMetricRequest} ArchiveCustomMetricRequest instance + */ + ArchiveCustomMetricRequest.create = function create(properties) { + return new ArchiveCustomMetricRequest(properties); + }; + + /** + * Encodes the specified ArchiveCustomMetricRequest message. Does not implicitly {@link google.analytics.admin.v1beta.ArchiveCustomMetricRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1beta.ArchiveCustomMetricRequest + * @static + * @param {google.analytics.admin.v1beta.IArchiveCustomMetricRequest} message ArchiveCustomMetricRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ArchiveCustomMetricRequest.encode = function encode(message, writer) { + 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 ArchiveCustomMetricRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.ArchiveCustomMetricRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1beta.ArchiveCustomMetricRequest + * @static + * @param {google.analytics.admin.v1beta.IArchiveCustomMetricRequest} message ArchiveCustomMetricRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ArchiveCustomMetricRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ArchiveCustomMetricRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1beta.ArchiveCustomMetricRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1beta.ArchiveCustomMetricRequest} ArchiveCustomMetricRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ArchiveCustomMetricRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1beta.ArchiveCustomMetricRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ArchiveCustomMetricRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1beta.ArchiveCustomMetricRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1beta.ArchiveCustomMetricRequest} ArchiveCustomMetricRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ArchiveCustomMetricRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ArchiveCustomMetricRequest message. + * @function verify + * @memberof google.analytics.admin.v1beta.ArchiveCustomMetricRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ArchiveCustomMetricRequest.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 an ArchiveCustomMetricRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1beta.ArchiveCustomMetricRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1beta.ArchiveCustomMetricRequest} ArchiveCustomMetricRequest + */ + ArchiveCustomMetricRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1beta.ArchiveCustomMetricRequest) + return object; + var message = new $root.google.analytics.admin.v1beta.ArchiveCustomMetricRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from an ArchiveCustomMetricRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1beta.ArchiveCustomMetricRequest + * @static + * @param {google.analytics.admin.v1beta.ArchiveCustomMetricRequest} message ArchiveCustomMetricRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ArchiveCustomMetricRequest.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 ArchiveCustomMetricRequest to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1beta.ArchiveCustomMetricRequest + * @instance + * @returns {Object.} JSON object + */ + ArchiveCustomMetricRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ArchiveCustomMetricRequest + * @function getTypeUrl + * @memberof google.analytics.admin.v1beta.ArchiveCustomMetricRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ArchiveCustomMetricRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1beta.ArchiveCustomMetricRequest"; + }; + + return ArchiveCustomMetricRequest; + })(); + + v1beta.GetCustomMetricRequest = (function() { + + /** + * Properties of a GetCustomMetricRequest. + * @memberof google.analytics.admin.v1beta + * @interface IGetCustomMetricRequest + * @property {string|null} [name] GetCustomMetricRequest name + */ + + /** + * Constructs a new GetCustomMetricRequest. + * @memberof google.analytics.admin.v1beta + * @classdesc Represents a GetCustomMetricRequest. + * @implements IGetCustomMetricRequest + * @constructor + * @param {google.analytics.admin.v1beta.IGetCustomMetricRequest=} [properties] Properties to set + */ + function GetCustomMetricRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetCustomMetricRequest name. + * @member {string} name + * @memberof google.analytics.admin.v1beta.GetCustomMetricRequest + * @instance + */ + GetCustomMetricRequest.prototype.name = ""; + + /** + * Creates a new GetCustomMetricRequest instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1beta.GetCustomMetricRequest + * @static + * @param {google.analytics.admin.v1beta.IGetCustomMetricRequest=} [properties] Properties to set + * @returns {google.analytics.admin.v1beta.GetCustomMetricRequest} GetCustomMetricRequest instance + */ + GetCustomMetricRequest.create = function create(properties) { + return new GetCustomMetricRequest(properties); + }; + + /** + * Encodes the specified GetCustomMetricRequest message. Does not implicitly {@link google.analytics.admin.v1beta.GetCustomMetricRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1beta.GetCustomMetricRequest + * @static + * @param {google.analytics.admin.v1beta.IGetCustomMetricRequest} message GetCustomMetricRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetCustomMetricRequest.encode = function encode(message, writer) { + 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 GetCustomMetricRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.GetCustomMetricRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1beta.GetCustomMetricRequest + * @static + * @param {google.analytics.admin.v1beta.IGetCustomMetricRequest} message GetCustomMetricRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetCustomMetricRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetCustomMetricRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1beta.GetCustomMetricRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1beta.GetCustomMetricRequest} GetCustomMetricRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetCustomMetricRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1beta.GetCustomMetricRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetCustomMetricRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1beta.GetCustomMetricRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1beta.GetCustomMetricRequest} GetCustomMetricRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetCustomMetricRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetCustomMetricRequest message. + * @function verify + * @memberof google.analytics.admin.v1beta.GetCustomMetricRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetCustomMetricRequest.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 GetCustomMetricRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1beta.GetCustomMetricRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1beta.GetCustomMetricRequest} GetCustomMetricRequest + */ + GetCustomMetricRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1beta.GetCustomMetricRequest) + return object; + var message = new $root.google.analytics.admin.v1beta.GetCustomMetricRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetCustomMetricRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1beta.GetCustomMetricRequest + * @static + * @param {google.analytics.admin.v1beta.GetCustomMetricRequest} message GetCustomMetricRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetCustomMetricRequest.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 GetCustomMetricRequest to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1beta.GetCustomMetricRequest + * @instance + * @returns {Object.} JSON object + */ + GetCustomMetricRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetCustomMetricRequest + * @function getTypeUrl + * @memberof google.analytics.admin.v1beta.GetCustomMetricRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetCustomMetricRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1beta.GetCustomMetricRequest"; + }; + + return GetCustomMetricRequest; + })(); + + v1beta.GetDataRetentionSettingsRequest = (function() { + + /** + * Properties of a GetDataRetentionSettingsRequest. + * @memberof google.analytics.admin.v1beta + * @interface IGetDataRetentionSettingsRequest + * @property {string|null} [name] GetDataRetentionSettingsRequest name + */ + + /** + * Constructs a new GetDataRetentionSettingsRequest. + * @memberof google.analytics.admin.v1beta + * @classdesc Represents a GetDataRetentionSettingsRequest. + * @implements IGetDataRetentionSettingsRequest + * @constructor + * @param {google.analytics.admin.v1beta.IGetDataRetentionSettingsRequest=} [properties] Properties to set + */ + function GetDataRetentionSettingsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetDataRetentionSettingsRequest name. + * @member {string} name + * @memberof google.analytics.admin.v1beta.GetDataRetentionSettingsRequest + * @instance + */ + GetDataRetentionSettingsRequest.prototype.name = ""; + + /** + * Creates a new GetDataRetentionSettingsRequest instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1beta.GetDataRetentionSettingsRequest + * @static + * @param {google.analytics.admin.v1beta.IGetDataRetentionSettingsRequest=} [properties] Properties to set + * @returns {google.analytics.admin.v1beta.GetDataRetentionSettingsRequest} GetDataRetentionSettingsRequest instance + */ + GetDataRetentionSettingsRequest.create = function create(properties) { + return new GetDataRetentionSettingsRequest(properties); + }; + + /** + * Encodes the specified GetDataRetentionSettingsRequest message. Does not implicitly {@link google.analytics.admin.v1beta.GetDataRetentionSettingsRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1beta.GetDataRetentionSettingsRequest + * @static + * @param {google.analytics.admin.v1beta.IGetDataRetentionSettingsRequest} message GetDataRetentionSettingsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetDataRetentionSettingsRequest.encode = function encode(message, writer) { + 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 GetDataRetentionSettingsRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.GetDataRetentionSettingsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1beta.GetDataRetentionSettingsRequest + * @static + * @param {google.analytics.admin.v1beta.IGetDataRetentionSettingsRequest} message GetDataRetentionSettingsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetDataRetentionSettingsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetDataRetentionSettingsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1beta.GetDataRetentionSettingsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1beta.GetDataRetentionSettingsRequest} GetDataRetentionSettingsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetDataRetentionSettingsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1beta.GetDataRetentionSettingsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetDataRetentionSettingsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1beta.GetDataRetentionSettingsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1beta.GetDataRetentionSettingsRequest} GetDataRetentionSettingsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetDataRetentionSettingsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetDataRetentionSettingsRequest message. + * @function verify + * @memberof google.analytics.admin.v1beta.GetDataRetentionSettingsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetDataRetentionSettingsRequest.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 GetDataRetentionSettingsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1beta.GetDataRetentionSettingsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1beta.GetDataRetentionSettingsRequest} GetDataRetentionSettingsRequest + */ + GetDataRetentionSettingsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1beta.GetDataRetentionSettingsRequest) + return object; + var message = new $root.google.analytics.admin.v1beta.GetDataRetentionSettingsRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetDataRetentionSettingsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1beta.GetDataRetentionSettingsRequest + * @static + * @param {google.analytics.admin.v1beta.GetDataRetentionSettingsRequest} message GetDataRetentionSettingsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetDataRetentionSettingsRequest.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 GetDataRetentionSettingsRequest to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1beta.GetDataRetentionSettingsRequest + * @instance + * @returns {Object.} JSON object + */ + GetDataRetentionSettingsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetDataRetentionSettingsRequest + * @function getTypeUrl + * @memberof google.analytics.admin.v1beta.GetDataRetentionSettingsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetDataRetentionSettingsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1beta.GetDataRetentionSettingsRequest"; + }; + + return GetDataRetentionSettingsRequest; + })(); + + v1beta.UpdateDataRetentionSettingsRequest = (function() { + + /** + * Properties of an UpdateDataRetentionSettingsRequest. + * @memberof google.analytics.admin.v1beta + * @interface IUpdateDataRetentionSettingsRequest + * @property {google.analytics.admin.v1beta.IDataRetentionSettings|null} [dataRetentionSettings] UpdateDataRetentionSettingsRequest dataRetentionSettings + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateDataRetentionSettingsRequest updateMask + */ + + /** + * Constructs a new UpdateDataRetentionSettingsRequest. + * @memberof google.analytics.admin.v1beta + * @classdesc Represents an UpdateDataRetentionSettingsRequest. + * @implements IUpdateDataRetentionSettingsRequest + * @constructor + * @param {google.analytics.admin.v1beta.IUpdateDataRetentionSettingsRequest=} [properties] Properties to set + */ + function UpdateDataRetentionSettingsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateDataRetentionSettingsRequest dataRetentionSettings. + * @member {google.analytics.admin.v1beta.IDataRetentionSettings|null|undefined} dataRetentionSettings + * @memberof google.analytics.admin.v1beta.UpdateDataRetentionSettingsRequest + * @instance + */ + UpdateDataRetentionSettingsRequest.prototype.dataRetentionSettings = null; + + /** + * UpdateDataRetentionSettingsRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.analytics.admin.v1beta.UpdateDataRetentionSettingsRequest + * @instance + */ + UpdateDataRetentionSettingsRequest.prototype.updateMask = null; + + /** + * Creates a new UpdateDataRetentionSettingsRequest instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1beta.UpdateDataRetentionSettingsRequest + * @static + * @param {google.analytics.admin.v1beta.IUpdateDataRetentionSettingsRequest=} [properties] Properties to set + * @returns {google.analytics.admin.v1beta.UpdateDataRetentionSettingsRequest} UpdateDataRetentionSettingsRequest instance + */ + UpdateDataRetentionSettingsRequest.create = function create(properties) { + return new UpdateDataRetentionSettingsRequest(properties); + }; + + /** + * Encodes the specified UpdateDataRetentionSettingsRequest message. Does not implicitly {@link google.analytics.admin.v1beta.UpdateDataRetentionSettingsRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1beta.UpdateDataRetentionSettingsRequest + * @static + * @param {google.analytics.admin.v1beta.IUpdateDataRetentionSettingsRequest} message UpdateDataRetentionSettingsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateDataRetentionSettingsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dataRetentionSettings != null && Object.hasOwnProperty.call(message, "dataRetentionSettings")) + $root.google.analytics.admin.v1beta.DataRetentionSettings.encode(message.dataRetentionSettings, 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 UpdateDataRetentionSettingsRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.UpdateDataRetentionSettingsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1beta.UpdateDataRetentionSettingsRequest + * @static + * @param {google.analytics.admin.v1beta.IUpdateDataRetentionSettingsRequest} message UpdateDataRetentionSettingsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateDataRetentionSettingsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateDataRetentionSettingsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1beta.UpdateDataRetentionSettingsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1beta.UpdateDataRetentionSettingsRequest} UpdateDataRetentionSettingsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateDataRetentionSettingsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1beta.UpdateDataRetentionSettingsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.dataRetentionSettings = $root.google.analytics.admin.v1beta.DataRetentionSettings.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 UpdateDataRetentionSettingsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1beta.UpdateDataRetentionSettingsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1beta.UpdateDataRetentionSettingsRequest} UpdateDataRetentionSettingsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateDataRetentionSettingsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateDataRetentionSettingsRequest message. + * @function verify + * @memberof google.analytics.admin.v1beta.UpdateDataRetentionSettingsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateDataRetentionSettingsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dataRetentionSettings != null && message.hasOwnProperty("dataRetentionSettings")) { + var error = $root.google.analytics.admin.v1beta.DataRetentionSettings.verify(message.dataRetentionSettings); + if (error) + return "dataRetentionSettings." + 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 UpdateDataRetentionSettingsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1beta.UpdateDataRetentionSettingsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1beta.UpdateDataRetentionSettingsRequest} UpdateDataRetentionSettingsRequest + */ + UpdateDataRetentionSettingsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1beta.UpdateDataRetentionSettingsRequest) + return object; + var message = new $root.google.analytics.admin.v1beta.UpdateDataRetentionSettingsRequest(); + if (object.dataRetentionSettings != null) { + if (typeof object.dataRetentionSettings !== "object") + throw TypeError(".google.analytics.admin.v1beta.UpdateDataRetentionSettingsRequest.dataRetentionSettings: object expected"); + message.dataRetentionSettings = $root.google.analytics.admin.v1beta.DataRetentionSettings.fromObject(object.dataRetentionSettings); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.analytics.admin.v1beta.UpdateDataRetentionSettingsRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + return message; + }; + + /** + * Creates a plain object from an UpdateDataRetentionSettingsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1beta.UpdateDataRetentionSettingsRequest + * @static + * @param {google.analytics.admin.v1beta.UpdateDataRetentionSettingsRequest} message UpdateDataRetentionSettingsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateDataRetentionSettingsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.dataRetentionSettings = null; + object.updateMask = null; + } + if (message.dataRetentionSettings != null && message.hasOwnProperty("dataRetentionSettings")) + object.dataRetentionSettings = $root.google.analytics.admin.v1beta.DataRetentionSettings.toObject(message.dataRetentionSettings, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + return object; + }; + + /** + * Converts this UpdateDataRetentionSettingsRequest to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1beta.UpdateDataRetentionSettingsRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateDataRetentionSettingsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateDataRetentionSettingsRequest + * @function getTypeUrl + * @memberof google.analytics.admin.v1beta.UpdateDataRetentionSettingsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateDataRetentionSettingsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1beta.UpdateDataRetentionSettingsRequest"; + }; + + return UpdateDataRetentionSettingsRequest; + })(); + + v1beta.CreateDataStreamRequest = (function() { + + /** + * Properties of a CreateDataStreamRequest. + * @memberof google.analytics.admin.v1beta + * @interface ICreateDataStreamRequest + * @property {string|null} [parent] CreateDataStreamRequest parent + * @property {google.analytics.admin.v1beta.IDataStream|null} [dataStream] CreateDataStreamRequest dataStream + */ + + /** + * Constructs a new CreateDataStreamRequest. + * @memberof google.analytics.admin.v1beta + * @classdesc Represents a CreateDataStreamRequest. + * @implements ICreateDataStreamRequest + * @constructor + * @param {google.analytics.admin.v1beta.ICreateDataStreamRequest=} [properties] Properties to set + */ + function CreateDataStreamRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateDataStreamRequest parent. + * @member {string} parent + * @memberof google.analytics.admin.v1beta.CreateDataStreamRequest + * @instance + */ + CreateDataStreamRequest.prototype.parent = ""; + + /** + * CreateDataStreamRequest dataStream. + * @member {google.analytics.admin.v1beta.IDataStream|null|undefined} dataStream + * @memberof google.analytics.admin.v1beta.CreateDataStreamRequest + * @instance + */ + CreateDataStreamRequest.prototype.dataStream = null; + + /** + * Creates a new CreateDataStreamRequest instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1beta.CreateDataStreamRequest + * @static + * @param {google.analytics.admin.v1beta.ICreateDataStreamRequest=} [properties] Properties to set + * @returns {google.analytics.admin.v1beta.CreateDataStreamRequest} CreateDataStreamRequest instance + */ + CreateDataStreamRequest.create = function create(properties) { + return new CreateDataStreamRequest(properties); + }; + + /** + * Encodes the specified CreateDataStreamRequest message. Does not implicitly {@link google.analytics.admin.v1beta.CreateDataStreamRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1beta.CreateDataStreamRequest + * @static + * @param {google.analytics.admin.v1beta.ICreateDataStreamRequest} message CreateDataStreamRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateDataStreamRequest.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.dataStream != null && Object.hasOwnProperty.call(message, "dataStream")) + $root.google.analytics.admin.v1beta.DataStream.encode(message.dataStream, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CreateDataStreamRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.CreateDataStreamRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1beta.CreateDataStreamRequest + * @static + * @param {google.analytics.admin.v1beta.ICreateDataStreamRequest} message CreateDataStreamRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateDataStreamRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateDataStreamRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1beta.CreateDataStreamRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1beta.CreateDataStreamRequest} CreateDataStreamRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateDataStreamRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1beta.CreateDataStreamRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.dataStream = $root.google.analytics.admin.v1beta.DataStream.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateDataStreamRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1beta.CreateDataStreamRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1beta.CreateDataStreamRequest} CreateDataStreamRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateDataStreamRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateDataStreamRequest message. + * @function verify + * @memberof google.analytics.admin.v1beta.CreateDataStreamRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateDataStreamRequest.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.dataStream != null && message.hasOwnProperty("dataStream")) { + var error = $root.google.analytics.admin.v1beta.DataStream.verify(message.dataStream); + if (error) + return "dataStream." + error; + } + return null; + }; + + /** + * Creates a CreateDataStreamRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1beta.CreateDataStreamRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1beta.CreateDataStreamRequest} CreateDataStreamRequest + */ + CreateDataStreamRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1beta.CreateDataStreamRequest) + return object; + var message = new $root.google.analytics.admin.v1beta.CreateDataStreamRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.dataStream != null) { + if (typeof object.dataStream !== "object") + throw TypeError(".google.analytics.admin.v1beta.CreateDataStreamRequest.dataStream: object expected"); + message.dataStream = $root.google.analytics.admin.v1beta.DataStream.fromObject(object.dataStream); + } + return message; + }; + + /** + * Creates a plain object from a CreateDataStreamRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1beta.CreateDataStreamRequest + * @static + * @param {google.analytics.admin.v1beta.CreateDataStreamRequest} message CreateDataStreamRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateDataStreamRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.dataStream = null; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.dataStream != null && message.hasOwnProperty("dataStream")) + object.dataStream = $root.google.analytics.admin.v1beta.DataStream.toObject(message.dataStream, options); + return object; + }; + + /** + * Converts this CreateDataStreamRequest to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1beta.CreateDataStreamRequest + * @instance + * @returns {Object.} JSON object + */ + CreateDataStreamRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateDataStreamRequest + * @function getTypeUrl + * @memberof google.analytics.admin.v1beta.CreateDataStreamRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateDataStreamRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1beta.CreateDataStreamRequest"; + }; + + return CreateDataStreamRequest; + })(); + + v1beta.DeleteDataStreamRequest = (function() { + + /** + * Properties of a DeleteDataStreamRequest. + * @memberof google.analytics.admin.v1beta + * @interface IDeleteDataStreamRequest + * @property {string|null} [name] DeleteDataStreamRequest name + */ + + /** + * Constructs a new DeleteDataStreamRequest. + * @memberof google.analytics.admin.v1beta + * @classdesc Represents a DeleteDataStreamRequest. + * @implements IDeleteDataStreamRequest + * @constructor + * @param {google.analytics.admin.v1beta.IDeleteDataStreamRequest=} [properties] Properties to set + */ + function DeleteDataStreamRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteDataStreamRequest name. + * @member {string} name + * @memberof google.analytics.admin.v1beta.DeleteDataStreamRequest + * @instance + */ + DeleteDataStreamRequest.prototype.name = ""; + + /** + * Creates a new DeleteDataStreamRequest instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1beta.DeleteDataStreamRequest + * @static + * @param {google.analytics.admin.v1beta.IDeleteDataStreamRequest=} [properties] Properties to set + * @returns {google.analytics.admin.v1beta.DeleteDataStreamRequest} DeleteDataStreamRequest instance + */ + DeleteDataStreamRequest.create = function create(properties) { + return new DeleteDataStreamRequest(properties); + }; + + /** + * Encodes the specified DeleteDataStreamRequest message. Does not implicitly {@link google.analytics.admin.v1beta.DeleteDataStreamRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1beta.DeleteDataStreamRequest + * @static + * @param {google.analytics.admin.v1beta.IDeleteDataStreamRequest} message DeleteDataStreamRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteDataStreamRequest.encode = function encode(message, writer) { + 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 DeleteDataStreamRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.DeleteDataStreamRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1beta.DeleteDataStreamRequest + * @static + * @param {google.analytics.admin.v1beta.IDeleteDataStreamRequest} message DeleteDataStreamRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteDataStreamRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteDataStreamRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1beta.DeleteDataStreamRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1beta.DeleteDataStreamRequest} DeleteDataStreamRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteDataStreamRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1beta.DeleteDataStreamRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteDataStreamRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1beta.DeleteDataStreamRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1beta.DeleteDataStreamRequest} DeleteDataStreamRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteDataStreamRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteDataStreamRequest message. + * @function verify + * @memberof google.analytics.admin.v1beta.DeleteDataStreamRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteDataStreamRequest.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 DeleteDataStreamRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1beta.DeleteDataStreamRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1beta.DeleteDataStreamRequest} DeleteDataStreamRequest + */ + DeleteDataStreamRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1beta.DeleteDataStreamRequest) + return object; + var message = new $root.google.analytics.admin.v1beta.DeleteDataStreamRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteDataStreamRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1beta.DeleteDataStreamRequest + * @static + * @param {google.analytics.admin.v1beta.DeleteDataStreamRequest} message DeleteDataStreamRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteDataStreamRequest.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 DeleteDataStreamRequest to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1beta.DeleteDataStreamRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteDataStreamRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteDataStreamRequest + * @function getTypeUrl + * @memberof google.analytics.admin.v1beta.DeleteDataStreamRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteDataStreamRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1beta.DeleteDataStreamRequest"; + }; + + return DeleteDataStreamRequest; + })(); + + v1beta.UpdateDataStreamRequest = (function() { + + /** + * Properties of an UpdateDataStreamRequest. + * @memberof google.analytics.admin.v1beta + * @interface IUpdateDataStreamRequest + * @property {google.analytics.admin.v1beta.IDataStream|null} [dataStream] UpdateDataStreamRequest dataStream + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateDataStreamRequest updateMask + */ + + /** + * Constructs a new UpdateDataStreamRequest. + * @memberof google.analytics.admin.v1beta + * @classdesc Represents an UpdateDataStreamRequest. + * @implements IUpdateDataStreamRequest + * @constructor + * @param {google.analytics.admin.v1beta.IUpdateDataStreamRequest=} [properties] Properties to set + */ + function UpdateDataStreamRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateDataStreamRequest dataStream. + * @member {google.analytics.admin.v1beta.IDataStream|null|undefined} dataStream + * @memberof google.analytics.admin.v1beta.UpdateDataStreamRequest + * @instance + */ + UpdateDataStreamRequest.prototype.dataStream = null; + + /** + * UpdateDataStreamRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.analytics.admin.v1beta.UpdateDataStreamRequest + * @instance + */ + UpdateDataStreamRequest.prototype.updateMask = null; + + /** + * Creates a new UpdateDataStreamRequest instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1beta.UpdateDataStreamRequest + * @static + * @param {google.analytics.admin.v1beta.IUpdateDataStreamRequest=} [properties] Properties to set + * @returns {google.analytics.admin.v1beta.UpdateDataStreamRequest} UpdateDataStreamRequest instance + */ + UpdateDataStreamRequest.create = function create(properties) { + return new UpdateDataStreamRequest(properties); + }; + + /** + * Encodes the specified UpdateDataStreamRequest message. Does not implicitly {@link google.analytics.admin.v1beta.UpdateDataStreamRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1beta.UpdateDataStreamRequest + * @static + * @param {google.analytics.admin.v1beta.IUpdateDataStreamRequest} message UpdateDataStreamRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateDataStreamRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dataStream != null && Object.hasOwnProperty.call(message, "dataStream")) + $root.google.analytics.admin.v1beta.DataStream.encode(message.dataStream, 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 UpdateDataStreamRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.UpdateDataStreamRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1beta.UpdateDataStreamRequest + * @static + * @param {google.analytics.admin.v1beta.IUpdateDataStreamRequest} message UpdateDataStreamRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateDataStreamRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateDataStreamRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1beta.UpdateDataStreamRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1beta.UpdateDataStreamRequest} UpdateDataStreamRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateDataStreamRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1beta.UpdateDataStreamRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.dataStream = $root.google.analytics.admin.v1beta.DataStream.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 UpdateDataStreamRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1beta.UpdateDataStreamRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1beta.UpdateDataStreamRequest} UpdateDataStreamRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateDataStreamRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateDataStreamRequest message. + * @function verify + * @memberof google.analytics.admin.v1beta.UpdateDataStreamRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateDataStreamRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dataStream != null && message.hasOwnProperty("dataStream")) { + var error = $root.google.analytics.admin.v1beta.DataStream.verify(message.dataStream); + if (error) + return "dataStream." + 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 UpdateDataStreamRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1beta.UpdateDataStreamRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1beta.UpdateDataStreamRequest} UpdateDataStreamRequest + */ + UpdateDataStreamRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1beta.UpdateDataStreamRequest) + return object; + var message = new $root.google.analytics.admin.v1beta.UpdateDataStreamRequest(); + if (object.dataStream != null) { + if (typeof object.dataStream !== "object") + throw TypeError(".google.analytics.admin.v1beta.UpdateDataStreamRequest.dataStream: object expected"); + message.dataStream = $root.google.analytics.admin.v1beta.DataStream.fromObject(object.dataStream); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.analytics.admin.v1beta.UpdateDataStreamRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + return message; + }; + + /** + * Creates a plain object from an UpdateDataStreamRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1beta.UpdateDataStreamRequest + * @static + * @param {google.analytics.admin.v1beta.UpdateDataStreamRequest} message UpdateDataStreamRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateDataStreamRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.dataStream = null; + object.updateMask = null; + } + if (message.dataStream != null && message.hasOwnProperty("dataStream")) + object.dataStream = $root.google.analytics.admin.v1beta.DataStream.toObject(message.dataStream, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + return object; + }; + + /** + * Converts this UpdateDataStreamRequest to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1beta.UpdateDataStreamRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateDataStreamRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateDataStreamRequest + * @function getTypeUrl + * @memberof google.analytics.admin.v1beta.UpdateDataStreamRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateDataStreamRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1beta.UpdateDataStreamRequest"; + }; + + return UpdateDataStreamRequest; + })(); + + v1beta.ListDataStreamsRequest = (function() { + + /** + * Properties of a ListDataStreamsRequest. + * @memberof google.analytics.admin.v1beta + * @interface IListDataStreamsRequest + * @property {string|null} [parent] ListDataStreamsRequest parent + * @property {number|null} [pageSize] ListDataStreamsRequest pageSize + * @property {string|null} [pageToken] ListDataStreamsRequest pageToken + */ + + /** + * Constructs a new ListDataStreamsRequest. + * @memberof google.analytics.admin.v1beta + * @classdesc Represents a ListDataStreamsRequest. + * @implements IListDataStreamsRequest + * @constructor + * @param {google.analytics.admin.v1beta.IListDataStreamsRequest=} [properties] Properties to set + */ + function ListDataStreamsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListDataStreamsRequest parent. + * @member {string} parent + * @memberof google.analytics.admin.v1beta.ListDataStreamsRequest + * @instance + */ + ListDataStreamsRequest.prototype.parent = ""; + + /** + * ListDataStreamsRequest pageSize. + * @member {number} pageSize + * @memberof google.analytics.admin.v1beta.ListDataStreamsRequest + * @instance + */ + ListDataStreamsRequest.prototype.pageSize = 0; + + /** + * ListDataStreamsRequest pageToken. + * @member {string} pageToken + * @memberof google.analytics.admin.v1beta.ListDataStreamsRequest + * @instance + */ + ListDataStreamsRequest.prototype.pageToken = ""; + + /** + * Creates a new ListDataStreamsRequest instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1beta.ListDataStreamsRequest + * @static + * @param {google.analytics.admin.v1beta.IListDataStreamsRequest=} [properties] Properties to set + * @returns {google.analytics.admin.v1beta.ListDataStreamsRequest} ListDataStreamsRequest instance + */ + ListDataStreamsRequest.create = function create(properties) { + return new ListDataStreamsRequest(properties); + }; + + /** + * Encodes the specified ListDataStreamsRequest message. Does not implicitly {@link google.analytics.admin.v1beta.ListDataStreamsRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1beta.ListDataStreamsRequest + * @static + * @param {google.analytics.admin.v1beta.IListDataStreamsRequest} message ListDataStreamsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListDataStreamsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + return writer; + }; + + /** + * Encodes the specified ListDataStreamsRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.ListDataStreamsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1beta.ListDataStreamsRequest + * @static + * @param {google.analytics.admin.v1beta.IListDataStreamsRequest} message ListDataStreamsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListDataStreamsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListDataStreamsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1beta.ListDataStreamsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1beta.ListDataStreamsRequest} ListDataStreamsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListDataStreamsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1beta.ListDataStreamsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListDataStreamsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1beta.ListDataStreamsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1beta.ListDataStreamsRequest} ListDataStreamsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListDataStreamsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListDataStreamsRequest message. + * @function verify + * @memberof google.analytics.admin.v1beta.ListDataStreamsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListDataStreamsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + return null; + }; + + /** + * Creates a ListDataStreamsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1beta.ListDataStreamsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1beta.ListDataStreamsRequest} ListDataStreamsRequest + */ + ListDataStreamsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1beta.ListDataStreamsRequest) + return object; + var message = new $root.google.analytics.admin.v1beta.ListDataStreamsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + return message; + }; + + /** + * Creates a plain object from a ListDataStreamsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1beta.ListDataStreamsRequest + * @static + * @param {google.analytics.admin.v1beta.ListDataStreamsRequest} message ListDataStreamsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListDataStreamsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + return object; + }; + + /** + * Converts this ListDataStreamsRequest to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1beta.ListDataStreamsRequest + * @instance + * @returns {Object.} JSON object + */ + ListDataStreamsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListDataStreamsRequest + * @function getTypeUrl + * @memberof google.analytics.admin.v1beta.ListDataStreamsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListDataStreamsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1beta.ListDataStreamsRequest"; + }; + + return ListDataStreamsRequest; + })(); + + v1beta.ListDataStreamsResponse = (function() { + + /** + * Properties of a ListDataStreamsResponse. + * @memberof google.analytics.admin.v1beta + * @interface IListDataStreamsResponse + * @property {Array.|null} [dataStreams] ListDataStreamsResponse dataStreams + * @property {string|null} [nextPageToken] ListDataStreamsResponse nextPageToken + */ + + /** + * Constructs a new ListDataStreamsResponse. + * @memberof google.analytics.admin.v1beta + * @classdesc Represents a ListDataStreamsResponse. + * @implements IListDataStreamsResponse + * @constructor + * @param {google.analytics.admin.v1beta.IListDataStreamsResponse=} [properties] Properties to set + */ + function ListDataStreamsResponse(properties) { + this.dataStreams = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListDataStreamsResponse dataStreams. + * @member {Array.} dataStreams + * @memberof google.analytics.admin.v1beta.ListDataStreamsResponse + * @instance + */ + ListDataStreamsResponse.prototype.dataStreams = $util.emptyArray; + + /** + * ListDataStreamsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.analytics.admin.v1beta.ListDataStreamsResponse + * @instance + */ + ListDataStreamsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListDataStreamsResponse instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1beta.ListDataStreamsResponse + * @static + * @param {google.analytics.admin.v1beta.IListDataStreamsResponse=} [properties] Properties to set + * @returns {google.analytics.admin.v1beta.ListDataStreamsResponse} ListDataStreamsResponse instance + */ + ListDataStreamsResponse.create = function create(properties) { + return new ListDataStreamsResponse(properties); + }; + + /** + * Encodes the specified ListDataStreamsResponse message. Does not implicitly {@link google.analytics.admin.v1beta.ListDataStreamsResponse.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1beta.ListDataStreamsResponse + * @static + * @param {google.analytics.admin.v1beta.IListDataStreamsResponse} message ListDataStreamsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListDataStreamsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dataStreams != null && message.dataStreams.length) + for (var i = 0; i < message.dataStreams.length; ++i) + $root.google.analytics.admin.v1beta.DataStream.encode(message.dataStreams[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 ListDataStreamsResponse message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.ListDataStreamsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1beta.ListDataStreamsResponse + * @static + * @param {google.analytics.admin.v1beta.IListDataStreamsResponse} message ListDataStreamsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListDataStreamsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListDataStreamsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1beta.ListDataStreamsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1beta.ListDataStreamsResponse} ListDataStreamsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListDataStreamsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1beta.ListDataStreamsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.dataStreams && message.dataStreams.length)) + message.dataStreams = []; + message.dataStreams.push($root.google.analytics.admin.v1beta.DataStream.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListDataStreamsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1beta.ListDataStreamsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1beta.ListDataStreamsResponse} ListDataStreamsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListDataStreamsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListDataStreamsResponse message. + * @function verify + * @memberof google.analytics.admin.v1beta.ListDataStreamsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListDataStreamsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dataStreams != null && message.hasOwnProperty("dataStreams")) { + if (!Array.isArray(message.dataStreams)) + return "dataStreams: array expected"; + for (var i = 0; i < message.dataStreams.length; ++i) { + var error = $root.google.analytics.admin.v1beta.DataStream.verify(message.dataStreams[i]); + if (error) + return "dataStreams." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListDataStreamsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1beta.ListDataStreamsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1beta.ListDataStreamsResponse} ListDataStreamsResponse + */ + ListDataStreamsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1beta.ListDataStreamsResponse) + return object; + var message = new $root.google.analytics.admin.v1beta.ListDataStreamsResponse(); + if (object.dataStreams) { + if (!Array.isArray(object.dataStreams)) + throw TypeError(".google.analytics.admin.v1beta.ListDataStreamsResponse.dataStreams: array expected"); + message.dataStreams = []; + for (var i = 0; i < object.dataStreams.length; ++i) { + if (typeof object.dataStreams[i] !== "object") + throw TypeError(".google.analytics.admin.v1beta.ListDataStreamsResponse.dataStreams: object expected"); + message.dataStreams[i] = $root.google.analytics.admin.v1beta.DataStream.fromObject(object.dataStreams[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListDataStreamsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1beta.ListDataStreamsResponse + * @static + * @param {google.analytics.admin.v1beta.ListDataStreamsResponse} message ListDataStreamsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListDataStreamsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.dataStreams = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.dataStreams && message.dataStreams.length) { + object.dataStreams = []; + for (var j = 0; j < message.dataStreams.length; ++j) + object.dataStreams[j] = $root.google.analytics.admin.v1beta.DataStream.toObject(message.dataStreams[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListDataStreamsResponse to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1beta.ListDataStreamsResponse + * @instance + * @returns {Object.} JSON object + */ + ListDataStreamsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListDataStreamsResponse + * @function getTypeUrl + * @memberof google.analytics.admin.v1beta.ListDataStreamsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListDataStreamsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1beta.ListDataStreamsResponse"; + }; + + return ListDataStreamsResponse; + })(); + + v1beta.GetDataStreamRequest = (function() { + + /** + * Properties of a GetDataStreamRequest. + * @memberof google.analytics.admin.v1beta + * @interface IGetDataStreamRequest + * @property {string|null} [name] GetDataStreamRequest name + */ + + /** + * Constructs a new GetDataStreamRequest. + * @memberof google.analytics.admin.v1beta + * @classdesc Represents a GetDataStreamRequest. + * @implements IGetDataStreamRequest + * @constructor + * @param {google.analytics.admin.v1beta.IGetDataStreamRequest=} [properties] Properties to set + */ + function GetDataStreamRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetDataStreamRequest name. + * @member {string} name + * @memberof google.analytics.admin.v1beta.GetDataStreamRequest + * @instance + */ + GetDataStreamRequest.prototype.name = ""; + + /** + * Creates a new GetDataStreamRequest instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1beta.GetDataStreamRequest + * @static + * @param {google.analytics.admin.v1beta.IGetDataStreamRequest=} [properties] Properties to set + * @returns {google.analytics.admin.v1beta.GetDataStreamRequest} GetDataStreamRequest instance + */ + GetDataStreamRequest.create = function create(properties) { + return new GetDataStreamRequest(properties); + }; + + /** + * Encodes the specified GetDataStreamRequest message. Does not implicitly {@link google.analytics.admin.v1beta.GetDataStreamRequest.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1beta.GetDataStreamRequest + * @static + * @param {google.analytics.admin.v1beta.IGetDataStreamRequest} message GetDataStreamRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetDataStreamRequest.encode = function encode(message, writer) { + 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 GetDataStreamRequest message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.GetDataStreamRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1beta.GetDataStreamRequest + * @static + * @param {google.analytics.admin.v1beta.IGetDataStreamRequest} message GetDataStreamRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetDataStreamRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetDataStreamRequest message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1beta.GetDataStreamRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1beta.GetDataStreamRequest} GetDataStreamRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetDataStreamRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1beta.GetDataStreamRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetDataStreamRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1beta.GetDataStreamRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1beta.GetDataStreamRequest} GetDataStreamRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetDataStreamRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetDataStreamRequest message. + * @function verify + * @memberof google.analytics.admin.v1beta.GetDataStreamRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetDataStreamRequest.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 GetDataStreamRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1beta.GetDataStreamRequest + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1beta.GetDataStreamRequest} GetDataStreamRequest + */ + GetDataStreamRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1beta.GetDataStreamRequest) + return object; + var message = new $root.google.analytics.admin.v1beta.GetDataStreamRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetDataStreamRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1beta.GetDataStreamRequest + * @static + * @param {google.analytics.admin.v1beta.GetDataStreamRequest} message GetDataStreamRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetDataStreamRequest.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 GetDataStreamRequest to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1beta.GetDataStreamRequest + * @instance + * @returns {Object.} JSON object + */ + GetDataStreamRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetDataStreamRequest + * @function getTypeUrl + * @memberof google.analytics.admin.v1beta.GetDataStreamRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetDataStreamRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1beta.GetDataStreamRequest"; + }; + + return GetDataStreamRequest; + })(); + + /** + * IndustryCategory enum. + * @name google.analytics.admin.v1beta.IndustryCategory + * @enum {number} + * @property {number} INDUSTRY_CATEGORY_UNSPECIFIED=0 INDUSTRY_CATEGORY_UNSPECIFIED value + * @property {number} AUTOMOTIVE=1 AUTOMOTIVE value + * @property {number} BUSINESS_AND_INDUSTRIAL_MARKETS=2 BUSINESS_AND_INDUSTRIAL_MARKETS value + * @property {number} FINANCE=3 FINANCE value + * @property {number} HEALTHCARE=4 HEALTHCARE value + * @property {number} TECHNOLOGY=5 TECHNOLOGY value + * @property {number} TRAVEL=6 TRAVEL value + * @property {number} OTHER=7 OTHER value + * @property {number} ARTS_AND_ENTERTAINMENT=8 ARTS_AND_ENTERTAINMENT value + * @property {number} BEAUTY_AND_FITNESS=9 BEAUTY_AND_FITNESS value + * @property {number} BOOKS_AND_LITERATURE=10 BOOKS_AND_LITERATURE value + * @property {number} FOOD_AND_DRINK=11 FOOD_AND_DRINK value + * @property {number} GAMES=12 GAMES value + * @property {number} HOBBIES_AND_LEISURE=13 HOBBIES_AND_LEISURE value + * @property {number} HOME_AND_GARDEN=14 HOME_AND_GARDEN value + * @property {number} INTERNET_AND_TELECOM=15 INTERNET_AND_TELECOM value + * @property {number} LAW_AND_GOVERNMENT=16 LAW_AND_GOVERNMENT value + * @property {number} NEWS=17 NEWS value + * @property {number} ONLINE_COMMUNITIES=18 ONLINE_COMMUNITIES value + * @property {number} PEOPLE_AND_SOCIETY=19 PEOPLE_AND_SOCIETY value + * @property {number} PETS_AND_ANIMALS=20 PETS_AND_ANIMALS value + * @property {number} REAL_ESTATE=21 REAL_ESTATE value + * @property {number} REFERENCE=22 REFERENCE value + * @property {number} SCIENCE=23 SCIENCE value + * @property {number} SPORTS=24 SPORTS value + * @property {number} JOBS_AND_EDUCATION=25 JOBS_AND_EDUCATION value + * @property {number} SHOPPING=26 SHOPPING value + */ + v1beta.IndustryCategory = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "INDUSTRY_CATEGORY_UNSPECIFIED"] = 0; + values[valuesById[1] = "AUTOMOTIVE"] = 1; + values[valuesById[2] = "BUSINESS_AND_INDUSTRIAL_MARKETS"] = 2; + values[valuesById[3] = "FINANCE"] = 3; + values[valuesById[4] = "HEALTHCARE"] = 4; + values[valuesById[5] = "TECHNOLOGY"] = 5; + values[valuesById[6] = "TRAVEL"] = 6; + values[valuesById[7] = "OTHER"] = 7; + values[valuesById[8] = "ARTS_AND_ENTERTAINMENT"] = 8; + values[valuesById[9] = "BEAUTY_AND_FITNESS"] = 9; + values[valuesById[10] = "BOOKS_AND_LITERATURE"] = 10; + values[valuesById[11] = "FOOD_AND_DRINK"] = 11; + values[valuesById[12] = "GAMES"] = 12; + values[valuesById[13] = "HOBBIES_AND_LEISURE"] = 13; + values[valuesById[14] = "HOME_AND_GARDEN"] = 14; + values[valuesById[15] = "INTERNET_AND_TELECOM"] = 15; + values[valuesById[16] = "LAW_AND_GOVERNMENT"] = 16; + values[valuesById[17] = "NEWS"] = 17; + values[valuesById[18] = "ONLINE_COMMUNITIES"] = 18; + values[valuesById[19] = "PEOPLE_AND_SOCIETY"] = 19; + values[valuesById[20] = "PETS_AND_ANIMALS"] = 20; + values[valuesById[21] = "REAL_ESTATE"] = 21; + values[valuesById[22] = "REFERENCE"] = 22; + values[valuesById[23] = "SCIENCE"] = 23; + values[valuesById[24] = "SPORTS"] = 24; + values[valuesById[25] = "JOBS_AND_EDUCATION"] = 25; + values[valuesById[26] = "SHOPPING"] = 26; + return values; + })(); + + /** + * ServiceLevel enum. + * @name google.analytics.admin.v1beta.ServiceLevel + * @enum {number} + * @property {number} SERVICE_LEVEL_UNSPECIFIED=0 SERVICE_LEVEL_UNSPECIFIED value + * @property {number} GOOGLE_ANALYTICS_STANDARD=1 GOOGLE_ANALYTICS_STANDARD value + * @property {number} GOOGLE_ANALYTICS_360=2 GOOGLE_ANALYTICS_360 value + */ + v1beta.ServiceLevel = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "SERVICE_LEVEL_UNSPECIFIED"] = 0; + values[valuesById[1] = "GOOGLE_ANALYTICS_STANDARD"] = 1; + values[valuesById[2] = "GOOGLE_ANALYTICS_360"] = 2; + return values; + })(); + + /** + * ActorType enum. + * @name google.analytics.admin.v1beta.ActorType + * @enum {number} + * @property {number} ACTOR_TYPE_UNSPECIFIED=0 ACTOR_TYPE_UNSPECIFIED value + * @property {number} USER=1 USER value + * @property {number} SYSTEM=2 SYSTEM value + * @property {number} SUPPORT=3 SUPPORT value + */ + v1beta.ActorType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ACTOR_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "USER"] = 1; + values[valuesById[2] = "SYSTEM"] = 2; + values[valuesById[3] = "SUPPORT"] = 3; + return values; + })(); + + /** + * ActionType enum. + * @name google.analytics.admin.v1beta.ActionType + * @enum {number} + * @property {number} ACTION_TYPE_UNSPECIFIED=0 ACTION_TYPE_UNSPECIFIED value + * @property {number} CREATED=1 CREATED value + * @property {number} UPDATED=2 UPDATED value + * @property {number} DELETED=3 DELETED value + */ + v1beta.ActionType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ACTION_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "CREATED"] = 1; + values[valuesById[2] = "UPDATED"] = 2; + values[valuesById[3] = "DELETED"] = 3; + return values; + })(); + + /** + * ChangeHistoryResourceType enum. + * @name google.analytics.admin.v1beta.ChangeHistoryResourceType + * @enum {number} + * @property {number} CHANGE_HISTORY_RESOURCE_TYPE_UNSPECIFIED=0 CHANGE_HISTORY_RESOURCE_TYPE_UNSPECIFIED value + * @property {number} ACCOUNT=1 ACCOUNT value + * @property {number} PROPERTY=2 PROPERTY value + * @property {number} FIREBASE_LINK=6 FIREBASE_LINK value + * @property {number} GOOGLE_ADS_LINK=7 GOOGLE_ADS_LINK value + * @property {number} GOOGLE_SIGNALS_SETTINGS=8 GOOGLE_SIGNALS_SETTINGS value + * @property {number} CONVERSION_EVENT=9 CONVERSION_EVENT value + * @property {number} MEASUREMENT_PROTOCOL_SECRET=10 MEASUREMENT_PROTOCOL_SECRET value + * @property {number} DATA_RETENTION_SETTINGS=13 DATA_RETENTION_SETTINGS value + * @property {number} DISPLAY_VIDEO_360_ADVERTISER_LINK=14 DISPLAY_VIDEO_360_ADVERTISER_LINK value + * @property {number} DISPLAY_VIDEO_360_ADVERTISER_LINK_PROPOSAL=15 DISPLAY_VIDEO_360_ADVERTISER_LINK_PROPOSAL value + * @property {number} DATA_STREAM=18 DATA_STREAM value + * @property {number} ATTRIBUTION_SETTINGS=20 ATTRIBUTION_SETTINGS value + */ + v1beta.ChangeHistoryResourceType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "CHANGE_HISTORY_RESOURCE_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "ACCOUNT"] = 1; + values[valuesById[2] = "PROPERTY"] = 2; + values[valuesById[6] = "FIREBASE_LINK"] = 6; + values[valuesById[7] = "GOOGLE_ADS_LINK"] = 7; + values[valuesById[8] = "GOOGLE_SIGNALS_SETTINGS"] = 8; + values[valuesById[9] = "CONVERSION_EVENT"] = 9; + values[valuesById[10] = "MEASUREMENT_PROTOCOL_SECRET"] = 10; + values[valuesById[13] = "DATA_RETENTION_SETTINGS"] = 13; + values[valuesById[14] = "DISPLAY_VIDEO_360_ADVERTISER_LINK"] = 14; + values[valuesById[15] = "DISPLAY_VIDEO_360_ADVERTISER_LINK_PROPOSAL"] = 15; + values[valuesById[18] = "DATA_STREAM"] = 18; + values[valuesById[20] = "ATTRIBUTION_SETTINGS"] = 20; + return values; + })(); + + /** + * PropertyType enum. + * @name google.analytics.admin.v1beta.PropertyType + * @enum {number} + * @property {number} PROPERTY_TYPE_UNSPECIFIED=0 PROPERTY_TYPE_UNSPECIFIED value + * @property {number} PROPERTY_TYPE_ORDINARY=1 PROPERTY_TYPE_ORDINARY value + * @property {number} PROPERTY_TYPE_SUBPROPERTY=2 PROPERTY_TYPE_SUBPROPERTY value + * @property {number} PROPERTY_TYPE_ROLLUP=3 PROPERTY_TYPE_ROLLUP value + */ + v1beta.PropertyType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "PROPERTY_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "PROPERTY_TYPE_ORDINARY"] = 1; + values[valuesById[2] = "PROPERTY_TYPE_SUBPROPERTY"] = 2; + values[valuesById[3] = "PROPERTY_TYPE_ROLLUP"] = 3; + return values; + })(); + + v1beta.Account = (function() { + + /** + * Properties of an Account. + * @memberof google.analytics.admin.v1beta + * @interface IAccount + * @property {string|null} [name] Account name + * @property {google.protobuf.ITimestamp|null} [createTime] Account createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] Account updateTime + * @property {string|null} [displayName] Account displayName + * @property {string|null} [regionCode] Account regionCode + * @property {boolean|null} [deleted] Account deleted + */ + + /** + * Constructs a new Account. + * @memberof google.analytics.admin.v1beta + * @classdesc Represents an Account. + * @implements IAccount + * @constructor + * @param {google.analytics.admin.v1beta.IAccount=} [properties] Properties to set + */ + function Account(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Account name. + * @member {string} name + * @memberof google.analytics.admin.v1beta.Account + * @instance + */ + Account.prototype.name = ""; + + /** + * Account createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.analytics.admin.v1beta.Account + * @instance + */ + Account.prototype.createTime = null; + + /** + * Account updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.analytics.admin.v1beta.Account + * @instance + */ + Account.prototype.updateTime = null; + + /** + * Account displayName. + * @member {string} displayName + * @memberof google.analytics.admin.v1beta.Account + * @instance + */ + Account.prototype.displayName = ""; + + /** + * Account regionCode. + * @member {string} regionCode + * @memberof google.analytics.admin.v1beta.Account + * @instance + */ + Account.prototype.regionCode = ""; + + /** + * Account deleted. + * @member {boolean} deleted + * @memberof google.analytics.admin.v1beta.Account + * @instance + */ + Account.prototype.deleted = false; + + /** + * Creates a new Account instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1beta.Account + * @static + * @param {google.analytics.admin.v1beta.IAccount=} [properties] Properties to set + * @returns {google.analytics.admin.v1beta.Account} Account instance + */ + Account.create = function create(properties) { + return new Account(properties); + }; + + /** + * Encodes the specified Account message. Does not implicitly {@link google.analytics.admin.v1beta.Account.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1beta.Account + * @static + * @param {google.analytics.admin.v1beta.IAccount} message Account message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Account.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.displayName); + if (message.regionCode != null && Object.hasOwnProperty.call(message, "regionCode")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.regionCode); + if (message.deleted != null && Object.hasOwnProperty.call(message, "deleted")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.deleted); + return writer; + }; + + /** + * Encodes the specified Account message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.Account.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1beta.Account + * @static + * @param {google.analytics.admin.v1beta.IAccount} message Account message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Account.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Account message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1beta.Account + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1beta.Account} Account + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Account.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1beta.Account(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 3: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 4: { + message.displayName = reader.string(); + break; + } + case 5: { + message.regionCode = reader.string(); + break; + } + case 6: { + message.deleted = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Account message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1beta.Account + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1beta.Account} Account + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Account.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Account message. + * @function verify + * @memberof google.analytics.admin.v1beta.Account + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Account.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.regionCode != null && message.hasOwnProperty("regionCode")) + if (!$util.isString(message.regionCode)) + return "regionCode: string expected"; + if (message.deleted != null && message.hasOwnProperty("deleted")) + if (typeof message.deleted !== "boolean") + return "deleted: boolean expected"; + return null; + }; + + /** + * Creates an Account message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1beta.Account + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1beta.Account} Account + */ + Account.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1beta.Account) + return object; + var message = new $root.google.analytics.admin.v1beta.Account(); + if (object.name != null) + message.name = String(object.name); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.analytics.admin.v1beta.Account.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.analytics.admin.v1beta.Account.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.regionCode != null) + message.regionCode = String(object.regionCode); + if (object.deleted != null) + message.deleted = Boolean(object.deleted); + return message; + }; + + /** + * Creates a plain object from an Account message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1beta.Account + * @static + * @param {google.analytics.admin.v1beta.Account} message Account + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Account.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.createTime = null; + object.updateTime = null; + object.displayName = ""; + object.regionCode = ""; + object.deleted = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.regionCode != null && message.hasOwnProperty("regionCode")) + object.regionCode = message.regionCode; + if (message.deleted != null && message.hasOwnProperty("deleted")) + object.deleted = message.deleted; + return object; + }; + + /** + * Converts this Account to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1beta.Account + * @instance + * @returns {Object.} JSON object + */ + Account.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Account + * @function getTypeUrl + * @memberof google.analytics.admin.v1beta.Account + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Account.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1beta.Account"; + }; + + return Account; + })(); + + v1beta.Property = (function() { + + /** + * Properties of a Property. + * @memberof google.analytics.admin.v1beta + * @interface IProperty + * @property {string|null} [name] Property name + * @property {google.analytics.admin.v1beta.PropertyType|null} [propertyType] Property propertyType + * @property {google.protobuf.ITimestamp|null} [createTime] Property createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] Property updateTime + * @property {string|null} [parent] Property parent + * @property {string|null} [displayName] Property displayName + * @property {google.analytics.admin.v1beta.IndustryCategory|null} [industryCategory] Property industryCategory + * @property {string|null} [timeZone] Property timeZone + * @property {string|null} [currencyCode] Property currencyCode + * @property {google.analytics.admin.v1beta.ServiceLevel|null} [serviceLevel] Property serviceLevel + * @property {google.protobuf.ITimestamp|null} [deleteTime] Property deleteTime + * @property {google.protobuf.ITimestamp|null} [expireTime] Property expireTime + * @property {string|null} [account] Property account + */ + + /** + * Constructs a new Property. + * @memberof google.analytics.admin.v1beta + * @classdesc Represents a Property. + * @implements IProperty + * @constructor + * @param {google.analytics.admin.v1beta.IProperty=} [properties] Properties to set + */ + function Property(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Property name. + * @member {string} name + * @memberof google.analytics.admin.v1beta.Property + * @instance + */ + Property.prototype.name = ""; + + /** + * Property propertyType. + * @member {google.analytics.admin.v1beta.PropertyType} propertyType + * @memberof google.analytics.admin.v1beta.Property + * @instance + */ + Property.prototype.propertyType = 0; + + /** + * Property createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.analytics.admin.v1beta.Property + * @instance + */ + Property.prototype.createTime = null; + + /** + * Property updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.analytics.admin.v1beta.Property + * @instance + */ + Property.prototype.updateTime = null; + + /** + * Property parent. + * @member {string} parent + * @memberof google.analytics.admin.v1beta.Property + * @instance + */ + Property.prototype.parent = ""; + + /** + * Property displayName. + * @member {string} displayName + * @memberof google.analytics.admin.v1beta.Property + * @instance + */ + Property.prototype.displayName = ""; + + /** + * Property industryCategory. + * @member {google.analytics.admin.v1beta.IndustryCategory} industryCategory + * @memberof google.analytics.admin.v1beta.Property + * @instance + */ + Property.prototype.industryCategory = 0; + + /** + * Property timeZone. + * @member {string} timeZone + * @memberof google.analytics.admin.v1beta.Property + * @instance + */ + Property.prototype.timeZone = ""; + + /** + * Property currencyCode. + * @member {string} currencyCode + * @memberof google.analytics.admin.v1beta.Property + * @instance + */ + Property.prototype.currencyCode = ""; + + /** + * Property serviceLevel. + * @member {google.analytics.admin.v1beta.ServiceLevel} serviceLevel + * @memberof google.analytics.admin.v1beta.Property + * @instance + */ + Property.prototype.serviceLevel = 0; + + /** + * Property deleteTime. + * @member {google.protobuf.ITimestamp|null|undefined} deleteTime + * @memberof google.analytics.admin.v1beta.Property + * @instance + */ + Property.prototype.deleteTime = null; + + /** + * Property expireTime. + * @member {google.protobuf.ITimestamp|null|undefined} expireTime + * @memberof google.analytics.admin.v1beta.Property + * @instance + */ + Property.prototype.expireTime = null; + + /** + * Property account. + * @member {string} account + * @memberof google.analytics.admin.v1beta.Property + * @instance + */ + Property.prototype.account = ""; + + /** + * Creates a new Property instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1beta.Property + * @static + * @param {google.analytics.admin.v1beta.IProperty=} [properties] Properties to set + * @returns {google.analytics.admin.v1beta.Property} Property instance + */ + Property.create = function create(properties) { + return new Property(properties); + }; + + /** + * Encodes the specified Property message. Does not implicitly {@link google.analytics.admin.v1beta.Property.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1beta.Property + * @static + * @param {google.analytics.admin.v1beta.IProperty} message Property message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Property.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.parent); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.displayName); + if (message.industryCategory != null && Object.hasOwnProperty.call(message, "industryCategory")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.industryCategory); + if (message.timeZone != null && Object.hasOwnProperty.call(message, "timeZone")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.timeZone); + if (message.currencyCode != null && Object.hasOwnProperty.call(message, "currencyCode")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.currencyCode); + if (message.serviceLevel != null && Object.hasOwnProperty.call(message, "serviceLevel")) + writer.uint32(/* id 10, wireType 0 =*/80).int32(message.serviceLevel); + if (message.deleteTime != null && Object.hasOwnProperty.call(message, "deleteTime")) + $root.google.protobuf.Timestamp.encode(message.deleteTime, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.expireTime != null && Object.hasOwnProperty.call(message, "expireTime")) + $root.google.protobuf.Timestamp.encode(message.expireTime, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.account != null && Object.hasOwnProperty.call(message, "account")) + writer.uint32(/* id 13, wireType 2 =*/106).string(message.account); + if (message.propertyType != null && Object.hasOwnProperty.call(message, "propertyType")) + writer.uint32(/* id 14, wireType 0 =*/112).int32(message.propertyType); + return writer; + }; + + /** + * Encodes the specified Property message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.Property.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1beta.Property + * @static + * @param {google.analytics.admin.v1beta.IProperty} message Property message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Property.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Property message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1beta.Property + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1beta.Property} Property + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Property.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1beta.Property(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 14: { + message.propertyType = reader.int32(); + break; + } + case 3: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 4: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 2: { + message.parent = reader.string(); + break; + } + case 5: { + message.displayName = reader.string(); + break; + } + case 6: { + message.industryCategory = reader.int32(); + break; + } + case 7: { + message.timeZone = reader.string(); + break; + } + case 8: { + message.currencyCode = reader.string(); + break; + } + case 10: { + message.serviceLevel = reader.int32(); + break; + } + case 11: { + message.deleteTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 12: { + message.expireTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 13: { + message.account = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Property message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1beta.Property + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1beta.Property} Property + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Property.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Property message. + * @function verify + * @memberof google.analytics.admin.v1beta.Property + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Property.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.propertyType != null && message.hasOwnProperty("propertyType")) + switch (message.propertyType) { + default: + return "propertyType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.industryCategory != null && message.hasOwnProperty("industryCategory")) + switch (message.industryCategory) { + default: + return "industryCategory: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + case 13: + case 14: + case 15: + case 16: + case 17: + case 18: + case 19: + case 20: + case 21: + case 22: + case 23: + case 24: + case 25: + case 26: + break; + } + if (message.timeZone != null && message.hasOwnProperty("timeZone")) + if (!$util.isString(message.timeZone)) + return "timeZone: string expected"; + if (message.currencyCode != null && message.hasOwnProperty("currencyCode")) + if (!$util.isString(message.currencyCode)) + return "currencyCode: string expected"; + if (message.serviceLevel != null && message.hasOwnProperty("serviceLevel")) + switch (message.serviceLevel) { + default: + return "serviceLevel: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.deleteTime != null && message.hasOwnProperty("deleteTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.deleteTime); + if (error) + return "deleteTime." + error; + } + if (message.expireTime != null && message.hasOwnProperty("expireTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.expireTime); + if (error) + return "expireTime." + error; + } + if (message.account != null && message.hasOwnProperty("account")) + if (!$util.isString(message.account)) + return "account: string expected"; + return null; + }; + + /** + * Creates a Property message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1beta.Property + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1beta.Property} Property + */ + Property.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1beta.Property) + return object; + var message = new $root.google.analytics.admin.v1beta.Property(); + if (object.name != null) + message.name = String(object.name); + switch (object.propertyType) { + default: + if (typeof object.propertyType === "number") { + message.propertyType = object.propertyType; + break; + } + break; + case "PROPERTY_TYPE_UNSPECIFIED": + case 0: + message.propertyType = 0; + break; + case "PROPERTY_TYPE_ORDINARY": + case 1: + message.propertyType = 1; + break; + case "PROPERTY_TYPE_SUBPROPERTY": + case 2: + message.propertyType = 2; + break; + case "PROPERTY_TYPE_ROLLUP": + case 3: + message.propertyType = 3; + break; + } + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.analytics.admin.v1beta.Property.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.analytics.admin.v1beta.Property.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.parent != null) + message.parent = String(object.parent); + if (object.displayName != null) + message.displayName = String(object.displayName); + switch (object.industryCategory) { + default: + if (typeof object.industryCategory === "number") { + message.industryCategory = object.industryCategory; + break; + } + break; + case "INDUSTRY_CATEGORY_UNSPECIFIED": + case 0: + message.industryCategory = 0; + break; + case "AUTOMOTIVE": + case 1: + message.industryCategory = 1; + break; + case "BUSINESS_AND_INDUSTRIAL_MARKETS": + case 2: + message.industryCategory = 2; + break; + case "FINANCE": + case 3: + message.industryCategory = 3; + break; + case "HEALTHCARE": + case 4: + message.industryCategory = 4; + break; + case "TECHNOLOGY": + case 5: + message.industryCategory = 5; + break; + case "TRAVEL": + case 6: + message.industryCategory = 6; + break; + case "OTHER": + case 7: + message.industryCategory = 7; + break; + case "ARTS_AND_ENTERTAINMENT": + case 8: + message.industryCategory = 8; + break; + case "BEAUTY_AND_FITNESS": + case 9: + message.industryCategory = 9; + break; + case "BOOKS_AND_LITERATURE": + case 10: + message.industryCategory = 10; + break; + case "FOOD_AND_DRINK": + case 11: + message.industryCategory = 11; + break; + case "GAMES": + case 12: + message.industryCategory = 12; + break; + case "HOBBIES_AND_LEISURE": + case 13: + message.industryCategory = 13; + break; + case "HOME_AND_GARDEN": + case 14: + message.industryCategory = 14; + break; + case "INTERNET_AND_TELECOM": + case 15: + message.industryCategory = 15; + break; + case "LAW_AND_GOVERNMENT": + case 16: + message.industryCategory = 16; + break; + case "NEWS": + case 17: + message.industryCategory = 17; + break; + case "ONLINE_COMMUNITIES": + case 18: + message.industryCategory = 18; + break; + case "PEOPLE_AND_SOCIETY": + case 19: + message.industryCategory = 19; + break; + case "PETS_AND_ANIMALS": + case 20: + message.industryCategory = 20; + break; + case "REAL_ESTATE": + case 21: + message.industryCategory = 21; + break; + case "REFERENCE": + case 22: + message.industryCategory = 22; + break; + case "SCIENCE": + case 23: + message.industryCategory = 23; + break; + case "SPORTS": + case 24: + message.industryCategory = 24; + break; + case "JOBS_AND_EDUCATION": + case 25: + message.industryCategory = 25; + break; + case "SHOPPING": + case 26: + message.industryCategory = 26; + break; + } + if (object.timeZone != null) + message.timeZone = String(object.timeZone); + if (object.currencyCode != null) + message.currencyCode = String(object.currencyCode); + switch (object.serviceLevel) { + default: + if (typeof object.serviceLevel === "number") { + message.serviceLevel = object.serviceLevel; + break; + } + break; + case "SERVICE_LEVEL_UNSPECIFIED": + case 0: + message.serviceLevel = 0; + break; + case "GOOGLE_ANALYTICS_STANDARD": + case 1: + message.serviceLevel = 1; + break; + case "GOOGLE_ANALYTICS_360": + case 2: + message.serviceLevel = 2; + break; + } + if (object.deleteTime != null) { + if (typeof object.deleteTime !== "object") + throw TypeError(".google.analytics.admin.v1beta.Property.deleteTime: object expected"); + message.deleteTime = $root.google.protobuf.Timestamp.fromObject(object.deleteTime); + } + if (object.expireTime != null) { + if (typeof object.expireTime !== "object") + throw TypeError(".google.analytics.admin.v1beta.Property.expireTime: object expected"); + message.expireTime = $root.google.protobuf.Timestamp.fromObject(object.expireTime); + } + if (object.account != null) + message.account = String(object.account); + return message; + }; + + /** + * Creates a plain object from a Property message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1beta.Property + * @static + * @param {google.analytics.admin.v1beta.Property} message Property + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Property.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.parent = ""; + object.createTime = null; + object.updateTime = null; + object.displayName = ""; + object.industryCategory = options.enums === String ? "INDUSTRY_CATEGORY_UNSPECIFIED" : 0; + object.timeZone = ""; + object.currencyCode = ""; + object.serviceLevel = options.enums === String ? "SERVICE_LEVEL_UNSPECIFIED" : 0; + object.deleteTime = null; + object.expireTime = null; + object.account = ""; + object.propertyType = options.enums === String ? "PROPERTY_TYPE_UNSPECIFIED" : 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.industryCategory != null && message.hasOwnProperty("industryCategory")) + object.industryCategory = options.enums === String ? $root.google.analytics.admin.v1beta.IndustryCategory[message.industryCategory] === undefined ? message.industryCategory : $root.google.analytics.admin.v1beta.IndustryCategory[message.industryCategory] : message.industryCategory; + if (message.timeZone != null && message.hasOwnProperty("timeZone")) + object.timeZone = message.timeZone; + if (message.currencyCode != null && message.hasOwnProperty("currencyCode")) + object.currencyCode = message.currencyCode; + if (message.serviceLevel != null && message.hasOwnProperty("serviceLevel")) + object.serviceLevel = options.enums === String ? $root.google.analytics.admin.v1beta.ServiceLevel[message.serviceLevel] === undefined ? message.serviceLevel : $root.google.analytics.admin.v1beta.ServiceLevel[message.serviceLevel] : message.serviceLevel; + if (message.deleteTime != null && message.hasOwnProperty("deleteTime")) + object.deleteTime = $root.google.protobuf.Timestamp.toObject(message.deleteTime, options); + if (message.expireTime != null && message.hasOwnProperty("expireTime")) + object.expireTime = $root.google.protobuf.Timestamp.toObject(message.expireTime, options); + if (message.account != null && message.hasOwnProperty("account")) + object.account = message.account; + if (message.propertyType != null && message.hasOwnProperty("propertyType")) + object.propertyType = options.enums === String ? $root.google.analytics.admin.v1beta.PropertyType[message.propertyType] === undefined ? message.propertyType : $root.google.analytics.admin.v1beta.PropertyType[message.propertyType] : message.propertyType; + return object; + }; + + /** + * Converts this Property to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1beta.Property + * @instance + * @returns {Object.} JSON object + */ + Property.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Property + * @function getTypeUrl + * @memberof google.analytics.admin.v1beta.Property + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Property.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1beta.Property"; + }; + + return Property; + })(); + + v1beta.DataStream = (function() { + + /** + * Properties of a DataStream. + * @memberof google.analytics.admin.v1beta + * @interface IDataStream + * @property {google.analytics.admin.v1beta.DataStream.IWebStreamData|null} [webStreamData] DataStream webStreamData + * @property {google.analytics.admin.v1beta.DataStream.IAndroidAppStreamData|null} [androidAppStreamData] DataStream androidAppStreamData + * @property {google.analytics.admin.v1beta.DataStream.IIosAppStreamData|null} [iosAppStreamData] DataStream iosAppStreamData + * @property {string|null} [name] DataStream name + * @property {google.analytics.admin.v1beta.DataStream.DataStreamType|null} [type] DataStream type + * @property {string|null} [displayName] DataStream displayName + * @property {google.protobuf.ITimestamp|null} [createTime] DataStream createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] DataStream updateTime + */ + + /** + * Constructs a new DataStream. + * @memberof google.analytics.admin.v1beta + * @classdesc Represents a DataStream. + * @implements IDataStream + * @constructor + * @param {google.analytics.admin.v1beta.IDataStream=} [properties] Properties to set + */ + function DataStream(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DataStream webStreamData. + * @member {google.analytics.admin.v1beta.DataStream.IWebStreamData|null|undefined} webStreamData + * @memberof google.analytics.admin.v1beta.DataStream + * @instance + */ + DataStream.prototype.webStreamData = null; + + /** + * DataStream androidAppStreamData. + * @member {google.analytics.admin.v1beta.DataStream.IAndroidAppStreamData|null|undefined} androidAppStreamData + * @memberof google.analytics.admin.v1beta.DataStream + * @instance + */ + DataStream.prototype.androidAppStreamData = null; + + /** + * DataStream iosAppStreamData. + * @member {google.analytics.admin.v1beta.DataStream.IIosAppStreamData|null|undefined} iosAppStreamData + * @memberof google.analytics.admin.v1beta.DataStream + * @instance + */ + DataStream.prototype.iosAppStreamData = null; + + /** + * DataStream name. + * @member {string} name + * @memberof google.analytics.admin.v1beta.DataStream + * @instance + */ + DataStream.prototype.name = ""; + + /** + * DataStream type. + * @member {google.analytics.admin.v1beta.DataStream.DataStreamType} type + * @memberof google.analytics.admin.v1beta.DataStream + * @instance + */ + DataStream.prototype.type = 0; + + /** + * DataStream displayName. + * @member {string} displayName + * @memberof google.analytics.admin.v1beta.DataStream + * @instance + */ + DataStream.prototype.displayName = ""; + + /** + * DataStream createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.analytics.admin.v1beta.DataStream + * @instance + */ + DataStream.prototype.createTime = null; + + /** + * DataStream updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.analytics.admin.v1beta.DataStream + * @instance + */ + DataStream.prototype.updateTime = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * DataStream streamData. + * @member {"webStreamData"|"androidAppStreamData"|"iosAppStreamData"|undefined} streamData + * @memberof google.analytics.admin.v1beta.DataStream + * @instance + */ + Object.defineProperty(DataStream.prototype, "streamData", { + get: $util.oneOfGetter($oneOfFields = ["webStreamData", "androidAppStreamData", "iosAppStreamData"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new DataStream instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1beta.DataStream + * @static + * @param {google.analytics.admin.v1beta.IDataStream=} [properties] Properties to set + * @returns {google.analytics.admin.v1beta.DataStream} DataStream instance + */ + DataStream.create = function create(properties) { + return new DataStream(properties); + }; + + /** + * Encodes the specified DataStream message. Does not implicitly {@link google.analytics.admin.v1beta.DataStream.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1beta.DataStream + * @static + * @param {google.analytics.admin.v1beta.IDataStream} message DataStream message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataStream.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.type); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.displayName); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.webStreamData != null && Object.hasOwnProperty.call(message, "webStreamData")) + $root.google.analytics.admin.v1beta.DataStream.WebStreamData.encode(message.webStreamData, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.androidAppStreamData != null && Object.hasOwnProperty.call(message, "androidAppStreamData")) + $root.google.analytics.admin.v1beta.DataStream.AndroidAppStreamData.encode(message.androidAppStreamData, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.iosAppStreamData != null && Object.hasOwnProperty.call(message, "iosAppStreamData")) + $root.google.analytics.admin.v1beta.DataStream.IosAppStreamData.encode(message.iosAppStreamData, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified DataStream message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.DataStream.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1beta.DataStream + * @static + * @param {google.analytics.admin.v1beta.IDataStream} message DataStream message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataStream.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DataStream message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1beta.DataStream + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1beta.DataStream} DataStream + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataStream.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1beta.DataStream(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 6: { + message.webStreamData = $root.google.analytics.admin.v1beta.DataStream.WebStreamData.decode(reader, reader.uint32()); + break; + } + case 7: { + message.androidAppStreamData = $root.google.analytics.admin.v1beta.DataStream.AndroidAppStreamData.decode(reader, reader.uint32()); + break; + } + case 8: { + message.iosAppStreamData = $root.google.analytics.admin.v1beta.DataStream.IosAppStreamData.decode(reader, reader.uint32()); + break; + } + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.type = reader.int32(); + break; + } + case 3: { + message.displayName = reader.string(); + break; + } + case 4: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 5: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DataStream message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1beta.DataStream + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1beta.DataStream} DataStream + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataStream.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DataStream message. + * @function verify + * @memberof google.analytics.admin.v1beta.DataStream + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DataStream.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.webStreamData != null && message.hasOwnProperty("webStreamData")) { + properties.streamData = 1; + { + var error = $root.google.analytics.admin.v1beta.DataStream.WebStreamData.verify(message.webStreamData); + if (error) + return "webStreamData." + error; + } + } + if (message.androidAppStreamData != null && message.hasOwnProperty("androidAppStreamData")) { + if (properties.streamData === 1) + return "streamData: multiple values"; + properties.streamData = 1; + { + var error = $root.google.analytics.admin.v1beta.DataStream.AndroidAppStreamData.verify(message.androidAppStreamData); + if (error) + return "androidAppStreamData." + error; + } + } + if (message.iosAppStreamData != null && message.hasOwnProperty("iosAppStreamData")) { + if (properties.streamData === 1) + return "streamData: multiple values"; + properties.streamData = 1; + { + var error = $root.google.analytics.admin.v1beta.DataStream.IosAppStreamData.verify(message.iosAppStreamData); + if (error) + return "iosAppStreamData." + error; + } + } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + return null; + }; + + /** + * Creates a DataStream message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1beta.DataStream + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1beta.DataStream} DataStream + */ + DataStream.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1beta.DataStream) + return object; + var message = new $root.google.analytics.admin.v1beta.DataStream(); + if (object.webStreamData != null) { + if (typeof object.webStreamData !== "object") + throw TypeError(".google.analytics.admin.v1beta.DataStream.webStreamData: object expected"); + message.webStreamData = $root.google.analytics.admin.v1beta.DataStream.WebStreamData.fromObject(object.webStreamData); + } + if (object.androidAppStreamData != null) { + if (typeof object.androidAppStreamData !== "object") + throw TypeError(".google.analytics.admin.v1beta.DataStream.androidAppStreamData: object expected"); + message.androidAppStreamData = $root.google.analytics.admin.v1beta.DataStream.AndroidAppStreamData.fromObject(object.androidAppStreamData); + } + if (object.iosAppStreamData != null) { + if (typeof object.iosAppStreamData !== "object") + throw TypeError(".google.analytics.admin.v1beta.DataStream.iosAppStreamData: object expected"); + message.iosAppStreamData = $root.google.analytics.admin.v1beta.DataStream.IosAppStreamData.fromObject(object.iosAppStreamData); + } + if (object.name != null) + message.name = String(object.name); + switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; + case "DATA_STREAM_TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "WEB_DATA_STREAM": + case 1: + message.type = 1; + break; + case "ANDROID_APP_DATA_STREAM": + case 2: + message.type = 2; + break; + case "IOS_APP_DATA_STREAM": + case 3: + message.type = 3; + break; + } + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.analytics.admin.v1beta.DataStream.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.analytics.admin.v1beta.DataStream.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + return message; + }; + + /** + * Creates a plain object from a DataStream message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1beta.DataStream + * @static + * @param {google.analytics.admin.v1beta.DataStream} message DataStream + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DataStream.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.type = options.enums === String ? "DATA_STREAM_TYPE_UNSPECIFIED" : 0; + object.displayName = ""; + object.createTime = null; + object.updateTime = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.analytics.admin.v1beta.DataStream.DataStreamType[message.type] === undefined ? message.type : $root.google.analytics.admin.v1beta.DataStream.DataStreamType[message.type] : message.type; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + if (message.webStreamData != null && message.hasOwnProperty("webStreamData")) { + object.webStreamData = $root.google.analytics.admin.v1beta.DataStream.WebStreamData.toObject(message.webStreamData, options); + if (options.oneofs) + object.streamData = "webStreamData"; + } + if (message.androidAppStreamData != null && message.hasOwnProperty("androidAppStreamData")) { + object.androidAppStreamData = $root.google.analytics.admin.v1beta.DataStream.AndroidAppStreamData.toObject(message.androidAppStreamData, options); + if (options.oneofs) + object.streamData = "androidAppStreamData"; + } + if (message.iosAppStreamData != null && message.hasOwnProperty("iosAppStreamData")) { + object.iosAppStreamData = $root.google.analytics.admin.v1beta.DataStream.IosAppStreamData.toObject(message.iosAppStreamData, options); + if (options.oneofs) + object.streamData = "iosAppStreamData"; + } + return object; + }; + + /** + * Converts this DataStream to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1beta.DataStream + * @instance + * @returns {Object.} JSON object + */ + DataStream.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DataStream + * @function getTypeUrl + * @memberof google.analytics.admin.v1beta.DataStream + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DataStream.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1beta.DataStream"; + }; + + DataStream.WebStreamData = (function() { + + /** + * Properties of a WebStreamData. + * @memberof google.analytics.admin.v1beta.DataStream + * @interface IWebStreamData + * @property {string|null} [measurementId] WebStreamData measurementId + * @property {string|null} [firebaseAppId] WebStreamData firebaseAppId + * @property {string|null} [defaultUri] WebStreamData defaultUri + */ + + /** + * Constructs a new WebStreamData. + * @memberof google.analytics.admin.v1beta.DataStream + * @classdesc Represents a WebStreamData. + * @implements IWebStreamData + * @constructor + * @param {google.analytics.admin.v1beta.DataStream.IWebStreamData=} [properties] Properties to set + */ + function WebStreamData(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * WebStreamData measurementId. + * @member {string} measurementId + * @memberof google.analytics.admin.v1beta.DataStream.WebStreamData + * @instance + */ + WebStreamData.prototype.measurementId = ""; + + /** + * WebStreamData firebaseAppId. + * @member {string} firebaseAppId + * @memberof google.analytics.admin.v1beta.DataStream.WebStreamData + * @instance + */ + WebStreamData.prototype.firebaseAppId = ""; + + /** + * WebStreamData defaultUri. + * @member {string} defaultUri + * @memberof google.analytics.admin.v1beta.DataStream.WebStreamData + * @instance + */ + WebStreamData.prototype.defaultUri = ""; + + /** + * Creates a new WebStreamData instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1beta.DataStream.WebStreamData + * @static + * @param {google.analytics.admin.v1beta.DataStream.IWebStreamData=} [properties] Properties to set + * @returns {google.analytics.admin.v1beta.DataStream.WebStreamData} WebStreamData instance + */ + WebStreamData.create = function create(properties) { + return new WebStreamData(properties); + }; + + /** + * Encodes the specified WebStreamData message. Does not implicitly {@link google.analytics.admin.v1beta.DataStream.WebStreamData.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1beta.DataStream.WebStreamData + * @static + * @param {google.analytics.admin.v1beta.DataStream.IWebStreamData} message WebStreamData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WebStreamData.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.measurementId != null && Object.hasOwnProperty.call(message, "measurementId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.measurementId); + if (message.firebaseAppId != null && Object.hasOwnProperty.call(message, "firebaseAppId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.firebaseAppId); + if (message.defaultUri != null && Object.hasOwnProperty.call(message, "defaultUri")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.defaultUri); + return writer; + }; + + /** + * Encodes the specified WebStreamData message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.DataStream.WebStreamData.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1beta.DataStream.WebStreamData + * @static + * @param {google.analytics.admin.v1beta.DataStream.IWebStreamData} message WebStreamData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WebStreamData.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a WebStreamData message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1beta.DataStream.WebStreamData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1beta.DataStream.WebStreamData} WebStreamData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WebStreamData.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1beta.DataStream.WebStreamData(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.measurementId = reader.string(); + break; + } + case 2: { + message.firebaseAppId = reader.string(); + break; + } + case 3: { + message.defaultUri = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a WebStreamData message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1beta.DataStream.WebStreamData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1beta.DataStream.WebStreamData} WebStreamData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WebStreamData.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a WebStreamData message. + * @function verify + * @memberof google.analytics.admin.v1beta.DataStream.WebStreamData + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + WebStreamData.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.measurementId != null && message.hasOwnProperty("measurementId")) + if (!$util.isString(message.measurementId)) + return "measurementId: string expected"; + if (message.firebaseAppId != null && message.hasOwnProperty("firebaseAppId")) + if (!$util.isString(message.firebaseAppId)) + return "firebaseAppId: string expected"; + if (message.defaultUri != null && message.hasOwnProperty("defaultUri")) + if (!$util.isString(message.defaultUri)) + return "defaultUri: string expected"; + return null; + }; + + /** + * Creates a WebStreamData message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1beta.DataStream.WebStreamData + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1beta.DataStream.WebStreamData} WebStreamData + */ + WebStreamData.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1beta.DataStream.WebStreamData) + return object; + var message = new $root.google.analytics.admin.v1beta.DataStream.WebStreamData(); + if (object.measurementId != null) + message.measurementId = String(object.measurementId); + if (object.firebaseAppId != null) + message.firebaseAppId = String(object.firebaseAppId); + if (object.defaultUri != null) + message.defaultUri = String(object.defaultUri); + return message; + }; + + /** + * Creates a plain object from a WebStreamData message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1beta.DataStream.WebStreamData + * @static + * @param {google.analytics.admin.v1beta.DataStream.WebStreamData} message WebStreamData + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + WebStreamData.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.measurementId = ""; + object.firebaseAppId = ""; + object.defaultUri = ""; + } + if (message.measurementId != null && message.hasOwnProperty("measurementId")) + object.measurementId = message.measurementId; + if (message.firebaseAppId != null && message.hasOwnProperty("firebaseAppId")) + object.firebaseAppId = message.firebaseAppId; + if (message.defaultUri != null && message.hasOwnProperty("defaultUri")) + object.defaultUri = message.defaultUri; + return object; + }; + + /** + * Converts this WebStreamData to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1beta.DataStream.WebStreamData + * @instance + * @returns {Object.} JSON object + */ + WebStreamData.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for WebStreamData + * @function getTypeUrl + * @memberof google.analytics.admin.v1beta.DataStream.WebStreamData + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + WebStreamData.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1beta.DataStream.WebStreamData"; + }; + + return WebStreamData; + })(); + + DataStream.AndroidAppStreamData = (function() { + + /** + * Properties of an AndroidAppStreamData. + * @memberof google.analytics.admin.v1beta.DataStream + * @interface IAndroidAppStreamData + * @property {string|null} [firebaseAppId] AndroidAppStreamData firebaseAppId + * @property {string|null} [packageName] AndroidAppStreamData packageName + */ + + /** + * Constructs a new AndroidAppStreamData. + * @memberof google.analytics.admin.v1beta.DataStream + * @classdesc Represents an AndroidAppStreamData. + * @implements IAndroidAppStreamData + * @constructor + * @param {google.analytics.admin.v1beta.DataStream.IAndroidAppStreamData=} [properties] Properties to set + */ + function AndroidAppStreamData(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AndroidAppStreamData firebaseAppId. + * @member {string} firebaseAppId + * @memberof google.analytics.admin.v1beta.DataStream.AndroidAppStreamData + * @instance + */ + AndroidAppStreamData.prototype.firebaseAppId = ""; + + /** + * AndroidAppStreamData packageName. + * @member {string} packageName + * @memberof google.analytics.admin.v1beta.DataStream.AndroidAppStreamData + * @instance + */ + AndroidAppStreamData.prototype.packageName = ""; + + /** + * Creates a new AndroidAppStreamData instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1beta.DataStream.AndroidAppStreamData + * @static + * @param {google.analytics.admin.v1beta.DataStream.IAndroidAppStreamData=} [properties] Properties to set + * @returns {google.analytics.admin.v1beta.DataStream.AndroidAppStreamData} AndroidAppStreamData instance + */ + AndroidAppStreamData.create = function create(properties) { + return new AndroidAppStreamData(properties); + }; + + /** + * Encodes the specified AndroidAppStreamData message. Does not implicitly {@link google.analytics.admin.v1beta.DataStream.AndroidAppStreamData.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1beta.DataStream.AndroidAppStreamData + * @static + * @param {google.analytics.admin.v1beta.DataStream.IAndroidAppStreamData} message AndroidAppStreamData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AndroidAppStreamData.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.firebaseAppId != null && Object.hasOwnProperty.call(message, "firebaseAppId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.firebaseAppId); + if (message.packageName != null && Object.hasOwnProperty.call(message, "packageName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.packageName); + return writer; + }; + + /** + * Encodes the specified AndroidAppStreamData message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.DataStream.AndroidAppStreamData.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1beta.DataStream.AndroidAppStreamData + * @static + * @param {google.analytics.admin.v1beta.DataStream.IAndroidAppStreamData} message AndroidAppStreamData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AndroidAppStreamData.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AndroidAppStreamData message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1beta.DataStream.AndroidAppStreamData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1beta.DataStream.AndroidAppStreamData} AndroidAppStreamData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AndroidAppStreamData.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1beta.DataStream.AndroidAppStreamData(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.firebaseAppId = reader.string(); + break; + } + case 2: { + message.packageName = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AndroidAppStreamData message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1beta.DataStream.AndroidAppStreamData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1beta.DataStream.AndroidAppStreamData} AndroidAppStreamData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AndroidAppStreamData.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AndroidAppStreamData message. + * @function verify + * @memberof google.analytics.admin.v1beta.DataStream.AndroidAppStreamData + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AndroidAppStreamData.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.firebaseAppId != null && message.hasOwnProperty("firebaseAppId")) + if (!$util.isString(message.firebaseAppId)) + return "firebaseAppId: string expected"; + if (message.packageName != null && message.hasOwnProperty("packageName")) + if (!$util.isString(message.packageName)) + return "packageName: string expected"; + return null; + }; + + /** + * Creates an AndroidAppStreamData message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1beta.DataStream.AndroidAppStreamData + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1beta.DataStream.AndroidAppStreamData} AndroidAppStreamData + */ + AndroidAppStreamData.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1beta.DataStream.AndroidAppStreamData) + return object; + var message = new $root.google.analytics.admin.v1beta.DataStream.AndroidAppStreamData(); + if (object.firebaseAppId != null) + message.firebaseAppId = String(object.firebaseAppId); + if (object.packageName != null) + message.packageName = String(object.packageName); + return message; + }; + + /** + * Creates a plain object from an AndroidAppStreamData message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1beta.DataStream.AndroidAppStreamData + * @static + * @param {google.analytics.admin.v1beta.DataStream.AndroidAppStreamData} message AndroidAppStreamData + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AndroidAppStreamData.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.firebaseAppId = ""; + object.packageName = ""; + } + if (message.firebaseAppId != null && message.hasOwnProperty("firebaseAppId")) + object.firebaseAppId = message.firebaseAppId; + if (message.packageName != null && message.hasOwnProperty("packageName")) + object.packageName = message.packageName; + return object; + }; + + /** + * Converts this AndroidAppStreamData to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1beta.DataStream.AndroidAppStreamData + * @instance + * @returns {Object.} JSON object + */ + AndroidAppStreamData.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AndroidAppStreamData + * @function getTypeUrl + * @memberof google.analytics.admin.v1beta.DataStream.AndroidAppStreamData + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AndroidAppStreamData.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1beta.DataStream.AndroidAppStreamData"; + }; + + return AndroidAppStreamData; + })(); + + DataStream.IosAppStreamData = (function() { + + /** + * Properties of an IosAppStreamData. + * @memberof google.analytics.admin.v1beta.DataStream + * @interface IIosAppStreamData + * @property {string|null} [firebaseAppId] IosAppStreamData firebaseAppId + * @property {string|null} [bundleId] IosAppStreamData bundleId + */ + + /** + * Constructs a new IosAppStreamData. + * @memberof google.analytics.admin.v1beta.DataStream + * @classdesc Represents an IosAppStreamData. + * @implements IIosAppStreamData + * @constructor + * @param {google.analytics.admin.v1beta.DataStream.IIosAppStreamData=} [properties] Properties to set + */ + function IosAppStreamData(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * IosAppStreamData firebaseAppId. + * @member {string} firebaseAppId + * @memberof google.analytics.admin.v1beta.DataStream.IosAppStreamData + * @instance + */ + IosAppStreamData.prototype.firebaseAppId = ""; + + /** + * IosAppStreamData bundleId. + * @member {string} bundleId + * @memberof google.analytics.admin.v1beta.DataStream.IosAppStreamData + * @instance + */ + IosAppStreamData.prototype.bundleId = ""; + + /** + * Creates a new IosAppStreamData instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1beta.DataStream.IosAppStreamData + * @static + * @param {google.analytics.admin.v1beta.DataStream.IIosAppStreamData=} [properties] Properties to set + * @returns {google.analytics.admin.v1beta.DataStream.IosAppStreamData} IosAppStreamData instance + */ + IosAppStreamData.create = function create(properties) { + return new IosAppStreamData(properties); + }; + + /** + * Encodes the specified IosAppStreamData message. Does not implicitly {@link google.analytics.admin.v1beta.DataStream.IosAppStreamData.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1beta.DataStream.IosAppStreamData + * @static + * @param {google.analytics.admin.v1beta.DataStream.IIosAppStreamData} message IosAppStreamData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IosAppStreamData.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.firebaseAppId != null && Object.hasOwnProperty.call(message, "firebaseAppId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.firebaseAppId); + if (message.bundleId != null && Object.hasOwnProperty.call(message, "bundleId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.bundleId); + return writer; + }; + + /** + * Encodes the specified IosAppStreamData message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.DataStream.IosAppStreamData.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1beta.DataStream.IosAppStreamData + * @static + * @param {google.analytics.admin.v1beta.DataStream.IIosAppStreamData} message IosAppStreamData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IosAppStreamData.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an IosAppStreamData message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1beta.DataStream.IosAppStreamData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1beta.DataStream.IosAppStreamData} IosAppStreamData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IosAppStreamData.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1beta.DataStream.IosAppStreamData(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.firebaseAppId = reader.string(); + break; + } + case 2: { + message.bundleId = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an IosAppStreamData message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1beta.DataStream.IosAppStreamData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1beta.DataStream.IosAppStreamData} IosAppStreamData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IosAppStreamData.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an IosAppStreamData message. + * @function verify + * @memberof google.analytics.admin.v1beta.DataStream.IosAppStreamData + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + IosAppStreamData.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.firebaseAppId != null && message.hasOwnProperty("firebaseAppId")) + if (!$util.isString(message.firebaseAppId)) + return "firebaseAppId: string expected"; + if (message.bundleId != null && message.hasOwnProperty("bundleId")) + if (!$util.isString(message.bundleId)) + return "bundleId: string expected"; + return null; + }; + + /** + * Creates an IosAppStreamData message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1beta.DataStream.IosAppStreamData + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1beta.DataStream.IosAppStreamData} IosAppStreamData + */ + IosAppStreamData.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1beta.DataStream.IosAppStreamData) + return object; + var message = new $root.google.analytics.admin.v1beta.DataStream.IosAppStreamData(); + if (object.firebaseAppId != null) + message.firebaseAppId = String(object.firebaseAppId); + if (object.bundleId != null) + message.bundleId = String(object.bundleId); + return message; + }; + + /** + * Creates a plain object from an IosAppStreamData message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1beta.DataStream.IosAppStreamData + * @static + * @param {google.analytics.admin.v1beta.DataStream.IosAppStreamData} message IosAppStreamData + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + IosAppStreamData.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.firebaseAppId = ""; + object.bundleId = ""; + } + if (message.firebaseAppId != null && message.hasOwnProperty("firebaseAppId")) + object.firebaseAppId = message.firebaseAppId; + if (message.bundleId != null && message.hasOwnProperty("bundleId")) + object.bundleId = message.bundleId; + return object; + }; + + /** + * Converts this IosAppStreamData to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1beta.DataStream.IosAppStreamData + * @instance + * @returns {Object.} JSON object + */ + IosAppStreamData.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for IosAppStreamData + * @function getTypeUrl + * @memberof google.analytics.admin.v1beta.DataStream.IosAppStreamData + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + IosAppStreamData.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1beta.DataStream.IosAppStreamData"; + }; + + return IosAppStreamData; + })(); + + /** + * DataStreamType enum. + * @name google.analytics.admin.v1beta.DataStream.DataStreamType + * @enum {number} + * @property {number} DATA_STREAM_TYPE_UNSPECIFIED=0 DATA_STREAM_TYPE_UNSPECIFIED value + * @property {number} WEB_DATA_STREAM=1 WEB_DATA_STREAM value + * @property {number} ANDROID_APP_DATA_STREAM=2 ANDROID_APP_DATA_STREAM value + * @property {number} IOS_APP_DATA_STREAM=3 IOS_APP_DATA_STREAM value + */ + DataStream.DataStreamType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DATA_STREAM_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "WEB_DATA_STREAM"] = 1; + values[valuesById[2] = "ANDROID_APP_DATA_STREAM"] = 2; + values[valuesById[3] = "IOS_APP_DATA_STREAM"] = 3; + return values; + })(); + + return DataStream; + })(); + + v1beta.FirebaseLink = (function() { + + /** + * Properties of a FirebaseLink. + * @memberof google.analytics.admin.v1beta + * @interface IFirebaseLink + * @property {string|null} [name] FirebaseLink name + * @property {string|null} [project] FirebaseLink project + * @property {google.protobuf.ITimestamp|null} [createTime] FirebaseLink createTime + */ + + /** + * Constructs a new FirebaseLink. + * @memberof google.analytics.admin.v1beta + * @classdesc Represents a FirebaseLink. + * @implements IFirebaseLink + * @constructor + * @param {google.analytics.admin.v1beta.IFirebaseLink=} [properties] Properties to set + */ + function FirebaseLink(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FirebaseLink name. + * @member {string} name + * @memberof google.analytics.admin.v1beta.FirebaseLink + * @instance + */ + FirebaseLink.prototype.name = ""; + + /** + * FirebaseLink project. + * @member {string} project + * @memberof google.analytics.admin.v1beta.FirebaseLink + * @instance + */ + FirebaseLink.prototype.project = ""; + + /** + * FirebaseLink createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.analytics.admin.v1beta.FirebaseLink + * @instance + */ + FirebaseLink.prototype.createTime = null; + + /** + * Creates a new FirebaseLink instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1beta.FirebaseLink + * @static + * @param {google.analytics.admin.v1beta.IFirebaseLink=} [properties] Properties to set + * @returns {google.analytics.admin.v1beta.FirebaseLink} FirebaseLink instance + */ + FirebaseLink.create = function create(properties) { + return new FirebaseLink(properties); + }; + + /** + * Encodes the specified FirebaseLink message. Does not implicitly {@link google.analytics.admin.v1beta.FirebaseLink.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1beta.FirebaseLink + * @static + * @param {google.analytics.admin.v1beta.IFirebaseLink} message FirebaseLink message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FirebaseLink.encode = function encode(message, writer) { + 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.project != null && Object.hasOwnProperty.call(message, "project")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.project); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FirebaseLink message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.FirebaseLink.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1beta.FirebaseLink + * @static + * @param {google.analytics.admin.v1beta.IFirebaseLink} message FirebaseLink message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FirebaseLink.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FirebaseLink message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1beta.FirebaseLink + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1beta.FirebaseLink} FirebaseLink + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FirebaseLink.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1beta.FirebaseLink(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.project = reader.string(); + break; + } + case 3: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FirebaseLink message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1beta.FirebaseLink + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1beta.FirebaseLink} FirebaseLink + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FirebaseLink.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FirebaseLink message. + * @function verify + * @memberof google.analytics.admin.v1beta.FirebaseLink + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FirebaseLink.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.project != null && message.hasOwnProperty("project")) + if (!$util.isString(message.project)) + return "project: string expected"; + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + return null; + }; + + /** + * Creates a FirebaseLink message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1beta.FirebaseLink + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1beta.FirebaseLink} FirebaseLink + */ + FirebaseLink.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1beta.FirebaseLink) + return object; + var message = new $root.google.analytics.admin.v1beta.FirebaseLink(); + if (object.name != null) + message.name = String(object.name); + if (object.project != null) + message.project = String(object.project); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.analytics.admin.v1beta.FirebaseLink.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + return message; + }; + + /** + * Creates a plain object from a FirebaseLink message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1beta.FirebaseLink + * @static + * @param {google.analytics.admin.v1beta.FirebaseLink} message FirebaseLink + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FirebaseLink.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.project = ""; + object.createTime = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.project != null && message.hasOwnProperty("project")) + object.project = message.project; + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + return object; + }; + + /** + * Converts this FirebaseLink to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1beta.FirebaseLink + * @instance + * @returns {Object.} JSON object + */ + FirebaseLink.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FirebaseLink + * @function getTypeUrl + * @memberof google.analytics.admin.v1beta.FirebaseLink + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FirebaseLink.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1beta.FirebaseLink"; + }; + + return FirebaseLink; + })(); + + v1beta.GoogleAdsLink = (function() { + + /** + * Properties of a GoogleAdsLink. + * @memberof google.analytics.admin.v1beta + * @interface IGoogleAdsLink + * @property {string|null} [name] GoogleAdsLink name + * @property {string|null} [customerId] GoogleAdsLink customerId + * @property {boolean|null} [canManageClients] GoogleAdsLink canManageClients + * @property {google.protobuf.IBoolValue|null} [adsPersonalizationEnabled] GoogleAdsLink adsPersonalizationEnabled + * @property {google.protobuf.ITimestamp|null} [createTime] GoogleAdsLink createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] GoogleAdsLink updateTime + * @property {string|null} [creatorEmailAddress] GoogleAdsLink creatorEmailAddress + */ + + /** + * Constructs a new GoogleAdsLink. + * @memberof google.analytics.admin.v1beta + * @classdesc Represents a GoogleAdsLink. + * @implements IGoogleAdsLink + * @constructor + * @param {google.analytics.admin.v1beta.IGoogleAdsLink=} [properties] Properties to set + */ + function GoogleAdsLink(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GoogleAdsLink name. + * @member {string} name + * @memberof google.analytics.admin.v1beta.GoogleAdsLink + * @instance + */ + GoogleAdsLink.prototype.name = ""; + + /** + * GoogleAdsLink customerId. + * @member {string} customerId + * @memberof google.analytics.admin.v1beta.GoogleAdsLink + * @instance + */ + GoogleAdsLink.prototype.customerId = ""; + + /** + * GoogleAdsLink canManageClients. + * @member {boolean} canManageClients + * @memberof google.analytics.admin.v1beta.GoogleAdsLink + * @instance + */ + GoogleAdsLink.prototype.canManageClients = false; + + /** + * GoogleAdsLink adsPersonalizationEnabled. + * @member {google.protobuf.IBoolValue|null|undefined} adsPersonalizationEnabled + * @memberof google.analytics.admin.v1beta.GoogleAdsLink + * @instance + */ + GoogleAdsLink.prototype.adsPersonalizationEnabled = null; + + /** + * GoogleAdsLink createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.analytics.admin.v1beta.GoogleAdsLink + * @instance + */ + GoogleAdsLink.prototype.createTime = null; + + /** + * GoogleAdsLink updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.analytics.admin.v1beta.GoogleAdsLink + * @instance + */ + GoogleAdsLink.prototype.updateTime = null; + + /** + * GoogleAdsLink creatorEmailAddress. + * @member {string} creatorEmailAddress + * @memberof google.analytics.admin.v1beta.GoogleAdsLink + * @instance + */ + GoogleAdsLink.prototype.creatorEmailAddress = ""; + + /** + * Creates a new GoogleAdsLink instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1beta.GoogleAdsLink + * @static + * @param {google.analytics.admin.v1beta.IGoogleAdsLink=} [properties] Properties to set + * @returns {google.analytics.admin.v1beta.GoogleAdsLink} GoogleAdsLink instance + */ + GoogleAdsLink.create = function create(properties) { + return new GoogleAdsLink(properties); + }; + + /** + * Encodes the specified GoogleAdsLink message. Does not implicitly {@link google.analytics.admin.v1beta.GoogleAdsLink.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1beta.GoogleAdsLink + * @static + * @param {google.analytics.admin.v1beta.IGoogleAdsLink} message GoogleAdsLink message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GoogleAdsLink.encode = function encode(message, writer) { + 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.customerId != null && Object.hasOwnProperty.call(message, "customerId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.customerId); + if (message.canManageClients != null && Object.hasOwnProperty.call(message, "canManageClients")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.canManageClients); + if (message.adsPersonalizationEnabled != null && Object.hasOwnProperty.call(message, "adsPersonalizationEnabled")) + $root.google.protobuf.BoolValue.encode(message.adsPersonalizationEnabled, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.creatorEmailAddress != null && Object.hasOwnProperty.call(message, "creatorEmailAddress")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.creatorEmailAddress); + return writer; + }; + + /** + * Encodes the specified GoogleAdsLink message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.GoogleAdsLink.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1beta.GoogleAdsLink + * @static + * @param {google.analytics.admin.v1beta.IGoogleAdsLink} message GoogleAdsLink message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GoogleAdsLink.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GoogleAdsLink message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1beta.GoogleAdsLink + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1beta.GoogleAdsLink} GoogleAdsLink + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GoogleAdsLink.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1beta.GoogleAdsLink(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 3: { + message.customerId = reader.string(); + break; + } + case 4: { + message.canManageClients = reader.bool(); + break; + } + case 5: { + message.adsPersonalizationEnabled = $root.google.protobuf.BoolValue.decode(reader, reader.uint32()); + break; + } + case 7: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 8: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 9: { + message.creatorEmailAddress = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GoogleAdsLink message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1beta.GoogleAdsLink + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1beta.GoogleAdsLink} GoogleAdsLink + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GoogleAdsLink.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GoogleAdsLink message. + * @function verify + * @memberof google.analytics.admin.v1beta.GoogleAdsLink + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GoogleAdsLink.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.customerId != null && message.hasOwnProperty("customerId")) + if (!$util.isString(message.customerId)) + return "customerId: string expected"; + if (message.canManageClients != null && message.hasOwnProperty("canManageClients")) + if (typeof message.canManageClients !== "boolean") + return "canManageClients: boolean expected"; + if (message.adsPersonalizationEnabled != null && message.hasOwnProperty("adsPersonalizationEnabled")) { + var error = $root.google.protobuf.BoolValue.verify(message.adsPersonalizationEnabled); + if (error) + return "adsPersonalizationEnabled." + error; + } + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + if (message.creatorEmailAddress != null && message.hasOwnProperty("creatorEmailAddress")) + if (!$util.isString(message.creatorEmailAddress)) + return "creatorEmailAddress: string expected"; + return null; + }; + + /** + * Creates a GoogleAdsLink message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1beta.GoogleAdsLink + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1beta.GoogleAdsLink} GoogleAdsLink + */ + GoogleAdsLink.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1beta.GoogleAdsLink) + return object; + var message = new $root.google.analytics.admin.v1beta.GoogleAdsLink(); + if (object.name != null) + message.name = String(object.name); + if (object.customerId != null) + message.customerId = String(object.customerId); + if (object.canManageClients != null) + message.canManageClients = Boolean(object.canManageClients); + if (object.adsPersonalizationEnabled != null) { + if (typeof object.adsPersonalizationEnabled !== "object") + throw TypeError(".google.analytics.admin.v1beta.GoogleAdsLink.adsPersonalizationEnabled: object expected"); + message.adsPersonalizationEnabled = $root.google.protobuf.BoolValue.fromObject(object.adsPersonalizationEnabled); + } + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.analytics.admin.v1beta.GoogleAdsLink.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.analytics.admin.v1beta.GoogleAdsLink.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.creatorEmailAddress != null) + message.creatorEmailAddress = String(object.creatorEmailAddress); + return message; + }; + + /** + * Creates a plain object from a GoogleAdsLink message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1beta.GoogleAdsLink + * @static + * @param {google.analytics.admin.v1beta.GoogleAdsLink} message GoogleAdsLink + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GoogleAdsLink.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.customerId = ""; + object.canManageClients = false; + object.adsPersonalizationEnabled = null; + object.createTime = null; + object.updateTime = null; + object.creatorEmailAddress = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.customerId != null && message.hasOwnProperty("customerId")) + object.customerId = message.customerId; + if (message.canManageClients != null && message.hasOwnProperty("canManageClients")) + object.canManageClients = message.canManageClients; + if (message.adsPersonalizationEnabled != null && message.hasOwnProperty("adsPersonalizationEnabled")) + object.adsPersonalizationEnabled = $root.google.protobuf.BoolValue.toObject(message.adsPersonalizationEnabled, options); + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + if (message.creatorEmailAddress != null && message.hasOwnProperty("creatorEmailAddress")) + object.creatorEmailAddress = message.creatorEmailAddress; + return object; + }; + + /** + * Converts this GoogleAdsLink to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1beta.GoogleAdsLink + * @instance + * @returns {Object.} JSON object + */ + GoogleAdsLink.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GoogleAdsLink + * @function getTypeUrl + * @memberof google.analytics.admin.v1beta.GoogleAdsLink + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GoogleAdsLink.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1beta.GoogleAdsLink"; + }; + + return GoogleAdsLink; + })(); + + v1beta.DataSharingSettings = (function() { + + /** + * Properties of a DataSharingSettings. + * @memberof google.analytics.admin.v1beta + * @interface IDataSharingSettings + * @property {string|null} [name] DataSharingSettings name + * @property {boolean|null} [sharingWithGoogleSupportEnabled] DataSharingSettings sharingWithGoogleSupportEnabled + * @property {boolean|null} [sharingWithGoogleAssignedSalesEnabled] DataSharingSettings sharingWithGoogleAssignedSalesEnabled + * @property {boolean|null} [sharingWithGoogleAnySalesEnabled] DataSharingSettings sharingWithGoogleAnySalesEnabled + * @property {boolean|null} [sharingWithGoogleProductsEnabled] DataSharingSettings sharingWithGoogleProductsEnabled + * @property {boolean|null} [sharingWithOthersEnabled] DataSharingSettings sharingWithOthersEnabled + */ + + /** + * Constructs a new DataSharingSettings. + * @memberof google.analytics.admin.v1beta + * @classdesc Represents a DataSharingSettings. + * @implements IDataSharingSettings + * @constructor + * @param {google.analytics.admin.v1beta.IDataSharingSettings=} [properties] Properties to set + */ + function DataSharingSettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DataSharingSettings name. + * @member {string} name + * @memberof google.analytics.admin.v1beta.DataSharingSettings + * @instance + */ + DataSharingSettings.prototype.name = ""; + + /** + * DataSharingSettings sharingWithGoogleSupportEnabled. + * @member {boolean} sharingWithGoogleSupportEnabled + * @memberof google.analytics.admin.v1beta.DataSharingSettings + * @instance + */ + DataSharingSettings.prototype.sharingWithGoogleSupportEnabled = false; + + /** + * DataSharingSettings sharingWithGoogleAssignedSalesEnabled. + * @member {boolean} sharingWithGoogleAssignedSalesEnabled + * @memberof google.analytics.admin.v1beta.DataSharingSettings + * @instance + */ + DataSharingSettings.prototype.sharingWithGoogleAssignedSalesEnabled = false; + + /** + * DataSharingSettings sharingWithGoogleAnySalesEnabled. + * @member {boolean} sharingWithGoogleAnySalesEnabled + * @memberof google.analytics.admin.v1beta.DataSharingSettings + * @instance + */ + DataSharingSettings.prototype.sharingWithGoogleAnySalesEnabled = false; + + /** + * DataSharingSettings sharingWithGoogleProductsEnabled. + * @member {boolean} sharingWithGoogleProductsEnabled + * @memberof google.analytics.admin.v1beta.DataSharingSettings + * @instance + */ + DataSharingSettings.prototype.sharingWithGoogleProductsEnabled = false; + + /** + * DataSharingSettings sharingWithOthersEnabled. + * @member {boolean} sharingWithOthersEnabled + * @memberof google.analytics.admin.v1beta.DataSharingSettings + * @instance + */ + DataSharingSettings.prototype.sharingWithOthersEnabled = false; + + /** + * Creates a new DataSharingSettings instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1beta.DataSharingSettings + * @static + * @param {google.analytics.admin.v1beta.IDataSharingSettings=} [properties] Properties to set + * @returns {google.analytics.admin.v1beta.DataSharingSettings} DataSharingSettings instance + */ + DataSharingSettings.create = function create(properties) { + return new DataSharingSettings(properties); + }; + + /** + * Encodes the specified DataSharingSettings message. Does not implicitly {@link google.analytics.admin.v1beta.DataSharingSettings.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1beta.DataSharingSettings + * @static + * @param {google.analytics.admin.v1beta.IDataSharingSettings} message DataSharingSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataSharingSettings.encode = function encode(message, writer) { + 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.sharingWithGoogleSupportEnabled != null && Object.hasOwnProperty.call(message, "sharingWithGoogleSupportEnabled")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.sharingWithGoogleSupportEnabled); + if (message.sharingWithGoogleAssignedSalesEnabled != null && Object.hasOwnProperty.call(message, "sharingWithGoogleAssignedSalesEnabled")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.sharingWithGoogleAssignedSalesEnabled); + if (message.sharingWithGoogleAnySalesEnabled != null && Object.hasOwnProperty.call(message, "sharingWithGoogleAnySalesEnabled")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.sharingWithGoogleAnySalesEnabled); + if (message.sharingWithGoogleProductsEnabled != null && Object.hasOwnProperty.call(message, "sharingWithGoogleProductsEnabled")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.sharingWithGoogleProductsEnabled); + if (message.sharingWithOthersEnabled != null && Object.hasOwnProperty.call(message, "sharingWithOthersEnabled")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.sharingWithOthersEnabled); + return writer; + }; + + /** + * Encodes the specified DataSharingSettings message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.DataSharingSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1beta.DataSharingSettings + * @static + * @param {google.analytics.admin.v1beta.IDataSharingSettings} message DataSharingSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataSharingSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DataSharingSettings message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1beta.DataSharingSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1beta.DataSharingSettings} DataSharingSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataSharingSettings.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1beta.DataSharingSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.sharingWithGoogleSupportEnabled = reader.bool(); + break; + } + case 3: { + message.sharingWithGoogleAssignedSalesEnabled = reader.bool(); + break; + } + case 4: { + message.sharingWithGoogleAnySalesEnabled = reader.bool(); + break; + } + case 5: { + message.sharingWithGoogleProductsEnabled = reader.bool(); + break; + } + case 6: { + message.sharingWithOthersEnabled = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DataSharingSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1beta.DataSharingSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1beta.DataSharingSettings} DataSharingSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataSharingSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DataSharingSettings message. + * @function verify + * @memberof google.analytics.admin.v1beta.DataSharingSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DataSharingSettings.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.sharingWithGoogleSupportEnabled != null && message.hasOwnProperty("sharingWithGoogleSupportEnabled")) + if (typeof message.sharingWithGoogleSupportEnabled !== "boolean") + return "sharingWithGoogleSupportEnabled: boolean expected"; + if (message.sharingWithGoogleAssignedSalesEnabled != null && message.hasOwnProperty("sharingWithGoogleAssignedSalesEnabled")) + if (typeof message.sharingWithGoogleAssignedSalesEnabled !== "boolean") + return "sharingWithGoogleAssignedSalesEnabled: boolean expected"; + if (message.sharingWithGoogleAnySalesEnabled != null && message.hasOwnProperty("sharingWithGoogleAnySalesEnabled")) + if (typeof message.sharingWithGoogleAnySalesEnabled !== "boolean") + return "sharingWithGoogleAnySalesEnabled: boolean expected"; + if (message.sharingWithGoogleProductsEnabled != null && message.hasOwnProperty("sharingWithGoogleProductsEnabled")) + if (typeof message.sharingWithGoogleProductsEnabled !== "boolean") + return "sharingWithGoogleProductsEnabled: boolean expected"; + if (message.sharingWithOthersEnabled != null && message.hasOwnProperty("sharingWithOthersEnabled")) + if (typeof message.sharingWithOthersEnabled !== "boolean") + return "sharingWithOthersEnabled: boolean expected"; + return null; + }; + + /** + * Creates a DataSharingSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1beta.DataSharingSettings + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1beta.DataSharingSettings} DataSharingSettings + */ + DataSharingSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1beta.DataSharingSettings) + return object; + var message = new $root.google.analytics.admin.v1beta.DataSharingSettings(); + if (object.name != null) + message.name = String(object.name); + if (object.sharingWithGoogleSupportEnabled != null) + message.sharingWithGoogleSupportEnabled = Boolean(object.sharingWithGoogleSupportEnabled); + if (object.sharingWithGoogleAssignedSalesEnabled != null) + message.sharingWithGoogleAssignedSalesEnabled = Boolean(object.sharingWithGoogleAssignedSalesEnabled); + if (object.sharingWithGoogleAnySalesEnabled != null) + message.sharingWithGoogleAnySalesEnabled = Boolean(object.sharingWithGoogleAnySalesEnabled); + if (object.sharingWithGoogleProductsEnabled != null) + message.sharingWithGoogleProductsEnabled = Boolean(object.sharingWithGoogleProductsEnabled); + if (object.sharingWithOthersEnabled != null) + message.sharingWithOthersEnabled = Boolean(object.sharingWithOthersEnabled); + return message; + }; + + /** + * Creates a plain object from a DataSharingSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1beta.DataSharingSettings + * @static + * @param {google.analytics.admin.v1beta.DataSharingSettings} message DataSharingSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DataSharingSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.sharingWithGoogleSupportEnabled = false; + object.sharingWithGoogleAssignedSalesEnabled = false; + object.sharingWithGoogleAnySalesEnabled = false; + object.sharingWithGoogleProductsEnabled = false; + object.sharingWithOthersEnabled = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.sharingWithGoogleSupportEnabled != null && message.hasOwnProperty("sharingWithGoogleSupportEnabled")) + object.sharingWithGoogleSupportEnabled = message.sharingWithGoogleSupportEnabled; + if (message.sharingWithGoogleAssignedSalesEnabled != null && message.hasOwnProperty("sharingWithGoogleAssignedSalesEnabled")) + object.sharingWithGoogleAssignedSalesEnabled = message.sharingWithGoogleAssignedSalesEnabled; + if (message.sharingWithGoogleAnySalesEnabled != null && message.hasOwnProperty("sharingWithGoogleAnySalesEnabled")) + object.sharingWithGoogleAnySalesEnabled = message.sharingWithGoogleAnySalesEnabled; + if (message.sharingWithGoogleProductsEnabled != null && message.hasOwnProperty("sharingWithGoogleProductsEnabled")) + object.sharingWithGoogleProductsEnabled = message.sharingWithGoogleProductsEnabled; + if (message.sharingWithOthersEnabled != null && message.hasOwnProperty("sharingWithOthersEnabled")) + object.sharingWithOthersEnabled = message.sharingWithOthersEnabled; + return object; + }; + + /** + * Converts this DataSharingSettings to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1beta.DataSharingSettings + * @instance + * @returns {Object.} JSON object + */ + DataSharingSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DataSharingSettings + * @function getTypeUrl + * @memberof google.analytics.admin.v1beta.DataSharingSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DataSharingSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1beta.DataSharingSettings"; + }; + + return DataSharingSettings; + })(); + + v1beta.AccountSummary = (function() { + + /** + * Properties of an AccountSummary. + * @memberof google.analytics.admin.v1beta + * @interface IAccountSummary + * @property {string|null} [name] AccountSummary name + * @property {string|null} [account] AccountSummary account + * @property {string|null} [displayName] AccountSummary displayName + * @property {Array.|null} [propertySummaries] AccountSummary propertySummaries + */ + + /** + * Constructs a new AccountSummary. + * @memberof google.analytics.admin.v1beta + * @classdesc Represents an AccountSummary. + * @implements IAccountSummary + * @constructor + * @param {google.analytics.admin.v1beta.IAccountSummary=} [properties] Properties to set + */ + function AccountSummary(properties) { + this.propertySummaries = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AccountSummary name. + * @member {string} name + * @memberof google.analytics.admin.v1beta.AccountSummary + * @instance + */ + AccountSummary.prototype.name = ""; + + /** + * AccountSummary account. + * @member {string} account + * @memberof google.analytics.admin.v1beta.AccountSummary + * @instance + */ + AccountSummary.prototype.account = ""; + + /** + * AccountSummary displayName. + * @member {string} displayName + * @memberof google.analytics.admin.v1beta.AccountSummary + * @instance + */ + AccountSummary.prototype.displayName = ""; + + /** + * AccountSummary propertySummaries. + * @member {Array.} propertySummaries + * @memberof google.analytics.admin.v1beta.AccountSummary + * @instance + */ + AccountSummary.prototype.propertySummaries = $util.emptyArray; + + /** + * Creates a new AccountSummary instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1beta.AccountSummary + * @static + * @param {google.analytics.admin.v1beta.IAccountSummary=} [properties] Properties to set + * @returns {google.analytics.admin.v1beta.AccountSummary} AccountSummary instance + */ + AccountSummary.create = function create(properties) { + return new AccountSummary(properties); + }; + + /** + * Encodes the specified AccountSummary message. Does not implicitly {@link google.analytics.admin.v1beta.AccountSummary.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1beta.AccountSummary + * @static + * @param {google.analytics.admin.v1beta.IAccountSummary} message AccountSummary message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AccountSummary.encode = function encode(message, writer) { + 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.account != null && Object.hasOwnProperty.call(message, "account")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.account); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.displayName); + if (message.propertySummaries != null && message.propertySummaries.length) + for (var i = 0; i < message.propertySummaries.length; ++i) + $root.google.analytics.admin.v1beta.PropertySummary.encode(message.propertySummaries[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified AccountSummary message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.AccountSummary.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1beta.AccountSummary + * @static + * @param {google.analytics.admin.v1beta.IAccountSummary} message AccountSummary message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AccountSummary.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AccountSummary message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1beta.AccountSummary + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1beta.AccountSummary} AccountSummary + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AccountSummary.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1beta.AccountSummary(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.account = reader.string(); + break; + } + case 3: { + message.displayName = reader.string(); + break; + } + case 4: { + if (!(message.propertySummaries && message.propertySummaries.length)) + message.propertySummaries = []; + message.propertySummaries.push($root.google.analytics.admin.v1beta.PropertySummary.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AccountSummary message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1beta.AccountSummary + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1beta.AccountSummary} AccountSummary + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AccountSummary.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AccountSummary message. + * @function verify + * @memberof google.analytics.admin.v1beta.AccountSummary + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AccountSummary.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.account != null && message.hasOwnProperty("account")) + if (!$util.isString(message.account)) + return "account: string expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.propertySummaries != null && message.hasOwnProperty("propertySummaries")) { + if (!Array.isArray(message.propertySummaries)) + return "propertySummaries: array expected"; + for (var i = 0; i < message.propertySummaries.length; ++i) { + var error = $root.google.analytics.admin.v1beta.PropertySummary.verify(message.propertySummaries[i]); + if (error) + return "propertySummaries." + error; + } + } + return null; + }; + + /** + * Creates an AccountSummary message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1beta.AccountSummary + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1beta.AccountSummary} AccountSummary + */ + AccountSummary.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1beta.AccountSummary) + return object; + var message = new $root.google.analytics.admin.v1beta.AccountSummary(); + if (object.name != null) + message.name = String(object.name); + if (object.account != null) + message.account = String(object.account); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.propertySummaries) { + if (!Array.isArray(object.propertySummaries)) + throw TypeError(".google.analytics.admin.v1beta.AccountSummary.propertySummaries: array expected"); + message.propertySummaries = []; + for (var i = 0; i < object.propertySummaries.length; ++i) { + if (typeof object.propertySummaries[i] !== "object") + throw TypeError(".google.analytics.admin.v1beta.AccountSummary.propertySummaries: object expected"); + message.propertySummaries[i] = $root.google.analytics.admin.v1beta.PropertySummary.fromObject(object.propertySummaries[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an AccountSummary message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1beta.AccountSummary + * @static + * @param {google.analytics.admin.v1beta.AccountSummary} message AccountSummary + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AccountSummary.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.propertySummaries = []; + if (options.defaults) { + object.name = ""; + object.account = ""; + object.displayName = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.account != null && message.hasOwnProperty("account")) + object.account = message.account; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.propertySummaries && message.propertySummaries.length) { + object.propertySummaries = []; + for (var j = 0; j < message.propertySummaries.length; ++j) + object.propertySummaries[j] = $root.google.analytics.admin.v1beta.PropertySummary.toObject(message.propertySummaries[j], options); + } + return object; + }; + + /** + * Converts this AccountSummary to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1beta.AccountSummary + * @instance + * @returns {Object.} JSON object + */ + AccountSummary.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AccountSummary + * @function getTypeUrl + * @memberof google.analytics.admin.v1beta.AccountSummary + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AccountSummary.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1beta.AccountSummary"; + }; + + return AccountSummary; + })(); + + v1beta.PropertySummary = (function() { + + /** + * Properties of a PropertySummary. + * @memberof google.analytics.admin.v1beta + * @interface IPropertySummary + * @property {string|null} [property] PropertySummary property + * @property {string|null} [displayName] PropertySummary displayName + * @property {google.analytics.admin.v1beta.PropertyType|null} [propertyType] PropertySummary propertyType + * @property {string|null} [parent] PropertySummary parent + */ + + /** + * Constructs a new PropertySummary. + * @memberof google.analytics.admin.v1beta + * @classdesc Represents a PropertySummary. + * @implements IPropertySummary + * @constructor + * @param {google.analytics.admin.v1beta.IPropertySummary=} [properties] Properties to set + */ + function PropertySummary(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PropertySummary property. + * @member {string} property + * @memberof google.analytics.admin.v1beta.PropertySummary + * @instance + */ + PropertySummary.prototype.property = ""; + + /** + * PropertySummary displayName. + * @member {string} displayName + * @memberof google.analytics.admin.v1beta.PropertySummary + * @instance + */ + PropertySummary.prototype.displayName = ""; + + /** + * PropertySummary propertyType. + * @member {google.analytics.admin.v1beta.PropertyType} propertyType + * @memberof google.analytics.admin.v1beta.PropertySummary + * @instance + */ + PropertySummary.prototype.propertyType = 0; + + /** + * PropertySummary parent. + * @member {string} parent + * @memberof google.analytics.admin.v1beta.PropertySummary + * @instance + */ + PropertySummary.prototype.parent = ""; + + /** + * Creates a new PropertySummary instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1beta.PropertySummary + * @static + * @param {google.analytics.admin.v1beta.IPropertySummary=} [properties] Properties to set + * @returns {google.analytics.admin.v1beta.PropertySummary} PropertySummary instance + */ + PropertySummary.create = function create(properties) { + return new PropertySummary(properties); + }; + + /** + * Encodes the specified PropertySummary message. Does not implicitly {@link google.analytics.admin.v1beta.PropertySummary.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1beta.PropertySummary + * @static + * @param {google.analytics.admin.v1beta.IPropertySummary} message PropertySummary message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PropertySummary.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.property != null && Object.hasOwnProperty.call(message, "property")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.property); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); + if (message.propertyType != null && Object.hasOwnProperty.call(message, "propertyType")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.propertyType); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.parent); + return writer; + }; + + /** + * Encodes the specified PropertySummary message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.PropertySummary.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1beta.PropertySummary + * @static + * @param {google.analytics.admin.v1beta.IPropertySummary} message PropertySummary message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PropertySummary.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PropertySummary message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1beta.PropertySummary + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1beta.PropertySummary} PropertySummary + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PropertySummary.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1beta.PropertySummary(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.property = reader.string(); + break; + } + case 2: { + message.displayName = reader.string(); + break; + } + case 3: { + message.propertyType = reader.int32(); + break; + } + case 4: { + message.parent = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PropertySummary message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1beta.PropertySummary + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1beta.PropertySummary} PropertySummary + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PropertySummary.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PropertySummary message. + * @function verify + * @memberof google.analytics.admin.v1beta.PropertySummary + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PropertySummary.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.property != null && message.hasOwnProperty("property")) + if (!$util.isString(message.property)) + return "property: string expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.propertyType != null && message.hasOwnProperty("propertyType")) + switch (message.propertyType) { + default: + return "propertyType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + return null; + }; + + /** + * Creates a PropertySummary message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1beta.PropertySummary + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1beta.PropertySummary} PropertySummary + */ + PropertySummary.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1beta.PropertySummary) + return object; + var message = new $root.google.analytics.admin.v1beta.PropertySummary(); + if (object.property != null) + message.property = String(object.property); + if (object.displayName != null) + message.displayName = String(object.displayName); + switch (object.propertyType) { + default: + if (typeof object.propertyType === "number") { + message.propertyType = object.propertyType; + break; + } + break; + case "PROPERTY_TYPE_UNSPECIFIED": + case 0: + message.propertyType = 0; + break; + case "PROPERTY_TYPE_ORDINARY": + case 1: + message.propertyType = 1; + break; + case "PROPERTY_TYPE_SUBPROPERTY": + case 2: + message.propertyType = 2; + break; + case "PROPERTY_TYPE_ROLLUP": + case 3: + message.propertyType = 3; + break; + } + if (object.parent != null) + message.parent = String(object.parent); + return message; + }; + + /** + * Creates a plain object from a PropertySummary message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1beta.PropertySummary + * @static + * @param {google.analytics.admin.v1beta.PropertySummary} message PropertySummary + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PropertySummary.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.property = ""; + object.displayName = ""; + object.propertyType = options.enums === String ? "PROPERTY_TYPE_UNSPECIFIED" : 0; + object.parent = ""; + } + if (message.property != null && message.hasOwnProperty("property")) + object.property = message.property; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.propertyType != null && message.hasOwnProperty("propertyType")) + object.propertyType = options.enums === String ? $root.google.analytics.admin.v1beta.PropertyType[message.propertyType] === undefined ? message.propertyType : $root.google.analytics.admin.v1beta.PropertyType[message.propertyType] : message.propertyType; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + return object; + }; + + /** + * Converts this PropertySummary to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1beta.PropertySummary + * @instance + * @returns {Object.} JSON object + */ + PropertySummary.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PropertySummary + * @function getTypeUrl + * @memberof google.analytics.admin.v1beta.PropertySummary + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PropertySummary.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1beta.PropertySummary"; + }; + + return PropertySummary; + })(); + + v1beta.MeasurementProtocolSecret = (function() { + + /** + * Properties of a MeasurementProtocolSecret. + * @memberof google.analytics.admin.v1beta + * @interface IMeasurementProtocolSecret + * @property {string|null} [name] MeasurementProtocolSecret name + * @property {string|null} [displayName] MeasurementProtocolSecret displayName + * @property {string|null} [secretValue] MeasurementProtocolSecret secretValue + */ + + /** + * Constructs a new MeasurementProtocolSecret. + * @memberof google.analytics.admin.v1beta + * @classdesc Represents a MeasurementProtocolSecret. + * @implements IMeasurementProtocolSecret + * @constructor + * @param {google.analytics.admin.v1beta.IMeasurementProtocolSecret=} [properties] Properties to set + */ + function MeasurementProtocolSecret(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MeasurementProtocolSecret name. + * @member {string} name + * @memberof google.analytics.admin.v1beta.MeasurementProtocolSecret + * @instance + */ + MeasurementProtocolSecret.prototype.name = ""; + + /** + * MeasurementProtocolSecret displayName. + * @member {string} displayName + * @memberof google.analytics.admin.v1beta.MeasurementProtocolSecret + * @instance + */ + MeasurementProtocolSecret.prototype.displayName = ""; + + /** + * MeasurementProtocolSecret secretValue. + * @member {string} secretValue + * @memberof google.analytics.admin.v1beta.MeasurementProtocolSecret + * @instance + */ + MeasurementProtocolSecret.prototype.secretValue = ""; + + /** + * Creates a new MeasurementProtocolSecret instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1beta.MeasurementProtocolSecret + * @static + * @param {google.analytics.admin.v1beta.IMeasurementProtocolSecret=} [properties] Properties to set + * @returns {google.analytics.admin.v1beta.MeasurementProtocolSecret} MeasurementProtocolSecret instance + */ + MeasurementProtocolSecret.create = function create(properties) { + return new MeasurementProtocolSecret(properties); + }; + + /** + * Encodes the specified MeasurementProtocolSecret message. Does not implicitly {@link google.analytics.admin.v1beta.MeasurementProtocolSecret.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1beta.MeasurementProtocolSecret + * @static + * @param {google.analytics.admin.v1beta.IMeasurementProtocolSecret} message MeasurementProtocolSecret message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MeasurementProtocolSecret.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); + if (message.secretValue != null && Object.hasOwnProperty.call(message, "secretValue")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.secretValue); + return writer; + }; + + /** + * Encodes the specified MeasurementProtocolSecret message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.MeasurementProtocolSecret.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1beta.MeasurementProtocolSecret + * @static + * @param {google.analytics.admin.v1beta.IMeasurementProtocolSecret} message MeasurementProtocolSecret message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MeasurementProtocolSecret.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MeasurementProtocolSecret message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1beta.MeasurementProtocolSecret + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1beta.MeasurementProtocolSecret} MeasurementProtocolSecret + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MeasurementProtocolSecret.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1beta.MeasurementProtocolSecret(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.displayName = reader.string(); + break; + } + case 3: { + message.secretValue = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MeasurementProtocolSecret message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1beta.MeasurementProtocolSecret + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1beta.MeasurementProtocolSecret} MeasurementProtocolSecret + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MeasurementProtocolSecret.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MeasurementProtocolSecret message. + * @function verify + * @memberof google.analytics.admin.v1beta.MeasurementProtocolSecret + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MeasurementProtocolSecret.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.secretValue != null && message.hasOwnProperty("secretValue")) + if (!$util.isString(message.secretValue)) + return "secretValue: string expected"; + return null; + }; + + /** + * Creates a MeasurementProtocolSecret message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1beta.MeasurementProtocolSecret + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1beta.MeasurementProtocolSecret} MeasurementProtocolSecret + */ + MeasurementProtocolSecret.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1beta.MeasurementProtocolSecret) + return object; + var message = new $root.google.analytics.admin.v1beta.MeasurementProtocolSecret(); + if (object.name != null) + message.name = String(object.name); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.secretValue != null) + message.secretValue = String(object.secretValue); + return message; + }; + + /** + * Creates a plain object from a MeasurementProtocolSecret message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1beta.MeasurementProtocolSecret + * @static + * @param {google.analytics.admin.v1beta.MeasurementProtocolSecret} message MeasurementProtocolSecret + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MeasurementProtocolSecret.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.displayName = ""; + object.secretValue = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.secretValue != null && message.hasOwnProperty("secretValue")) + object.secretValue = message.secretValue; + return object; + }; + + /** + * Converts this MeasurementProtocolSecret to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1beta.MeasurementProtocolSecret + * @instance + * @returns {Object.} JSON object + */ + MeasurementProtocolSecret.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MeasurementProtocolSecret + * @function getTypeUrl + * @memberof google.analytics.admin.v1beta.MeasurementProtocolSecret + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MeasurementProtocolSecret.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1beta.MeasurementProtocolSecret"; + }; + + return MeasurementProtocolSecret; + })(); + + v1beta.ChangeHistoryEvent = (function() { + + /** + * Properties of a ChangeHistoryEvent. + * @memberof google.analytics.admin.v1beta + * @interface IChangeHistoryEvent + * @property {string|null} [id] ChangeHistoryEvent id + * @property {google.protobuf.ITimestamp|null} [changeTime] ChangeHistoryEvent changeTime + * @property {google.analytics.admin.v1beta.ActorType|null} [actorType] ChangeHistoryEvent actorType + * @property {string|null} [userActorEmail] ChangeHistoryEvent userActorEmail + * @property {boolean|null} [changesFiltered] ChangeHistoryEvent changesFiltered + * @property {Array.|null} [changes] ChangeHistoryEvent changes + */ + + /** + * Constructs a new ChangeHistoryEvent. + * @memberof google.analytics.admin.v1beta + * @classdesc Represents a ChangeHistoryEvent. + * @implements IChangeHistoryEvent + * @constructor + * @param {google.analytics.admin.v1beta.IChangeHistoryEvent=} [properties] Properties to set + */ + function ChangeHistoryEvent(properties) { + this.changes = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ChangeHistoryEvent id. + * @member {string} id + * @memberof google.analytics.admin.v1beta.ChangeHistoryEvent + * @instance + */ + ChangeHistoryEvent.prototype.id = ""; + + /** + * ChangeHistoryEvent changeTime. + * @member {google.protobuf.ITimestamp|null|undefined} changeTime + * @memberof google.analytics.admin.v1beta.ChangeHistoryEvent + * @instance + */ + ChangeHistoryEvent.prototype.changeTime = null; + + /** + * ChangeHistoryEvent actorType. + * @member {google.analytics.admin.v1beta.ActorType} actorType + * @memberof google.analytics.admin.v1beta.ChangeHistoryEvent + * @instance + */ + ChangeHistoryEvent.prototype.actorType = 0; + + /** + * ChangeHistoryEvent userActorEmail. + * @member {string} userActorEmail + * @memberof google.analytics.admin.v1beta.ChangeHistoryEvent + * @instance + */ + ChangeHistoryEvent.prototype.userActorEmail = ""; + + /** + * ChangeHistoryEvent changesFiltered. + * @member {boolean} changesFiltered + * @memberof google.analytics.admin.v1beta.ChangeHistoryEvent + * @instance + */ + ChangeHistoryEvent.prototype.changesFiltered = false; + + /** + * ChangeHistoryEvent changes. + * @member {Array.} changes + * @memberof google.analytics.admin.v1beta.ChangeHistoryEvent + * @instance + */ + ChangeHistoryEvent.prototype.changes = $util.emptyArray; + + /** + * Creates a new ChangeHistoryEvent instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1beta.ChangeHistoryEvent + * @static + * @param {google.analytics.admin.v1beta.IChangeHistoryEvent=} [properties] Properties to set + * @returns {google.analytics.admin.v1beta.ChangeHistoryEvent} ChangeHistoryEvent instance + */ + ChangeHistoryEvent.create = function create(properties) { + return new ChangeHistoryEvent(properties); + }; + + /** + * Encodes the specified ChangeHistoryEvent message. Does not implicitly {@link google.analytics.admin.v1beta.ChangeHistoryEvent.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1beta.ChangeHistoryEvent + * @static + * @param {google.analytics.admin.v1beta.IChangeHistoryEvent} message ChangeHistoryEvent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ChangeHistoryEvent.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.id != null && Object.hasOwnProperty.call(message, "id")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.id); + if (message.changeTime != null && Object.hasOwnProperty.call(message, "changeTime")) + $root.google.protobuf.Timestamp.encode(message.changeTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.actorType != null && Object.hasOwnProperty.call(message, "actorType")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.actorType); + if (message.userActorEmail != null && Object.hasOwnProperty.call(message, "userActorEmail")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.userActorEmail); + if (message.changesFiltered != null && Object.hasOwnProperty.call(message, "changesFiltered")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.changesFiltered); + if (message.changes != null && message.changes.length) + for (var i = 0; i < message.changes.length; ++i) + $root.google.analytics.admin.v1beta.ChangeHistoryChange.encode(message.changes[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ChangeHistoryEvent message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.ChangeHistoryEvent.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1beta.ChangeHistoryEvent + * @static + * @param {google.analytics.admin.v1beta.IChangeHistoryEvent} message ChangeHistoryEvent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ChangeHistoryEvent.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ChangeHistoryEvent message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1beta.ChangeHistoryEvent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1beta.ChangeHistoryEvent} ChangeHistoryEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ChangeHistoryEvent.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1beta.ChangeHistoryEvent(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.id = reader.string(); + break; + } + case 2: { + message.changeTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 3: { + message.actorType = reader.int32(); + break; + } + case 4: { + message.userActorEmail = reader.string(); + break; + } + case 5: { + message.changesFiltered = reader.bool(); + break; + } + case 6: { + if (!(message.changes && message.changes.length)) + message.changes = []; + message.changes.push($root.google.analytics.admin.v1beta.ChangeHistoryChange.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ChangeHistoryEvent message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1beta.ChangeHistoryEvent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1beta.ChangeHistoryEvent} ChangeHistoryEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ChangeHistoryEvent.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ChangeHistoryEvent message. + * @function verify + * @memberof google.analytics.admin.v1beta.ChangeHistoryEvent + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ChangeHistoryEvent.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.id != null && message.hasOwnProperty("id")) + if (!$util.isString(message.id)) + return "id: string expected"; + if (message.changeTime != null && message.hasOwnProperty("changeTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.changeTime); + if (error) + return "changeTime." + error; + } + if (message.actorType != null && message.hasOwnProperty("actorType")) + switch (message.actorType) { + default: + return "actorType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.userActorEmail != null && message.hasOwnProperty("userActorEmail")) + if (!$util.isString(message.userActorEmail)) + return "userActorEmail: string expected"; + if (message.changesFiltered != null && message.hasOwnProperty("changesFiltered")) + if (typeof message.changesFiltered !== "boolean") + return "changesFiltered: boolean expected"; + if (message.changes != null && message.hasOwnProperty("changes")) { + if (!Array.isArray(message.changes)) + return "changes: array expected"; + for (var i = 0; i < message.changes.length; ++i) { + var error = $root.google.analytics.admin.v1beta.ChangeHistoryChange.verify(message.changes[i]); + if (error) + return "changes." + error; + } + } + return null; + }; + + /** + * Creates a ChangeHistoryEvent message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1beta.ChangeHistoryEvent + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1beta.ChangeHistoryEvent} ChangeHistoryEvent + */ + ChangeHistoryEvent.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1beta.ChangeHistoryEvent) + return object; + var message = new $root.google.analytics.admin.v1beta.ChangeHistoryEvent(); + if (object.id != null) + message.id = String(object.id); + if (object.changeTime != null) { + if (typeof object.changeTime !== "object") + throw TypeError(".google.analytics.admin.v1beta.ChangeHistoryEvent.changeTime: object expected"); + message.changeTime = $root.google.protobuf.Timestamp.fromObject(object.changeTime); + } + switch (object.actorType) { + default: + if (typeof object.actorType === "number") { + message.actorType = object.actorType; + break; + } + break; + case "ACTOR_TYPE_UNSPECIFIED": + case 0: + message.actorType = 0; + break; + case "USER": + case 1: + message.actorType = 1; + break; + case "SYSTEM": + case 2: + message.actorType = 2; + break; + case "SUPPORT": + case 3: + message.actorType = 3; + break; + } + if (object.userActorEmail != null) + message.userActorEmail = String(object.userActorEmail); + if (object.changesFiltered != null) + message.changesFiltered = Boolean(object.changesFiltered); + if (object.changes) { + if (!Array.isArray(object.changes)) + throw TypeError(".google.analytics.admin.v1beta.ChangeHistoryEvent.changes: array expected"); + message.changes = []; + for (var i = 0; i < object.changes.length; ++i) { + if (typeof object.changes[i] !== "object") + throw TypeError(".google.analytics.admin.v1beta.ChangeHistoryEvent.changes: object expected"); + message.changes[i] = $root.google.analytics.admin.v1beta.ChangeHistoryChange.fromObject(object.changes[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a ChangeHistoryEvent message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1beta.ChangeHistoryEvent + * @static + * @param {google.analytics.admin.v1beta.ChangeHistoryEvent} message ChangeHistoryEvent + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ChangeHistoryEvent.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.changes = []; + if (options.defaults) { + object.id = ""; + object.changeTime = null; + object.actorType = options.enums === String ? "ACTOR_TYPE_UNSPECIFIED" : 0; + object.userActorEmail = ""; + object.changesFiltered = false; + } + if (message.id != null && message.hasOwnProperty("id")) + object.id = message.id; + if (message.changeTime != null && message.hasOwnProperty("changeTime")) + object.changeTime = $root.google.protobuf.Timestamp.toObject(message.changeTime, options); + if (message.actorType != null && message.hasOwnProperty("actorType")) + object.actorType = options.enums === String ? $root.google.analytics.admin.v1beta.ActorType[message.actorType] === undefined ? message.actorType : $root.google.analytics.admin.v1beta.ActorType[message.actorType] : message.actorType; + if (message.userActorEmail != null && message.hasOwnProperty("userActorEmail")) + object.userActorEmail = message.userActorEmail; + if (message.changesFiltered != null && message.hasOwnProperty("changesFiltered")) + object.changesFiltered = message.changesFiltered; + if (message.changes && message.changes.length) { + object.changes = []; + for (var j = 0; j < message.changes.length; ++j) + object.changes[j] = $root.google.analytics.admin.v1beta.ChangeHistoryChange.toObject(message.changes[j], options); + } + return object; + }; + + /** + * Converts this ChangeHistoryEvent to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1beta.ChangeHistoryEvent + * @instance + * @returns {Object.} JSON object + */ + ChangeHistoryEvent.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ChangeHistoryEvent + * @function getTypeUrl + * @memberof google.analytics.admin.v1beta.ChangeHistoryEvent + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ChangeHistoryEvent.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1beta.ChangeHistoryEvent"; + }; + + return ChangeHistoryEvent; + })(); + + v1beta.ChangeHistoryChange = (function() { + + /** + * Properties of a ChangeHistoryChange. + * @memberof google.analytics.admin.v1beta + * @interface IChangeHistoryChange + * @property {string|null} [resource] ChangeHistoryChange resource + * @property {google.analytics.admin.v1beta.ActionType|null} [action] ChangeHistoryChange action + * @property {google.analytics.admin.v1beta.ChangeHistoryChange.IChangeHistoryResource|null} [resourceBeforeChange] ChangeHistoryChange resourceBeforeChange + * @property {google.analytics.admin.v1beta.ChangeHistoryChange.IChangeHistoryResource|null} [resourceAfterChange] ChangeHistoryChange resourceAfterChange + */ + + /** + * Constructs a new ChangeHistoryChange. + * @memberof google.analytics.admin.v1beta + * @classdesc Represents a ChangeHistoryChange. + * @implements IChangeHistoryChange + * @constructor + * @param {google.analytics.admin.v1beta.IChangeHistoryChange=} [properties] Properties to set + */ + function ChangeHistoryChange(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ChangeHistoryChange resource. + * @member {string} resource + * @memberof google.analytics.admin.v1beta.ChangeHistoryChange + * @instance + */ + ChangeHistoryChange.prototype.resource = ""; + + /** + * ChangeHistoryChange action. + * @member {google.analytics.admin.v1beta.ActionType} action + * @memberof google.analytics.admin.v1beta.ChangeHistoryChange + * @instance + */ + ChangeHistoryChange.prototype.action = 0; + + /** + * ChangeHistoryChange resourceBeforeChange. + * @member {google.analytics.admin.v1beta.ChangeHistoryChange.IChangeHistoryResource|null|undefined} resourceBeforeChange + * @memberof google.analytics.admin.v1beta.ChangeHistoryChange + * @instance + */ + ChangeHistoryChange.prototype.resourceBeforeChange = null; + + /** + * ChangeHistoryChange resourceAfterChange. + * @member {google.analytics.admin.v1beta.ChangeHistoryChange.IChangeHistoryResource|null|undefined} resourceAfterChange + * @memberof google.analytics.admin.v1beta.ChangeHistoryChange + * @instance + */ + ChangeHistoryChange.prototype.resourceAfterChange = null; + + /** + * Creates a new ChangeHistoryChange instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1beta.ChangeHistoryChange + * @static + * @param {google.analytics.admin.v1beta.IChangeHistoryChange=} [properties] Properties to set + * @returns {google.analytics.admin.v1beta.ChangeHistoryChange} ChangeHistoryChange instance + */ + ChangeHistoryChange.create = function create(properties) { + return new ChangeHistoryChange(properties); + }; + + /** + * Encodes the specified ChangeHistoryChange message. Does not implicitly {@link google.analytics.admin.v1beta.ChangeHistoryChange.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1beta.ChangeHistoryChange + * @static + * @param {google.analytics.admin.v1beta.IChangeHistoryChange} message ChangeHistoryChange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ChangeHistoryChange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.resource != null && Object.hasOwnProperty.call(message, "resource")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.resource); + if (message.action != null && Object.hasOwnProperty.call(message, "action")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.action); + if (message.resourceBeforeChange != null && Object.hasOwnProperty.call(message, "resourceBeforeChange")) + $root.google.analytics.admin.v1beta.ChangeHistoryChange.ChangeHistoryResource.encode(message.resourceBeforeChange, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.resourceAfterChange != null && Object.hasOwnProperty.call(message, "resourceAfterChange")) + $root.google.analytics.admin.v1beta.ChangeHistoryChange.ChangeHistoryResource.encode(message.resourceAfterChange, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ChangeHistoryChange message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.ChangeHistoryChange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1beta.ChangeHistoryChange + * @static + * @param {google.analytics.admin.v1beta.IChangeHistoryChange} message ChangeHistoryChange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ChangeHistoryChange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ChangeHistoryChange message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1beta.ChangeHistoryChange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1beta.ChangeHistoryChange} ChangeHistoryChange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ChangeHistoryChange.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1beta.ChangeHistoryChange(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.resource = reader.string(); + break; + } + case 2: { + message.action = reader.int32(); + break; + } + case 3: { + message.resourceBeforeChange = $root.google.analytics.admin.v1beta.ChangeHistoryChange.ChangeHistoryResource.decode(reader, reader.uint32()); + break; + } + case 4: { + message.resourceAfterChange = $root.google.analytics.admin.v1beta.ChangeHistoryChange.ChangeHistoryResource.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ChangeHistoryChange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1beta.ChangeHistoryChange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1beta.ChangeHistoryChange} ChangeHistoryChange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ChangeHistoryChange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ChangeHistoryChange message. + * @function verify + * @memberof google.analytics.admin.v1beta.ChangeHistoryChange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ChangeHistoryChange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.resource != null && message.hasOwnProperty("resource")) + if (!$util.isString(message.resource)) + return "resource: string expected"; + if (message.action != null && message.hasOwnProperty("action")) + switch (message.action) { + default: + return "action: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.resourceBeforeChange != null && message.hasOwnProperty("resourceBeforeChange")) { + var error = $root.google.analytics.admin.v1beta.ChangeHistoryChange.ChangeHistoryResource.verify(message.resourceBeforeChange); + if (error) + return "resourceBeforeChange." + error; + } + if (message.resourceAfterChange != null && message.hasOwnProperty("resourceAfterChange")) { + var error = $root.google.analytics.admin.v1beta.ChangeHistoryChange.ChangeHistoryResource.verify(message.resourceAfterChange); + if (error) + return "resourceAfterChange." + error; + } + return null; + }; + + /** + * Creates a ChangeHistoryChange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1beta.ChangeHistoryChange + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1beta.ChangeHistoryChange} ChangeHistoryChange + */ + ChangeHistoryChange.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1beta.ChangeHistoryChange) + return object; + var message = new $root.google.analytics.admin.v1beta.ChangeHistoryChange(); + if (object.resource != null) + message.resource = String(object.resource); + switch (object.action) { + default: + if (typeof object.action === "number") { + message.action = object.action; + break; + } + break; + case "ACTION_TYPE_UNSPECIFIED": + case 0: + message.action = 0; + break; + case "CREATED": + case 1: + message.action = 1; + break; + case "UPDATED": + case 2: + message.action = 2; + break; + case "DELETED": + case 3: + message.action = 3; + break; + } + if (object.resourceBeforeChange != null) { + if (typeof object.resourceBeforeChange !== "object") + throw TypeError(".google.analytics.admin.v1beta.ChangeHistoryChange.resourceBeforeChange: object expected"); + message.resourceBeforeChange = $root.google.analytics.admin.v1beta.ChangeHistoryChange.ChangeHistoryResource.fromObject(object.resourceBeforeChange); + } + if (object.resourceAfterChange != null) { + if (typeof object.resourceAfterChange !== "object") + throw TypeError(".google.analytics.admin.v1beta.ChangeHistoryChange.resourceAfterChange: object expected"); + message.resourceAfterChange = $root.google.analytics.admin.v1beta.ChangeHistoryChange.ChangeHistoryResource.fromObject(object.resourceAfterChange); + } + return message; + }; + + /** + * Creates a plain object from a ChangeHistoryChange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1beta.ChangeHistoryChange + * @static + * @param {google.analytics.admin.v1beta.ChangeHistoryChange} message ChangeHistoryChange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ChangeHistoryChange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.resource = ""; + object.action = options.enums === String ? "ACTION_TYPE_UNSPECIFIED" : 0; + object.resourceBeforeChange = null; + object.resourceAfterChange = null; + } + if (message.resource != null && message.hasOwnProperty("resource")) + object.resource = message.resource; + if (message.action != null && message.hasOwnProperty("action")) + object.action = options.enums === String ? $root.google.analytics.admin.v1beta.ActionType[message.action] === undefined ? message.action : $root.google.analytics.admin.v1beta.ActionType[message.action] : message.action; + if (message.resourceBeforeChange != null && message.hasOwnProperty("resourceBeforeChange")) + object.resourceBeforeChange = $root.google.analytics.admin.v1beta.ChangeHistoryChange.ChangeHistoryResource.toObject(message.resourceBeforeChange, options); + if (message.resourceAfterChange != null && message.hasOwnProperty("resourceAfterChange")) + object.resourceAfterChange = $root.google.analytics.admin.v1beta.ChangeHistoryChange.ChangeHistoryResource.toObject(message.resourceAfterChange, options); + return object; + }; + + /** + * Converts this ChangeHistoryChange to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1beta.ChangeHistoryChange + * @instance + * @returns {Object.} JSON object + */ + ChangeHistoryChange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ChangeHistoryChange + * @function getTypeUrl + * @memberof google.analytics.admin.v1beta.ChangeHistoryChange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ChangeHistoryChange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1beta.ChangeHistoryChange"; + }; + + ChangeHistoryChange.ChangeHistoryResource = (function() { + + /** + * Properties of a ChangeHistoryResource. + * @memberof google.analytics.admin.v1beta.ChangeHistoryChange + * @interface IChangeHistoryResource + * @property {google.analytics.admin.v1beta.IAccount|null} [account] ChangeHistoryResource account + * @property {google.analytics.admin.v1beta.IProperty|null} [property] ChangeHistoryResource property + * @property {google.analytics.admin.v1beta.IFirebaseLink|null} [firebaseLink] ChangeHistoryResource firebaseLink + * @property {google.analytics.admin.v1beta.IGoogleAdsLink|null} [googleAdsLink] ChangeHistoryResource googleAdsLink + * @property {google.analytics.admin.v1beta.IConversionEvent|null} [conversionEvent] ChangeHistoryResource conversionEvent + * @property {google.analytics.admin.v1beta.IMeasurementProtocolSecret|null} [measurementProtocolSecret] ChangeHistoryResource measurementProtocolSecret + * @property {google.analytics.admin.v1beta.IDataRetentionSettings|null} [dataRetentionSettings] ChangeHistoryResource dataRetentionSettings + * @property {google.analytics.admin.v1beta.IDataStream|null} [dataStream] ChangeHistoryResource dataStream + */ + + /** + * Constructs a new ChangeHistoryResource. + * @memberof google.analytics.admin.v1beta.ChangeHistoryChange + * @classdesc Represents a ChangeHistoryResource. + * @implements IChangeHistoryResource + * @constructor + * @param {google.analytics.admin.v1beta.ChangeHistoryChange.IChangeHistoryResource=} [properties] Properties to set + */ + function ChangeHistoryResource(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ChangeHistoryResource account. + * @member {google.analytics.admin.v1beta.IAccount|null|undefined} account + * @memberof google.analytics.admin.v1beta.ChangeHistoryChange.ChangeHistoryResource + * @instance + */ + ChangeHistoryResource.prototype.account = null; + + /** + * ChangeHistoryResource property. + * @member {google.analytics.admin.v1beta.IProperty|null|undefined} property + * @memberof google.analytics.admin.v1beta.ChangeHistoryChange.ChangeHistoryResource + * @instance + */ + ChangeHistoryResource.prototype.property = null; + + /** + * ChangeHistoryResource firebaseLink. + * @member {google.analytics.admin.v1beta.IFirebaseLink|null|undefined} firebaseLink + * @memberof google.analytics.admin.v1beta.ChangeHistoryChange.ChangeHistoryResource + * @instance + */ + ChangeHistoryResource.prototype.firebaseLink = null; + + /** + * ChangeHistoryResource googleAdsLink. + * @member {google.analytics.admin.v1beta.IGoogleAdsLink|null|undefined} googleAdsLink + * @memberof google.analytics.admin.v1beta.ChangeHistoryChange.ChangeHistoryResource + * @instance + */ + ChangeHistoryResource.prototype.googleAdsLink = null; + + /** + * ChangeHistoryResource conversionEvent. + * @member {google.analytics.admin.v1beta.IConversionEvent|null|undefined} conversionEvent + * @memberof google.analytics.admin.v1beta.ChangeHistoryChange.ChangeHistoryResource + * @instance + */ + ChangeHistoryResource.prototype.conversionEvent = null; + + /** + * ChangeHistoryResource measurementProtocolSecret. + * @member {google.analytics.admin.v1beta.IMeasurementProtocolSecret|null|undefined} measurementProtocolSecret + * @memberof google.analytics.admin.v1beta.ChangeHistoryChange.ChangeHistoryResource + * @instance + */ + ChangeHistoryResource.prototype.measurementProtocolSecret = null; + + /** + * ChangeHistoryResource dataRetentionSettings. + * @member {google.analytics.admin.v1beta.IDataRetentionSettings|null|undefined} dataRetentionSettings + * @memberof google.analytics.admin.v1beta.ChangeHistoryChange.ChangeHistoryResource + * @instance + */ + ChangeHistoryResource.prototype.dataRetentionSettings = null; + + /** + * ChangeHistoryResource dataStream. + * @member {google.analytics.admin.v1beta.IDataStream|null|undefined} dataStream + * @memberof google.analytics.admin.v1beta.ChangeHistoryChange.ChangeHistoryResource + * @instance + */ + ChangeHistoryResource.prototype.dataStream = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ChangeHistoryResource resource. + * @member {"account"|"property"|"firebaseLink"|"googleAdsLink"|"conversionEvent"|"measurementProtocolSecret"|"dataRetentionSettings"|"dataStream"|undefined} resource + * @memberof google.analytics.admin.v1beta.ChangeHistoryChange.ChangeHistoryResource + * @instance + */ + Object.defineProperty(ChangeHistoryResource.prototype, "resource", { + get: $util.oneOfGetter($oneOfFields = ["account", "property", "firebaseLink", "googleAdsLink", "conversionEvent", "measurementProtocolSecret", "dataRetentionSettings", "dataStream"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ChangeHistoryResource instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1beta.ChangeHistoryChange.ChangeHistoryResource + * @static + * @param {google.analytics.admin.v1beta.ChangeHistoryChange.IChangeHistoryResource=} [properties] Properties to set + * @returns {google.analytics.admin.v1beta.ChangeHistoryChange.ChangeHistoryResource} ChangeHistoryResource instance + */ + ChangeHistoryResource.create = function create(properties) { + return new ChangeHistoryResource(properties); + }; + + /** + * Encodes the specified ChangeHistoryResource message. Does not implicitly {@link google.analytics.admin.v1beta.ChangeHistoryChange.ChangeHistoryResource.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1beta.ChangeHistoryChange.ChangeHistoryResource + * @static + * @param {google.analytics.admin.v1beta.ChangeHistoryChange.IChangeHistoryResource} message ChangeHistoryResource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ChangeHistoryResource.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.account != null && Object.hasOwnProperty.call(message, "account")) + $root.google.analytics.admin.v1beta.Account.encode(message.account, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.property != null && Object.hasOwnProperty.call(message, "property")) + $root.google.analytics.admin.v1beta.Property.encode(message.property, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.firebaseLink != null && Object.hasOwnProperty.call(message, "firebaseLink")) + $root.google.analytics.admin.v1beta.FirebaseLink.encode(message.firebaseLink, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.googleAdsLink != null && Object.hasOwnProperty.call(message, "googleAdsLink")) + $root.google.analytics.admin.v1beta.GoogleAdsLink.encode(message.googleAdsLink, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.conversionEvent != null && Object.hasOwnProperty.call(message, "conversionEvent")) + $root.google.analytics.admin.v1beta.ConversionEvent.encode(message.conversionEvent, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.measurementProtocolSecret != null && Object.hasOwnProperty.call(message, "measurementProtocolSecret")) + $root.google.analytics.admin.v1beta.MeasurementProtocolSecret.encode(message.measurementProtocolSecret, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.dataRetentionSettings != null && Object.hasOwnProperty.call(message, "dataRetentionSettings")) + $root.google.analytics.admin.v1beta.DataRetentionSettings.encode(message.dataRetentionSettings, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); + if (message.dataStream != null && Object.hasOwnProperty.call(message, "dataStream")) + $root.google.analytics.admin.v1beta.DataStream.encode(message.dataStream, writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ChangeHistoryResource message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.ChangeHistoryChange.ChangeHistoryResource.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1beta.ChangeHistoryChange.ChangeHistoryResource + * @static + * @param {google.analytics.admin.v1beta.ChangeHistoryChange.IChangeHistoryResource} message ChangeHistoryResource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ChangeHistoryResource.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ChangeHistoryResource message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1beta.ChangeHistoryChange.ChangeHistoryResource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1beta.ChangeHistoryChange.ChangeHistoryResource} ChangeHistoryResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ChangeHistoryResource.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1beta.ChangeHistoryChange.ChangeHistoryResource(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.account = $root.google.analytics.admin.v1beta.Account.decode(reader, reader.uint32()); + break; + } + case 2: { + message.property = $root.google.analytics.admin.v1beta.Property.decode(reader, reader.uint32()); + break; + } + case 6: { + message.firebaseLink = $root.google.analytics.admin.v1beta.FirebaseLink.decode(reader, reader.uint32()); + break; + } + case 7: { + message.googleAdsLink = $root.google.analytics.admin.v1beta.GoogleAdsLink.decode(reader, reader.uint32()); + break; + } + case 11: { + message.conversionEvent = $root.google.analytics.admin.v1beta.ConversionEvent.decode(reader, reader.uint32()); + break; + } + case 12: { + message.measurementProtocolSecret = $root.google.analytics.admin.v1beta.MeasurementProtocolSecret.decode(reader, reader.uint32()); + break; + } + case 15: { + message.dataRetentionSettings = $root.google.analytics.admin.v1beta.DataRetentionSettings.decode(reader, reader.uint32()); + break; + } + case 18: { + message.dataStream = $root.google.analytics.admin.v1beta.DataStream.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ChangeHistoryResource message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1beta.ChangeHistoryChange.ChangeHistoryResource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1beta.ChangeHistoryChange.ChangeHistoryResource} ChangeHistoryResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ChangeHistoryResource.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ChangeHistoryResource message. + * @function verify + * @memberof google.analytics.admin.v1beta.ChangeHistoryChange.ChangeHistoryResource + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ChangeHistoryResource.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.account != null && message.hasOwnProperty("account")) { + properties.resource = 1; + { + var error = $root.google.analytics.admin.v1beta.Account.verify(message.account); + if (error) + return "account." + error; + } + } + if (message.property != null && message.hasOwnProperty("property")) { + if (properties.resource === 1) + return "resource: multiple values"; + properties.resource = 1; + { + var error = $root.google.analytics.admin.v1beta.Property.verify(message.property); + if (error) + return "property." + error; + } + } + if (message.firebaseLink != null && message.hasOwnProperty("firebaseLink")) { + if (properties.resource === 1) + return "resource: multiple values"; + properties.resource = 1; + { + var error = $root.google.analytics.admin.v1beta.FirebaseLink.verify(message.firebaseLink); + if (error) + return "firebaseLink." + error; + } + } + if (message.googleAdsLink != null && message.hasOwnProperty("googleAdsLink")) { + if (properties.resource === 1) + return "resource: multiple values"; + properties.resource = 1; + { + var error = $root.google.analytics.admin.v1beta.GoogleAdsLink.verify(message.googleAdsLink); + if (error) + return "googleAdsLink." + error; + } + } + if (message.conversionEvent != null && message.hasOwnProperty("conversionEvent")) { + if (properties.resource === 1) + return "resource: multiple values"; + properties.resource = 1; + { + var error = $root.google.analytics.admin.v1beta.ConversionEvent.verify(message.conversionEvent); + if (error) + return "conversionEvent." + error; + } + } + if (message.measurementProtocolSecret != null && message.hasOwnProperty("measurementProtocolSecret")) { + if (properties.resource === 1) + return "resource: multiple values"; + properties.resource = 1; + { + var error = $root.google.analytics.admin.v1beta.MeasurementProtocolSecret.verify(message.measurementProtocolSecret); + if (error) + return "measurementProtocolSecret." + error; + } + } + if (message.dataRetentionSettings != null && message.hasOwnProperty("dataRetentionSettings")) { + if (properties.resource === 1) + return "resource: multiple values"; + properties.resource = 1; + { + var error = $root.google.analytics.admin.v1beta.DataRetentionSettings.verify(message.dataRetentionSettings); + if (error) + return "dataRetentionSettings." + error; + } + } + if (message.dataStream != null && message.hasOwnProperty("dataStream")) { + if (properties.resource === 1) + return "resource: multiple values"; + properties.resource = 1; + { + var error = $root.google.analytics.admin.v1beta.DataStream.verify(message.dataStream); + if (error) + return "dataStream." + error; + } + } + return null; + }; + + /** + * Creates a ChangeHistoryResource message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1beta.ChangeHistoryChange.ChangeHistoryResource + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1beta.ChangeHistoryChange.ChangeHistoryResource} ChangeHistoryResource + */ + ChangeHistoryResource.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1beta.ChangeHistoryChange.ChangeHistoryResource) + return object; + var message = new $root.google.analytics.admin.v1beta.ChangeHistoryChange.ChangeHistoryResource(); + if (object.account != null) { + if (typeof object.account !== "object") + throw TypeError(".google.analytics.admin.v1beta.ChangeHistoryChange.ChangeHistoryResource.account: object expected"); + message.account = $root.google.analytics.admin.v1beta.Account.fromObject(object.account); + } + if (object.property != null) { + if (typeof object.property !== "object") + throw TypeError(".google.analytics.admin.v1beta.ChangeHistoryChange.ChangeHistoryResource.property: object expected"); + message.property = $root.google.analytics.admin.v1beta.Property.fromObject(object.property); + } + if (object.firebaseLink != null) { + if (typeof object.firebaseLink !== "object") + throw TypeError(".google.analytics.admin.v1beta.ChangeHistoryChange.ChangeHistoryResource.firebaseLink: object expected"); + message.firebaseLink = $root.google.analytics.admin.v1beta.FirebaseLink.fromObject(object.firebaseLink); + } + if (object.googleAdsLink != null) { + if (typeof object.googleAdsLink !== "object") + throw TypeError(".google.analytics.admin.v1beta.ChangeHistoryChange.ChangeHistoryResource.googleAdsLink: object expected"); + message.googleAdsLink = $root.google.analytics.admin.v1beta.GoogleAdsLink.fromObject(object.googleAdsLink); + } + if (object.conversionEvent != null) { + if (typeof object.conversionEvent !== "object") + throw TypeError(".google.analytics.admin.v1beta.ChangeHistoryChange.ChangeHistoryResource.conversionEvent: object expected"); + message.conversionEvent = $root.google.analytics.admin.v1beta.ConversionEvent.fromObject(object.conversionEvent); + } + if (object.measurementProtocolSecret != null) { + if (typeof object.measurementProtocolSecret !== "object") + throw TypeError(".google.analytics.admin.v1beta.ChangeHistoryChange.ChangeHistoryResource.measurementProtocolSecret: object expected"); + message.measurementProtocolSecret = $root.google.analytics.admin.v1beta.MeasurementProtocolSecret.fromObject(object.measurementProtocolSecret); + } + if (object.dataRetentionSettings != null) { + if (typeof object.dataRetentionSettings !== "object") + throw TypeError(".google.analytics.admin.v1beta.ChangeHistoryChange.ChangeHistoryResource.dataRetentionSettings: object expected"); + message.dataRetentionSettings = $root.google.analytics.admin.v1beta.DataRetentionSettings.fromObject(object.dataRetentionSettings); + } + if (object.dataStream != null) { + if (typeof object.dataStream !== "object") + throw TypeError(".google.analytics.admin.v1beta.ChangeHistoryChange.ChangeHistoryResource.dataStream: object expected"); + message.dataStream = $root.google.analytics.admin.v1beta.DataStream.fromObject(object.dataStream); + } + return message; + }; + + /** + * Creates a plain object from a ChangeHistoryResource message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1beta.ChangeHistoryChange.ChangeHistoryResource + * @static + * @param {google.analytics.admin.v1beta.ChangeHistoryChange.ChangeHistoryResource} message ChangeHistoryResource + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ChangeHistoryResource.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.account != null && message.hasOwnProperty("account")) { + object.account = $root.google.analytics.admin.v1beta.Account.toObject(message.account, options); + if (options.oneofs) + object.resource = "account"; + } + if (message.property != null && message.hasOwnProperty("property")) { + object.property = $root.google.analytics.admin.v1beta.Property.toObject(message.property, options); + if (options.oneofs) + object.resource = "property"; + } + if (message.firebaseLink != null && message.hasOwnProperty("firebaseLink")) { + object.firebaseLink = $root.google.analytics.admin.v1beta.FirebaseLink.toObject(message.firebaseLink, options); + if (options.oneofs) + object.resource = "firebaseLink"; + } + if (message.googleAdsLink != null && message.hasOwnProperty("googleAdsLink")) { + object.googleAdsLink = $root.google.analytics.admin.v1beta.GoogleAdsLink.toObject(message.googleAdsLink, options); + if (options.oneofs) + object.resource = "googleAdsLink"; + } + if (message.conversionEvent != null && message.hasOwnProperty("conversionEvent")) { + object.conversionEvent = $root.google.analytics.admin.v1beta.ConversionEvent.toObject(message.conversionEvent, options); + if (options.oneofs) + object.resource = "conversionEvent"; + } + if (message.measurementProtocolSecret != null && message.hasOwnProperty("measurementProtocolSecret")) { + object.measurementProtocolSecret = $root.google.analytics.admin.v1beta.MeasurementProtocolSecret.toObject(message.measurementProtocolSecret, options); + if (options.oneofs) + object.resource = "measurementProtocolSecret"; + } + if (message.dataRetentionSettings != null && message.hasOwnProperty("dataRetentionSettings")) { + object.dataRetentionSettings = $root.google.analytics.admin.v1beta.DataRetentionSettings.toObject(message.dataRetentionSettings, options); + if (options.oneofs) + object.resource = "dataRetentionSettings"; + } + if (message.dataStream != null && message.hasOwnProperty("dataStream")) { + object.dataStream = $root.google.analytics.admin.v1beta.DataStream.toObject(message.dataStream, options); + if (options.oneofs) + object.resource = "dataStream"; + } + return object; + }; + + /** + * Converts this ChangeHistoryResource to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1beta.ChangeHistoryChange.ChangeHistoryResource + * @instance + * @returns {Object.} JSON object + */ + ChangeHistoryResource.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ChangeHistoryResource + * @function getTypeUrl + * @memberof google.analytics.admin.v1beta.ChangeHistoryChange.ChangeHistoryResource + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ChangeHistoryResource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1beta.ChangeHistoryChange.ChangeHistoryResource"; + }; + + return ChangeHistoryResource; + })(); + + return ChangeHistoryChange; + })(); + + v1beta.ConversionEvent = (function() { + + /** + * Properties of a ConversionEvent. + * @memberof google.analytics.admin.v1beta + * @interface IConversionEvent + * @property {string|null} [name] ConversionEvent name + * @property {string|null} [eventName] ConversionEvent eventName + * @property {google.protobuf.ITimestamp|null} [createTime] ConversionEvent createTime + * @property {boolean|null} [deletable] ConversionEvent deletable + * @property {boolean|null} [custom] ConversionEvent custom + */ + + /** + * Constructs a new ConversionEvent. + * @memberof google.analytics.admin.v1beta + * @classdesc Represents a ConversionEvent. + * @implements IConversionEvent + * @constructor + * @param {google.analytics.admin.v1beta.IConversionEvent=} [properties] Properties to set + */ + function ConversionEvent(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ConversionEvent name. + * @member {string} name + * @memberof google.analytics.admin.v1beta.ConversionEvent + * @instance + */ + ConversionEvent.prototype.name = ""; + + /** + * ConversionEvent eventName. + * @member {string} eventName + * @memberof google.analytics.admin.v1beta.ConversionEvent + * @instance + */ + ConversionEvent.prototype.eventName = ""; + + /** + * ConversionEvent createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.analytics.admin.v1beta.ConversionEvent + * @instance + */ + ConversionEvent.prototype.createTime = null; + + /** + * ConversionEvent deletable. + * @member {boolean} deletable + * @memberof google.analytics.admin.v1beta.ConversionEvent + * @instance + */ + ConversionEvent.prototype.deletable = false; + + /** + * ConversionEvent custom. + * @member {boolean} custom + * @memberof google.analytics.admin.v1beta.ConversionEvent + * @instance + */ + ConversionEvent.prototype.custom = false; + + /** + * Creates a new ConversionEvent instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1beta.ConversionEvent + * @static + * @param {google.analytics.admin.v1beta.IConversionEvent=} [properties] Properties to set + * @returns {google.analytics.admin.v1beta.ConversionEvent} ConversionEvent instance + */ + ConversionEvent.create = function create(properties) { + return new ConversionEvent(properties); + }; + + /** + * Encodes the specified ConversionEvent message. Does not implicitly {@link google.analytics.admin.v1beta.ConversionEvent.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1beta.ConversionEvent + * @static + * @param {google.analytics.admin.v1beta.IConversionEvent} message ConversionEvent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConversionEvent.encode = function encode(message, writer) { + 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.eventName != null && Object.hasOwnProperty.call(message, "eventName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.eventName); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.deletable != null && Object.hasOwnProperty.call(message, "deletable")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.deletable); + if (message.custom != null && Object.hasOwnProperty.call(message, "custom")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.custom); + return writer; + }; + + /** + * Encodes the specified ConversionEvent message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.ConversionEvent.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1beta.ConversionEvent + * @static + * @param {google.analytics.admin.v1beta.IConversionEvent} message ConversionEvent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConversionEvent.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ConversionEvent message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1beta.ConversionEvent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1beta.ConversionEvent} ConversionEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConversionEvent.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1beta.ConversionEvent(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.eventName = reader.string(); + break; + } + case 3: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 4: { + message.deletable = reader.bool(); + break; + } + case 5: { + message.custom = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ConversionEvent message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1beta.ConversionEvent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1beta.ConversionEvent} ConversionEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConversionEvent.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ConversionEvent message. + * @function verify + * @memberof google.analytics.admin.v1beta.ConversionEvent + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ConversionEvent.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.eventName != null && message.hasOwnProperty("eventName")) + if (!$util.isString(message.eventName)) + return "eventName: string expected"; + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.deletable != null && message.hasOwnProperty("deletable")) + if (typeof message.deletable !== "boolean") + return "deletable: boolean expected"; + if (message.custom != null && message.hasOwnProperty("custom")) + if (typeof message.custom !== "boolean") + return "custom: boolean expected"; + return null; + }; + + /** + * Creates a ConversionEvent message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1beta.ConversionEvent + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1beta.ConversionEvent} ConversionEvent + */ + ConversionEvent.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1beta.ConversionEvent) + return object; + var message = new $root.google.analytics.admin.v1beta.ConversionEvent(); + if (object.name != null) + message.name = String(object.name); + if (object.eventName != null) + message.eventName = String(object.eventName); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.analytics.admin.v1beta.ConversionEvent.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.deletable != null) + message.deletable = Boolean(object.deletable); + if (object.custom != null) + message.custom = Boolean(object.custom); + return message; + }; + + /** + * Creates a plain object from a ConversionEvent message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1beta.ConversionEvent + * @static + * @param {google.analytics.admin.v1beta.ConversionEvent} message ConversionEvent + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ConversionEvent.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.eventName = ""; + object.createTime = null; + object.deletable = false; + object.custom = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.eventName != null && message.hasOwnProperty("eventName")) + object.eventName = message.eventName; + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.deletable != null && message.hasOwnProperty("deletable")) + object.deletable = message.deletable; + if (message.custom != null && message.hasOwnProperty("custom")) + object.custom = message.custom; + return object; + }; + + /** + * Converts this ConversionEvent to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1beta.ConversionEvent + * @instance + * @returns {Object.} JSON object + */ + ConversionEvent.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ConversionEvent + * @function getTypeUrl + * @memberof google.analytics.admin.v1beta.ConversionEvent + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ConversionEvent.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1beta.ConversionEvent"; + }; + + return ConversionEvent; + })(); + + v1beta.CustomDimension = (function() { + + /** + * Properties of a CustomDimension. + * @memberof google.analytics.admin.v1beta + * @interface ICustomDimension + * @property {string|null} [name] CustomDimension name + * @property {string|null} [parameterName] CustomDimension parameterName + * @property {string|null} [displayName] CustomDimension displayName + * @property {string|null} [description] CustomDimension description + * @property {google.analytics.admin.v1beta.CustomDimension.DimensionScope|null} [scope] CustomDimension scope + * @property {boolean|null} [disallowAdsPersonalization] CustomDimension disallowAdsPersonalization + */ + + /** + * Constructs a new CustomDimension. + * @memberof google.analytics.admin.v1beta + * @classdesc Represents a CustomDimension. + * @implements ICustomDimension + * @constructor + * @param {google.analytics.admin.v1beta.ICustomDimension=} [properties] Properties to set + */ + function CustomDimension(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CustomDimension name. + * @member {string} name + * @memberof google.analytics.admin.v1beta.CustomDimension + * @instance + */ + CustomDimension.prototype.name = ""; + + /** + * CustomDimension parameterName. + * @member {string} parameterName + * @memberof google.analytics.admin.v1beta.CustomDimension + * @instance + */ + CustomDimension.prototype.parameterName = ""; + + /** + * CustomDimension displayName. + * @member {string} displayName + * @memberof google.analytics.admin.v1beta.CustomDimension + * @instance + */ + CustomDimension.prototype.displayName = ""; + + /** + * CustomDimension description. + * @member {string} description + * @memberof google.analytics.admin.v1beta.CustomDimension + * @instance + */ + CustomDimension.prototype.description = ""; + + /** + * CustomDimension scope. + * @member {google.analytics.admin.v1beta.CustomDimension.DimensionScope} scope + * @memberof google.analytics.admin.v1beta.CustomDimension + * @instance + */ + CustomDimension.prototype.scope = 0; + + /** + * CustomDimension disallowAdsPersonalization. + * @member {boolean} disallowAdsPersonalization + * @memberof google.analytics.admin.v1beta.CustomDimension + * @instance + */ + CustomDimension.prototype.disallowAdsPersonalization = false; + + /** + * Creates a new CustomDimension instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1beta.CustomDimension + * @static + * @param {google.analytics.admin.v1beta.ICustomDimension=} [properties] Properties to set + * @returns {google.analytics.admin.v1beta.CustomDimension} CustomDimension instance + */ + CustomDimension.create = function create(properties) { + return new CustomDimension(properties); + }; + + /** + * Encodes the specified CustomDimension message. Does not implicitly {@link google.analytics.admin.v1beta.CustomDimension.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1beta.CustomDimension + * @static + * @param {google.analytics.admin.v1beta.ICustomDimension} message CustomDimension message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CustomDimension.encode = function encode(message, writer) { + 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.parameterName != null && Object.hasOwnProperty.call(message, "parameterName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.parameterName); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.displayName); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.description); + if (message.scope != null && Object.hasOwnProperty.call(message, "scope")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.scope); + if (message.disallowAdsPersonalization != null && Object.hasOwnProperty.call(message, "disallowAdsPersonalization")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.disallowAdsPersonalization); + return writer; + }; + + /** + * Encodes the specified CustomDimension message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.CustomDimension.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1beta.CustomDimension + * @static + * @param {google.analytics.admin.v1beta.ICustomDimension} message CustomDimension message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CustomDimension.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CustomDimension message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1beta.CustomDimension + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1beta.CustomDimension} CustomDimension + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CustomDimension.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1beta.CustomDimension(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.parameterName = reader.string(); + break; + } + case 3: { + message.displayName = reader.string(); + break; + } + case 4: { + message.description = reader.string(); + break; + } + case 5: { + message.scope = reader.int32(); + break; + } + case 6: { + message.disallowAdsPersonalization = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CustomDimension message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1beta.CustomDimension + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1beta.CustomDimension} CustomDimension + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CustomDimension.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CustomDimension message. + * @function verify + * @memberof google.analytics.admin.v1beta.CustomDimension + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CustomDimension.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.parameterName != null && message.hasOwnProperty("parameterName")) + if (!$util.isString(message.parameterName)) + return "parameterName: string expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.scope != null && message.hasOwnProperty("scope")) + switch (message.scope) { + default: + return "scope: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.disallowAdsPersonalization != null && message.hasOwnProperty("disallowAdsPersonalization")) + if (typeof message.disallowAdsPersonalization !== "boolean") + return "disallowAdsPersonalization: boolean expected"; + return null; + }; + + /** + * Creates a CustomDimension message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1beta.CustomDimension + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1beta.CustomDimension} CustomDimension + */ + CustomDimension.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1beta.CustomDimension) + return object; + var message = new $root.google.analytics.admin.v1beta.CustomDimension(); + if (object.name != null) + message.name = String(object.name); + if (object.parameterName != null) + message.parameterName = String(object.parameterName); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.description != null) + message.description = String(object.description); + switch (object.scope) { + default: + if (typeof object.scope === "number") { + message.scope = object.scope; + break; + } + break; + case "DIMENSION_SCOPE_UNSPECIFIED": + case 0: + message.scope = 0; + break; + case "EVENT": + case 1: + message.scope = 1; + break; + case "USER": + case 2: + message.scope = 2; + break; + } + if (object.disallowAdsPersonalization != null) + message.disallowAdsPersonalization = Boolean(object.disallowAdsPersonalization); + return message; + }; + + /** + * Creates a plain object from a CustomDimension message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1beta.CustomDimension + * @static + * @param {google.analytics.admin.v1beta.CustomDimension} message CustomDimension + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CustomDimension.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.parameterName = ""; + object.displayName = ""; + object.description = ""; + object.scope = options.enums === String ? "DIMENSION_SCOPE_UNSPECIFIED" : 0; + object.disallowAdsPersonalization = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.parameterName != null && message.hasOwnProperty("parameterName")) + object.parameterName = message.parameterName; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.scope != null && message.hasOwnProperty("scope")) + object.scope = options.enums === String ? $root.google.analytics.admin.v1beta.CustomDimension.DimensionScope[message.scope] === undefined ? message.scope : $root.google.analytics.admin.v1beta.CustomDimension.DimensionScope[message.scope] : message.scope; + if (message.disallowAdsPersonalization != null && message.hasOwnProperty("disallowAdsPersonalization")) + object.disallowAdsPersonalization = message.disallowAdsPersonalization; + return object; + }; + + /** + * Converts this CustomDimension to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1beta.CustomDimension + * @instance + * @returns {Object.} JSON object + */ + CustomDimension.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CustomDimension + * @function getTypeUrl + * @memberof google.analytics.admin.v1beta.CustomDimension + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CustomDimension.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1beta.CustomDimension"; + }; + + /** + * DimensionScope enum. + * @name google.analytics.admin.v1beta.CustomDimension.DimensionScope + * @enum {number} + * @property {number} DIMENSION_SCOPE_UNSPECIFIED=0 DIMENSION_SCOPE_UNSPECIFIED value + * @property {number} EVENT=1 EVENT value + * @property {number} USER=2 USER value + */ + CustomDimension.DimensionScope = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DIMENSION_SCOPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "EVENT"] = 1; + values[valuesById[2] = "USER"] = 2; + return values; + })(); + + return CustomDimension; + })(); + + v1beta.CustomMetric = (function() { + + /** + * Properties of a CustomMetric. + * @memberof google.analytics.admin.v1beta + * @interface ICustomMetric + * @property {string|null} [name] CustomMetric name + * @property {string|null} [parameterName] CustomMetric parameterName + * @property {string|null} [displayName] CustomMetric displayName + * @property {string|null} [description] CustomMetric description + * @property {google.analytics.admin.v1beta.CustomMetric.MeasurementUnit|null} [measurementUnit] CustomMetric measurementUnit + * @property {google.analytics.admin.v1beta.CustomMetric.MetricScope|null} [scope] CustomMetric scope + * @property {Array.|null} [restrictedMetricType] CustomMetric restrictedMetricType + */ + + /** + * Constructs a new CustomMetric. + * @memberof google.analytics.admin.v1beta + * @classdesc Represents a CustomMetric. + * @implements ICustomMetric + * @constructor + * @param {google.analytics.admin.v1beta.ICustomMetric=} [properties] Properties to set + */ + function CustomMetric(properties) { + this.restrictedMetricType = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CustomMetric name. + * @member {string} name + * @memberof google.analytics.admin.v1beta.CustomMetric + * @instance + */ + CustomMetric.prototype.name = ""; + + /** + * CustomMetric parameterName. + * @member {string} parameterName + * @memberof google.analytics.admin.v1beta.CustomMetric + * @instance + */ + CustomMetric.prototype.parameterName = ""; + + /** + * CustomMetric displayName. + * @member {string} displayName + * @memberof google.analytics.admin.v1beta.CustomMetric + * @instance + */ + CustomMetric.prototype.displayName = ""; + + /** + * CustomMetric description. + * @member {string} description + * @memberof google.analytics.admin.v1beta.CustomMetric + * @instance + */ + CustomMetric.prototype.description = ""; + + /** + * CustomMetric measurementUnit. + * @member {google.analytics.admin.v1beta.CustomMetric.MeasurementUnit} measurementUnit + * @memberof google.analytics.admin.v1beta.CustomMetric + * @instance + */ + CustomMetric.prototype.measurementUnit = 0; + + /** + * CustomMetric scope. + * @member {google.analytics.admin.v1beta.CustomMetric.MetricScope} scope + * @memberof google.analytics.admin.v1beta.CustomMetric + * @instance + */ + CustomMetric.prototype.scope = 0; + + /** + * CustomMetric restrictedMetricType. + * @member {Array.} restrictedMetricType + * @memberof google.analytics.admin.v1beta.CustomMetric + * @instance + */ + CustomMetric.prototype.restrictedMetricType = $util.emptyArray; + + /** + * Creates a new CustomMetric instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1beta.CustomMetric + * @static + * @param {google.analytics.admin.v1beta.ICustomMetric=} [properties] Properties to set + * @returns {google.analytics.admin.v1beta.CustomMetric} CustomMetric instance + */ + CustomMetric.create = function create(properties) { + return new CustomMetric(properties); + }; + + /** + * Encodes the specified CustomMetric message. Does not implicitly {@link google.analytics.admin.v1beta.CustomMetric.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1beta.CustomMetric + * @static + * @param {google.analytics.admin.v1beta.ICustomMetric} message CustomMetric message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CustomMetric.encode = function encode(message, writer) { + 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.parameterName != null && Object.hasOwnProperty.call(message, "parameterName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.parameterName); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.displayName); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.description); + if (message.measurementUnit != null && Object.hasOwnProperty.call(message, "measurementUnit")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.measurementUnit); + if (message.scope != null && Object.hasOwnProperty.call(message, "scope")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.scope); + if (message.restrictedMetricType != null && message.restrictedMetricType.length) { + writer.uint32(/* id 8, wireType 2 =*/66).fork(); + for (var i = 0; i < message.restrictedMetricType.length; ++i) + writer.int32(message.restrictedMetricType[i]); + writer.ldelim(); + } + return writer; + }; + + /** + * Encodes the specified CustomMetric message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.CustomMetric.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1beta.CustomMetric + * @static + * @param {google.analytics.admin.v1beta.ICustomMetric} message CustomMetric message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CustomMetric.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CustomMetric message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1beta.CustomMetric + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1beta.CustomMetric} CustomMetric + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CustomMetric.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1beta.CustomMetric(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.parameterName = reader.string(); + break; + } + case 3: { + message.displayName = reader.string(); + break; + } + case 4: { + message.description = reader.string(); + break; + } + case 5: { + message.measurementUnit = reader.int32(); + break; + } + case 6: { + message.scope = reader.int32(); + break; + } + case 8: { + if (!(message.restrictedMetricType && message.restrictedMetricType.length)) + message.restrictedMetricType = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.restrictedMetricType.push(reader.int32()); + } else + message.restrictedMetricType.push(reader.int32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CustomMetric message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1beta.CustomMetric + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1beta.CustomMetric} CustomMetric + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CustomMetric.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CustomMetric message. + * @function verify + * @memberof google.analytics.admin.v1beta.CustomMetric + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CustomMetric.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.parameterName != null && message.hasOwnProperty("parameterName")) + if (!$util.isString(message.parameterName)) + return "parameterName: string expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.measurementUnit != null && message.hasOwnProperty("measurementUnit")) + switch (message.measurementUnit) { + default: + return "measurementUnit: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + break; + } + if (message.scope != null && message.hasOwnProperty("scope")) + switch (message.scope) { + default: + return "scope: enum value expected"; + case 0: + case 1: + break; + } + if (message.restrictedMetricType != null && message.hasOwnProperty("restrictedMetricType")) { + if (!Array.isArray(message.restrictedMetricType)) + return "restrictedMetricType: array expected"; + for (var i = 0; i < message.restrictedMetricType.length; ++i) + switch (message.restrictedMetricType[i]) { + default: + return "restrictedMetricType: enum value[] expected"; + case 0: + case 1: + case 2: + break; + } + } + return null; + }; + + /** + * Creates a CustomMetric message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1beta.CustomMetric + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1beta.CustomMetric} CustomMetric + */ + CustomMetric.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1beta.CustomMetric) + return object; + var message = new $root.google.analytics.admin.v1beta.CustomMetric(); + if (object.name != null) + message.name = String(object.name); + if (object.parameterName != null) + message.parameterName = String(object.parameterName); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.description != null) + message.description = String(object.description); + switch (object.measurementUnit) { + default: + if (typeof object.measurementUnit === "number") { + message.measurementUnit = object.measurementUnit; + break; + } + break; + case "MEASUREMENT_UNIT_UNSPECIFIED": + case 0: + message.measurementUnit = 0; + break; + case "STANDARD": + case 1: + message.measurementUnit = 1; + break; + case "CURRENCY": + case 2: + message.measurementUnit = 2; + break; + case "FEET": + case 3: + message.measurementUnit = 3; + break; + case "METERS": + case 4: + message.measurementUnit = 4; + break; + case "KILOMETERS": + case 5: + message.measurementUnit = 5; + break; + case "MILES": + case 6: + message.measurementUnit = 6; + break; + case "MILLISECONDS": + case 7: + message.measurementUnit = 7; + break; + case "SECONDS": + case 8: + message.measurementUnit = 8; + break; + case "MINUTES": + case 9: + message.measurementUnit = 9; + break; + case "HOURS": + case 10: + message.measurementUnit = 10; + break; + } + switch (object.scope) { + default: + if (typeof object.scope === "number") { + message.scope = object.scope; + break; + } + break; + case "METRIC_SCOPE_UNSPECIFIED": + case 0: + message.scope = 0; + break; + case "EVENT": + case 1: + message.scope = 1; + break; + } + if (object.restrictedMetricType) { + if (!Array.isArray(object.restrictedMetricType)) + throw TypeError(".google.analytics.admin.v1beta.CustomMetric.restrictedMetricType: array expected"); + message.restrictedMetricType = []; + for (var i = 0; i < object.restrictedMetricType.length; ++i) + switch (object.restrictedMetricType[i]) { + default: + if (typeof object.restrictedMetricType[i] === "number") { + message.restrictedMetricType[i] = object.restrictedMetricType[i]; + break; + } + case "RESTRICTED_METRIC_TYPE_UNSPECIFIED": + case 0: + message.restrictedMetricType[i] = 0; + break; + case "COST_DATA": + case 1: + message.restrictedMetricType[i] = 1; + break; + case "REVENUE_DATA": + case 2: + message.restrictedMetricType[i] = 2; + break; + } + } + return message; + }; + + /** + * Creates a plain object from a CustomMetric message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1beta.CustomMetric + * @static + * @param {google.analytics.admin.v1beta.CustomMetric} message CustomMetric + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CustomMetric.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.restrictedMetricType = []; + if (options.defaults) { + object.name = ""; + object.parameterName = ""; + object.displayName = ""; + object.description = ""; + object.measurementUnit = options.enums === String ? "MEASUREMENT_UNIT_UNSPECIFIED" : 0; + object.scope = options.enums === String ? "METRIC_SCOPE_UNSPECIFIED" : 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.parameterName != null && message.hasOwnProperty("parameterName")) + object.parameterName = message.parameterName; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.measurementUnit != null && message.hasOwnProperty("measurementUnit")) + object.measurementUnit = options.enums === String ? $root.google.analytics.admin.v1beta.CustomMetric.MeasurementUnit[message.measurementUnit] === undefined ? message.measurementUnit : $root.google.analytics.admin.v1beta.CustomMetric.MeasurementUnit[message.measurementUnit] : message.measurementUnit; + if (message.scope != null && message.hasOwnProperty("scope")) + object.scope = options.enums === String ? $root.google.analytics.admin.v1beta.CustomMetric.MetricScope[message.scope] === undefined ? message.scope : $root.google.analytics.admin.v1beta.CustomMetric.MetricScope[message.scope] : message.scope; + if (message.restrictedMetricType && message.restrictedMetricType.length) { + object.restrictedMetricType = []; + for (var j = 0; j < message.restrictedMetricType.length; ++j) + object.restrictedMetricType[j] = options.enums === String ? $root.google.analytics.admin.v1beta.CustomMetric.RestrictedMetricType[message.restrictedMetricType[j]] === undefined ? message.restrictedMetricType[j] : $root.google.analytics.admin.v1beta.CustomMetric.RestrictedMetricType[message.restrictedMetricType[j]] : message.restrictedMetricType[j]; + } + return object; + }; + + /** + * Converts this CustomMetric to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1beta.CustomMetric + * @instance + * @returns {Object.} JSON object + */ + CustomMetric.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CustomMetric + * @function getTypeUrl + * @memberof google.analytics.admin.v1beta.CustomMetric + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CustomMetric.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1beta.CustomMetric"; + }; + + /** + * MeasurementUnit enum. + * @name google.analytics.admin.v1beta.CustomMetric.MeasurementUnit + * @enum {number} + * @property {number} MEASUREMENT_UNIT_UNSPECIFIED=0 MEASUREMENT_UNIT_UNSPECIFIED value + * @property {number} STANDARD=1 STANDARD value + * @property {number} CURRENCY=2 CURRENCY value + * @property {number} FEET=3 FEET value + * @property {number} METERS=4 METERS value + * @property {number} KILOMETERS=5 KILOMETERS value + * @property {number} MILES=6 MILES value + * @property {number} MILLISECONDS=7 MILLISECONDS value + * @property {number} SECONDS=8 SECONDS value + * @property {number} MINUTES=9 MINUTES value + * @property {number} HOURS=10 HOURS value + */ + CustomMetric.MeasurementUnit = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "MEASUREMENT_UNIT_UNSPECIFIED"] = 0; + values[valuesById[1] = "STANDARD"] = 1; + values[valuesById[2] = "CURRENCY"] = 2; + values[valuesById[3] = "FEET"] = 3; + values[valuesById[4] = "METERS"] = 4; + values[valuesById[5] = "KILOMETERS"] = 5; + values[valuesById[6] = "MILES"] = 6; + values[valuesById[7] = "MILLISECONDS"] = 7; + values[valuesById[8] = "SECONDS"] = 8; + values[valuesById[9] = "MINUTES"] = 9; + values[valuesById[10] = "HOURS"] = 10; + return values; + })(); + + /** + * MetricScope enum. + * @name google.analytics.admin.v1beta.CustomMetric.MetricScope + * @enum {number} + * @property {number} METRIC_SCOPE_UNSPECIFIED=0 METRIC_SCOPE_UNSPECIFIED value + * @property {number} EVENT=1 EVENT value + */ + CustomMetric.MetricScope = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "METRIC_SCOPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "EVENT"] = 1; + return values; + })(); + + /** + * RestrictedMetricType enum. + * @name google.analytics.admin.v1beta.CustomMetric.RestrictedMetricType + * @enum {number} + * @property {number} RESTRICTED_METRIC_TYPE_UNSPECIFIED=0 RESTRICTED_METRIC_TYPE_UNSPECIFIED value + * @property {number} COST_DATA=1 COST_DATA value + * @property {number} REVENUE_DATA=2 REVENUE_DATA value + */ + CustomMetric.RestrictedMetricType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "RESTRICTED_METRIC_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "COST_DATA"] = 1; + values[valuesById[2] = "REVENUE_DATA"] = 2; + return values; + })(); + + return CustomMetric; + })(); + + v1beta.DataRetentionSettings = (function() { + + /** + * Properties of a DataRetentionSettings. + * @memberof google.analytics.admin.v1beta + * @interface IDataRetentionSettings + * @property {string|null} [name] DataRetentionSettings name + * @property {google.analytics.admin.v1beta.DataRetentionSettings.RetentionDuration|null} [eventDataRetention] DataRetentionSettings eventDataRetention + * @property {boolean|null} [resetUserDataOnNewActivity] DataRetentionSettings resetUserDataOnNewActivity + */ + + /** + * Constructs a new DataRetentionSettings. + * @memberof google.analytics.admin.v1beta + * @classdesc Represents a DataRetentionSettings. + * @implements IDataRetentionSettings + * @constructor + * @param {google.analytics.admin.v1beta.IDataRetentionSettings=} [properties] Properties to set + */ + function DataRetentionSettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DataRetentionSettings name. + * @member {string} name + * @memberof google.analytics.admin.v1beta.DataRetentionSettings + * @instance + */ + DataRetentionSettings.prototype.name = ""; + + /** + * DataRetentionSettings eventDataRetention. + * @member {google.analytics.admin.v1beta.DataRetentionSettings.RetentionDuration} eventDataRetention + * @memberof google.analytics.admin.v1beta.DataRetentionSettings + * @instance + */ + DataRetentionSettings.prototype.eventDataRetention = 0; + + /** + * DataRetentionSettings resetUserDataOnNewActivity. + * @member {boolean} resetUserDataOnNewActivity + * @memberof google.analytics.admin.v1beta.DataRetentionSettings + * @instance + */ + DataRetentionSettings.prototype.resetUserDataOnNewActivity = false; + + /** + * Creates a new DataRetentionSettings instance using the specified properties. + * @function create + * @memberof google.analytics.admin.v1beta.DataRetentionSettings + * @static + * @param {google.analytics.admin.v1beta.IDataRetentionSettings=} [properties] Properties to set + * @returns {google.analytics.admin.v1beta.DataRetentionSettings} DataRetentionSettings instance + */ + DataRetentionSettings.create = function create(properties) { + return new DataRetentionSettings(properties); + }; + + /** + * Encodes the specified DataRetentionSettings message. Does not implicitly {@link google.analytics.admin.v1beta.DataRetentionSettings.verify|verify} messages. + * @function encode + * @memberof google.analytics.admin.v1beta.DataRetentionSettings + * @static + * @param {google.analytics.admin.v1beta.IDataRetentionSettings} message DataRetentionSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataRetentionSettings.encode = function encode(message, writer) { + 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.eventDataRetention != null && Object.hasOwnProperty.call(message, "eventDataRetention")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.eventDataRetention); + if (message.resetUserDataOnNewActivity != null && Object.hasOwnProperty.call(message, "resetUserDataOnNewActivity")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.resetUserDataOnNewActivity); + return writer; + }; + + /** + * Encodes the specified DataRetentionSettings message, length delimited. Does not implicitly {@link google.analytics.admin.v1beta.DataRetentionSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.analytics.admin.v1beta.DataRetentionSettings + * @static + * @param {google.analytics.admin.v1beta.IDataRetentionSettings} message DataRetentionSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataRetentionSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DataRetentionSettings message from the specified reader or buffer. + * @function decode + * @memberof google.analytics.admin.v1beta.DataRetentionSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.analytics.admin.v1beta.DataRetentionSettings} DataRetentionSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataRetentionSettings.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.analytics.admin.v1beta.DataRetentionSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.eventDataRetention = reader.int32(); + break; + } + case 3: { + message.resetUserDataOnNewActivity = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DataRetentionSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.analytics.admin.v1beta.DataRetentionSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.analytics.admin.v1beta.DataRetentionSettings} DataRetentionSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataRetentionSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DataRetentionSettings message. + * @function verify + * @memberof google.analytics.admin.v1beta.DataRetentionSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DataRetentionSettings.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.eventDataRetention != null && message.hasOwnProperty("eventDataRetention")) + switch (message.eventDataRetention) { + default: + return "eventDataRetention: enum value expected"; + case 0: + case 1: + case 3: + case 4: + case 5: + case 6: + break; + } + if (message.resetUserDataOnNewActivity != null && message.hasOwnProperty("resetUserDataOnNewActivity")) + if (typeof message.resetUserDataOnNewActivity !== "boolean") + return "resetUserDataOnNewActivity: boolean expected"; + return null; + }; + + /** + * Creates a DataRetentionSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.analytics.admin.v1beta.DataRetentionSettings + * @static + * @param {Object.} object Plain object + * @returns {google.analytics.admin.v1beta.DataRetentionSettings} DataRetentionSettings + */ + DataRetentionSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.analytics.admin.v1beta.DataRetentionSettings) + return object; + var message = new $root.google.analytics.admin.v1beta.DataRetentionSettings(); + if (object.name != null) + message.name = String(object.name); + switch (object.eventDataRetention) { + default: + if (typeof object.eventDataRetention === "number") { + message.eventDataRetention = object.eventDataRetention; + break; + } + break; + case "RETENTION_DURATION_UNSPECIFIED": + case 0: + message.eventDataRetention = 0; + break; + case "TWO_MONTHS": + case 1: + message.eventDataRetention = 1; + break; + case "FOURTEEN_MONTHS": + case 3: + message.eventDataRetention = 3; + break; + case "TWENTY_SIX_MONTHS": + case 4: + message.eventDataRetention = 4; + break; + case "THIRTY_EIGHT_MONTHS": + case 5: + message.eventDataRetention = 5; + break; + case "FIFTY_MONTHS": + case 6: + message.eventDataRetention = 6; + break; + } + if (object.resetUserDataOnNewActivity != null) + message.resetUserDataOnNewActivity = Boolean(object.resetUserDataOnNewActivity); + return message; + }; + + /** + * Creates a plain object from a DataRetentionSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.analytics.admin.v1beta.DataRetentionSettings + * @static + * @param {google.analytics.admin.v1beta.DataRetentionSettings} message DataRetentionSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DataRetentionSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.eventDataRetention = options.enums === String ? "RETENTION_DURATION_UNSPECIFIED" : 0; + object.resetUserDataOnNewActivity = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.eventDataRetention != null && message.hasOwnProperty("eventDataRetention")) + object.eventDataRetention = options.enums === String ? $root.google.analytics.admin.v1beta.DataRetentionSettings.RetentionDuration[message.eventDataRetention] === undefined ? message.eventDataRetention : $root.google.analytics.admin.v1beta.DataRetentionSettings.RetentionDuration[message.eventDataRetention] : message.eventDataRetention; + if (message.resetUserDataOnNewActivity != null && message.hasOwnProperty("resetUserDataOnNewActivity")) + object.resetUserDataOnNewActivity = message.resetUserDataOnNewActivity; + return object; + }; + + /** + * Converts this DataRetentionSettings to JSON. + * @function toJSON + * @memberof google.analytics.admin.v1beta.DataRetentionSettings + * @instance + * @returns {Object.} JSON object + */ + DataRetentionSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DataRetentionSettings + * @function getTypeUrl + * @memberof google.analytics.admin.v1beta.DataRetentionSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DataRetentionSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.analytics.admin.v1beta.DataRetentionSettings"; + }; + + /** + * RetentionDuration enum. + * @name google.analytics.admin.v1beta.DataRetentionSettings.RetentionDuration + * @enum {number} + * @property {number} RETENTION_DURATION_UNSPECIFIED=0 RETENTION_DURATION_UNSPECIFIED value + * @property {number} TWO_MONTHS=1 TWO_MONTHS value + * @property {number} FOURTEEN_MONTHS=3 FOURTEEN_MONTHS value + * @property {number} TWENTY_SIX_MONTHS=4 TWENTY_SIX_MONTHS value + * @property {number} THIRTY_EIGHT_MONTHS=5 THIRTY_EIGHT_MONTHS value + * @property {number} FIFTY_MONTHS=6 FIFTY_MONTHS value + */ + DataRetentionSettings.RetentionDuration = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "RETENTION_DURATION_UNSPECIFIED"] = 0; + values[valuesById[1] = "TWO_MONTHS"] = 1; + values[valuesById[3] = "FOURTEEN_MONTHS"] = 3; + values[valuesById[4] = "TWENTY_SIX_MONTHS"] = 4; + values[valuesById[5] = "THIRTY_EIGHT_MONTHS"] = 5; + values[valuesById[6] = "FIFTY_MONTHS"] = 6; + return values; + })(); + + return DataRetentionSettings; + })(); + + return v1beta; + })(); + + return admin; + })(); + + return analytics; + })(); + + 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 + */ + api.FieldBehavior = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FIELD_BEHAVIOR_UNSPECIFIED"] = 0; + values[valuesById[1] = "OPTIONAL"] = 1; + values[valuesById[2] = "REQUIRED"] = 2; + values[valuesById[3] = "OUTPUT_ONLY"] = 3; + values[valuesById[4] = "INPUT_ONLY"] = 4; + values[valuesById[5] = "IMMUTABLE"] = 5; + values[valuesById[6] = "UNORDERED_LIST"] = 6; + values[valuesById[7] = "NON_EMPTY_DEFAULT"] = 7; + return values; + })(); + + api.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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceDescriptor(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.type = reader.string(); + break; + } + case 2: { + if (!(message.pattern && message.pattern.length)) + message.pattern = []; + message.pattern.push(reader.string()); + break; + } + case 3: { + message.nameField = reader.string(); + break; + } + case 4: { + message.history = reader.int32(); + break; + } + case 5: { + message.plural = reader.string(); + break; + } + case 6: { + message.singular = reader.string(); + break; + } + case 10: { + if (!(message.style && message.style.length)) + message.style = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.style.push(reader.int32()); + } else + message.style.push(reader.int32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.ResourceDescriptor + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.ResourceDescriptor} ResourceDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceDescriptor.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResourceDescriptor message. + * @function verify + * @memberof google.api.ResourceDescriptor + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResourceDescriptor.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.pattern != null && message.hasOwnProperty("pattern")) { + if (!Array.isArray(message.pattern)) + return "pattern: array expected"; + for (var i = 0; i < message.pattern.length; ++i) + if (!$util.isString(message.pattern[i])) + return "pattern: string[] expected"; + } + if (message.nameField != null && message.hasOwnProperty("nameField")) + if (!$util.isString(message.nameField)) + return "nameField: string expected"; + if (message.history != null && message.hasOwnProperty("history")) + switch (message.history) { + default: + return "history: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.plural != null && message.hasOwnProperty("plural")) + if (!$util.isString(message.plural)) + return "plural: string expected"; + if (message.singular != null && message.hasOwnProperty("singular")) + if (!$util.isString(message.singular)) + return "singular: string expected"; + if (message.style != null && message.hasOwnProperty("style")) { + if (!Array.isArray(message.style)) + return "style: array expected"; + for (var i = 0; i < message.style.length; ++i) + switch (message.style[i]) { + default: + return "style: enum value[] expected"; + case 0: + case 1: + break; + } + } + return null; + }; + + /** + * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.ResourceDescriptor + * @static + * @param {Object.} object Plain object + * @returns {google.api.ResourceDescriptor} ResourceDescriptor + */ + ResourceDescriptor.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.ResourceDescriptor) + return object; + var message = new $root.google.api.ResourceDescriptor(); + if (object.type != null) + message.type = String(object.type); + if (object.pattern) { + if (!Array.isArray(object.pattern)) + throw TypeError(".google.api.ResourceDescriptor.pattern: array expected"); + message.pattern = []; + for (var i = 0; i < object.pattern.length; ++i) + message.pattern[i] = String(object.pattern[i]); + } + if (object.nameField != null) + message.nameField = String(object.nameField); + switch (object.history) { + default: + if (typeof object.history === "number") { + message.history = object.history; + break; + } + break; + case "HISTORY_UNSPECIFIED": + case 0: + message.history = 0; + break; + case "ORIGINALLY_SINGLE_PATTERN": + case 1: + message.history = 1; + break; + case "FUTURE_MULTI_PATTERN": + case 2: + message.history = 2; + break; + } + if (object.plural != null) + message.plural = String(object.plural); + if (object.singular != null) + message.singular = String(object.singular); + if (object.style) { + if (!Array.isArray(object.style)) + throw TypeError(".google.api.ResourceDescriptor.style: array expected"); + message.style = []; + for (var i = 0; i < object.style.length; ++i) + switch (object.style[i]) { + default: + if (typeof object.style[i] === "number") { + message.style[i] = object.style[i]; + break; + } + case "STYLE_UNSPECIFIED": + case 0: + message.style[i] = 0; + break; + case "DECLARATIVE_FRIENDLY": + case 1: + message.style[i] = 1; + break; + } + } + return message; + }; + + /** + * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.ResourceDescriptor + * @static + * @param {google.api.ResourceDescriptor} message ResourceDescriptor + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResourceDescriptor.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.pattern = []; + object.style = []; + } + if (options.defaults) { + object.type = ""; + object.nameField = ""; + object.history = options.enums === String ? "HISTORY_UNSPECIFIED" : 0; + object.plural = ""; + object.singular = ""; + } + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.pattern && message.pattern.length) { + object.pattern = []; + for (var j = 0; j < message.pattern.length; ++j) + object.pattern[j] = message.pattern[j]; + } + if (message.nameField != null && message.hasOwnProperty("nameField")) + object.nameField = message.nameField; + if (message.history != null && message.hasOwnProperty("history")) + object.history = options.enums === String ? $root.google.api.ResourceDescriptor.History[message.history] === undefined ? message.history : $root.google.api.ResourceDescriptor.History[message.history] : message.history; + if (message.plural != null && message.hasOwnProperty("plural")) + object.plural = message.plural; + if (message.singular != null && message.hasOwnProperty("singular")) + object.singular = message.singular; + if (message.style && message.style.length) { + object.style = []; + for (var j = 0; j < message.style.length; ++j) + object.style[j] = options.enums === String ? $root.google.api.ResourceDescriptor.Style[message.style[j]] === undefined ? message.style[j] : $root.google.api.ResourceDescriptor.Style[message.style[j]] : message.style[j]; + } + return object; + }; + + /** + * Converts this ResourceDescriptor to JSON. + * @function toJSON + * @memberof google.api.ResourceDescriptor + * @instance + * @returns {Object.} JSON object + */ + ResourceDescriptor.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ResourceDescriptor + * @function getTypeUrl + * @memberof google.api.ResourceDescriptor + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ResourceDescriptor.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.ResourceDescriptor"; + }; + + /** + * History enum. + * @name google.api.ResourceDescriptor.History + * @enum {number} + * @property {number} HISTORY_UNSPECIFIED=0 HISTORY_UNSPECIFIED value + * @property {number} ORIGINALLY_SINGLE_PATTERN=1 ORIGINALLY_SINGLE_PATTERN value + * @property {number} FUTURE_MULTI_PATTERN=2 FUTURE_MULTI_PATTERN value + */ + ResourceDescriptor.History = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "HISTORY_UNSPECIFIED"] = 0; + values[valuesById[1] = "ORIGINALLY_SINGLE_PATTERN"] = 1; + values[valuesById[2] = "FUTURE_MULTI_PATTERN"] = 2; + return values; + })(); + + /** + * Style enum. + * @name google.api.ResourceDescriptor.Style + * @enum {number} + * @property {number} STYLE_UNSPECIFIED=0 STYLE_UNSPECIFIED value + * @property {number} DECLARATIVE_FRIENDLY=1 DECLARATIVE_FRIENDLY value + */ + ResourceDescriptor.Style = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STYLE_UNSPECIFIED"] = 0; + values[valuesById[1] = "DECLARATIVE_FRIENDLY"] = 1; + return values; + })(); + + return ResourceDescriptor; + })(); + + api.ResourceReference = (function() { + + /** + * Properties of a ResourceReference. + * @memberof google.api + * @interface IResourceReference + * @property {string|null} [type] ResourceReference type + * @property {string|null} [childType] ResourceReference childType + */ + + /** + * Constructs a new ResourceReference. + * @memberof google.api + * @classdesc Represents a ResourceReference. + * @implements IResourceReference + * @constructor + * @param {google.api.IResourceReference=} [properties] Properties to set + */ + function ResourceReference(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResourceReference type. + * @member {string} type + * @memberof google.api.ResourceReference + * @instance + */ + ResourceReference.prototype.type = ""; + + /** + * ResourceReference childType. + * @member {string} childType + * @memberof google.api.ResourceReference + * @instance + */ + ResourceReference.prototype.childType = ""; + + /** + * Creates a new ResourceReference instance using the specified properties. + * @function create + * @memberof google.api.ResourceReference + * @static + * @param {google.api.IResourceReference=} [properties] Properties to set + * @returns {google.api.ResourceReference} ResourceReference instance + */ + ResourceReference.create = function create(properties) { + return new ResourceReference(properties); + }; + + /** + * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @function encode + * @memberof google.api.ResourceReference + * @static + * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceReference.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); + if (message.childType != null && Object.hasOwnProperty.call(message, "childType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.childType); + return writer; + }; + + /** + * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.ResourceReference + * @static + * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceReference.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResourceReference message from the specified reader or buffer. + * @function decode + * @memberof google.api.ResourceReference + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.ResourceReference} ResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceReference.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceReference(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.type = reader.string(); + break; + } + case 2: { + message.childType = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResourceReference message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.ResourceReference + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.ResourceReference} ResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceReference.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResourceReference message. + * @function verify + * @memberof google.api.ResourceReference + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResourceReference.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.childType != null && message.hasOwnProperty("childType")) + if (!$util.isString(message.childType)) + return "childType: string expected"; + return null; + }; + + /** + * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.ResourceReference + * @static + * @param {Object.} object Plain object + * @returns {google.api.ResourceReference} ResourceReference + */ + ResourceReference.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.ResourceReference) + return object; + var message = new $root.google.api.ResourceReference(); + if (object.type != null) + message.type = String(object.type); + if (object.childType != null) + message.childType = String(object.childType); + return message; + }; + + /** + * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.ResourceReference + * @static + * @param {google.api.ResourceReference} message ResourceReference + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResourceReference.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.type = ""; + object.childType = ""; + } + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.childType != null && message.hasOwnProperty("childType")) + object.childType = message.childType; + return object; + }; + + /** + * Converts this ResourceReference to JSON. + * @function toJSON + * @memberof google.api.ResourceReference + * @instance + * @returns {Object.} JSON object + */ + ResourceReference.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ResourceReference + * @function getTypeUrl + * @memberof google.api.ResourceReference + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ResourceReference.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.ResourceReference"; + }; + + return ResourceReference; + })(); + + api.Http = (function() { + + /** + * Properties of a Http. + * @memberof google.api + * @interface IHttp + * @property {Array.|null} [rules] Http rules + * @property {boolean|null} [fullyDecodeReservedExpansion] Http fullyDecodeReservedExpansion + */ + + /** + * Constructs a new Http. + * @memberof google.api + * @classdesc Represents a Http. + * @implements IHttp + * @constructor + * @param {google.api.IHttp=} [properties] Properties to set + */ + function Http(properties) { + this.rules = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Http rules. + * @member {Array.} rules + * @memberof google.api.Http + * @instance + */ + Http.prototype.rules = $util.emptyArray; + + /** + * Http fullyDecodeReservedExpansion. + * @member {boolean} fullyDecodeReservedExpansion + * @memberof google.api.Http + * @instance + */ + Http.prototype.fullyDecodeReservedExpansion = false; + + /** + * Creates a new Http instance using the specified properties. + * @function create + * @memberof google.api.Http + * @static + * @param {google.api.IHttp=} [properties] Properties to set + * @returns {google.api.Http} Http instance + */ + Http.create = function create(properties) { + return new Http(properties); + }; + + /** + * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @function encode + * @memberof google.api.Http + * @static + * @param {google.api.IHttp} message Http message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Http.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.rules != null && message.rules.length) + for (var i = 0; i < message.rules.length; ++i) + $root.google.api.HttpRule.encode(message.rules[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.fullyDecodeReservedExpansion != null && Object.hasOwnProperty.call(message, "fullyDecodeReservedExpansion")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.fullyDecodeReservedExpansion); + return writer; + }; + + /** + * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.Http + * @static + * @param {google.api.IHttp} message Http message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Http.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Http message from the specified reader or buffer. + * @function decode + * @memberof google.api.Http + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.Http} Http + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Http.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Http(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.rules && message.rules.length)) + message.rules = []; + message.rules.push($root.google.api.HttpRule.decode(reader, reader.uint32())); + break; + } + case 2: { + message.fullyDecodeReservedExpansion = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Http message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.Http + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.Http} Http + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Http.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Http message. + * @function verify + * @memberof google.api.Http + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Http.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.rules != null && message.hasOwnProperty("rules")) { + if (!Array.isArray(message.rules)) + return "rules: array expected"; + for (var i = 0; i < message.rules.length; ++i) { + var error = $root.google.api.HttpRule.verify(message.rules[i]); + if (error) + return "rules." + error; + } + } + if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) + if (typeof message.fullyDecodeReservedExpansion !== "boolean") + return "fullyDecodeReservedExpansion: boolean expected"; + return null; + }; + + /** + * Creates a Http message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.Http + * @static + * @param {Object.} object Plain object + * @returns {google.api.Http} Http + */ + Http.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Http) + return object; + var message = new $root.google.api.Http(); + if (object.rules) { + if (!Array.isArray(object.rules)) + throw TypeError(".google.api.Http.rules: array expected"); + message.rules = []; + for (var i = 0; i < object.rules.length; ++i) { + if (typeof object.rules[i] !== "object") + throw TypeError(".google.api.Http.rules: object expected"); + message.rules[i] = $root.google.api.HttpRule.fromObject(object.rules[i]); + } + } + if (object.fullyDecodeReservedExpansion != null) + message.fullyDecodeReservedExpansion = Boolean(object.fullyDecodeReservedExpansion); + return message; + }; + + /** + * Creates a plain object from a Http message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.Http + * @static + * @param {google.api.Http} message Http + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Http.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.rules = []; + if (options.defaults) + object.fullyDecodeReservedExpansion = false; + if (message.rules && message.rules.length) { + object.rules = []; + for (var j = 0; j < message.rules.length; ++j) + object.rules[j] = $root.google.api.HttpRule.toObject(message.rules[j], options); + } + if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) + object.fullyDecodeReservedExpansion = message.fullyDecodeReservedExpansion; + return object; + }; + + /** + * Converts this Http to JSON. + * @function toJSON + * @memberof google.api.Http + * @instance + * @returns {Object.} JSON object + */ + Http.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Http + * @function getTypeUrl + * @memberof google.api.Http + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Http.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.Http"; + }; + + return Http; + })(); + + api.HttpRule = (function() { + + /** + * Properties of a HttpRule. + * @memberof google.api + * @interface IHttpRule + * @property {string|null} [selector] HttpRule selector + * @property {string|null} [get] HttpRule get + * @property {string|null} [put] HttpRule put + * @property {string|null} [post] HttpRule post + * @property {string|null} ["delete"] HttpRule delete + * @property {string|null} [patch] HttpRule patch + * @property {google.api.ICustomHttpPattern|null} [custom] HttpRule custom + * @property {string|null} [body] HttpRule body + * @property {string|null} [responseBody] HttpRule responseBody + * @property {Array.|null} [additionalBindings] HttpRule additionalBindings + */ + + /** + * Constructs a new HttpRule. + * @memberof google.api + * @classdesc Represents a HttpRule. + * @implements IHttpRule + * @constructor + * @param {google.api.IHttpRule=} [properties] Properties to set + */ + function HttpRule(properties) { + this.additionalBindings = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * HttpRule selector. + * @member {string} selector + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.selector = ""; + + /** + * HttpRule get. + * @member {string|null|undefined} get + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.get = null; + + /** + * HttpRule put. + * @member {string|null|undefined} put + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.put = null; + + /** + * HttpRule post. + * @member {string|null|undefined} post + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.post = null; + + /** + * HttpRule delete. + * @member {string|null|undefined} delete + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype["delete"] = null; + + /** + * HttpRule patch. + * @member {string|null|undefined} patch + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.patch = null; + + /** + * HttpRule custom. + * @member {google.api.ICustomHttpPattern|null|undefined} custom + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.custom = null; + + /** + * HttpRule body. + * @member {string} body + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.body = ""; + + /** + * HttpRule responseBody. + * @member {string} responseBody + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.responseBody = ""; + + /** + * HttpRule additionalBindings. + * @member {Array.} additionalBindings + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.additionalBindings = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * HttpRule pattern. + * @member {"get"|"put"|"post"|"delete"|"patch"|"custom"|undefined} pattern + * @memberof google.api.HttpRule + * @instance + */ + Object.defineProperty(HttpRule.prototype, "pattern", { + get: $util.oneOfGetter($oneOfFields = ["get", "put", "post", "delete", "patch", "custom"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new HttpRule instance using the specified properties. + * @function create + * @memberof google.api.HttpRule + * @static + * @param {google.api.IHttpRule=} [properties] Properties to set + * @returns {google.api.HttpRule} HttpRule instance + */ + HttpRule.create = function create(properties) { + return new HttpRule(properties); + }; + + /** + * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @function encode + * @memberof google.api.HttpRule + * @static + * @param {google.api.IHttpRule} message HttpRule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HttpRule.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.selector != null && Object.hasOwnProperty.call(message, "selector")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.selector); + if (message.get != null && Object.hasOwnProperty.call(message, "get")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.get); + if (message.put != null && Object.hasOwnProperty.call(message, "put")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.put); + if (message.post != null && Object.hasOwnProperty.call(message, "post")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.post); + if (message["delete"] != null && Object.hasOwnProperty.call(message, "delete")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message["delete"]); + if (message.patch != null && Object.hasOwnProperty.call(message, "patch")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.patch); + if (message.body != null && Object.hasOwnProperty.call(message, "body")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.body); + if (message.custom != null && Object.hasOwnProperty.call(message, "custom")) + $root.google.api.CustomHttpPattern.encode(message.custom, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.additionalBindings != null && message.additionalBindings.length) + for (var i = 0; i < message.additionalBindings.length; ++i) + $root.google.api.HttpRule.encode(message.additionalBindings[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.responseBody != null && Object.hasOwnProperty.call(message, "responseBody")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.responseBody); + return writer; + }; + + /** + * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.HttpRule + * @static + * @param {google.api.IHttpRule} message HttpRule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HttpRule.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a HttpRule message from the specified reader or buffer. + * @function decode + * @memberof google.api.HttpRule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.HttpRule} HttpRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HttpRule.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.HttpRule(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.selector = reader.string(); + break; + } + case 2: { + message.get = reader.string(); + break; + } + case 3: { + message.put = reader.string(); + break; + } + case 4: { + message.post = reader.string(); + break; + } + case 5: { + message["delete"] = reader.string(); + break; + } + case 6: { + message.patch = reader.string(); + break; + } + case 8: { + message.custom = $root.google.api.CustomHttpPattern.decode(reader, reader.uint32()); + break; + } + case 7: { + message.body = reader.string(); + break; + } + case 12: { + message.responseBody = reader.string(); + break; + } + case 11: { + if (!(message.additionalBindings && message.additionalBindings.length)) + message.additionalBindings = []; + message.additionalBindings.push($root.google.api.HttpRule.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a HttpRule message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.HttpRule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.HttpRule} HttpRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HttpRule.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a HttpRule message. + * @function verify + * @memberof google.api.HttpRule + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + HttpRule.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.selector != null && message.hasOwnProperty("selector")) + if (!$util.isString(message.selector)) + return "selector: string expected"; + if (message.get != null && message.hasOwnProperty("get")) { + properties.pattern = 1; + if (!$util.isString(message.get)) + return "get: string expected"; + } + if (message.put != null && message.hasOwnProperty("put")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.put)) + return "put: string expected"; + } + if (message.post != null && message.hasOwnProperty("post")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.post)) + return "post: string expected"; + } + if (message["delete"] != null && message.hasOwnProperty("delete")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message["delete"])) + return "delete: string expected"; + } + if (message.patch != null && message.hasOwnProperty("patch")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.patch)) + return "patch: string expected"; + } + if (message.custom != null && message.hasOwnProperty("custom")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + { + var error = $root.google.api.CustomHttpPattern.verify(message.custom); + if (error) + return "custom." + error; + } + } + if (message.body != null && message.hasOwnProperty("body")) + if (!$util.isString(message.body)) + return "body: string expected"; + if (message.responseBody != null && message.hasOwnProperty("responseBody")) + if (!$util.isString(message.responseBody)) + return "responseBody: string expected"; + if (message.additionalBindings != null && message.hasOwnProperty("additionalBindings")) { + if (!Array.isArray(message.additionalBindings)) + return "additionalBindings: array expected"; + for (var i = 0; i < message.additionalBindings.length; ++i) { + var error = $root.google.api.HttpRule.verify(message.additionalBindings[i]); + if (error) + return "additionalBindings." + error; + } + } + return null; + }; + + /** + * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.HttpRule + * @static + * @param {Object.} object Plain object + * @returns {google.api.HttpRule} HttpRule + */ + HttpRule.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.HttpRule) + return object; + var message = new $root.google.api.HttpRule(); + if (object.selector != null) + message.selector = String(object.selector); + if (object.get != null) + message.get = String(object.get); + if (object.put != null) + message.put = String(object.put); + if (object.post != null) + message.post = String(object.post); + if (object["delete"] != null) + message["delete"] = String(object["delete"]); + if (object.patch != null) + message.patch = String(object.patch); + if (object.custom != null) { + if (typeof object.custom !== "object") + throw TypeError(".google.api.HttpRule.custom: object expected"); + message.custom = $root.google.api.CustomHttpPattern.fromObject(object.custom); + } + if (object.body != null) + message.body = String(object.body); + if (object.responseBody != null) + message.responseBody = String(object.responseBody); + if (object.additionalBindings) { + if (!Array.isArray(object.additionalBindings)) + throw TypeError(".google.api.HttpRule.additionalBindings: array expected"); + message.additionalBindings = []; + for (var i = 0; i < object.additionalBindings.length; ++i) { + if (typeof object.additionalBindings[i] !== "object") + throw TypeError(".google.api.HttpRule.additionalBindings: object expected"); + message.additionalBindings[i] = $root.google.api.HttpRule.fromObject(object.additionalBindings[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a HttpRule message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.HttpRule + * @static + * @param {google.api.HttpRule} message HttpRule + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + HttpRule.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.additionalBindings = []; + if (options.defaults) { + object.selector = ""; + object.body = ""; + object.responseBody = ""; + } + if (message.selector != null && message.hasOwnProperty("selector")) + object.selector = message.selector; + if (message.get != null && message.hasOwnProperty("get")) { + object.get = message.get; + if (options.oneofs) + object.pattern = "get"; + } + if (message.put != null && message.hasOwnProperty("put")) { + object.put = message.put; + if (options.oneofs) + object.pattern = "put"; + } + if (message.post != null && message.hasOwnProperty("post")) { + object.post = message.post; + if (options.oneofs) + object.pattern = "post"; + } + if (message["delete"] != null && message.hasOwnProperty("delete")) { + object["delete"] = message["delete"]; + if (options.oneofs) + object.pattern = "delete"; + } + if (message.patch != null && message.hasOwnProperty("patch")) { + object.patch = message.patch; + if (options.oneofs) + object.pattern = "patch"; + } + if (message.body != null && message.hasOwnProperty("body")) + object.body = message.body; + if (message.custom != null && message.hasOwnProperty("custom")) { + object.custom = $root.google.api.CustomHttpPattern.toObject(message.custom, options); + if (options.oneofs) + object.pattern = "custom"; + } + if (message.additionalBindings && message.additionalBindings.length) { + object.additionalBindings = []; + for (var j = 0; j < message.additionalBindings.length; ++j) + object.additionalBindings[j] = $root.google.api.HttpRule.toObject(message.additionalBindings[j], options); + } + if (message.responseBody != null && message.hasOwnProperty("responseBody")) + object.responseBody = message.responseBody; + return object; + }; + + /** + * Converts this HttpRule to JSON. + * @function toJSON + * @memberof google.api.HttpRule + * @instance + * @returns {Object.} JSON object + */ + HttpRule.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for HttpRule + * @function getTypeUrl + * @memberof google.api.HttpRule + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + HttpRule.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.HttpRule"; + }; + + return HttpRule; + })(); + + api.CustomHttpPattern = (function() { + + /** + * Properties of a CustomHttpPattern. + * @memberof google.api + * @interface ICustomHttpPattern + * @property {string|null} [kind] CustomHttpPattern kind + * @property {string|null} [path] CustomHttpPattern path + */ + + /** + * Constructs a new CustomHttpPattern. + * @memberof google.api + * @classdesc Represents a CustomHttpPattern. + * @implements ICustomHttpPattern + * @constructor + * @param {google.api.ICustomHttpPattern=} [properties] Properties to set + */ + function CustomHttpPattern(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CustomHttpPattern kind. + * @member {string} kind + * @memberof google.api.CustomHttpPattern + * @instance + */ + CustomHttpPattern.prototype.kind = ""; + + /** + * CustomHttpPattern path. + * @member {string} path + * @memberof google.api.CustomHttpPattern + * @instance + */ + CustomHttpPattern.prototype.path = ""; + + /** + * Creates a new CustomHttpPattern instance using the specified properties. + * @function create + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.ICustomHttpPattern=} [properties] Properties to set + * @returns {google.api.CustomHttpPattern} CustomHttpPattern instance + */ + CustomHttpPattern.create = function create(properties) { + return new CustomHttpPattern(properties); + }; + + /** + * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @function encode + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CustomHttpPattern.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.kind != null && Object.hasOwnProperty.call(message, "kind")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.kind); + if (message.path != null && Object.hasOwnProperty.call(message, "path")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.path); + return writer; + }; + + /** + * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CustomHttpPattern.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer. + * @function decode + * @memberof google.api.CustomHttpPattern + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.CustomHttpPattern} CustomHttpPattern + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CustomHttpPattern.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CustomHttpPattern(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.kind = reader.string(); + break; + } + case 2: { + message.path = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.CustomHttpPattern + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.CustomHttpPattern} CustomHttpPattern + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CustomHttpPattern.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CustomHttpPattern message. + * @function verify + * @memberof google.api.CustomHttpPattern + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CustomHttpPattern.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.kind != null && message.hasOwnProperty("kind")) + if (!$util.isString(message.kind)) + return "kind: string expected"; + if (message.path != null && message.hasOwnProperty("path")) + if (!$util.isString(message.path)) + return "path: string expected"; + return null; + }; + + /** + * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.CustomHttpPattern + * @static + * @param {Object.} object Plain object + * @returns {google.api.CustomHttpPattern} CustomHttpPattern + */ + CustomHttpPattern.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.CustomHttpPattern) + return object; + var message = new $root.google.api.CustomHttpPattern(); + if (object.kind != null) + message.kind = String(object.kind); + if (object.path != null) + message.path = String(object.path); + return message; + }; + + /** + * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.CustomHttpPattern} message CustomHttpPattern + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CustomHttpPattern.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.kind = ""; + object.path = ""; + } + if (message.kind != null && message.hasOwnProperty("kind")) + object.kind = message.kind; + if (message.path != null && message.hasOwnProperty("path")) + object.path = message.path; + return object; + }; + + /** + * Converts this CustomHttpPattern to JSON. + * @function toJSON + * @memberof google.api.CustomHttpPattern + * @instance + * @returns {Object.} JSON object + */ + CustomHttpPattern.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CustomHttpPattern + * @function getTypeUrl + * @memberof google.api.CustomHttpPattern + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CustomHttpPattern.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.CustomHttpPattern"; + }; + + return CustomHttpPattern; + })(); + + return api; + })(); + + google.protobuf = (function() { + + /** + * Namespace protobuf. + * @memberof google + * @namespace + */ + var protobuf = {}; + + protobuf.FileDescriptorSet = (function() { + + /** + * Properties of a FileDescriptorSet. + * @memberof google.protobuf + * @interface IFileDescriptorSet + * @property {Array.|null} [file] FileDescriptorSet file + */ + + /** + * Constructs a new FileDescriptorSet. + * @memberof google.protobuf + * @classdesc Represents a FileDescriptorSet. + * @implements IFileDescriptorSet + * @constructor + * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set + */ + function FileDescriptorSet(properties) { + this.file = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FileDescriptorSet file. + * @member {Array.} file + * @memberof google.protobuf.FileDescriptorSet + * @instance + */ + FileDescriptorSet.prototype.file = $util.emptyArray; + + /** + * Creates a new FileDescriptorSet instance using the specified properties. + * @function create + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet instance + */ + FileDescriptorSet.create = function create(properties) { + return new FileDescriptorSet(properties); + }; + + /** + * Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorSet.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.file != null && message.file.length) + for (var i = 0; i < message.file.length; ++i) + $root.google.protobuf.FileDescriptorProto.encode(message.file[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FileDescriptorSet message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorSet.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorSet.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileDescriptorSet(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.file && message.file.length)) + message.file = []; + message.file.push($root.google.protobuf.FileDescriptorProto.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorSet.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FileDescriptorSet message. + * @function verify + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FileDescriptorSet.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.file != null && message.hasOwnProperty("file")) { + if (!Array.isArray(message.file)) + return "file: array expected"; + for (var i = 0; i < message.file.length; ++i) { + var error = $root.google.protobuf.FileDescriptorProto.verify(message.file[i]); + if (error) + return "file." + error; + } + } + return null; + }; + + /** + * Creates a FileDescriptorSet message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + */ + FileDescriptorSet.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FileDescriptorSet) + return object; + var message = new $root.google.protobuf.FileDescriptorSet(); + if (object.file) { + if (!Array.isArray(object.file)) + throw TypeError(".google.protobuf.FileDescriptorSet.file: array expected"); + message.file = []; + for (var i = 0; i < object.file.length; ++i) { + if (typeof object.file[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorSet.file: object expected"); + message.file[i] = $root.google.protobuf.FileDescriptorProto.fromObject(object.file[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.FileDescriptorSet} message FileDescriptorSet + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FileDescriptorSet.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.file = []; + if (message.file && message.file.length) { + object.file = []; + for (var j = 0; j < message.file.length; ++j) + object.file[j] = $root.google.protobuf.FileDescriptorProto.toObject(message.file[j], options); + } + return object; + }; + + /** + * Converts this FileDescriptorSet to JSON. + * @function toJSON + * @memberof google.protobuf.FileDescriptorSet + * @instance + * @returns {Object.} JSON object + */ + FileDescriptorSet.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FileDescriptorSet + * @function getTypeUrl + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FileDescriptorSet.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FileDescriptorSet"; + }; + + return FileDescriptorSet; + })(); + + protobuf.FileDescriptorProto = (function() { + + /** + * Properties of a FileDescriptorProto. + * @memberof google.protobuf + * @interface IFileDescriptorProto + * @property {string|null} [name] FileDescriptorProto name + * @property {string|null} ["package"] FileDescriptorProto package + * @property {Array.|null} [dependency] FileDescriptorProto dependency + * @property {Array.|null} [publicDependency] FileDescriptorProto publicDependency + * @property {Array.|null} [weakDependency] FileDescriptorProto weakDependency + * @property {Array.|null} [messageType] FileDescriptorProto messageType + * @property {Array.|null} [enumType] FileDescriptorProto enumType + * @property {Array.|null} [service] FileDescriptorProto service + * @property {Array.|null} [extension] FileDescriptorProto extension + * @property {google.protobuf.IFileOptions|null} [options] FileDescriptorProto options + * @property {google.protobuf.ISourceCodeInfo|null} [sourceCodeInfo] FileDescriptorProto sourceCodeInfo + * @property {string|null} [syntax] FileDescriptorProto syntax + * @property {string|null} [edition] FileDescriptorProto edition + */ + + /** + * Constructs a new FileDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a FileDescriptorProto. + * @implements IFileDescriptorProto + * @constructor + * @param {google.protobuf.IFileDescriptorProto=} [properties] Properties to set + */ + function FileDescriptorProto(properties) { + this.dependency = []; + this.publicDependency = []; + this.weakDependency = []; + this.messageType = []; + this.enumType = []; + this.service = []; + this.extension = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FileDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.name = ""; + + /** + * FileDescriptorProto package. + * @member {string} package + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype["package"] = ""; + + /** + * FileDescriptorProto dependency. + * @member {Array.} dependency + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.dependency = $util.emptyArray; + + /** + * FileDescriptorProto publicDependency. + * @member {Array.} publicDependency + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.publicDependency = $util.emptyArray; + + /** + * FileDescriptorProto weakDependency. + * @member {Array.} weakDependency + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.weakDependency = $util.emptyArray; + + /** + * FileDescriptorProto messageType. + * @member {Array.} messageType + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.messageType = $util.emptyArray; + + /** + * FileDescriptorProto enumType. + * @member {Array.} enumType + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.enumType = $util.emptyArray; + + /** + * FileDescriptorProto service. + * @member {Array.} service + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.service = $util.emptyArray; + + /** + * FileDescriptorProto extension. + * @member {Array.} extension + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.extension = $util.emptyArray; + + /** + * FileDescriptorProto options. + * @member {google.protobuf.IFileOptions|null|undefined} options + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.options = null; + + /** + * FileDescriptorProto sourceCodeInfo. + * @member {google.protobuf.ISourceCodeInfo|null|undefined} sourceCodeInfo + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.sourceCodeInfo = null; + + /** + * FileDescriptorProto syntax. + * @member {string} syntax + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.syntax = ""; + + /** + * FileDescriptorProto edition. + * @member {string} edition + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.edition = ""; + + /** + * Creates a new FileDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.IFileDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto instance + */ + FileDescriptorProto.create = function create(properties) { + return new FileDescriptorProto(properties); + }; + + /** + * Encodes the specified FileDescriptorProto message. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message["package"] != null && Object.hasOwnProperty.call(message, "package")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message["package"]); + if (message.dependency != null && message.dependency.length) + for (var i = 0; i < message.dependency.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.dependency[i]); + if (message.messageType != null && message.messageType.length) + for (var i = 0; i < message.messageType.length; ++i) + $root.google.protobuf.DescriptorProto.encode(message.messageType[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.enumType != null && message.enumType.length) + for (var i = 0; i < message.enumType.length; ++i) + $root.google.protobuf.EnumDescriptorProto.encode(message.enumType[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.service != null && message.service.length) + for (var i = 0; i < message.service.length; ++i) + $root.google.protobuf.ServiceDescriptorProto.encode(message.service[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.extension != null && message.extension.length) + for (var i = 0; i < message.extension.length; ++i) + $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.FileOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.sourceCodeInfo != null && Object.hasOwnProperty.call(message, "sourceCodeInfo")) + $root.google.protobuf.SourceCodeInfo.encode(message.sourceCodeInfo, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.publicDependency != null && message.publicDependency.length) + for (var i = 0; i < message.publicDependency.length; ++i) + writer.uint32(/* id 10, wireType 0 =*/80).int32(message.publicDependency[i]); + if (message.weakDependency != null && message.weakDependency.length) + for (var i = 0; i < message.weakDependency.length; ++i) + writer.uint32(/* id 11, wireType 0 =*/88).int32(message.weakDependency[i]); + if (message.syntax != null && Object.hasOwnProperty.call(message, "syntax")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.syntax); + if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) + writer.uint32(/* id 13, wireType 2 =*/106).string(message.edition); + return writer; + }; + + /** + * Encodes the specified FileDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message["package"] = reader.string(); + break; + } + case 3: { + if (!(message.dependency && message.dependency.length)) + message.dependency = []; + message.dependency.push(reader.string()); + break; + } + case 10: { + if (!(message.publicDependency && message.publicDependency.length)) + message.publicDependency = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.publicDependency.push(reader.int32()); + } else + message.publicDependency.push(reader.int32()); + break; + } + case 11: { + if (!(message.weakDependency && message.weakDependency.length)) + message.weakDependency = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.weakDependency.push(reader.int32()); + } else + message.weakDependency.push(reader.int32()); + break; + } + case 4: { + if (!(message.messageType && message.messageType.length)) + message.messageType = []; + message.messageType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); + break; + } + case 5: { + if (!(message.enumType && message.enumType.length)) + message.enumType = []; + message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 6: { + if (!(message.service && message.service.length)) + message.service = []; + message.service.push($root.google.protobuf.ServiceDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 7: { + if (!(message.extension && message.extension.length)) + message.extension = []; + message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 8: { + message.options = $root.google.protobuf.FileOptions.decode(reader, reader.uint32()); + break; + } + case 9: { + message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.decode(reader, reader.uint32()); + break; + } + case 12: { + message.syntax = reader.string(); + break; + } + case 13: { + message.edition = reader.string(); + break; + } + default: + 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")) + if (!$util.isString(message.edition)) + return "edition: string expected"; + return null; + }; + + /** + * Creates a FileDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @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); + if (object.edition != null) + message.edition = String(object.edition); + return message; + }; + + /** + * Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified. + * @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 = ""; + } + 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 = 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) { + 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(); + 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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto.ExtensionRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.start = reader.int32(); + break; + } + case 2: { + message.end = reader.int32(); + break; + } + case 3: { + message.options = $root.google.protobuf.ExtensionRangeOptions.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + 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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto.ReservedRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.start = reader.int32(); + break; + } + case 2: { + message.end = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * 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 + */ + + /** + * 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 = []; + if (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; + + /** + * 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.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) { + 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(); + 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; + } + 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; + } + } + 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]); + } + } + 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.uninterpretedOption = []; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; + + /** + * Converts this 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"; + }; + + 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) { + 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(); + 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 2: + case 3: + break; + } + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + case 13: + case 14: + case 15: + case 16: + case 17: + case 18: + break; + } + if (message.typeName != null && message.hasOwnProperty("typeName")) + if (!$util.isString(message.typeName)) + return "typeName: string expected"; + if (message.extendee != null && message.hasOwnProperty("extendee")) + if (!$util.isString(message.extendee)) + return "extendee: string expected"; + if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) + if (!$util.isString(message.defaultValue)) + return "defaultValue: string expected"; + if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex")) + if (!$util.isInteger(message.oneofIndex)) + return "oneofIndex: integer expected"; + if (message.jsonName != null && message.hasOwnProperty("jsonName")) + if (!$util.isString(message.jsonName)) + return "jsonName: string expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.FieldOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.proto3Optional != null && message.hasOwnProperty("proto3Optional")) + if (typeof message.proto3Optional !== "boolean") + return "proto3Optional: boolean expected"; + return null; + }; + + /** + * Creates a FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + */ + FieldDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldDescriptorProto) + return object; + var message = new $root.google.protobuf.FieldDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.number != null) + message.number = object.number | 0; + switch (object.label) { + default: + if (typeof object.label === "number") { + message.label = object.label; + break; + } + break; + case "LABEL_OPTIONAL": + case 1: + message.label = 1; + break; + case "LABEL_REQUIRED": + case 2: + message.label = 2; + break; + case "LABEL_REPEATED": + case 3: + message.label = 3; + break; + } + switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; + case "TYPE_DOUBLE": + case 1: + message.type = 1; + break; + case "TYPE_FLOAT": + case 2: + message.type = 2; + break; + case "TYPE_INT64": + case 3: + message.type = 3; + break; + case "TYPE_UINT64": + case 4: + message.type = 4; + break; + case "TYPE_INT32": + case 5: + message.type = 5; + break; + case "TYPE_FIXED64": + case 6: + message.type = 6; + break; + case "TYPE_FIXED32": + case 7: + message.type = 7; + break; + case "TYPE_BOOL": + case 8: + message.type = 8; + break; + case "TYPE_STRING": + case 9: + message.type = 9; + break; + case "TYPE_GROUP": + case 10: + message.type = 10; + break; + case "TYPE_MESSAGE": + case 11: + message.type = 11; + break; + case "TYPE_BYTES": + case 12: + message.type = 12; + break; + case "TYPE_UINT32": + case 13: + message.type = 13; + break; + case "TYPE_ENUM": + case 14: + message.type = 14; + break; + case "TYPE_SFIXED32": + case 15: + message.type = 15; + break; + case "TYPE_SFIXED64": + case 16: + message.type = 16; + break; + case "TYPE_SINT32": + case 17: + message.type = 17; + break; + case "TYPE_SINT64": + case 18: + message.type = 18; + break; + } + if (object.typeName != null) + message.typeName = String(object.typeName); + if (object.extendee != null) + message.extendee = String(object.extendee); + if (object.defaultValue != null) + message.defaultValue = String(object.defaultValue); + if (object.oneofIndex != null) + message.oneofIndex = object.oneofIndex | 0; + if (object.jsonName != null) + message.jsonName = String(object.jsonName); + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.FieldDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.FieldOptions.fromObject(object.options); + } + if (object.proto3Optional != null) + message.proto3Optional = Boolean(object.proto3Optional); + return message; + }; + + /** + * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.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_REQUIRED=2 LABEL_REQUIRED value + * @property {number} LABEL_REPEATED=3 LABEL_REPEATED value + */ + FieldDescriptorProto.Label = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "LABEL_OPTIONAL"] = 1; + values[valuesById[2] = "LABEL_REQUIRED"] = 2; + values[valuesById[3] = "LABEL_REPEATED"] = 3; + return values; + })(); + + return FieldDescriptorProto; + })(); + + 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) { + 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(); + 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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + if (!(message.value && message.value.length)) + message.value = []; + message.value.push($root.google.protobuf.EnumValueDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 3: { + message.options = $root.google.protobuf.EnumOptions.decode(reader, reader.uint32()); + break; + } + case 4: { + if (!(message.reservedRange && message.reservedRange.length)) + message.reservedRange = []; + message.reservedRange.push($root.google.protobuf.EnumDescriptorProto.EnumReservedRange.decode(reader, reader.uint32())); + break; + } + case 5: { + if (!(message.reservedName && message.reservedName.length)) + message.reservedName = []; + message.reservedName.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * 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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumDescriptorProto.EnumReservedRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.start = reader.int32(); + break; + } + case 2: { + message.end = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumReservedRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumReservedRange message. + * @function verify + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumReservedRange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.start != null && message.hasOwnProperty("start")) + if (!$util.isInteger(message.start)) + return "start: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + return null; + }; + + /** + * Creates an EnumReservedRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange + */ + EnumReservedRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumDescriptorProto.EnumReservedRange) + return object; + var message = new $root.google.protobuf.EnumDescriptorProto.EnumReservedRange(); + if (object.start != null) + message.start = object.start | 0; + if (object.end != null) + message.end = object.end | 0; + return message; + }; + + /** + * Creates a plain object from an EnumReservedRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.EnumReservedRange} message EnumReservedRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumReservedRange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.start = 0; + object.end = 0; + } + if (message.start != null && message.hasOwnProperty("start")) + object.start = message.start; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + return object; + }; + + /** + * 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) { + 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(); + 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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + if (!(message.method && message.method.length)) + message.method = []; + message.method.push($root.google.protobuf.MethodDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 3: { + message.options = $root.google.protobuf.ServiceOptions.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * 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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MethodDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.inputType = reader.string(); + break; + } + case 3: { + message.outputType = reader.string(); + break; + } + case 4: { + message.options = $root.google.protobuf.MethodOptions.decode(reader, reader.uint32()); + break; + } + case 5: { + message.clientStreaming = reader.bool(); + break; + } + case 6: { + message.serverStreaming = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a 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} [phpGenericServices] FileOptions phpGenericServices + * @property {boolean|null} [deprecated] FileOptions deprecated + * @property {boolean|null} [ccEnableArenas] FileOptions ccEnableArenas + * @property {string|null} [objcClassPrefix] FileOptions objcClassPrefix + * @property {string|null} [csharpNamespace] FileOptions csharpNamespace + * @property {string|null} [swiftPrefix] FileOptions swiftPrefix + * @property {string|null} [phpClassPrefix] FileOptions phpClassPrefix + * @property {string|null} [phpNamespace] FileOptions phpNamespace + * @property {string|null} [phpMetadataNamespace] FileOptions phpMetadataNamespace + * @property {string|null} [rubyPackage] FileOptions rubyPackage + * @property {Array.|null} [uninterpretedOption] FileOptions uninterpretedOption + * @property {Array.|null} [".google.api.resourceDefinition"] FileOptions .google.api.resourceDefinition + */ + + /** + * Constructs a new 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 phpGenericServices. + * @member {boolean} phpGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpGenericServices = false; + + /** + * FileOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.deprecated = false; + + /** + * FileOptions ccEnableArenas. + * @member {boolean} ccEnableArenas + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.ccEnableArenas = true; + + /** + * FileOptions objcClassPrefix. + * @member {string} objcClassPrefix + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.objcClassPrefix = ""; + + /** + * FileOptions csharpNamespace. + * @member {string} csharpNamespace + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.csharpNamespace = ""; + + /** + * FileOptions swiftPrefix. + * @member {string} swiftPrefix + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.swiftPrefix = ""; + + /** + * FileOptions phpClassPrefix. + * @member {string} phpClassPrefix + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpClassPrefix = ""; + + /** + * FileOptions phpNamespace. + * @member {string} phpNamespace + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpNamespace = ""; + + /** + * FileOptions phpMetadataNamespace. + * @member {string} phpMetadataNamespace + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpMetadataNamespace = ""; + + /** + * FileOptions rubyPackage. + * @member {string} rubyPackage + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.rubyPackage = ""; + + /** + * FileOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.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.phpGenericServices != null && Object.hasOwnProperty.call(message, "phpGenericServices")) + writer.uint32(/* id 42, wireType 0 =*/336).bool(message.phpGenericServices); + if (message.phpMetadataNamespace != null && Object.hasOwnProperty.call(message, "phpMetadataNamespace")) + writer.uint32(/* id 44, wireType 2 =*/354).string(message.phpMetadataNamespace); + if (message.rubyPackage != null && Object.hasOwnProperty.call(message, "rubyPackage")) + writer.uint32(/* id 45, wireType 2 =*/362).string(message.rubyPackage); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.resourceDefinition"] != null && message[".google.api.resourceDefinition"].length) + for (var i = 0; i < message[".google.api.resourceDefinition"].length; ++i) + $root.google.api.ResourceDescriptor.encode(message[".google.api.resourceDefinition"][i], writer.uint32(/* id 1053, wireType 2 =*/8426).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified 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) { + 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(); + switch (tag >>> 3) { + case 1: { + message.javaPackage = reader.string(); + break; + } + case 8: { + message.javaOuterClassname = reader.string(); + break; + } + case 10: { + message.javaMultipleFiles = reader.bool(); + break; + } + case 20: { + message.javaGenerateEqualsAndHash = reader.bool(); + break; + } + case 27: { + message.javaStringCheckUtf8 = reader.bool(); + break; + } + case 9: { + message.optimizeFor = reader.int32(); + break; + } + case 11: { + message.goPackage = reader.string(); + break; + } + case 16: { + message.ccGenericServices = reader.bool(); + break; + } + case 17: { + message.javaGenericServices = reader.bool(); + break; + } + case 18: { + message.pyGenericServices = reader.bool(); + break; + } + case 42: { + message.phpGenericServices = reader.bool(); + break; + } + case 23: { + message.deprecated = reader.bool(); + break; + } + case 31: { + message.ccEnableArenas = reader.bool(); + break; + } + case 36: { + message.objcClassPrefix = reader.string(); + break; + } + case 37: { + message.csharpNamespace = reader.string(); + break; + } + case 39: { + message.swiftPrefix = reader.string(); + break; + } + case 40: { + message.phpClassPrefix = reader.string(); + break; + } + case 41: { + message.phpNamespace = reader.string(); + break; + } + case 44: { + message.phpMetadataNamespace = reader.string(); + break; + } + case 45: { + message.rubyPackage = reader.string(); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 1053: { + if (!(message[".google.api.resourceDefinition"] && message[".google.api.resourceDefinition"].length)) + message[".google.api.resourceDefinition"] = []; + message[".google.api.resourceDefinition"].push($root.google.api.ResourceDescriptor.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + 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.phpGenericServices != null && message.hasOwnProperty("phpGenericServices")) + if (typeof message.phpGenericServices !== "boolean") + return "phpGenericServices: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas")) + if (typeof message.ccEnableArenas !== "boolean") + return "ccEnableArenas: boolean expected"; + if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix")) + if (!$util.isString(message.objcClassPrefix)) + return "objcClassPrefix: string expected"; + if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace")) + if (!$util.isString(message.csharpNamespace)) + return "csharpNamespace: string expected"; + if (message.swiftPrefix != null && message.hasOwnProperty("swiftPrefix")) + if (!$util.isString(message.swiftPrefix)) + return "swiftPrefix: string expected"; + if (message.phpClassPrefix != null && message.hasOwnProperty("phpClassPrefix")) + if (!$util.isString(message.phpClassPrefix)) + return "phpClassPrefix: string expected"; + if (message.phpNamespace != null && message.hasOwnProperty("phpNamespace")) + if (!$util.isString(message.phpNamespace)) + return "phpNamespace: string expected"; + if (message.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace")) + if (!$util.isString(message.phpMetadataNamespace)) + return "phpMetadataNamespace: string expected"; + if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage")) + if (!$util.isString(message.rubyPackage)) + return "rubyPackage: string expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.resourceDefinition"] != null && message.hasOwnProperty(".google.api.resourceDefinition")) { + if (!Array.isArray(message[".google.api.resourceDefinition"])) + return ".google.api.resourceDefinition: array expected"; + for (var i = 0; i < message[".google.api.resourceDefinition"].length; ++i) { + var error = $root.google.api.ResourceDescriptor.verify(message[".google.api.resourceDefinition"][i]); + 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.phpGenericServices != null) + message.phpGenericServices = Boolean(object.phpGenericServices); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.ccEnableArenas != null) + message.ccEnableArenas = Boolean(object.ccEnableArenas); + if (object.objcClassPrefix != null) + message.objcClassPrefix = String(object.objcClassPrefix); + if (object.csharpNamespace != null) + message.csharpNamespace = String(object.csharpNamespace); + if (object.swiftPrefix != null) + message.swiftPrefix = String(object.swiftPrefix); + if (object.phpClassPrefix != null) + message.phpClassPrefix = String(object.phpClassPrefix); + if (object.phpNamespace != null) + message.phpNamespace = String(object.phpNamespace); + if (object.phpMetadataNamespace != null) + message.phpMetadataNamespace = String(object.phpMetadataNamespace); + if (object.rubyPackage != null) + message.rubyPackage = String(object.rubyPackage); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.resourceDefinition"]) { + if (!Array.isArray(object[".google.api.resourceDefinition"])) + throw TypeError(".google.protobuf.FileOptions..google.api.resourceDefinition: array expected"); + message[".google.api.resourceDefinition"] = []; + for (var i = 0; i < object[".google.api.resourceDefinition"].length; ++i) { + if (typeof object[".google.api.resourceDefinition"][i] !== "object") + throw TypeError(".google.protobuf.FileOptions..google.api.resourceDefinition: object expected"); + message[".google.api.resourceDefinition"][i] = $root.google.api.ResourceDescriptor.fromObject(object[".google.api.resourceDefinition"][i]); + } + } + 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.phpGenericServices = false; + object.phpMetadataNamespace = ""; + object.rubyPackage = ""; + } + if (message.javaPackage != null && message.hasOwnProperty("javaPackage")) + object.javaPackage = message.javaPackage; + if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) + object.javaOuterClassname = message.javaOuterClassname; + if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) + object.optimizeFor = options.enums === String ? $root.google.protobuf.FileOptions.OptimizeMode[message.optimizeFor] === undefined ? message.optimizeFor : $root.google.protobuf.FileOptions.OptimizeMode[message.optimizeFor] : message.optimizeFor; + if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) + object.javaMultipleFiles = message.javaMultipleFiles; + if (message.goPackage != null && message.hasOwnProperty("goPackage")) + object.goPackage = message.goPackage; + if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices")) + object.ccGenericServices = message.ccGenericServices; + if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices")) + object.javaGenericServices = message.javaGenericServices; + if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices")) + object.pyGenericServices = message.pyGenericServices; + if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash")) + object.javaGenerateEqualsAndHash = message.javaGenerateEqualsAndHash; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8")) + object.javaStringCheckUtf8 = message.javaStringCheckUtf8; + if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas")) + object.ccEnableArenas = message.ccEnableArenas; + if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix")) + object.objcClassPrefix = message.objcClassPrefix; + if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace")) + object.csharpNamespace = message.csharpNamespace; + if (message.swiftPrefix != null && message.hasOwnProperty("swiftPrefix")) + object.swiftPrefix = message.swiftPrefix; + if (message.phpClassPrefix != null && message.hasOwnProperty("phpClassPrefix")) + object.phpClassPrefix = message.phpClassPrefix; + if (message.phpNamespace != null && message.hasOwnProperty("phpNamespace")) + object.phpNamespace = message.phpNamespace; + if (message.phpGenericServices != null && message.hasOwnProperty("phpGenericServices")) + object.phpGenericServices = message.phpGenericServices; + if (message.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace")) + object.phpMetadataNamespace = message.phpMetadataNamespace; + if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage")) + object.rubyPackage = message.rubyPackage; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.resourceDefinition"] && message[".google.api.resourceDefinition"].length) { + object[".google.api.resourceDefinition"] = []; + for (var j = 0; j < message[".google.api.resourceDefinition"].length; ++j) + object[".google.api.resourceDefinition"][j] = $root.google.api.ResourceDescriptor.toObject(message[".google.api.resourceDefinition"][j], options); + } + return object; + }; + + /** + * Converts this 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 {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 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.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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MessageOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.messageSetWireFormat = reader.bool(); + break; + } + case 2: { + message.noStandardDescriptorAccessor = reader.bool(); + break; + } + case 3: { + message.deprecated = reader.bool(); + break; + } + case 7: { + message.mapEntry = reader.bool(); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 1053: { + message[".google.api.resource"] = $root.google.api.ResourceDescriptor.decode(reader, reader.uint32()); + 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.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.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[".google.api.resource"] = null; + } + if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat")) + object.messageSetWireFormat = message.messageSetWireFormat; + if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor")) + object.noStandardDescriptorAccessor = message.noStandardDescriptorAccessor; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.mapEntry != null && message.hasOwnProperty("mapEntry")) + object.mapEntry = message.mapEntry; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.resource"] != null && message.hasOwnProperty(".google.api.resource")) + object[".google.api.resource"] = $root.google.api.ResourceDescriptor.toObject(message[".google.api.resource"], options); + return object; + }; + + /** + * Converts this 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 {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.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 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.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.fieldBehavior"] != null && message[".google.api.fieldBehavior"].length) { + writer.uint32(/* id 1052, wireType 2 =*/8418).fork(); + for (var i = 0; i < message[".google.api.fieldBehavior"].length; ++i) + writer.int32(message[".google.api.fieldBehavior"][i]); + writer.ldelim(); + } + if (message[".google.api.resourceReference"] != null && Object.hasOwnProperty.call(message, ".google.api.resourceReference")) + $root.google.api.ResourceReference.encode(message[".google.api.resourceReference"], writer.uint32(/* id 1055, wireType 2 =*/8442).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified 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) { + 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(); + switch (tag >>> 3) { + case 1: { + message.ctype = reader.int32(); + break; + } + case 2: { + message.packed = reader.bool(); + break; + } + case 6: { + message.jstype = reader.int32(); + break; + } + case 5: { + message.lazy = reader.bool(); + break; + } + case 15: { + message.unverifiedLazy = reader.bool(); + break; + } + case 3: { + message.deprecated = reader.bool(); + break; + } + case 10: { + message.weak = reader.bool(); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 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.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: + 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.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; + } + } + 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.uninterpretedOption = []; + object[".google.api.fieldBehavior"] = []; + } + if (options.defaults) { + object.ctype = options.enums === String ? "STRING" : 0; + object.packed = false; + object.deprecated = false; + object.lazy = false; + object.jstype = options.enums === String ? "JS_NORMAL" : 0; + object.weak = false; + object.unverifiedLazy = false; + object[".google.api.resourceReference"] = null; + } + if (message.ctype != null && message.hasOwnProperty("ctype")) + object.ctype = options.enums === String ? $root.google.protobuf.FieldOptions.CType[message.ctype] === undefined ? message.ctype : $root.google.protobuf.FieldOptions.CType[message.ctype] : message.ctype; + if (message.packed != null && message.hasOwnProperty("packed")) + object.packed = message.packed; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.lazy != null && message.hasOwnProperty("lazy")) + object.lazy = message.lazy; + if (message.jstype != null && message.hasOwnProperty("jstype")) + object.jstype = options.enums === String ? $root.google.protobuf.FieldOptions.JSType[message.jstype] === undefined ? message.jstype : $root.google.protobuf.FieldOptions.JSType[message.jstype] : message.jstype; + if (message.weak != null && message.hasOwnProperty("weak")) + object.weak = message.weak; + if (message.unverifiedLazy != null && message.hasOwnProperty("unverifiedLazy")) + object.unverifiedLazy = message.unverifiedLazy; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length) { + object[".google.api.fieldBehavior"] = []; + for (var j = 0; j < message[".google.api.fieldBehavior"].length; ++j) + object[".google.api.fieldBehavior"][j] = options.enums === String ? $root.google.api.FieldBehavior[message[".google.api.fieldBehavior"][j]] === undefined ? message[".google.api.fieldBehavior"][j] : $root.google.api.FieldBehavior[message[".google.api.fieldBehavior"][j]] : message[".google.api.fieldBehavior"][j]; + } + if (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; + })(); + + return FieldOptions; + })(); + + protobuf.OneofOptions = (function() { + + /** + * Properties of an OneofOptions. + * @memberof google.protobuf + * @interface IOneofOptions + * @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 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.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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.OneofOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + 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.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.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 (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 {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 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.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) { + 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(); + switch (tag >>> 3) { + case 2: { + message.allowAlias = reader.bool(); + break; + } + case 3: { + message.deprecated = reader.bool(); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + default: + 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.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.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; + } + if (message.allowAlias != null && message.hasOwnProperty("allowAlias")) + object.allowAlias = message.allowAlias; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + 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 {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 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.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) { + 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(); + switch (tag >>> 3) { + case 1: { + message.deprecated = reader.bool(); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + 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.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.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; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + 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 {boolean|null} [deprecated] ServiceOptions deprecated + * @property {Array.|null} [uninterpretedOption] ServiceOptions uninterpretedOption + * @property {string|null} [".google.api.defaultHost"] ServiceOptions .google.api.defaultHost + * @property {string|null} [".google.api.oauthScopes"] ServiceOptions .google.api.oauthScopes + */ + + /** + * Constructs a new 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 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"] = ""; + + /** + * 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.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.defaultHost"] != null && Object.hasOwnProperty.call(message, ".google.api.defaultHost")) + writer.uint32(/* id 1049, wireType 2 =*/8394).string(message[".google.api.defaultHost"]); + if (message[".google.api.oauthScopes"] != null && Object.hasOwnProperty.call(message, ".google.api.oauthScopes")) + writer.uint32(/* id 1050, wireType 2 =*/8402).string(message[".google.api.oauthScopes"]); + return writer; + }; + + /** + * Encodes the specified 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) { + 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(); + switch (tag >>> 3) { + 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; + } + 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.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"; + 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.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"]); + 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[".google.api.defaultHost"] = ""; + object[".google.api.oauthScopes"] = ""; + } + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.defaultHost"] != null && message.hasOwnProperty(".google.api.defaultHost")) + object[".google.api.defaultHost"] = message[".google.api.defaultHost"]; + if (message[".google.api.oauthScopes"] != null && message.hasOwnProperty(".google.api.oauthScopes")) + object[".google.api.oauthScopes"] = message[".google.api.oauthScopes"]; + return object; + }; + + /** + * Converts this 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 {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 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.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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MethodOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 33: { + message.deprecated = reader.bool(); + break; + } + case 34: { + message.idempotencyLevel = reader.int32(); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 72295728: { + message[".google.api.http"] = $root.google.api.HttpRule.decode(reader, reader.uint32()); + break; + } + case 1051: { + if (!(message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length)) + message[".google.api.methodSignature"] = []; + message[".google.api.methodSignature"].push(reader.string()); + break; + } + 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.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.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[".google.api.http"] = null; + } + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) + object.idempotencyLevel = options.enums === String ? $root.google.protobuf.MethodOptions.IdempotencyLevel[message.idempotencyLevel] === undefined ? message.idempotencyLevel : $root.google.protobuf.MethodOptions.IdempotencyLevel[message.idempotencyLevel] : message.idempotencyLevel; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length) { + object[".google.api.methodSignature"] = []; + for (var j = 0; j < message[".google.api.methodSignature"].length; ++j) + object[".google.api.methodSignature"][j] = message[".google.api.methodSignature"][j]; + } + 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) { + 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(); + 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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UninterpretedOption.NamePart(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.namePart = reader.string(); + break; + } + case 2: { + message.isExtension = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("namePart")) + throw $util.ProtocolError("missing required 'namePart'", { instance: message }); + if (!message.hasOwnProperty("isExtension")) + throw $util.ProtocolError("missing required 'isExtension'", { instance: message }); + return message; + }; + + /** + * Decodes a NamePart message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NamePart.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NamePart message. + * @function verify + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NamePart.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isString(message.namePart)) + return "namePart: string expected"; + if (typeof message.isExtension !== "boolean") + return "isExtension: boolean expected"; + return null; + }; + + /** + * Creates a NamePart message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart + */ + NamePart.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.UninterpretedOption.NamePart) + return object; + var message = new $root.google.protobuf.UninterpretedOption.NamePart(); + if (object.namePart != null) + message.namePart = String(object.namePart); + if (object.isExtension != null) + message.isExtension = Boolean(object.isExtension); + return message; + }; + + /** + * Creates a plain object from a NamePart message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.NamePart} message NamePart + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NamePart.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.namePart = ""; + object.isExtension = false; + } + if (message.namePart != null && message.hasOwnProperty("namePart")) + object.namePart = message.namePart; + if (message.isExtension != null && message.hasOwnProperty("isExtension")) + object.isExtension = message.isExtension; + return object; + }; + + /** + * Converts this NamePart to JSON. + * @function toJSON + * @memberof google.protobuf.UninterpretedOption.NamePart + * @instance + * @returns {Object.} JSON object + */ + NamePart.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for NamePart + * @function getTypeUrl + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NamePart.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.UninterpretedOption.NamePart"; + }; + + return NamePart; + })(); + + return UninterpretedOption; + })(); + + 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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.SourceCodeInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.location && message.location.length)) + message.location = []; + message.location.push($root.google.protobuf.SourceCodeInfo.Location.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * 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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.SourceCodeInfo.Location(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.path && message.path.length)) + message.path = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.path.push(reader.int32()); + } else + message.path.push(reader.int32()); + break; + } + case 2: { + if (!(message.span && message.span.length)) + message.span = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.span.push(reader.int32()); + } else + message.span.push(reader.int32()); + break; + } + case 3: { + message.leadingComments = reader.string(); + break; + } + case 4: { + message.trailingComments = reader.string(); + break; + } + case 6: { + if (!(message.leadingDetachedComments && message.leadingDetachedComments.length)) + message.leadingDetachedComments = []; + message.leadingDetachedComments.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * 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) { + 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(); + 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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.GeneratedCodeInfo.Annotation(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.path && message.path.length)) + message.path = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.path.push(reader.int32()); + } else + message.path.push(reader.int32()); + break; + } + case 2: { + message.sourceFile = reader.string(); + break; + } + case 3: { + message.begin = reader.int32(); + break; + } + case 4: { + message.end = reader.int32(); + break; + } + case 5: { + message.semantic = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Annotation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Annotation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Annotation message. + * @function verify + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Annotation.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.path != null && message.hasOwnProperty("path")) { + if (!Array.isArray(message.path)) + return "path: array expected"; + for (var i = 0; i < message.path.length; ++i) + if (!$util.isInteger(message.path[i])) + return "path: integer[] expected"; + } + if (message.sourceFile != null && message.hasOwnProperty("sourceFile")) + if (!$util.isString(message.sourceFile)) + return "sourceFile: string expected"; + if (message.begin != null && message.hasOwnProperty("begin")) + if (!$util.isInteger(message.begin)) + return "begin: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + if (message.semantic != null && message.hasOwnProperty("semantic")) + switch (message.semantic) { + default: + return "semantic: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates an Annotation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation + */ + Annotation.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.GeneratedCodeInfo.Annotation) + return object; + var message = new $root.google.protobuf.GeneratedCodeInfo.Annotation(); + if (object.path) { + if (!Array.isArray(object.path)) + throw TypeError(".google.protobuf.GeneratedCodeInfo.Annotation.path: array expected"); + message.path = []; + for (var i = 0; i < object.path.length; ++i) + message.path[i] = object.path[i] | 0; + } + if (object.sourceFile != null) + message.sourceFile = String(object.sourceFile); + if (object.begin != null) + message.begin = object.begin | 0; + if (object.end != null) + message.end = object.end | 0; + switch (object.semantic) { + default: + if (typeof object.semantic === "number") { + message.semantic = object.semantic; + break; + } + break; + case "NONE": + case 0: + message.semantic = 0; + break; + case "SET": + case 1: + message.semantic = 1; + break; + case "ALIAS": + case 2: + message.semantic = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from an Annotation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.Annotation} message Annotation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Annotation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.path = []; + if (options.defaults) { + object.sourceFile = ""; + object.begin = 0; + object.end = 0; + object.semantic = options.enums === String ? "NONE" : 0; + } + if (message.path && message.path.length) { + object.path = []; + for (var j = 0; j < message.path.length; ++j) + object.path[j] = message.path[j]; + } + if (message.sourceFile != null && message.hasOwnProperty("sourceFile")) + object.sourceFile = message.sourceFile; + if (message.begin != null && message.hasOwnProperty("begin")) + object.begin = message.begin; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + if (message.semantic != null && message.hasOwnProperty("semantic")) + object.semantic = options.enums === String ? $root.google.protobuf.GeneratedCodeInfo.Annotation.Semantic[message.semantic] === undefined ? message.semantic : $root.google.protobuf.GeneratedCodeInfo.Annotation.Semantic[message.semantic] : message.semantic; + return object; + }; + + /** + * Converts this Annotation to JSON. + * @function toJSON + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + * @returns {Object.} JSON object + */ + Annotation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Annotation + * @function getTypeUrl + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Annotation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.GeneratedCodeInfo.Annotation"; + }; + + /** + * Semantic enum. + * @name google.protobuf.GeneratedCodeInfo.Annotation.Semantic + * @enum {number} + * @property {number} NONE=0 NONE value + * @property {number} SET=1 SET value + * @property {number} ALIAS=2 ALIAS value + */ + Annotation.Semantic = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "NONE"] = 0; + values[valuesById[1] = "SET"] = 1; + values[valuesById[2] = "ALIAS"] = 2; + return values; + })(); + + return Annotation; + })(); + + return GeneratedCodeInfo; + })(); + + protobuf.Duration = (function() { + + /** + * Properties of a Duration. + * @memberof google.protobuf + * @interface IDuration + * @property {number|Long|null} [seconds] Duration seconds + * @property {number|null} [nanos] Duration nanos + */ + + /** + * Constructs a new Duration. + * @memberof google.protobuf + * @classdesc Represents a Duration. + * @implements IDuration + * @constructor + * @param {google.protobuf.IDuration=} [properties] Properties to set + */ + function Duration(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Duration seconds. + * @member {number|Long} seconds + * @memberof google.protobuf.Duration + * @instance + */ + Duration.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Duration nanos. + * @member {number} nanos + * @memberof google.protobuf.Duration + * @instance + */ + Duration.prototype.nanos = 0; + + /** + * Creates a new Duration instance using the specified properties. + * @function create + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.IDuration=} [properties] Properties to set + * @returns {google.protobuf.Duration} Duration instance + */ + Duration.create = function create(properties) { + return new Duration(properties); + }; + + /** + * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.IDuration} message Duration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Duration.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); + if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); + return writer; + }; + + /** + * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.IDuration} message Duration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Duration.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Duration message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Duration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Duration} Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Duration.decode = function decode(reader, length) { + 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(); + 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.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) { + 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(); + 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.DoubleValue = (function() { + + /** + * Properties of a DoubleValue. + * @memberof google.protobuf + * @interface IDoubleValue + * @property {number|null} [value] DoubleValue value + */ + + /** + * Constructs a new DoubleValue. + * @memberof google.protobuf + * @classdesc Represents a DoubleValue. + * @implements IDoubleValue + * @constructor + * @param {google.protobuf.IDoubleValue=} [properties] Properties to set + */ + function DoubleValue(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DoubleValue value. + * @member {number} value + * @memberof google.protobuf.DoubleValue + * @instance + */ + DoubleValue.prototype.value = 0; + + /** + * Creates a new DoubleValue instance using the specified properties. + * @function create + * @memberof google.protobuf.DoubleValue + * @static + * @param {google.protobuf.IDoubleValue=} [properties] Properties to set + * @returns {google.protobuf.DoubleValue} DoubleValue instance + */ + DoubleValue.create = function create(properties) { + return new DoubleValue(properties); + }; + + /** + * Encodes the specified DoubleValue message. Does not implicitly {@link google.protobuf.DoubleValue.verify|verify} messages. + * @function encode + * @memberof google.protobuf.DoubleValue + * @static + * @param {google.protobuf.IDoubleValue} message DoubleValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DoubleValue.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 1, wireType 1 =*/9).double(message.value); + return writer; + }; + + /** + * Encodes the specified DoubleValue message, length delimited. Does not implicitly {@link google.protobuf.DoubleValue.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.DoubleValue + * @static + * @param {google.protobuf.IDoubleValue} message DoubleValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DoubleValue.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DoubleValue message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.DoubleValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.DoubleValue} DoubleValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DoubleValue.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DoubleValue(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.value = reader.double(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DoubleValue message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.DoubleValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.DoubleValue} DoubleValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DoubleValue.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DoubleValue message. + * @function verify + * @memberof google.protobuf.DoubleValue + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DoubleValue.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (typeof message.value !== "number") + return "value: number expected"; + return null; + }; + + /** + * Creates a DoubleValue message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.DoubleValue + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.DoubleValue} DoubleValue + */ + DoubleValue.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.DoubleValue) + return object; + var message = new $root.google.protobuf.DoubleValue(); + if (object.value != null) + message.value = Number(object.value); + return message; + }; + + /** + * Creates a plain object from a DoubleValue message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.DoubleValue + * @static + * @param {google.protobuf.DoubleValue} message DoubleValue + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DoubleValue.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.value = 0; + if (message.value != null && message.hasOwnProperty("value")) + object.value = options.json && !isFinite(message.value) ? String(message.value) : message.value; + return object; + }; + + /** + * Converts this DoubleValue to JSON. + * @function toJSON + * @memberof google.protobuf.DoubleValue + * @instance + * @returns {Object.} JSON object + */ + DoubleValue.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DoubleValue + * @function getTypeUrl + * @memberof google.protobuf.DoubleValue + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DoubleValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.DoubleValue"; + }; + + return DoubleValue; + })(); + + protobuf.FloatValue = (function() { + + /** + * Properties of a FloatValue. + * @memberof google.protobuf + * @interface IFloatValue + * @property {number|null} [value] FloatValue value + */ + + /** + * Constructs a new FloatValue. + * @memberof google.protobuf + * @classdesc Represents a FloatValue. + * @implements IFloatValue + * @constructor + * @param {google.protobuf.IFloatValue=} [properties] Properties to set + */ + function FloatValue(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FloatValue value. + * @member {number} value + * @memberof google.protobuf.FloatValue + * @instance + */ + FloatValue.prototype.value = 0; + + /** + * Creates a new FloatValue instance using the specified properties. + * @function create + * @memberof google.protobuf.FloatValue + * @static + * @param {google.protobuf.IFloatValue=} [properties] Properties to set + * @returns {google.protobuf.FloatValue} FloatValue instance + */ + FloatValue.create = function create(properties) { + return new FloatValue(properties); + }; + + /** + * Encodes the specified FloatValue message. Does not implicitly {@link google.protobuf.FloatValue.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FloatValue + * @static + * @param {google.protobuf.IFloatValue} message FloatValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FloatValue.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 1, wireType 5 =*/13).float(message.value); + return writer; + }; + + /** + * Encodes the specified FloatValue message, length delimited. Does not implicitly {@link google.protobuf.FloatValue.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FloatValue + * @static + * @param {google.protobuf.IFloatValue} message FloatValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FloatValue.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FloatValue message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FloatValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FloatValue} FloatValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FloatValue.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FloatValue(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.value = reader.float(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FloatValue message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FloatValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FloatValue} FloatValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FloatValue.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FloatValue message. + * @function verify + * @memberof google.protobuf.FloatValue + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FloatValue.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (typeof message.value !== "number") + return "value: number expected"; + return null; + }; + + /** + * Creates a FloatValue message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FloatValue + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FloatValue} FloatValue + */ + FloatValue.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FloatValue) + return object; + var message = new $root.google.protobuf.FloatValue(); + if (object.value != null) + message.value = Number(object.value); + return message; + }; + + /** + * Creates a plain object from a FloatValue message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FloatValue + * @static + * @param {google.protobuf.FloatValue} message FloatValue + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FloatValue.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.value = 0; + if (message.value != null && message.hasOwnProperty("value")) + object.value = options.json && !isFinite(message.value) ? String(message.value) : message.value; + return object; + }; + + /** + * Converts this FloatValue to JSON. + * @function toJSON + * @memberof google.protobuf.FloatValue + * @instance + * @returns {Object.} JSON object + */ + FloatValue.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FloatValue + * @function getTypeUrl + * @memberof google.protobuf.FloatValue + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FloatValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FloatValue"; + }; + + return FloatValue; + })(); + + protobuf.Int64Value = (function() { + + /** + * Properties of an Int64Value. + * @memberof google.protobuf + * @interface IInt64Value + * @property {number|Long|null} [value] Int64Value value + */ + + /** + * Constructs a new Int64Value. + * @memberof google.protobuf + * @classdesc Represents an Int64Value. + * @implements IInt64Value + * @constructor + * @param {google.protobuf.IInt64Value=} [properties] Properties to set + */ + function Int64Value(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Int64Value value. + * @member {number|Long} value + * @memberof google.protobuf.Int64Value + * @instance + */ + Int64Value.prototype.value = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new Int64Value instance using the specified properties. + * @function create + * @memberof google.protobuf.Int64Value + * @static + * @param {google.protobuf.IInt64Value=} [properties] Properties to set + * @returns {google.protobuf.Int64Value} Int64Value instance + */ + Int64Value.create = function create(properties) { + return new Int64Value(properties); + }; + + /** + * Encodes the specified Int64Value message. Does not implicitly {@link google.protobuf.Int64Value.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Int64Value + * @static + * @param {google.protobuf.IInt64Value} message Int64Value message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Int64Value.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.value); + return writer; + }; + + /** + * Encodes the specified Int64Value message, length delimited. Does not implicitly {@link google.protobuf.Int64Value.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Int64Value + * @static + * @param {google.protobuf.IInt64Value} message Int64Value message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Int64Value.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Int64Value message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Int64Value + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Int64Value} Int64Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Int64Value.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Int64Value(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.value = reader.int64(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Int64Value message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Int64Value + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Int64Value} Int64Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Int64Value.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Int64Value message. + * @function verify + * @memberof google.protobuf.Int64Value + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Int64Value.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (!$util.isInteger(message.value) && !(message.value && $util.isInteger(message.value.low) && $util.isInteger(message.value.high))) + return "value: integer|Long expected"; + return null; + }; + + /** + * Creates an Int64Value message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Int64Value + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Int64Value} Int64Value + */ + Int64Value.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Int64Value) + return object; + var message = new $root.google.protobuf.Int64Value(); + if (object.value != null) + if ($util.Long) + (message.value = $util.Long.fromValue(object.value)).unsigned = false; + else if (typeof object.value === "string") + message.value = parseInt(object.value, 10); + else if (typeof object.value === "number") + message.value = object.value; + else if (typeof object.value === "object") + message.value = new $util.LongBits(object.value.low >>> 0, object.value.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from an Int64Value message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Int64Value + * @static + * @param {google.protobuf.Int64Value} message Int64Value + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Int64Value.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.value = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.value = options.longs === String ? "0" : 0; + if (message.value != null && message.hasOwnProperty("value")) + if (typeof message.value === "number") + object.value = options.longs === String ? String(message.value) : message.value; + else + object.value = options.longs === String ? $util.Long.prototype.toString.call(message.value) : options.longs === Number ? new $util.LongBits(message.value.low >>> 0, message.value.high >>> 0).toNumber() : message.value; + return object; + }; + + /** + * Converts this Int64Value to JSON. + * @function toJSON + * @memberof google.protobuf.Int64Value + * @instance + * @returns {Object.} JSON object + */ + Int64Value.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Int64Value + * @function getTypeUrl + * @memberof google.protobuf.Int64Value + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Int64Value.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Int64Value"; + }; + + return Int64Value; + })(); + + protobuf.UInt64Value = (function() { + + /** + * Properties of a UInt64Value. + * @memberof google.protobuf + * @interface IUInt64Value + * @property {number|Long|null} [value] UInt64Value value + */ + + /** + * Constructs a new UInt64Value. + * @memberof google.protobuf + * @classdesc Represents a UInt64Value. + * @implements IUInt64Value + * @constructor + * @param {google.protobuf.IUInt64Value=} [properties] Properties to set + */ + function UInt64Value(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UInt64Value value. + * @member {number|Long} value + * @memberof google.protobuf.UInt64Value + * @instance + */ + UInt64Value.prototype.value = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * Creates a new UInt64Value instance using the specified properties. + * @function create + * @memberof google.protobuf.UInt64Value + * @static + * @param {google.protobuf.IUInt64Value=} [properties] Properties to set + * @returns {google.protobuf.UInt64Value} UInt64Value instance + */ + UInt64Value.create = function create(properties) { + return new UInt64Value(properties); + }; + + /** + * Encodes the specified UInt64Value message. Does not implicitly {@link google.protobuf.UInt64Value.verify|verify} messages. + * @function encode + * @memberof google.protobuf.UInt64Value + * @static + * @param {google.protobuf.IUInt64Value} message UInt64Value message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UInt64Value.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.value); + return writer; + }; + + /** + * Encodes the specified UInt64Value message, length delimited. Does not implicitly {@link google.protobuf.UInt64Value.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.UInt64Value + * @static + * @param {google.protobuf.IUInt64Value} message UInt64Value message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UInt64Value.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a UInt64Value message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.UInt64Value + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.UInt64Value} UInt64Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UInt64Value.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UInt64Value(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.value = reader.uint64(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a UInt64Value message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.UInt64Value + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.UInt64Value} UInt64Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UInt64Value.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a UInt64Value message. + * @function verify + * @memberof google.protobuf.UInt64Value + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UInt64Value.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (!$util.isInteger(message.value) && !(message.value && $util.isInteger(message.value.low) && $util.isInteger(message.value.high))) + return "value: integer|Long expected"; + return null; + }; + + /** + * Creates a UInt64Value message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.UInt64Value + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.UInt64Value} UInt64Value + */ + UInt64Value.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.UInt64Value) + return object; + var message = new $root.google.protobuf.UInt64Value(); + if (object.value != null) + if ($util.Long) + (message.value = $util.Long.fromValue(object.value)).unsigned = true; + else if (typeof object.value === "string") + message.value = parseInt(object.value, 10); + else if (typeof object.value === "number") + message.value = object.value; + else if (typeof object.value === "object") + message.value = new $util.LongBits(object.value.low >>> 0, object.value.high >>> 0).toNumber(true); + return message; + }; + + /** + * Creates a plain object from a UInt64Value message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.UInt64Value + * @static + * @param {google.protobuf.UInt64Value} message UInt64Value + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UInt64Value.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.value = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.value = options.longs === String ? "0" : 0; + if (message.value != null && message.hasOwnProperty("value")) + if (typeof message.value === "number") + object.value = options.longs === String ? String(message.value) : message.value; + else + object.value = options.longs === String ? $util.Long.prototype.toString.call(message.value) : options.longs === Number ? new $util.LongBits(message.value.low >>> 0, message.value.high >>> 0).toNumber(true) : message.value; + return object; + }; + + /** + * Converts this UInt64Value to JSON. + * @function toJSON + * @memberof google.protobuf.UInt64Value + * @instance + * @returns {Object.} JSON object + */ + UInt64Value.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UInt64Value + * @function getTypeUrl + * @memberof google.protobuf.UInt64Value + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UInt64Value.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.UInt64Value"; + }; + + return UInt64Value; + })(); + + protobuf.Int32Value = (function() { + + /** + * Properties of an Int32Value. + * @memberof google.protobuf + * @interface IInt32Value + * @property {number|null} [value] Int32Value value + */ + + /** + * Constructs a new Int32Value. + * @memberof google.protobuf + * @classdesc Represents an Int32Value. + * @implements IInt32Value + * @constructor + * @param {google.protobuf.IInt32Value=} [properties] Properties to set + */ + function Int32Value(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Int32Value value. + * @member {number} value + * @memberof google.protobuf.Int32Value + * @instance + */ + Int32Value.prototype.value = 0; + + /** + * Creates a new Int32Value instance using the specified properties. + * @function create + * @memberof google.protobuf.Int32Value + * @static + * @param {google.protobuf.IInt32Value=} [properties] Properties to set + * @returns {google.protobuf.Int32Value} Int32Value instance + */ + Int32Value.create = function create(properties) { + return new Int32Value(properties); + }; + + /** + * Encodes the specified Int32Value message. Does not implicitly {@link google.protobuf.Int32Value.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Int32Value + * @static + * @param {google.protobuf.IInt32Value} message Int32Value message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Int32Value.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.value); + return writer; + }; + + /** + * Encodes the specified Int32Value message, length delimited. Does not implicitly {@link google.protobuf.Int32Value.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Int32Value + * @static + * @param {google.protobuf.IInt32Value} message Int32Value message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Int32Value.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Int32Value message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Int32Value + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Int32Value} Int32Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Int32Value.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Int32Value(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.value = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Int32Value message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Int32Value + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Int32Value} Int32Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Int32Value.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Int32Value message. + * @function verify + * @memberof google.protobuf.Int32Value + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Int32Value.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (!$util.isInteger(message.value)) + return "value: integer expected"; + return null; + }; + + /** + * Creates an Int32Value message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Int32Value + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Int32Value} Int32Value + */ + Int32Value.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Int32Value) + return object; + var message = new $root.google.protobuf.Int32Value(); + if (object.value != null) + message.value = object.value | 0; + return message; + }; + + /** + * Creates a plain object from an Int32Value message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Int32Value + * @static + * @param {google.protobuf.Int32Value} message Int32Value + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Int32Value.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.value = 0; + if (message.value != null && message.hasOwnProperty("value")) + object.value = message.value; + return object; + }; + + /** + * Converts this Int32Value to JSON. + * @function toJSON + * @memberof google.protobuf.Int32Value + * @instance + * @returns {Object.} JSON object + */ + Int32Value.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Int32Value + * @function getTypeUrl + * @memberof google.protobuf.Int32Value + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Int32Value.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Int32Value"; + }; + + return Int32Value; + })(); + + protobuf.UInt32Value = (function() { + + /** + * Properties of a UInt32Value. + * @memberof google.protobuf + * @interface IUInt32Value + * @property {number|null} [value] UInt32Value value + */ + + /** + * Constructs a new UInt32Value. + * @memberof google.protobuf + * @classdesc Represents a UInt32Value. + * @implements IUInt32Value + * @constructor + * @param {google.protobuf.IUInt32Value=} [properties] Properties to set + */ + function UInt32Value(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UInt32Value value. + * @member {number} value + * @memberof google.protobuf.UInt32Value + * @instance + */ + UInt32Value.prototype.value = 0; + + /** + * Creates a new UInt32Value instance using the specified properties. + * @function create + * @memberof google.protobuf.UInt32Value + * @static + * @param {google.protobuf.IUInt32Value=} [properties] Properties to set + * @returns {google.protobuf.UInt32Value} UInt32Value instance + */ + UInt32Value.create = function create(properties) { + return new UInt32Value(properties); + }; + + /** + * Encodes the specified UInt32Value message. Does not implicitly {@link google.protobuf.UInt32Value.verify|verify} messages. + * @function encode + * @memberof google.protobuf.UInt32Value + * @static + * @param {google.protobuf.IUInt32Value} message UInt32Value message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UInt32Value.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.value); + return writer; + }; + + /** + * Encodes the specified UInt32Value message, length delimited. Does not implicitly {@link google.protobuf.UInt32Value.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.UInt32Value + * @static + * @param {google.protobuf.IUInt32Value} message UInt32Value message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UInt32Value.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a UInt32Value message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.UInt32Value + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.UInt32Value} UInt32Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UInt32Value.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UInt32Value(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.value = reader.uint32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a UInt32Value message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.UInt32Value + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.UInt32Value} UInt32Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UInt32Value.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a UInt32Value message. + * @function verify + * @memberof google.protobuf.UInt32Value + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UInt32Value.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (!$util.isInteger(message.value)) + return "value: integer expected"; + return null; + }; + + /** + * Creates a UInt32Value message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.UInt32Value + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.UInt32Value} UInt32Value + */ + UInt32Value.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.UInt32Value) + return object; + var message = new $root.google.protobuf.UInt32Value(); + if (object.value != null) + message.value = object.value >>> 0; + return message; + }; + + /** + * Creates a plain object from a UInt32Value message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.UInt32Value + * @static + * @param {google.protobuf.UInt32Value} message UInt32Value + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UInt32Value.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.value = 0; + if (message.value != null && message.hasOwnProperty("value")) + object.value = message.value; + return object; + }; + + /** + * Converts this UInt32Value to JSON. + * @function toJSON + * @memberof google.protobuf.UInt32Value + * @instance + * @returns {Object.} JSON object + */ + UInt32Value.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UInt32Value + * @function getTypeUrl + * @memberof google.protobuf.UInt32Value + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UInt32Value.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.UInt32Value"; + }; + + return UInt32Value; + })(); + + protobuf.BoolValue = (function() { + + /** + * Properties of a BoolValue. + * @memberof google.protobuf + * @interface IBoolValue + * @property {boolean|null} [value] BoolValue value + */ + + /** + * Constructs a new BoolValue. + * @memberof google.protobuf + * @classdesc Represents a BoolValue. + * @implements IBoolValue + * @constructor + * @param {google.protobuf.IBoolValue=} [properties] Properties to set + */ + function BoolValue(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BoolValue value. + * @member {boolean} value + * @memberof google.protobuf.BoolValue + * @instance + */ + BoolValue.prototype.value = false; + + /** + * Creates a new BoolValue instance using the specified properties. + * @function create + * @memberof google.protobuf.BoolValue + * @static + * @param {google.protobuf.IBoolValue=} [properties] Properties to set + * @returns {google.protobuf.BoolValue} BoolValue instance + */ + BoolValue.create = function create(properties) { + return new BoolValue(properties); + }; + + /** + * Encodes the specified BoolValue message. Does not implicitly {@link google.protobuf.BoolValue.verify|verify} messages. + * @function encode + * @memberof google.protobuf.BoolValue + * @static + * @param {google.protobuf.IBoolValue} message BoolValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BoolValue.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.value); + return writer; + }; + + /** + * Encodes the specified BoolValue message, length delimited. Does not implicitly {@link google.protobuf.BoolValue.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.BoolValue + * @static + * @param {google.protobuf.IBoolValue} message BoolValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BoolValue.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BoolValue message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.BoolValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.BoolValue} BoolValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BoolValue.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.BoolValue(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.value = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BoolValue message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.BoolValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.BoolValue} BoolValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BoolValue.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BoolValue message. + * @function verify + * @memberof google.protobuf.BoolValue + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BoolValue.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (typeof message.value !== "boolean") + return "value: boolean expected"; + return null; + }; + + /** + * Creates a BoolValue message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.BoolValue + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.BoolValue} BoolValue + */ + BoolValue.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.BoolValue) + return object; + var message = new $root.google.protobuf.BoolValue(); + if (object.value != null) + message.value = Boolean(object.value); + return message; + }; + + /** + * Creates a plain object from a BoolValue message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.BoolValue + * @static + * @param {google.protobuf.BoolValue} message BoolValue + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BoolValue.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.value = false; + if (message.value != null && message.hasOwnProperty("value")) + object.value = message.value; + return object; + }; + + /** + * Converts this BoolValue to JSON. + * @function toJSON + * @memberof google.protobuf.BoolValue + * @instance + * @returns {Object.} JSON object + */ + BoolValue.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BoolValue + * @function getTypeUrl + * @memberof google.protobuf.BoolValue + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BoolValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.BoolValue"; + }; + + return BoolValue; + })(); + + protobuf.StringValue = (function() { + + /** + * Properties of a StringValue. + * @memberof google.protobuf + * @interface IStringValue + * @property {string|null} [value] StringValue value + */ + + /** + * Constructs a new StringValue. + * @memberof google.protobuf + * @classdesc Represents a StringValue. + * @implements IStringValue + * @constructor + * @param {google.protobuf.IStringValue=} [properties] Properties to set + */ + function StringValue(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * StringValue value. + * @member {string} value + * @memberof google.protobuf.StringValue + * @instance + */ + StringValue.prototype.value = ""; + + /** + * Creates a new StringValue instance using the specified properties. + * @function create + * @memberof google.protobuf.StringValue + * @static + * @param {google.protobuf.IStringValue=} [properties] Properties to set + * @returns {google.protobuf.StringValue} StringValue instance + */ + StringValue.create = function create(properties) { + return new StringValue(properties); + }; + + /** + * Encodes the specified StringValue message. Does not implicitly {@link google.protobuf.StringValue.verify|verify} messages. + * @function encode + * @memberof google.protobuf.StringValue + * @static + * @param {google.protobuf.IStringValue} message StringValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StringValue.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.value); + return writer; + }; + + /** + * Encodes the specified StringValue message, length delimited. Does not implicitly {@link google.protobuf.StringValue.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.StringValue + * @static + * @param {google.protobuf.IStringValue} message StringValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StringValue.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a StringValue message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.StringValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.StringValue} StringValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StringValue.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.StringValue(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.value = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a StringValue message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.StringValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.StringValue} StringValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StringValue.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a StringValue message. + * @function verify + * @memberof google.protobuf.StringValue + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + StringValue.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (!$util.isString(message.value)) + return "value: string expected"; + return null; + }; + + /** + * Creates a StringValue message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.StringValue + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.StringValue} StringValue + */ + StringValue.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.StringValue) + return object; + var message = new $root.google.protobuf.StringValue(); + if (object.value != null) + message.value = String(object.value); + return message; + }; + + /** + * Creates a plain object from a StringValue message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.StringValue + * @static + * @param {google.protobuf.StringValue} message StringValue + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + StringValue.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.value = ""; + if (message.value != null && message.hasOwnProperty("value")) + object.value = message.value; + return object; + }; + + /** + * Converts this StringValue to JSON. + * @function toJSON + * @memberof google.protobuf.StringValue + * @instance + * @returns {Object.} JSON object + */ + StringValue.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for StringValue + * @function getTypeUrl + * @memberof google.protobuf.StringValue + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + StringValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.StringValue"; + }; + + return StringValue; + })(); + + protobuf.BytesValue = (function() { + + /** + * Properties of a BytesValue. + * @memberof google.protobuf + * @interface IBytesValue + * @property {Uint8Array|null} [value] BytesValue value + */ + + /** + * Constructs a new BytesValue. + * @memberof google.protobuf + * @classdesc Represents a BytesValue. + * @implements IBytesValue + * @constructor + * @param {google.protobuf.IBytesValue=} [properties] Properties to set + */ + function BytesValue(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BytesValue value. + * @member {Uint8Array} value + * @memberof google.protobuf.BytesValue + * @instance + */ + BytesValue.prototype.value = $util.newBuffer([]); + + /** + * Creates a new BytesValue instance using the specified properties. + * @function create + * @memberof google.protobuf.BytesValue + * @static + * @param {google.protobuf.IBytesValue=} [properties] Properties to set + * @returns {google.protobuf.BytesValue} BytesValue instance + */ + BytesValue.create = function create(properties) { + return new BytesValue(properties); + }; + + /** + * Encodes the specified BytesValue message. Does not implicitly {@link google.protobuf.BytesValue.verify|verify} messages. + * @function encode + * @memberof google.protobuf.BytesValue + * @static + * @param {google.protobuf.IBytesValue} message BytesValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BytesValue.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.value); + return writer; + }; + + /** + * Encodes the specified BytesValue message, length delimited. Does not implicitly {@link google.protobuf.BytesValue.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.BytesValue + * @static + * @param {google.protobuf.IBytesValue} message BytesValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BytesValue.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BytesValue message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.BytesValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.BytesValue} BytesValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BytesValue.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.BytesValue(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.value = reader.bytes(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BytesValue message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.BytesValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.BytesValue} BytesValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BytesValue.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BytesValue message. + * @function verify + * @memberof google.protobuf.BytesValue + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BytesValue.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (!(message.value && typeof message.value.length === "number" || $util.isString(message.value))) + return "value: buffer expected"; + return null; + }; + + /** + * Creates a BytesValue message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.BytesValue + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.BytesValue} BytesValue + */ + BytesValue.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.BytesValue) + return object; + var message = new $root.google.protobuf.BytesValue(); + if (object.value != null) + if (typeof object.value === "string") + $util.base64.decode(object.value, message.value = $util.newBuffer($util.base64.length(object.value)), 0); + else if (object.value.length >= 0) + message.value = object.value; + return message; + }; + + /** + * Creates a plain object from a BytesValue message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.BytesValue + * @static + * @param {google.protobuf.BytesValue} message BytesValue + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BytesValue.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + if (options.bytes === String) + object.value = ""; + else { + object.value = []; + if (options.bytes !== Array) + object.value = $util.newBuffer(object.value); + } + if (message.value != null && message.hasOwnProperty("value")) + object.value = options.bytes === String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === Array ? Array.prototype.slice.call(message.value) : message.value; + return object; + }; + + /** + * Converts this BytesValue to JSON. + * @function toJSON + * @memberof google.protobuf.BytesValue + * @instance + * @returns {Object.} JSON object + */ + BytesValue.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BytesValue + * @function getTypeUrl + * @memberof google.protobuf.BytesValue + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BytesValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.BytesValue"; + }; + + return BytesValue; + })(); + + 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) { + 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(); + 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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldMask(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.paths && message.paths.length)) + message.paths = []; + message.paths.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + 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/packages/google-analytics-admin/protos/protos.json b/packages/google-analytics-admin/protos/protos.json new file mode 100644 index 00000000000..743079aaad6 --- /dev/null +++ b/packages/google-analytics-admin/protos/protos.json @@ -0,0 +1,9128 @@ +{ + "nested": { + "google": { + "nested": { + "analytics": { + "nested": { + "admin": { + "nested": { + "v1alpha": { + "options": { + "go_package": "google.golang.org/genproto/googleapis/analytics/admin/v1alpha;admin", + "java_multiple_files": true, + "java_outer_classname": "ResourcesProto", + "java_package": "com.google.analytics.admin.v1alpha" + }, + "nested": { + "AccessDimension": { + "fields": { + "dimensionName": { + "type": "string", + "id": 1 + } + } + }, + "AccessMetric": { + "fields": { + "metricName": { + "type": "string", + "id": 1 + } + } + }, + "AccessDateRange": { + "fields": { + "startDate": { + "type": "string", + "id": 1 + }, + "endDate": { + "type": "string", + "id": 2 + } + } + }, + "AccessFilterExpression": { + "oneofs": { + "oneExpression": { + "oneof": [ + "andGroup", + "orGroup", + "notExpression", + "accessFilter" + ] + } + }, + "fields": { + "andGroup": { + "type": "AccessFilterExpressionList", + "id": 1 + }, + "orGroup": { + "type": "AccessFilterExpressionList", + "id": 2 + }, + "notExpression": { + "type": "AccessFilterExpression", + "id": 3 + }, + "accessFilter": { + "type": "AccessFilter", + "id": 4 + } + } + }, + "AccessFilterExpressionList": { + "fields": { + "expressions": { + "rule": "repeated", + "type": "AccessFilterExpression", + "id": 1 + } + } + }, + "AccessFilter": { + "oneofs": { + "oneFilter": { + "oneof": [ + "stringFilter", + "inListFilter", + "numericFilter", + "betweenFilter" + ] + } + }, + "fields": { + "stringFilter": { + "type": "AccessStringFilter", + "id": 2 + }, + "inListFilter": { + "type": "AccessInListFilter", + "id": 3 + }, + "numericFilter": { + "type": "AccessNumericFilter", + "id": 4 + }, + "betweenFilter": { + "type": "AccessBetweenFilter", + "id": 5 + }, + "fieldName": { + "type": "string", + "id": 1 + } + } + }, + "AccessStringFilter": { + "fields": { + "matchType": { + "type": "MatchType", + "id": 1 + }, + "value": { + "type": "string", + "id": 2 + }, + "caseSensitive": { + "type": "bool", + "id": 3 + } + }, + "nested": { + "MatchType": { + "values": { + "MATCH_TYPE_UNSPECIFIED": 0, + "EXACT": 1, + "BEGINS_WITH": 2, + "ENDS_WITH": 3, + "CONTAINS": 4, + "FULL_REGEXP": 5, + "PARTIAL_REGEXP": 6 + } + } + } + }, + "AccessInListFilter": { + "fields": { + "values": { + "rule": "repeated", + "type": "string", + "id": 1 + }, + "caseSensitive": { + "type": "bool", + "id": 2 + } + } + }, + "AccessNumericFilter": { + "fields": { + "operation": { + "type": "Operation", + "id": 1 + }, + "value": { + "type": "NumericValue", + "id": 2 + } + }, + "nested": { + "Operation": { + "values": { + "OPERATION_UNSPECIFIED": 0, + "EQUAL": 1, + "LESS_THAN": 2, + "LESS_THAN_OR_EQUAL": 3, + "GREATER_THAN": 4, + "GREATER_THAN_OR_EQUAL": 5 + } + } + } + }, + "AccessBetweenFilter": { + "fields": { + "fromValue": { + "type": "NumericValue", + "id": 1 + }, + "toValue": { + "type": "NumericValue", + "id": 2 + } + } + }, + "NumericValue": { + "oneofs": { + "oneValue": { + "oneof": [ + "int64Value", + "doubleValue" + ] + } + }, + "fields": { + "int64Value": { + "type": "int64", + "id": 1 + }, + "doubleValue": { + "type": "double", + "id": 2 + } + } + }, + "AccessOrderBy": { + "oneofs": { + "oneOrderBy": { + "oneof": [ + "metric", + "dimension" + ] + } + }, + "fields": { + "metric": { + "type": "MetricOrderBy", + "id": 1 + }, + "dimension": { + "type": "DimensionOrderBy", + "id": 2 + }, + "desc": { + "type": "bool", + "id": 3 + } + }, + "nested": { + "MetricOrderBy": { + "fields": { + "metricName": { + "type": "string", + "id": 1 + } + } + }, + "DimensionOrderBy": { + "fields": { + "dimensionName": { + "type": "string", + "id": 1 + }, + "orderType": { + "type": "OrderType", + "id": 2 + } + }, + "nested": { + "OrderType": { + "values": { + "ORDER_TYPE_UNSPECIFIED": 0, + "ALPHANUMERIC": 1, + "CASE_INSENSITIVE_ALPHANUMERIC": 2, + "NUMERIC": 3 + } + } + } + } + } + }, + "AccessDimensionHeader": { + "fields": { + "dimensionName": { + "type": "string", + "id": 1 + } + } + }, + "AccessMetricHeader": { + "fields": { + "metricName": { + "type": "string", + "id": 1 + } + } + }, + "AccessRow": { + "fields": { + "dimensionValues": { + "rule": "repeated", + "type": "AccessDimensionValue", + "id": 1 + }, + "metricValues": { + "rule": "repeated", + "type": "AccessMetricValue", + "id": 2 + } + } + }, + "AccessDimensionValue": { + "fields": { + "value": { + "type": "string", + "id": 1 + } + } + }, + "AccessMetricValue": { + "fields": { + "value": { + "type": "string", + "id": 1 + } + } + }, + "AccessQuota": { + "fields": { + "tokensPerDay": { + "type": "AccessQuotaStatus", + "id": 1 + }, + "tokensPerHour": { + "type": "AccessQuotaStatus", + "id": 2 + }, + "concurrentRequests": { + "type": "AccessQuotaStatus", + "id": 3 + }, + "serverErrorsPerProjectPerHour": { + "type": "AccessQuotaStatus", + "id": 4 + } + } + }, + "AccessQuotaStatus": { + "fields": { + "consumed": { + "type": "int32", + "id": 1 + }, + "remaining": { + "type": "int32", + "id": 2 + } + } + }, + "AnalyticsAdminService": { + "options": { + "(google.api.default_host)": "analyticsadmin.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/analytics.edit,https://www.googleapis.com/auth/analytics.manage.users,https://www.googleapis.com/auth/analytics.manage.users.readonly,https://www.googleapis.com/auth/analytics.readonly" + }, + "methods": { + "GetAccount": { + "requestType": "GetAccountRequest", + "responseType": "Account", + "options": { + "(google.api.http).get": "/v1alpha/{name=accounts/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1alpha/{name=accounts/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListAccounts": { + "requestType": "ListAccountsRequest", + "responseType": "ListAccountsResponse", + "options": { + "(google.api.http).get": "/v1alpha/accounts" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1alpha/accounts" + } + } + ] + }, + "DeleteAccount": { + "requestType": "DeleteAccountRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).delete": "/v1alpha/{name=accounts/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1alpha/{name=accounts/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "UpdateAccount": { + "requestType": "UpdateAccountRequest", + "responseType": "Account", + "options": { + "(google.api.http).patch": "/v1alpha/{account.name=accounts/*}", + "(google.api.http).body": "account", + "(google.api.method_signature)": "account,update_mask" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1alpha/{account.name=accounts/*}", + "body": "account" + } + }, + { + "(google.api.method_signature)": "account,update_mask" + } + ] + }, + "ProvisionAccountTicket": { + "requestType": "ProvisionAccountTicketRequest", + "responseType": "ProvisionAccountTicketResponse", + "options": { + "(google.api.http).post": "/v1alpha/accounts:provisionAccountTicket", + "(google.api.http).body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1alpha/accounts:provisionAccountTicket", + "body": "*" + } + } + ] + }, + "ListAccountSummaries": { + "requestType": "ListAccountSummariesRequest", + "responseType": "ListAccountSummariesResponse", + "options": { + "(google.api.http).get": "/v1alpha/accountSummaries" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1alpha/accountSummaries" + } + } + ] + }, + "GetProperty": { + "requestType": "GetPropertyRequest", + "responseType": "Property", + "options": { + "(google.api.http).get": "/v1alpha/{name=properties/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1alpha/{name=properties/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListProperties": { + "requestType": "ListPropertiesRequest", + "responseType": "ListPropertiesResponse", + "options": { + "(google.api.http).get": "/v1alpha/properties" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1alpha/properties" + } + } + ] + }, + "CreateProperty": { + "requestType": "CreatePropertyRequest", + "responseType": "Property", + "options": { + "(google.api.http).post": "/v1alpha/properties", + "(google.api.http).body": "property", + "(google.api.method_signature)": "property" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1alpha/properties", + "body": "property" + } + }, + { + "(google.api.method_signature)": "property" + } + ] + }, + "DeleteProperty": { + "requestType": "DeletePropertyRequest", + "responseType": "Property", + "options": { + "(google.api.http).delete": "/v1alpha/{name=properties/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1alpha/{name=properties/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "UpdateProperty": { + "requestType": "UpdatePropertyRequest", + "responseType": "Property", + "options": { + "(google.api.http).patch": "/v1alpha/{property.name=properties/*}", + "(google.api.http).body": "property", + "(google.api.method_signature)": "property,update_mask" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1alpha/{property.name=properties/*}", + "body": "property" + } + }, + { + "(google.api.method_signature)": "property,update_mask" + } + ] + }, + "GetUserLink": { + "requestType": "GetUserLinkRequest", + "responseType": "UserLink", + "options": { + "(google.api.http).get": "/v1alpha/{name=accounts/*/userLinks/*}", + "(google.api.http).additional_bindings.get": "/v1alpha/{name=properties/*/userLinks/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1alpha/{name=accounts/*/userLinks/*}", + "additional_bindings": { + "get": "/v1alpha/{name=properties/*/userLinks/*}" + } + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "BatchGetUserLinks": { + "requestType": "BatchGetUserLinksRequest", + "responseType": "BatchGetUserLinksResponse", + "options": { + "(google.api.http).get": "/v1alpha/{parent=accounts/*}/userLinks:batchGet", + "(google.api.http).additional_bindings.get": "/v1alpha/{parent=properties/*}/userLinks:batchGet" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1alpha/{parent=accounts/*}/userLinks:batchGet", + "additional_bindings": { + "get": "/v1alpha/{parent=properties/*}/userLinks:batchGet" + } + } + } + ] + }, + "ListUserLinks": { + "requestType": "ListUserLinksRequest", + "responseType": "ListUserLinksResponse", + "options": { + "(google.api.http).get": "/v1alpha/{parent=accounts/*}/userLinks", + "(google.api.http).additional_bindings.get": "/v1alpha/{parent=properties/*}/userLinks", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1alpha/{parent=accounts/*}/userLinks", + "additional_bindings": { + "get": "/v1alpha/{parent=properties/*}/userLinks" + } + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "AuditUserLinks": { + "requestType": "AuditUserLinksRequest", + "responseType": "AuditUserLinksResponse", + "options": { + "(google.api.http).post": "/v1alpha/{parent=accounts/*}/userLinks:audit", + "(google.api.http).body": "*", + "(google.api.http).additional_bindings.post": "/v1alpha/{parent=properties/*}/userLinks:audit", + "(google.api.http).additional_bindings.body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1alpha/{parent=accounts/*}/userLinks:audit", + "body": "*", + "additional_bindings": { + "post": "/v1alpha/{parent=properties/*}/userLinks:audit", + "body": "*" + } + } + } + ] + }, + "CreateUserLink": { + "requestType": "CreateUserLinkRequest", + "responseType": "UserLink", + "options": { + "(google.api.http).post": "/v1alpha/{parent=accounts/*}/userLinks", + "(google.api.http).body": "user_link", + "(google.api.http).additional_bindings.post": "/v1alpha/{parent=properties/*}/userLinks", + "(google.api.http).additional_bindings.body": "user_link", + "(google.api.method_signature)": "parent,user_link" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1alpha/{parent=accounts/*}/userLinks", + "body": "user_link", + "additional_bindings": { + "post": "/v1alpha/{parent=properties/*}/userLinks", + "body": "user_link" + } + } + }, + { + "(google.api.method_signature)": "parent,user_link" + } + ] + }, + "BatchCreateUserLinks": { + "requestType": "BatchCreateUserLinksRequest", + "responseType": "BatchCreateUserLinksResponse", + "options": { + "(google.api.http).post": "/v1alpha/{parent=accounts/*}/userLinks:batchCreate", + "(google.api.http).body": "*", + "(google.api.http).additional_bindings.post": "/v1alpha/{parent=properties/*}/userLinks:batchCreate", + "(google.api.http).additional_bindings.body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1alpha/{parent=accounts/*}/userLinks:batchCreate", + "body": "*", + "additional_bindings": { + "post": "/v1alpha/{parent=properties/*}/userLinks:batchCreate", + "body": "*" + } + } + } + ] + }, + "UpdateUserLink": { + "requestType": "UpdateUserLinkRequest", + "responseType": "UserLink", + "options": { + "(google.api.http).patch": "/v1alpha/{user_link.name=accounts/*/userLinks/*}", + "(google.api.http).body": "user_link", + "(google.api.http).additional_bindings.patch": "/v1alpha/{user_link.name=properties/*/userLinks/*}", + "(google.api.http).additional_bindings.body": "user_link", + "(google.api.method_signature)": "user_link" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1alpha/{user_link.name=accounts/*/userLinks/*}", + "body": "user_link", + "additional_bindings": { + "patch": "/v1alpha/{user_link.name=properties/*/userLinks/*}", + "body": "user_link" + } + } + }, + { + "(google.api.method_signature)": "user_link" + } + ] + }, + "BatchUpdateUserLinks": { + "requestType": "BatchUpdateUserLinksRequest", + "responseType": "BatchUpdateUserLinksResponse", + "options": { + "(google.api.http).post": "/v1alpha/{parent=accounts/*}/userLinks:batchUpdate", + "(google.api.http).body": "*", + "(google.api.http).additional_bindings.post": "/v1alpha/{parent=properties/*}/userLinks:batchUpdate", + "(google.api.http).additional_bindings.body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1alpha/{parent=accounts/*}/userLinks:batchUpdate", + "body": "*", + "additional_bindings": { + "post": "/v1alpha/{parent=properties/*}/userLinks:batchUpdate", + "body": "*" + } + } + } + ] + }, + "DeleteUserLink": { + "requestType": "DeleteUserLinkRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).delete": "/v1alpha/{name=accounts/*/userLinks/*}", + "(google.api.http).additional_bindings.delete": "/v1alpha/{name=properties/*/userLinks/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1alpha/{name=accounts/*/userLinks/*}", + "additional_bindings": { + "delete": "/v1alpha/{name=properties/*/userLinks/*}" + } + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "BatchDeleteUserLinks": { + "requestType": "BatchDeleteUserLinksRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).post": "/v1alpha/{parent=accounts/*}/userLinks:batchDelete", + "(google.api.http).body": "*", + "(google.api.http).additional_bindings.post": "/v1alpha/{parent=properties/*}/userLinks:batchDelete", + "(google.api.http).additional_bindings.body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1alpha/{parent=accounts/*}/userLinks:batchDelete", + "body": "*", + "additional_bindings": { + "post": "/v1alpha/{parent=properties/*}/userLinks:batchDelete", + "body": "*" + } + } + } + ] + }, + "CreateFirebaseLink": { + "requestType": "CreateFirebaseLinkRequest", + "responseType": "FirebaseLink", + "options": { + "(google.api.http).post": "/v1alpha/{parent=properties/*}/firebaseLinks", + "(google.api.http).body": "firebase_link", + "(google.api.method_signature)": "parent,firebase_link" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1alpha/{parent=properties/*}/firebaseLinks", + "body": "firebase_link" + } + }, + { + "(google.api.method_signature)": "parent,firebase_link" + } + ] + }, + "DeleteFirebaseLink": { + "requestType": "DeleteFirebaseLinkRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).delete": "/v1alpha/{name=properties/*/firebaseLinks/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1alpha/{name=properties/*/firebaseLinks/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListFirebaseLinks": { + "requestType": "ListFirebaseLinksRequest", + "responseType": "ListFirebaseLinksResponse", + "options": { + "(google.api.http).get": "/v1alpha/{parent=properties/*}/firebaseLinks", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1alpha/{parent=properties/*}/firebaseLinks" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetGlobalSiteTag": { + "requestType": "GetGlobalSiteTagRequest", + "responseType": "GlobalSiteTag", + "options": { + "(google.api.http).get": "/v1alpha/{name=properties/*/dataStreams/*/globalSiteTag}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1alpha/{name=properties/*/dataStreams/*/globalSiteTag}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "CreateGoogleAdsLink": { + "requestType": "CreateGoogleAdsLinkRequest", + "responseType": "GoogleAdsLink", + "options": { + "(google.api.http).post": "/v1alpha/{parent=properties/*}/googleAdsLinks", + "(google.api.http).body": "google_ads_link", + "(google.api.method_signature)": "parent,google_ads_link" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1alpha/{parent=properties/*}/googleAdsLinks", + "body": "google_ads_link" + } + }, + { + "(google.api.method_signature)": "parent,google_ads_link" + } + ] + }, + "UpdateGoogleAdsLink": { + "requestType": "UpdateGoogleAdsLinkRequest", + "responseType": "GoogleAdsLink", + "options": { + "(google.api.http).patch": "/v1alpha/{google_ads_link.name=properties/*/googleAdsLinks/*}", + "(google.api.http).body": "google_ads_link", + "(google.api.method_signature)": "google_ads_link,update_mask" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1alpha/{google_ads_link.name=properties/*/googleAdsLinks/*}", + "body": "google_ads_link" + } + }, + { + "(google.api.method_signature)": "google_ads_link,update_mask" + } + ] + }, + "DeleteGoogleAdsLink": { + "requestType": "DeleteGoogleAdsLinkRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).delete": "/v1alpha/{name=properties/*/googleAdsLinks/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1alpha/{name=properties/*/googleAdsLinks/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListGoogleAdsLinks": { + "requestType": "ListGoogleAdsLinksRequest", + "responseType": "ListGoogleAdsLinksResponse", + "options": { + "(google.api.http).get": "/v1alpha/{parent=properties/*}/googleAdsLinks", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1alpha/{parent=properties/*}/googleAdsLinks" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetDataSharingSettings": { + "requestType": "GetDataSharingSettingsRequest", + "responseType": "DataSharingSettings", + "options": { + "(google.api.http).get": "/v1alpha/{name=accounts/*/dataSharingSettings}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1alpha/{name=accounts/*/dataSharingSettings}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "GetMeasurementProtocolSecret": { + "requestType": "GetMeasurementProtocolSecretRequest", + "responseType": "MeasurementProtocolSecret", + "options": { + "(google.api.http).get": "/v1alpha/{name=properties/*/dataStreams/*/measurementProtocolSecrets/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1alpha/{name=properties/*/dataStreams/*/measurementProtocolSecrets/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListMeasurementProtocolSecrets": { + "requestType": "ListMeasurementProtocolSecretsRequest", + "responseType": "ListMeasurementProtocolSecretsResponse", + "options": { + "(google.api.http).get": "/v1alpha/{parent=properties/*/dataStreams/*}/measurementProtocolSecrets", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1alpha/{parent=properties/*/dataStreams/*}/measurementProtocolSecrets" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "CreateMeasurementProtocolSecret": { + "requestType": "CreateMeasurementProtocolSecretRequest", + "responseType": "MeasurementProtocolSecret", + "options": { + "(google.api.http).post": "/v1alpha/{parent=properties/*/dataStreams/*}/measurementProtocolSecrets", + "(google.api.http).body": "measurement_protocol_secret", + "(google.api.method_signature)": "parent,measurement_protocol_secret" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1alpha/{parent=properties/*/dataStreams/*}/measurementProtocolSecrets", + "body": "measurement_protocol_secret" + } + }, + { + "(google.api.method_signature)": "parent,measurement_protocol_secret" + } + ] + }, + "DeleteMeasurementProtocolSecret": { + "requestType": "DeleteMeasurementProtocolSecretRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).delete": "/v1alpha/{name=properties/*/dataStreams/*/measurementProtocolSecrets/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1alpha/{name=properties/*/dataStreams/*/measurementProtocolSecrets/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "UpdateMeasurementProtocolSecret": { + "requestType": "UpdateMeasurementProtocolSecretRequest", + "responseType": "MeasurementProtocolSecret", + "options": { + "(google.api.http).patch": "/v1alpha/{measurement_protocol_secret.name=properties/*/dataStreams/*/measurementProtocolSecrets/*}", + "(google.api.http).body": "measurement_protocol_secret", + "(google.api.method_signature)": "measurement_protocol_secret,update_mask" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1alpha/{measurement_protocol_secret.name=properties/*/dataStreams/*/measurementProtocolSecrets/*}", + "body": "measurement_protocol_secret" + } + }, + { + "(google.api.method_signature)": "measurement_protocol_secret,update_mask" + } + ] + }, + "AcknowledgeUserDataCollection": { + "requestType": "AcknowledgeUserDataCollectionRequest", + "responseType": "AcknowledgeUserDataCollectionResponse", + "options": { + "(google.api.http).post": "/v1alpha/{property=properties/*}:acknowledgeUserDataCollection", + "(google.api.http).body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1alpha/{property=properties/*}:acknowledgeUserDataCollection", + "body": "*" + } + } + ] + }, + "SearchChangeHistoryEvents": { + "requestType": "SearchChangeHistoryEventsRequest", + "responseType": "SearchChangeHistoryEventsResponse", + "options": { + "(google.api.http).post": "/v1alpha/{account=accounts/*}:searchChangeHistoryEvents", + "(google.api.http).body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1alpha/{account=accounts/*}:searchChangeHistoryEvents", + "body": "*" + } + } + ] + }, + "GetGoogleSignalsSettings": { + "requestType": "GetGoogleSignalsSettingsRequest", + "responseType": "GoogleSignalsSettings", + "options": { + "(google.api.http).get": "/v1alpha/{name=properties/*/googleSignalsSettings}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1alpha/{name=properties/*/googleSignalsSettings}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "UpdateGoogleSignalsSettings": { + "requestType": "UpdateGoogleSignalsSettingsRequest", + "responseType": "GoogleSignalsSettings", + "options": { + "(google.api.http).patch": "/v1alpha/{google_signals_settings.name=properties/*/googleSignalsSettings}", + "(google.api.http).body": "google_signals_settings", + "(google.api.method_signature)": "google_signals_settings,update_mask" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1alpha/{google_signals_settings.name=properties/*/googleSignalsSettings}", + "body": "google_signals_settings" + } + }, + { + "(google.api.method_signature)": "google_signals_settings,update_mask" + } + ] + }, + "CreateConversionEvent": { + "requestType": "CreateConversionEventRequest", + "responseType": "ConversionEvent", + "options": { + "(google.api.http).post": "/v1alpha/{parent=properties/*}/conversionEvents", + "(google.api.http).body": "conversion_event", + "(google.api.method_signature)": "parent,conversion_event" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1alpha/{parent=properties/*}/conversionEvents", + "body": "conversion_event" + } + }, + { + "(google.api.method_signature)": "parent,conversion_event" + } + ] + }, + "GetConversionEvent": { + "requestType": "GetConversionEventRequest", + "responseType": "ConversionEvent", + "options": { + "(google.api.http).get": "/v1alpha/{name=properties/*/conversionEvents/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1alpha/{name=properties/*/conversionEvents/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "DeleteConversionEvent": { + "requestType": "DeleteConversionEventRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).delete": "/v1alpha/{name=properties/*/conversionEvents/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1alpha/{name=properties/*/conversionEvents/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListConversionEvents": { + "requestType": "ListConversionEventsRequest", + "responseType": "ListConversionEventsResponse", + "options": { + "(google.api.http).get": "/v1alpha/{parent=properties/*}/conversionEvents", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1alpha/{parent=properties/*}/conversionEvents" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetDisplayVideo360AdvertiserLink": { + "requestType": "GetDisplayVideo360AdvertiserLinkRequest", + "responseType": "DisplayVideo360AdvertiserLink", + "options": { + "(google.api.http).get": "/v1alpha/{name=properties/*/displayVideo360AdvertiserLinks/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1alpha/{name=properties/*/displayVideo360AdvertiserLinks/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListDisplayVideo360AdvertiserLinks": { + "requestType": "ListDisplayVideo360AdvertiserLinksRequest", + "responseType": "ListDisplayVideo360AdvertiserLinksResponse", + "options": { + "(google.api.http).get": "/v1alpha/{parent=properties/*}/displayVideo360AdvertiserLinks", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1alpha/{parent=properties/*}/displayVideo360AdvertiserLinks" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "CreateDisplayVideo360AdvertiserLink": { + "requestType": "CreateDisplayVideo360AdvertiserLinkRequest", + "responseType": "DisplayVideo360AdvertiserLink", + "options": { + "(google.api.http).post": "/v1alpha/{parent=properties/*}/displayVideo360AdvertiserLinks", + "(google.api.http).body": "display_video_360_advertiser_link", + "(google.api.method_signature)": "parent,display_video_360_advertiser_link" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1alpha/{parent=properties/*}/displayVideo360AdvertiserLinks", + "body": "display_video_360_advertiser_link" + } + }, + { + "(google.api.method_signature)": "parent,display_video_360_advertiser_link" + } + ] + }, + "DeleteDisplayVideo360AdvertiserLink": { + "requestType": "DeleteDisplayVideo360AdvertiserLinkRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).delete": "/v1alpha/{name=properties/*/displayVideo360AdvertiserLinks/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1alpha/{name=properties/*/displayVideo360AdvertiserLinks/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "UpdateDisplayVideo360AdvertiserLink": { + "requestType": "UpdateDisplayVideo360AdvertiserLinkRequest", + "responseType": "DisplayVideo360AdvertiserLink", + "options": { + "(google.api.http).patch": "/v1alpha/{display_video_360_advertiser_link.name=properties/*/displayVideo360AdvertiserLinks/*}", + "(google.api.http).body": "display_video_360_advertiser_link", + "(google.api.method_signature)": "display_video_360_advertiser_link,update_mask" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1alpha/{display_video_360_advertiser_link.name=properties/*/displayVideo360AdvertiserLinks/*}", + "body": "display_video_360_advertiser_link" + } + }, + { + "(google.api.method_signature)": "display_video_360_advertiser_link,update_mask" + } + ] + }, + "GetDisplayVideo360AdvertiserLinkProposal": { + "requestType": "GetDisplayVideo360AdvertiserLinkProposalRequest", + "responseType": "DisplayVideo360AdvertiserLinkProposal", + "options": { + "(google.api.http).get": "/v1alpha/{name=properties/*/displayVideo360AdvertiserLinkProposals/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1alpha/{name=properties/*/displayVideo360AdvertiserLinkProposals/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListDisplayVideo360AdvertiserLinkProposals": { + "requestType": "ListDisplayVideo360AdvertiserLinkProposalsRequest", + "responseType": "ListDisplayVideo360AdvertiserLinkProposalsResponse", + "options": { + "(google.api.http).get": "/v1alpha/{parent=properties/*}/displayVideo360AdvertiserLinkProposals", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1alpha/{parent=properties/*}/displayVideo360AdvertiserLinkProposals" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "CreateDisplayVideo360AdvertiserLinkProposal": { + "requestType": "CreateDisplayVideo360AdvertiserLinkProposalRequest", + "responseType": "DisplayVideo360AdvertiserLinkProposal", + "options": { + "(google.api.http).post": "/v1alpha/{parent=properties/*}/displayVideo360AdvertiserLinkProposals", + "(google.api.http).body": "display_video_360_advertiser_link_proposal", + "(google.api.method_signature)": "parent,display_video_360_advertiser_link_proposal" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1alpha/{parent=properties/*}/displayVideo360AdvertiserLinkProposals", + "body": "display_video_360_advertiser_link_proposal" + } + }, + { + "(google.api.method_signature)": "parent,display_video_360_advertiser_link_proposal" + } + ] + }, + "DeleteDisplayVideo360AdvertiserLinkProposal": { + "requestType": "DeleteDisplayVideo360AdvertiserLinkProposalRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).delete": "/v1alpha/{name=properties/*/displayVideo360AdvertiserLinkProposals/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1alpha/{name=properties/*/displayVideo360AdvertiserLinkProposals/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ApproveDisplayVideo360AdvertiserLinkProposal": { + "requestType": "ApproveDisplayVideo360AdvertiserLinkProposalRequest", + "responseType": "ApproveDisplayVideo360AdvertiserLinkProposalResponse", + "options": { + "(google.api.http).post": "/v1alpha/{name=properties/*/displayVideo360AdvertiserLinkProposals/*}:approve", + "(google.api.http).body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1alpha/{name=properties/*/displayVideo360AdvertiserLinkProposals/*}:approve", + "body": "*" + } + } + ] + }, + "CancelDisplayVideo360AdvertiserLinkProposal": { + "requestType": "CancelDisplayVideo360AdvertiserLinkProposalRequest", + "responseType": "DisplayVideo360AdvertiserLinkProposal", + "options": { + "(google.api.http).post": "/v1alpha/{name=properties/*/displayVideo360AdvertiserLinkProposals/*}:cancel", + "(google.api.http).body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1alpha/{name=properties/*/displayVideo360AdvertiserLinkProposals/*}:cancel", + "body": "*" + } + } + ] + }, + "CreateCustomDimension": { + "requestType": "CreateCustomDimensionRequest", + "responseType": "CustomDimension", + "options": { + "(google.api.http).post": "/v1alpha/{parent=properties/*}/customDimensions", + "(google.api.http).body": "custom_dimension", + "(google.api.method_signature)": "parent,custom_dimension" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1alpha/{parent=properties/*}/customDimensions", + "body": "custom_dimension" + } + }, + { + "(google.api.method_signature)": "parent,custom_dimension" + } + ] + }, + "UpdateCustomDimension": { + "requestType": "UpdateCustomDimensionRequest", + "responseType": "CustomDimension", + "options": { + "(google.api.http).patch": "/v1alpha/{custom_dimension.name=properties/*/customDimensions/*}", + "(google.api.http).body": "custom_dimension", + "(google.api.method_signature)": "custom_dimension,update_mask" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1alpha/{custom_dimension.name=properties/*/customDimensions/*}", + "body": "custom_dimension" + } + }, + { + "(google.api.method_signature)": "custom_dimension,update_mask" + } + ] + }, + "ListCustomDimensions": { + "requestType": "ListCustomDimensionsRequest", + "responseType": "ListCustomDimensionsResponse", + "options": { + "(google.api.http).get": "/v1alpha/{parent=properties/*}/customDimensions", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1alpha/{parent=properties/*}/customDimensions" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "ArchiveCustomDimension": { + "requestType": "ArchiveCustomDimensionRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).post": "/v1alpha/{name=properties/*/customDimensions/*}:archive", + "(google.api.http).body": "*", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1alpha/{name=properties/*/customDimensions/*}:archive", + "body": "*" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "GetCustomDimension": { + "requestType": "GetCustomDimensionRequest", + "responseType": "CustomDimension", + "options": { + "(google.api.http).get": "/v1alpha/{name=properties/*/customDimensions/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1alpha/{name=properties/*/customDimensions/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "CreateCustomMetric": { + "requestType": "CreateCustomMetricRequest", + "responseType": "CustomMetric", + "options": { + "(google.api.http).post": "/v1alpha/{parent=properties/*}/customMetrics", + "(google.api.http).body": "custom_metric", + "(google.api.method_signature)": "parent,custom_metric" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1alpha/{parent=properties/*}/customMetrics", + "body": "custom_metric" + } + }, + { + "(google.api.method_signature)": "parent,custom_metric" + } + ] + }, + "UpdateCustomMetric": { + "requestType": "UpdateCustomMetricRequest", + "responseType": "CustomMetric", + "options": { + "(google.api.http).patch": "/v1alpha/{custom_metric.name=properties/*/customMetrics/*}", + "(google.api.http).body": "custom_metric", + "(google.api.method_signature)": "custom_metric,update_mask" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1alpha/{custom_metric.name=properties/*/customMetrics/*}", + "body": "custom_metric" + } + }, + { + "(google.api.method_signature)": "custom_metric,update_mask" + } + ] + }, + "ListCustomMetrics": { + "requestType": "ListCustomMetricsRequest", + "responseType": "ListCustomMetricsResponse", + "options": { + "(google.api.http).get": "/v1alpha/{parent=properties/*}/customMetrics", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1alpha/{parent=properties/*}/customMetrics" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "ArchiveCustomMetric": { + "requestType": "ArchiveCustomMetricRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).post": "/v1alpha/{name=properties/*/customMetrics/*}:archive", + "(google.api.http).body": "*", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1alpha/{name=properties/*/customMetrics/*}:archive", + "body": "*" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "GetCustomMetric": { + "requestType": "GetCustomMetricRequest", + "responseType": "CustomMetric", + "options": { + "(google.api.http).get": "/v1alpha/{name=properties/*/customMetrics/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1alpha/{name=properties/*/customMetrics/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "GetDataRetentionSettings": { + "requestType": "GetDataRetentionSettingsRequest", + "responseType": "DataRetentionSettings", + "options": { + "(google.api.http).get": "/v1alpha/{name=properties/*/dataRetentionSettings}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1alpha/{name=properties/*/dataRetentionSettings}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "UpdateDataRetentionSettings": { + "requestType": "UpdateDataRetentionSettingsRequest", + "responseType": "DataRetentionSettings", + "options": { + "(google.api.http).patch": "/v1alpha/{data_retention_settings.name=properties/*/dataRetentionSettings}", + "(google.api.http).body": "data_retention_settings", + "(google.api.method_signature)": "data_retention_settings,update_mask" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1alpha/{data_retention_settings.name=properties/*/dataRetentionSettings}", + "body": "data_retention_settings" + } + }, + { + "(google.api.method_signature)": "data_retention_settings,update_mask" + } + ] + }, + "CreateDataStream": { + "requestType": "CreateDataStreamRequest", + "responseType": "DataStream", + "options": { + "(google.api.http).post": "/v1alpha/{parent=properties/*}/dataStreams", + "(google.api.http).body": "data_stream", + "(google.api.method_signature)": "parent,data_stream" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1alpha/{parent=properties/*}/dataStreams", + "body": "data_stream" + } + }, + { + "(google.api.method_signature)": "parent,data_stream" + } + ] + }, + "DeleteDataStream": { + "requestType": "DeleteDataStreamRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).delete": "/v1alpha/{name=properties/*/dataStreams/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1alpha/{name=properties/*/dataStreams/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "UpdateDataStream": { + "requestType": "UpdateDataStreamRequest", + "responseType": "DataStream", + "options": { + "(google.api.http).patch": "/v1alpha/{data_stream.name=properties/*/dataStreams/*}", + "(google.api.http).body": "data_stream", + "(google.api.method_signature)": "data_stream,update_mask" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1alpha/{data_stream.name=properties/*/dataStreams/*}", + "body": "data_stream" + } + }, + { + "(google.api.method_signature)": "data_stream,update_mask" + } + ] + }, + "ListDataStreams": { + "requestType": "ListDataStreamsRequest", + "responseType": "ListDataStreamsResponse", + "options": { + "(google.api.http).get": "/v1alpha/{parent=properties/*}/dataStreams", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1alpha/{parent=properties/*}/dataStreams" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetDataStream": { + "requestType": "GetDataStreamRequest", + "responseType": "DataStream", + "options": { + "(google.api.http).get": "/v1alpha/{name=properties/*/dataStreams/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1alpha/{name=properties/*/dataStreams/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "GetAudience": { + "requestType": "GetAudienceRequest", + "responseType": "Audience", + "options": { + "(google.api.http).get": "/v1alpha/{name=properties/*/audiences/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1alpha/{name=properties/*/audiences/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListAudiences": { + "requestType": "ListAudiencesRequest", + "responseType": "ListAudiencesResponse", + "options": { + "(google.api.http).get": "/v1alpha/{parent=properties/*}/audiences", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1alpha/{parent=properties/*}/audiences" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "CreateAudience": { + "requestType": "CreateAudienceRequest", + "responseType": "Audience", + "options": { + "(google.api.http).post": "/v1alpha/{parent=properties/*}/audiences", + "(google.api.http).body": "audience", + "(google.api.method_signature)": "parent,audience" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1alpha/{parent=properties/*}/audiences", + "body": "audience" + } + }, + { + "(google.api.method_signature)": "parent,audience" + } + ] + }, + "UpdateAudience": { + "requestType": "UpdateAudienceRequest", + "responseType": "Audience", + "options": { + "(google.api.http).patch": "/v1alpha/{audience.name=properties/*/audiences/*}", + "(google.api.http).body": "audience", + "(google.api.method_signature)": "audience,update_mask" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1alpha/{audience.name=properties/*/audiences/*}", + "body": "audience" + } + }, + { + "(google.api.method_signature)": "audience,update_mask" + } + ] + }, + "ArchiveAudience": { + "requestType": "ArchiveAudienceRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).post": "/v1alpha/{name=properties/*/audiences/*}:archive", + "(google.api.http).body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1alpha/{name=properties/*/audiences/*}:archive", + "body": "*" + } + } + ] + }, + "GetAttributionSettings": { + "requestType": "GetAttributionSettingsRequest", + "responseType": "AttributionSettings", + "options": { + "(google.api.http).get": "/v1alpha/{name=properties/*/attributionSettings}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1alpha/{name=properties/*/attributionSettings}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "UpdateAttributionSettings": { + "requestType": "UpdateAttributionSettingsRequest", + "responseType": "AttributionSettings", + "options": { + "(google.api.http).patch": "/v1alpha/{attribution_settings.name=properties/*/attributionSettings}", + "(google.api.http).body": "attribution_settings", + "(google.api.method_signature)": "attribution_settings,update_mask" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1alpha/{attribution_settings.name=properties/*/attributionSettings}", + "body": "attribution_settings" + } + }, + { + "(google.api.method_signature)": "attribution_settings,update_mask" + } + ] + }, + "RunAccessReport": { + "requestType": "RunAccessReportRequest", + "responseType": "RunAccessReportResponse", + "options": { + "(google.api.http).post": "/v1alpha/{entity=properties/*}:runAccessReport", + "(google.api.http).body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1alpha/{entity=properties/*}:runAccessReport", + "body": "*" + } + } + ] + } + } + }, + "RunAccessReportRequest": { + "fields": { + "entity": { + "type": "string", + "id": 1 + }, + "dimensions": { + "rule": "repeated", + "type": "AccessDimension", + "id": 2 + }, + "metrics": { + "rule": "repeated", + "type": "AccessMetric", + "id": 3 + }, + "dateRanges": { + "rule": "repeated", + "type": "AccessDateRange", + "id": 4 + }, + "dimensionFilter": { + "type": "AccessFilterExpression", + "id": 5 + }, + "metricFilter": { + "type": "AccessFilterExpression", + "id": 6 + }, + "offset": { + "type": "int64", + "id": 7 + }, + "limit": { + "type": "int64", + "id": 8 + }, + "timeZone": { + "type": "string", + "id": 9 + }, + "orderBys": { + "rule": "repeated", + "type": "AccessOrderBy", + "id": 10 + }, + "returnEntityQuota": { + "type": "bool", + "id": 11 + } + } + }, + "RunAccessReportResponse": { + "fields": { + "dimensionHeaders": { + "rule": "repeated", + "type": "AccessDimensionHeader", + "id": 1 + }, + "metricHeaders": { + "rule": "repeated", + "type": "AccessMetricHeader", + "id": 2 + }, + "rows": { + "rule": "repeated", + "type": "AccessRow", + "id": 3 + }, + "rowCount": { + "type": "int32", + "id": 4 + }, + "quota": { + "type": "AccessQuota", + "id": 5 + } + } + }, + "GetAccountRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "analyticsadmin.googleapis.com/Account" + } + } + } + }, + "ListAccountsRequest": { + "fields": { + "pageSize": { + "type": "int32", + "id": 1 + }, + "pageToken": { + "type": "string", + "id": 2 + }, + "showDeleted": { + "type": "bool", + "id": 3 + } + } + }, + "ListAccountsResponse": { + "fields": { + "accounts": { + "rule": "repeated", + "type": "Account", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "DeleteAccountRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "analyticsadmin.googleapis.com/Account" + } + } + } + }, + "UpdateAccountRequest": { + "fields": { + "account": { + "type": "Account", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "ProvisionAccountTicketRequest": { + "fields": { + "account": { + "type": "Account", + "id": 1 + }, + "redirectUri": { + "type": "string", + "id": 2 + } + } + }, + "ProvisionAccountTicketResponse": { + "fields": { + "accountTicketId": { + "type": "string", + "id": 1 + } + } + }, + "GetPropertyRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "analyticsadmin.googleapis.com/Property" + } + } + } + }, + "ListPropertiesRequest": { + "fields": { + "filter": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + }, + "showDeleted": { + "type": "bool", + "id": 4 + } + } + }, + "ListPropertiesResponse": { + "fields": { + "properties": { + "rule": "repeated", + "type": "Property", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "UpdatePropertyRequest": { + "fields": { + "property": { + "type": "Property", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "CreatePropertyRequest": { + "fields": { + "property": { + "type": "Property", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "DeletePropertyRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "analyticsadmin.googleapis.com/Property" + } + } + } + }, + "GetUserLinkRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "analyticsadmin.googleapis.com/UserLink" + } + } + } + }, + "BatchGetUserLinksRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "analyticsadmin.googleapis.com/UserLink" + } + }, + "names": { + "rule": "repeated", + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "analyticsadmin.googleapis.com/UserLink" + } + } + } + }, + "BatchGetUserLinksResponse": { + "fields": { + "userLinks": { + "rule": "repeated", + "type": "UserLink", + "id": 1 + } + } + }, + "ListUserLinksRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "analyticsadmin.googleapis.com/UserLink" + } + }, + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + } + } + }, + "ListUserLinksResponse": { + "fields": { + "userLinks": { + "rule": "repeated", + "type": "UserLink", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "AuditUserLinksRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "analyticsadmin.googleapis.com/UserLink" + } + }, + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + } + } + }, + "AuditUserLinksResponse": { + "fields": { + "userLinks": { + "rule": "repeated", + "type": "AuditUserLink", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "CreateUserLinkRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "analyticsadmin.googleapis.com/UserLink" + } + }, + "notifyNewUser": { + "type": "bool", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "userLink": { + "type": "UserLink", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "BatchCreateUserLinksRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "analyticsadmin.googleapis.com/UserLink" + } + }, + "notifyNewUsers": { + "type": "bool", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "requests": { + "rule": "repeated", + "type": "CreateUserLinkRequest", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "BatchCreateUserLinksResponse": { + "fields": { + "userLinks": { + "rule": "repeated", + "type": "UserLink", + "id": 1 + } + } + }, + "UpdateUserLinkRequest": { + "fields": { + "userLink": { + "type": "UserLink", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "BatchUpdateUserLinksRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "analyticsadmin.googleapis.com/UserLink" + } + }, + "requests": { + "rule": "repeated", + "type": "UpdateUserLinkRequest", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "BatchUpdateUserLinksResponse": { + "fields": { + "userLinks": { + "rule": "repeated", + "type": "UserLink", + "id": 1 + } + } + }, + "DeleteUserLinkRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "analyticsadmin.googleapis.com/UserLink" + } + } + } + }, + "BatchDeleteUserLinksRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "analyticsadmin.googleapis.com/UserLink" + } + }, + "requests": { + "rule": "repeated", + "type": "DeleteUserLinkRequest", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "CreateFirebaseLinkRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "analyticsadmin.googleapis.com/FirebaseLink" + } + }, + "firebaseLink": { + "type": "FirebaseLink", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "DeleteFirebaseLinkRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "analyticsadmin.googleapis.com/FirebaseLink" + } + } + } + }, + "ListFirebaseLinksRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "analyticsadmin.googleapis.com/FirebaseLink" + } + }, + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + } + } + }, + "ListFirebaseLinksResponse": { + "fields": { + "firebaseLinks": { + "rule": "repeated", + "type": "FirebaseLink", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "GetGlobalSiteTagRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "analyticsadmin.googleapis.com/GlobalSiteTag" + } + } + } + }, + "CreateGoogleAdsLinkRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "analyticsadmin.googleapis.com/GoogleAdsLink" + } + }, + "googleAdsLink": { + "type": "GoogleAdsLink", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "UpdateGoogleAdsLinkRequest": { + "fields": { + "googleAdsLink": { + "type": "GoogleAdsLink", + "id": 1 + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "DeleteGoogleAdsLinkRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "analyticsadmin.googleapis.com/GoogleAdsLink" + } + } + } + }, + "ListGoogleAdsLinksRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "analyticsadmin.googleapis.com/GoogleAdsLink" + } + }, + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + } + } + }, + "ListGoogleAdsLinksResponse": { + "fields": { + "googleAdsLinks": { + "rule": "repeated", + "type": "GoogleAdsLink", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "GetDataSharingSettingsRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "analyticsadmin.googleapis.com/DataSharingSettings" + } + } + } + }, + "ListAccountSummariesRequest": { + "fields": { + "pageSize": { + "type": "int32", + "id": 1 + }, + "pageToken": { + "type": "string", + "id": 2 + } + } + }, + "ListAccountSummariesResponse": { + "fields": { + "accountSummaries": { + "rule": "repeated", + "type": "AccountSummary", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "AcknowledgeUserDataCollectionRequest": { + "fields": { + "property": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "analyticsadmin.googleapis.com/Property" + } + }, + "acknowledgement": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "AcknowledgeUserDataCollectionResponse": { + "fields": {} + }, + "SearchChangeHistoryEventsRequest": { + "fields": { + "account": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "analyticsadmin.googleapis.com/Account" + } + }, + "property": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "(google.api.resource_reference).type": "analyticsadmin.googleapis.com/Property" + } + }, + "resourceType": { + "rule": "repeated", + "type": "ChangeHistoryResourceType", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "action": { + "rule": "repeated", + "type": "ActionType", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "actorEmail": { + "rule": "repeated", + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "earliestChangeTime": { + "type": "google.protobuf.Timestamp", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "latestChangeTime": { + "type": "google.protobuf.Timestamp", + "id": 7, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageSize": { + "type": "int32", + "id": 8, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 9, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "SearchChangeHistoryEventsResponse": { + "fields": { + "changeHistoryEvents": { + "rule": "repeated", + "type": "ChangeHistoryEvent", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "GetMeasurementProtocolSecretRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "analyticsadmin.googleapis.com/MeasurementProtocolSecret" + } + } + } + }, + "CreateMeasurementProtocolSecretRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "analyticsadmin.googleapis.com/MeasurementProtocolSecret" + } + }, + "measurementProtocolSecret": { + "type": "MeasurementProtocolSecret", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "DeleteMeasurementProtocolSecretRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "analyticsadmin.googleapis.com/MeasurementProtocolSecret" + } + } + } + }, + "UpdateMeasurementProtocolSecretRequest": { + "fields": { + "measurementProtocolSecret": { + "type": "MeasurementProtocolSecret", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 2 + } + } + }, + "ListMeasurementProtocolSecretsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "analyticsadmin.googleapis.com/MeasurementProtocolSecret" + } + }, + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + } + } + }, + "ListMeasurementProtocolSecretsResponse": { + "fields": { + "measurementProtocolSecrets": { + "rule": "repeated", + "type": "MeasurementProtocolSecret", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "GetGoogleSignalsSettingsRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "analyticsadmin.googleapis.com/GoogleSignalsSettings" + } + } + } + }, + "UpdateGoogleSignalsSettingsRequest": { + "fields": { + "googleSignalsSettings": { + "type": "GoogleSignalsSettings", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "CreateConversionEventRequest": { + "fields": { + "conversionEvent": { + "type": "ConversionEvent", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "parent": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "analyticsadmin.googleapis.com/ConversionEvent" + } + } + } + }, + "GetConversionEventRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "analyticsadmin.googleapis.com/ConversionEvent" + } + } + } + }, + "DeleteConversionEventRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "analyticsadmin.googleapis.com/ConversionEvent" + } + } + } + }, + "ListConversionEventsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "analyticsadmin.googleapis.com/ConversionEvent" + } + }, + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + } + } + }, + "ListConversionEventsResponse": { + "fields": { + "conversionEvents": { + "rule": "repeated", + "type": "ConversionEvent", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "GetDisplayVideo360AdvertiserLinkRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "analyticsadmin.googleapis.com/DisplayVideo360AdvertiserLink" + } + } + } + }, + "ListDisplayVideo360AdvertiserLinksRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "analyticsadmin.googleapis.com/DisplayVideo360AdvertiserLink" + } + }, + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + } + } + }, + "ListDisplayVideo360AdvertiserLinksResponse": { + "fields": { + "displayVideo_360AdvertiserLinks": { + "rule": "repeated", + "type": "DisplayVideo360AdvertiserLink", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "CreateDisplayVideo360AdvertiserLinkRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "analyticsadmin.googleapis.com/DisplayVideo360AdvertiserLink" + } + }, + "displayVideo_360AdvertiserLink": { + "type": "DisplayVideo360AdvertiserLink", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "DeleteDisplayVideo360AdvertiserLinkRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "analyticsadmin.googleapis.com/DisplayVideo360AdvertiserLink" + } + } + } + }, + "UpdateDisplayVideo360AdvertiserLinkRequest": { + "fields": { + "displayVideo_360AdvertiserLink": { + "type": "DisplayVideo360AdvertiserLink", + "id": 1 + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "GetDisplayVideo360AdvertiserLinkProposalRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "analyticsadmin.googleapis.com/DisplayVideo360AdvertiserLinkProposal" + } + } + } + }, + "ListDisplayVideo360AdvertiserLinkProposalsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "analyticsadmin.googleapis.com/DisplayVideo360AdvertiserLinkProposal" + } + }, + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + } + } + }, + "ListDisplayVideo360AdvertiserLinkProposalsResponse": { + "fields": { + "displayVideo_360AdvertiserLinkProposals": { + "rule": "repeated", + "type": "DisplayVideo360AdvertiserLinkProposal", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "CreateDisplayVideo360AdvertiserLinkProposalRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "analyticsadmin.googleapis.com/DisplayVideo360AdvertiserLinkProposal" + } + }, + "displayVideo_360AdvertiserLinkProposal": { + "type": "DisplayVideo360AdvertiserLinkProposal", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "DeleteDisplayVideo360AdvertiserLinkProposalRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "analyticsadmin.googleapis.com/DisplayVideo360AdvertiserLinkProposal" + } + } + } + }, + "ApproveDisplayVideo360AdvertiserLinkProposalRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "analyticsadmin.googleapis.com/DisplayVideo360AdvertiserLinkProposal" + } + } + } + }, + "ApproveDisplayVideo360AdvertiserLinkProposalResponse": { + "fields": { + "displayVideo_360AdvertiserLink": { + "type": "DisplayVideo360AdvertiserLink", + "id": 1 + } + } + }, + "CancelDisplayVideo360AdvertiserLinkProposalRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "analyticsadmin.googleapis.com/DisplayVideo360AdvertiserLinkProposal" + } + } + } + }, + "CreateCustomDimensionRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "analyticsadmin.googleapis.com/CustomDimension" + } + }, + "customDimension": { + "type": "CustomDimension", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "UpdateCustomDimensionRequest": { + "fields": { + "customDimension": { + "type": "CustomDimension", + "id": 1 + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "ListCustomDimensionsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "analyticsadmin.googleapis.com/CustomDimension" + } + }, + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + } + } + }, + "ListCustomDimensionsResponse": { + "fields": { + "customDimensions": { + "rule": "repeated", + "type": "CustomDimension", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "ArchiveCustomDimensionRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "analyticsadmin.googleapis.com/CustomDimension" + } + } + } + }, + "GetCustomDimensionRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "analyticsadmin.googleapis.com/CustomDimension" + } + } + } + }, + "CreateCustomMetricRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "analyticsadmin.googleapis.com/CustomMetric" + } + }, + "customMetric": { + "type": "CustomMetric", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "UpdateCustomMetricRequest": { + "fields": { + "customMetric": { + "type": "CustomMetric", + "id": 1 + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "ListCustomMetricsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "analyticsadmin.googleapis.com/CustomMetric" + } + }, + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + } + } + }, + "ListCustomMetricsResponse": { + "fields": { + "customMetrics": { + "rule": "repeated", + "type": "CustomMetric", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "ArchiveCustomMetricRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "analyticsadmin.googleapis.com/CustomMetric" + } + } + } + }, + "GetCustomMetricRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "analyticsadmin.googleapis.com/CustomMetric" + } + } + } + }, + "GetDataRetentionSettingsRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "analyticsadmin.googleapis.com/DataRetentionSettings" + } + } + } + }, + "UpdateDataRetentionSettingsRequest": { + "fields": { + "dataRetentionSettings": { + "type": "DataRetentionSettings", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "CreateDataStreamRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "analyticsadmin.googleapis.com/DataStream" + } + }, + "dataStream": { + "type": "DataStream", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "DeleteDataStreamRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "analyticsadmin.googleapis.com/DataStream" + } + } + } + }, + "UpdateDataStreamRequest": { + "fields": { + "dataStream": { + "type": "DataStream", + "id": 1 + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "ListDataStreamsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "analyticsadmin.googleapis.com/DataStream" + } + }, + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + } + } + }, + "ListDataStreamsResponse": { + "fields": { + "dataStreams": { + "rule": "repeated", + "type": "DataStream", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "GetDataStreamRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "analyticsadmin.googleapis.com/DataStream" + } + } + } + }, + "GetAudienceRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "analyticsadmin.googleapis.com/Audience" + } + } + } + }, + "ListAudiencesRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "analyticsadmin.googleapis.com/Audience" + } + }, + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + } + } + }, + "ListAudiencesResponse": { + "fields": { + "audiences": { + "rule": "repeated", + "type": "Audience", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "CreateAudienceRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "analyticsadmin.googleapis.com/Audience" + } + }, + "audience": { + "type": "Audience", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "UpdateAudienceRequest": { + "fields": { + "audience": { + "type": "Audience", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "ArchiveAudienceRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "analyticsadmin.googleapis.com/Audience" + } + } + } + }, + "GetAttributionSettingsRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "analyticsadmin.googleapis.com/AttributionSettings" + } + } + } + }, + "UpdateAttributionSettingsRequest": { + "fields": { + "attributionSettings": { + "type": "AttributionSettings", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "AudienceFilterScope": { + "values": { + "AUDIENCE_FILTER_SCOPE_UNSPECIFIED": 0, + "AUDIENCE_FILTER_SCOPE_WITHIN_SAME_EVENT": 1, + "AUDIENCE_FILTER_SCOPE_WITHIN_SAME_SESSION": 2, + "AUDIENCE_FILTER_SCOPE_ACROSS_ALL_SESSIONS": 3 + } + }, + "AudienceDimensionOrMetricFilter": { + "oneofs": { + "oneFilter": { + "oneof": [ + "stringFilter", + "inListFilter", + "numericFilter", + "betweenFilter" + ] + } + }, + "fields": { + "stringFilter": { + "type": "StringFilter", + "id": 2 + }, + "inListFilter": { + "type": "InListFilter", + "id": 3 + }, + "numericFilter": { + "type": "NumericFilter", + "id": 4 + }, + "betweenFilter": { + "type": "BetweenFilter", + "id": 5 + }, + "fieldName": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + }, + "atAnyPointInTime": { + "type": "bool", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "inAnyNDayPeriod": { + "type": "int32", + "id": 7, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "StringFilter": { + "fields": { + "matchType": { + "type": "MatchType", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "value": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "caseSensitive": { + "type": "bool", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "MatchType": { + "values": { + "MATCH_TYPE_UNSPECIFIED": 0, + "EXACT": 1, + "BEGINS_WITH": 2, + "ENDS_WITH": 3, + "CONTAINS": 4, + "FULL_REGEXP": 5, + "PARTIAL_REGEXP": 6 + } + } + } + }, + "InListFilter": { + "fields": { + "values": { + "rule": "repeated", + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "caseSensitive": { + "type": "bool", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "NumericValue": { + "oneofs": { + "oneValue": { + "oneof": [ + "int64Value", + "doubleValue" + ] + } + }, + "fields": { + "int64Value": { + "type": "int64", + "id": 1 + }, + "doubleValue": { + "type": "double", + "id": 2 + } + } + }, + "NumericFilter": { + "fields": { + "operation": { + "type": "Operation", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "value": { + "type": "NumericValue", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + }, + "nested": { + "Operation": { + "values": { + "OPERATION_UNSPECIFIED": 0, + "EQUAL": 1, + "LESS_THAN": 2, + "LESS_THAN_OR_EQUAL": 3, + "GREATER_THAN": 4, + "GREATER_THAN_OR_EQUAL": 5 + } + } + } + }, + "BetweenFilter": { + "fields": { + "fromValue": { + "type": "NumericValue", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "toValue": { + "type": "NumericValue", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + } + } + }, + "AudienceEventFilter": { + "fields": { + "eventName": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + }, + "eventParameterFilterExpression": { + "type": "AudienceFilterExpression", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "AudienceFilterExpression": { + "oneofs": { + "expr": { + "oneof": [ + "andGroup", + "orGroup", + "notExpression", + "dimensionOrMetricFilter", + "eventFilter" + ] + } + }, + "fields": { + "andGroup": { + "type": "AudienceFilterExpressionList", + "id": 1 + }, + "orGroup": { + "type": "AudienceFilterExpressionList", + "id": 2 + }, + "notExpression": { + "type": "AudienceFilterExpression", + "id": 3 + }, + "dimensionOrMetricFilter": { + "type": "AudienceDimensionOrMetricFilter", + "id": 4 + }, + "eventFilter": { + "type": "AudienceEventFilter", + "id": 5 + } + } + }, + "AudienceFilterExpressionList": { + "fields": { + "filterExpressions": { + "rule": "repeated", + "type": "AudienceFilterExpression", + "id": 1 + } + } + }, + "AudienceSimpleFilter": { + "fields": { + "scope": { + "type": "AudienceFilterScope", + "id": 1, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + }, + "filterExpression": { + "type": "AudienceFilterExpression", + "id": 2, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + } + } + }, + "AudienceSequenceFilter": { + "fields": { + "scope": { + "type": "AudienceFilterScope", + "id": 1, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + }, + "sequenceMaximumDuration": { + "type": "google.protobuf.Duration", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "sequenceSteps": { + "rule": "repeated", + "type": "AudienceSequenceStep", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + }, + "nested": { + "AudienceSequenceStep": { + "fields": { + "scope": { + "type": "AudienceFilterScope", + "id": 1, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + }, + "immediatelyFollows": { + "type": "bool", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "constraintDuration": { + "type": "google.protobuf.Duration", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "filterExpression": { + "type": "AudienceFilterExpression", + "id": 4, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + } + } + } + } + }, + "AudienceFilterClause": { + "oneofs": { + "filter": { + "oneof": [ + "simpleFilter", + "sequenceFilter" + ] + } + }, + "fields": { + "simpleFilter": { + "type": "AudienceSimpleFilter", + "id": 2 + }, + "sequenceFilter": { + "type": "AudienceSequenceFilter", + "id": 3 + }, + "clauseType": { + "type": "AudienceClauseType", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + }, + "nested": { + "AudienceClauseType": { + "values": { + "AUDIENCE_CLAUSE_TYPE_UNSPECIFIED": 0, + "INCLUDE": 1, + "EXCLUDE": 2 + } + } + } + }, + "AudienceEventTrigger": { + "fields": { + "eventName": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "logCondition": { + "type": "LogCondition", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + }, + "nested": { + "LogCondition": { + "values": { + "LOG_CONDITION_UNSPECIFIED": 0, + "AUDIENCE_JOINED": 1, + "AUDIENCE_MEMBERSHIP_RENEWED": 2 + } + } + } + }, + "Audience": { + "options": { + "(google.api.resource).type": "analyticsadmin.googleapis.com/Audience", + "(google.api.resource).pattern": "properties/{property}/audiences/{audience}" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "displayName": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "description": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "membershipDurationDays": { + "type": "int32", + "id": 4, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + }, + "adsPersonalizationEnabled": { + "type": "bool", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "eventTrigger": { + "type": "AudienceEventTrigger", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "exclusionDurationMode": { + "type": "AudienceExclusionDurationMode", + "id": 7, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + }, + "filterClauses": { + "rule": "repeated", + "type": "AudienceFilterClause", + "id": 8, + "options": { + "(google.api.field_behavior)": "UNORDERED_LIST" + } + } + }, + "nested": { + "AudienceExclusionDurationMode": { + "values": { + "AUDIENCE_EXCLUSION_DURATION_MODE_UNSPECIFIED": 0, + "EXCLUDE_TEMPORARILY": 1, + "EXCLUDE_PERMANENTLY": 2 + } + } + } + }, + "IndustryCategory": { + "values": { + "INDUSTRY_CATEGORY_UNSPECIFIED": 0, + "AUTOMOTIVE": 1, + "BUSINESS_AND_INDUSTRIAL_MARKETS": 2, + "FINANCE": 3, + "HEALTHCARE": 4, + "TECHNOLOGY": 5, + "TRAVEL": 6, + "OTHER": 7, + "ARTS_AND_ENTERTAINMENT": 8, + "BEAUTY_AND_FITNESS": 9, + "BOOKS_AND_LITERATURE": 10, + "FOOD_AND_DRINK": 11, + "GAMES": 12, + "HOBBIES_AND_LEISURE": 13, + "HOME_AND_GARDEN": 14, + "INTERNET_AND_TELECOM": 15, + "LAW_AND_GOVERNMENT": 16, + "NEWS": 17, + "ONLINE_COMMUNITIES": 18, + "PEOPLE_AND_SOCIETY": 19, + "PETS_AND_ANIMALS": 20, + "REAL_ESTATE": 21, + "REFERENCE": 22, + "SCIENCE": 23, + "SPORTS": 24, + "JOBS_AND_EDUCATION": 25, + "SHOPPING": 26 + } + }, + "ServiceLevel": { + "values": { + "SERVICE_LEVEL_UNSPECIFIED": 0, + "GOOGLE_ANALYTICS_STANDARD": 1, + "GOOGLE_ANALYTICS_360": 2 + } + }, + "ActorType": { + "values": { + "ACTOR_TYPE_UNSPECIFIED": 0, + "USER": 1, + "SYSTEM": 2, + "SUPPORT": 3 + } + }, + "ActionType": { + "values": { + "ACTION_TYPE_UNSPECIFIED": 0, + "CREATED": 1, + "UPDATED": 2, + "DELETED": 3 + } + }, + "ChangeHistoryResourceType": { + "values": { + "CHANGE_HISTORY_RESOURCE_TYPE_UNSPECIFIED": 0, + "ACCOUNT": 1, + "PROPERTY": 2, + "FIREBASE_LINK": 6, + "GOOGLE_ADS_LINK": 7, + "GOOGLE_SIGNALS_SETTINGS": 8, + "CONVERSION_EVENT": 9, + "MEASUREMENT_PROTOCOL_SECRET": 10, + "CUSTOM_DIMENSION": 11, + "CUSTOM_METRIC": 12, + "DATA_RETENTION_SETTINGS": 13, + "DISPLAY_VIDEO_360_ADVERTISER_LINK": 14, + "DISPLAY_VIDEO_360_ADVERTISER_LINK_PROPOSAL": 15, + "SEARCH_ADS_360_LINK": 16, + "DATA_STREAM": 18, + "ATTRIBUTION_SETTINGS": 20 + } + }, + "GoogleSignalsState": { + "values": { + "GOOGLE_SIGNALS_STATE_UNSPECIFIED": 0, + "GOOGLE_SIGNALS_ENABLED": 1, + "GOOGLE_SIGNALS_DISABLED": 2 + } + }, + "GoogleSignalsConsent": { + "values": { + "GOOGLE_SIGNALS_CONSENT_UNSPECIFIED": 0, + "GOOGLE_SIGNALS_CONSENT_CONSENTED": 2, + "GOOGLE_SIGNALS_CONSENT_NOT_CONSENTED": 1 + } + }, + "LinkProposalInitiatingProduct": { + "values": { + "LINK_PROPOSAL_INITIATING_PRODUCT_UNSPECIFIED": 0, + "GOOGLE_ANALYTICS": 1, + "LINKED_PRODUCT": 2 + } + }, + "LinkProposalState": { + "values": { + "LINK_PROPOSAL_STATE_UNSPECIFIED": 0, + "AWAITING_REVIEW_FROM_GOOGLE_ANALYTICS": 1, + "AWAITING_REVIEW_FROM_LINKED_PRODUCT": 2, + "WITHDRAWN": 3, + "DECLINED": 4, + "EXPIRED": 5, + "OBSOLETE": 6 + } + }, + "PropertyType": { + "values": { + "PROPERTY_TYPE_UNSPECIFIED": 0, + "PROPERTY_TYPE_ORDINARY": 1, + "PROPERTY_TYPE_SUBPROPERTY": 2, + "PROPERTY_TYPE_ROLLUP": 3 + } + }, + "Account": { + "options": { + "(google.api.resource).type": "analyticsadmin.googleapis.com/Account", + "(google.api.resource).pattern": "accounts/{account}" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "displayName": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "regionCode": { + "type": "string", + "id": 5 + }, + "deleted": { + "type": "bool", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "Property": { + "options": { + "(google.api.resource).type": "analyticsadmin.googleapis.com/Property", + "(google.api.resource).pattern": "properties/{property}" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "propertyType": { + "type": "PropertyType", + "id": 14, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "parent": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + }, + "displayName": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "industryCategory": { + "type": "IndustryCategory", + "id": 6 + }, + "timeZone": { + "type": "string", + "id": 7, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "currencyCode": { + "type": "string", + "id": 8 + }, + "serviceLevel": { + "type": "ServiceLevel", + "id": 10, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "deleteTime": { + "type": "google.protobuf.Timestamp", + "id": 11, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "expireTime": { + "type": "google.protobuf.Timestamp", + "id": 12, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "account": { + "type": "string", + "id": 13, + "options": { + "(google.api.field_behavior)": "IMMUTABLE", + "(google.api.resource_reference).type": "analyticsadmin.googleapis.com/Account" + } + } + } + }, + "DataStream": { + "options": { + "(google.api.resource).type": "analyticsadmin.googleapis.com/DataStream", + "(google.api.resource).pattern": "properties/{property}/dataStreams/{data_stream}" + }, + "oneofs": { + "streamData": { + "oneof": [ + "webStreamData", + "androidAppStreamData", + "iosAppStreamData" + ] + } + }, + "fields": { + "webStreamData": { + "type": "WebStreamData", + "id": 6 + }, + "androidAppStreamData": { + "type": "AndroidAppStreamData", + "id": 7 + }, + "iosAppStreamData": { + "type": "IosAppStreamData", + "id": 8 + }, + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "type": { + "type": "DataStreamType", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "displayName": { + "type": "string", + "id": 3 + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "WebStreamData": { + "fields": { + "measurementId": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "firebaseAppId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "defaultUri": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + } + } + }, + "AndroidAppStreamData": { + "fields": { + "firebaseAppId": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "packageName": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + } + } + }, + "IosAppStreamData": { + "fields": { + "firebaseAppId": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "bundleId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "DataStreamType": { + "values": { + "DATA_STREAM_TYPE_UNSPECIFIED": 0, + "WEB_DATA_STREAM": 1, + "ANDROID_APP_DATA_STREAM": 2, + "IOS_APP_DATA_STREAM": 3 + } + } + } + }, + "UserLink": { + "options": { + "(google.api.resource).type": "analyticsadmin.googleapis.com/UserLink", + "(google.api.resource).pattern": "properties/{property}/userLinks/{user_link}" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "emailAddress": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + }, + "directRoles": { + "rule": "repeated", + "type": "string", + "id": 3 + } + } + }, + "AuditUserLink": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "emailAddress": { + "type": "string", + "id": 2 + }, + "directRoles": { + "rule": "repeated", + "type": "string", + "id": 3 + }, + "effectiveRoles": { + "rule": "repeated", + "type": "string", + "id": 4 + } + } + }, + "FirebaseLink": { + "options": { + "(google.api.resource).type": "analyticsadmin.googleapis.com/FirebaseLink", + "(google.api.resource).pattern": "properties/{property}/firebaseLinks/{firebase_link}" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "project": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "GlobalSiteTag": { + "options": { + "(google.api.resource).type": "analyticsadmin.googleapis.com/GlobalSiteTag", + "(google.api.resource).pattern": "properties/{property}/dataStreams/{data_stream}/globalSiteTag" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "snippet": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + } + } + }, + "GoogleAdsLink": { + "options": { + "(google.api.resource).type": "analyticsadmin.googleapis.com/GoogleAdsLink", + "(google.api.resource).pattern": "properties/{property}/googleAdsLinks/{google_ads_link}" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "customerId": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + }, + "canManageClients": { + "type": "bool", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "adsPersonalizationEnabled": { + "type": "google.protobuf.BoolValue", + "id": 5 + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 7, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 8, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "creatorEmailAddress": { + "type": "string", + "id": 9, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "DataSharingSettings": { + "options": { + "(google.api.resource).type": "analyticsadmin.googleapis.com/DataSharingSettings", + "(google.api.resource).pattern": "accounts/{account}/dataSharingSettings" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "sharingWithGoogleSupportEnabled": { + "type": "bool", + "id": 2 + }, + "sharingWithGoogleAssignedSalesEnabled": { + "type": "bool", + "id": 3 + }, + "sharingWithGoogleAnySalesEnabled": { + "type": "bool", + "id": 4 + }, + "sharingWithGoogleProductsEnabled": { + "type": "bool", + "id": 5 + }, + "sharingWithOthersEnabled": { + "type": "bool", + "id": 6 + } + } + }, + "AccountSummary": { + "options": { + "(google.api.resource).type": "analyticsadmin.googleapis.com/AccountSummary", + "(google.api.resource).pattern": "accountSummaries/{account_summary}" + }, + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "account": { + "type": "string", + "id": 2, + "options": { + "(google.api.resource_reference).type": "analyticsadmin.googleapis.com/Account" + } + }, + "displayName": { + "type": "string", + "id": 3 + }, + "propertySummaries": { + "rule": "repeated", + "type": "PropertySummary", + "id": 4 + } + } + }, + "PropertySummary": { + "fields": { + "property": { + "type": "string", + "id": 1, + "options": { + "(google.api.resource_reference).type": "analyticsadmin.googleapis.com/Property" + } + }, + "displayName": { + "type": "string", + "id": 2 + }, + "propertyType": { + "type": "PropertyType", + "id": 3 + }, + "parent": { + "type": "string", + "id": 4 + } + } + }, + "MeasurementProtocolSecret": { + "options": { + "(google.api.resource).type": "analyticsadmin.googleapis.com/MeasurementProtocolSecret", + "(google.api.resource).pattern": "properties/{property}/dataStreams/{data_stream}/measurementProtocolSecrets/{measurement_protocol_secret}" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "displayName": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "secretValue": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "ChangeHistoryEvent": { + "fields": { + "id": { + "type": "string", + "id": 1 + }, + "changeTime": { + "type": "google.protobuf.Timestamp", + "id": 2 + }, + "actorType": { + "type": "ActorType", + "id": 3 + }, + "userActorEmail": { + "type": "string", + "id": 4 + }, + "changesFiltered": { + "type": "bool", + "id": 5 + }, + "changes": { + "rule": "repeated", + "type": "ChangeHistoryChange", + "id": 6 + } + } + }, + "ChangeHistoryChange": { + "fields": { + "resource": { + "type": "string", + "id": 1 + }, + "action": { + "type": "ActionType", + "id": 2 + }, + "resourceBeforeChange": { + "type": "ChangeHistoryResource", + "id": 3 + }, + "resourceAfterChange": { + "type": "ChangeHistoryResource", + "id": 4 + } + }, + "nested": { + "ChangeHistoryResource": { + "oneofs": { + "resource": { + "oneof": [ + "account", + "property", + "firebaseLink", + "googleAdsLink", + "googleSignalsSettings", + "displayVideo_360AdvertiserLink", + "displayVideo_360AdvertiserLinkProposal", + "conversionEvent", + "measurementProtocolSecret", + "customDimension", + "customMetric", + "dataRetentionSettings", + "dataStream", + "attributionSettings" + ] + } + }, + "fields": { + "account": { + "type": "Account", + "id": 1 + }, + "property": { + "type": "Property", + "id": 2 + }, + "firebaseLink": { + "type": "FirebaseLink", + "id": 6 + }, + "googleAdsLink": { + "type": "GoogleAdsLink", + "id": 7 + }, + "googleSignalsSettings": { + "type": "GoogleSignalsSettings", + "id": 8 + }, + "displayVideo_360AdvertiserLink": { + "type": "DisplayVideo360AdvertiserLink", + "id": 9 + }, + "displayVideo_360AdvertiserLinkProposal": { + "type": "DisplayVideo360AdvertiserLinkProposal", + "id": 10 + }, + "conversionEvent": { + "type": "ConversionEvent", + "id": 11 + }, + "measurementProtocolSecret": { + "type": "MeasurementProtocolSecret", + "id": 12 + }, + "customDimension": { + "type": "CustomDimension", + "id": 13 + }, + "customMetric": { + "type": "CustomMetric", + "id": 14 + }, + "dataRetentionSettings": { + "type": "DataRetentionSettings", + "id": 15 + }, + "dataStream": { + "type": "DataStream", + "id": 18 + }, + "attributionSettings": { + "type": "AttributionSettings", + "id": 20 + } + } + } + } + }, + "DisplayVideo360AdvertiserLink": { + "options": { + "(google.api.resource).type": "analyticsadmin.googleapis.com/DisplayVideo360AdvertiserLink", + "(google.api.resource).pattern": "properties/{property}/displayVideo360AdvertiserLinks/{display_video_360_advertiser_link}" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "advertiserId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + }, + "advertiserDisplayName": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "adsPersonalizationEnabled": { + "type": "google.protobuf.BoolValue", + "id": 4 + }, + "campaignDataSharingEnabled": { + "type": "google.protobuf.BoolValue", + "id": 5, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + }, + "costDataSharingEnabled": { + "type": "google.protobuf.BoolValue", + "id": 6, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + } + } + }, + "DisplayVideo360AdvertiserLinkProposal": { + "options": { + "(google.api.resource).type": "analyticsadmin.googleapis.com/DisplayVideo360AdvertiserLinkProposal", + "(google.api.resource).pattern": "properties/{property}/displayVideo360AdvertiserLinkProposals/{display_video_360_advertiser_link_proposal}" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "advertiserId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + }, + "linkProposalStatusDetails": { + "type": "LinkProposalStatusDetails", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "advertiserDisplayName": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "validationEmail": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "INPUT_ONLY" + } + }, + "adsPersonalizationEnabled": { + "type": "google.protobuf.BoolValue", + "id": 6, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + }, + "campaignDataSharingEnabled": { + "type": "google.protobuf.BoolValue", + "id": 7, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + }, + "costDataSharingEnabled": { + "type": "google.protobuf.BoolValue", + "id": 8, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + } + } + }, + "LinkProposalStatusDetails": { + "fields": { + "linkProposalInitiatingProduct": { + "type": "LinkProposalInitiatingProduct", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "requestorEmail": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "linkProposalState": { + "type": "LinkProposalState", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "ConversionEvent": { + "options": { + "(google.api.resource).type": "analyticsadmin.googleapis.com/ConversionEvent", + "(google.api.resource).pattern": "properties/{property}/conversionEvents/{conversion_event}" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "eventName": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "deletable": { + "type": "bool", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "custom": { + "type": "bool", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "GoogleSignalsSettings": { + "options": { + "(google.api.resource).type": "analyticsadmin.googleapis.com/GoogleSignalsSettings", + "(google.api.resource).pattern": "properties/{property}/googleSignalsSettings" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "state": { + "type": "GoogleSignalsState", + "id": 3 + }, + "consent": { + "type": "GoogleSignalsConsent", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "CustomDimension": { + "options": { + "(google.api.resource).type": "analyticsadmin.googleapis.com/CustomDimension", + "(google.api.resource).pattern": "properties/{property}/customDimensions/{custom_dimension}" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "parameterName": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + }, + "displayName": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "description": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "scope": { + "type": "DimensionScope", + "id": 5, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + }, + "disallowAdsPersonalization": { + "type": "bool", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "DimensionScope": { + "values": { + "DIMENSION_SCOPE_UNSPECIFIED": 0, + "EVENT": 1, + "USER": 2 + } + } + } + }, + "CustomMetric": { + "options": { + "(google.api.resource).type": "analyticsadmin.googleapis.com/CustomMetric", + "(google.api.resource).pattern": "properties/{property}/customMetrics/{custom_metric}" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "parameterName": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + }, + "displayName": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "description": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "measurementUnit": { + "type": "MeasurementUnit", + "id": 5, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "scope": { + "type": "MetricScope", + "id": 6, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + }, + "restrictedMetricType": { + "rule": "repeated", + "type": "RestrictedMetricType", + "id": 8, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "MeasurementUnit": { + "values": { + "MEASUREMENT_UNIT_UNSPECIFIED": 0, + "STANDARD": 1, + "CURRENCY": 2, + "FEET": 3, + "METERS": 4, + "KILOMETERS": 5, + "MILES": 6, + "MILLISECONDS": 7, + "SECONDS": 8, + "MINUTES": 9, + "HOURS": 10 + } + }, + "MetricScope": { + "values": { + "METRIC_SCOPE_UNSPECIFIED": 0, + "EVENT": 1 + } + }, + "RestrictedMetricType": { + "values": { + "RESTRICTED_METRIC_TYPE_UNSPECIFIED": 0, + "COST_DATA": 1, + "REVENUE_DATA": 2 + } + } + } + }, + "DataRetentionSettings": { + "options": { + "(google.api.resource).type": "analyticsadmin.googleapis.com/DataRetentionSettings", + "(google.api.resource).pattern": "properties/{property}/dataRetentionSettings" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "eventDataRetention": { + "type": "RetentionDuration", + "id": 2 + }, + "resetUserDataOnNewActivity": { + "type": "bool", + "id": 3 + } + }, + "nested": { + "RetentionDuration": { + "values": { + "RETENTION_DURATION_UNSPECIFIED": 0, + "TWO_MONTHS": 1, + "FOURTEEN_MONTHS": 3, + "TWENTY_SIX_MONTHS": 4, + "THIRTY_EIGHT_MONTHS": 5, + "FIFTY_MONTHS": 6 + } + } + } + }, + "AttributionSettings": { + "options": { + "(google.api.resource).type": "analyticsadmin.googleapis.com/AttributionSettings", + "(google.api.resource).pattern": "properties/{property}/attributionSettings" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "acquisitionConversionEventLookbackWindow": { + "type": "AcquisitionConversionEventLookbackWindow", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "otherConversionEventLookbackWindow": { + "type": "OtherConversionEventLookbackWindow", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "reportingAttributionModel": { + "type": "ReportingAttributionModel", + "id": 4, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + }, + "nested": { + "AcquisitionConversionEventLookbackWindow": { + "values": { + "ACQUISITION_CONVERSION_EVENT_LOOKBACK_WINDOW_UNSPECIFIED": 0, + "ACQUISITION_CONVERSION_EVENT_LOOKBACK_WINDOW_7_DAYS": 1, + "ACQUISITION_CONVERSION_EVENT_LOOKBACK_WINDOW_30_DAYS": 2 + } + }, + "OtherConversionEventLookbackWindow": { + "values": { + "OTHER_CONVERSION_EVENT_LOOKBACK_WINDOW_UNSPECIFIED": 0, + "OTHER_CONVERSION_EVENT_LOOKBACK_WINDOW_30_DAYS": 1, + "OTHER_CONVERSION_EVENT_LOOKBACK_WINDOW_60_DAYS": 2, + "OTHER_CONVERSION_EVENT_LOOKBACK_WINDOW_90_DAYS": 3 + } + }, + "ReportingAttributionModel": { + "values": { + "REPORTING_ATTRIBUTION_MODEL_UNSPECIFIED": 0, + "CROSS_CHANNEL_DATA_DRIVEN": 1, + "CROSS_CHANNEL_LAST_CLICK": 2, + "CROSS_CHANNEL_FIRST_CLICK": 3, + "CROSS_CHANNEL_LINEAR": 4, + "CROSS_CHANNEL_POSITION_BASED": 5, + "CROSS_CHANNEL_TIME_DECAY": 6, + "ADS_PREFERRED_LAST_CLICK": 7 + } + } + } + } + } + }, + "v1beta": { + "options": { + "go_package": "google.golang.org/genproto/googleapis/analytics/admin/v1beta;admin", + "java_multiple_files": true, + "java_outer_classname": "ResourcesProto", + "java_package": "com.google.analytics.admin.v1beta" + }, + "nested": { + "AnalyticsAdminService": { + "options": { + "(google.api.default_host)": "analyticsadmin.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/analytics.edit,https://www.googleapis.com/auth/analytics.readonly" + }, + "methods": { + "GetAccount": { + "requestType": "GetAccountRequest", + "responseType": "Account", + "options": { + "(google.api.http).get": "/v1beta/{name=accounts/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta/{name=accounts/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListAccounts": { + "requestType": "ListAccountsRequest", + "responseType": "ListAccountsResponse", + "options": { + "(google.api.http).get": "/v1beta/accounts" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta/accounts" + } + } + ] + }, + "DeleteAccount": { + "requestType": "DeleteAccountRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).delete": "/v1beta/{name=accounts/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1beta/{name=accounts/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "UpdateAccount": { + "requestType": "UpdateAccountRequest", + "responseType": "Account", + "options": { + "(google.api.http).patch": "/v1beta/{account.name=accounts/*}", + "(google.api.http).body": "account", + "(google.api.method_signature)": "account,update_mask" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1beta/{account.name=accounts/*}", + "body": "account" + } + }, + { + "(google.api.method_signature)": "account,update_mask" + } + ] + }, + "ProvisionAccountTicket": { + "requestType": "ProvisionAccountTicketRequest", + "responseType": "ProvisionAccountTicketResponse", + "options": { + "(google.api.http).post": "/v1beta/accounts:provisionAccountTicket", + "(google.api.http).body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta/accounts:provisionAccountTicket", + "body": "*" + } + } + ] + }, + "ListAccountSummaries": { + "requestType": "ListAccountSummariesRequest", + "responseType": "ListAccountSummariesResponse", + "options": { + "(google.api.http).get": "/v1beta/accountSummaries" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta/accountSummaries" + } + } + ] + }, + "GetProperty": { + "requestType": "GetPropertyRequest", + "responseType": "Property", + "options": { + "(google.api.http).get": "/v1beta/{name=properties/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta/{name=properties/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListProperties": { + "requestType": "ListPropertiesRequest", + "responseType": "ListPropertiesResponse", + "options": { + "(google.api.http).get": "/v1beta/properties" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta/properties" + } + } + ] + }, + "CreateProperty": { + "requestType": "CreatePropertyRequest", + "responseType": "Property", + "options": { + "(google.api.http).post": "/v1beta/properties", + "(google.api.http).body": "property", + "(google.api.method_signature)": "property" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta/properties", + "body": "property" + } + }, + { + "(google.api.method_signature)": "property" + } + ] + }, + "DeleteProperty": { + "requestType": "DeletePropertyRequest", + "responseType": "Property", + "options": { + "(google.api.http).delete": "/v1beta/{name=properties/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1beta/{name=properties/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "UpdateProperty": { + "requestType": "UpdatePropertyRequest", + "responseType": "Property", + "options": { + "(google.api.http).patch": "/v1beta/{property.name=properties/*}", + "(google.api.http).body": "property", + "(google.api.method_signature)": "property,update_mask" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1beta/{property.name=properties/*}", + "body": "property" + } + }, + { + "(google.api.method_signature)": "property,update_mask" + } + ] + }, + "CreateFirebaseLink": { + "requestType": "CreateFirebaseLinkRequest", + "responseType": "FirebaseLink", + "options": { + "(google.api.http).post": "/v1beta/{parent=properties/*}/firebaseLinks", + "(google.api.http).body": "firebase_link", + "(google.api.method_signature)": "parent,firebase_link" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta/{parent=properties/*}/firebaseLinks", + "body": "firebase_link" + } + }, + { + "(google.api.method_signature)": "parent,firebase_link" + } + ] + }, + "DeleteFirebaseLink": { + "requestType": "DeleteFirebaseLinkRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).delete": "/v1beta/{name=properties/*/firebaseLinks/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1beta/{name=properties/*/firebaseLinks/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListFirebaseLinks": { + "requestType": "ListFirebaseLinksRequest", + "responseType": "ListFirebaseLinksResponse", + "options": { + "(google.api.http).get": "/v1beta/{parent=properties/*}/firebaseLinks", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta/{parent=properties/*}/firebaseLinks" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "CreateGoogleAdsLink": { + "requestType": "CreateGoogleAdsLinkRequest", + "responseType": "GoogleAdsLink", + "options": { + "(google.api.http).post": "/v1beta/{parent=properties/*}/googleAdsLinks", + "(google.api.http).body": "google_ads_link", + "(google.api.method_signature)": "parent,google_ads_link" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta/{parent=properties/*}/googleAdsLinks", + "body": "google_ads_link" + } + }, + { + "(google.api.method_signature)": "parent,google_ads_link" + } + ] + }, + "UpdateGoogleAdsLink": { + "requestType": "UpdateGoogleAdsLinkRequest", + "responseType": "GoogleAdsLink", + "options": { + "(google.api.http).patch": "/v1beta/{google_ads_link.name=properties/*/googleAdsLinks/*}", + "(google.api.http).body": "google_ads_link", + "(google.api.method_signature)": "google_ads_link,update_mask" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1beta/{google_ads_link.name=properties/*/googleAdsLinks/*}", + "body": "google_ads_link" + } + }, + { + "(google.api.method_signature)": "google_ads_link,update_mask" + } + ] + }, + "DeleteGoogleAdsLink": { + "requestType": "DeleteGoogleAdsLinkRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).delete": "/v1beta/{name=properties/*/googleAdsLinks/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1beta/{name=properties/*/googleAdsLinks/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListGoogleAdsLinks": { + "requestType": "ListGoogleAdsLinksRequest", + "responseType": "ListGoogleAdsLinksResponse", + "options": { + "(google.api.http).get": "/v1beta/{parent=properties/*}/googleAdsLinks", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta/{parent=properties/*}/googleAdsLinks" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetDataSharingSettings": { + "requestType": "GetDataSharingSettingsRequest", + "responseType": "DataSharingSettings", + "options": { + "(google.api.http).get": "/v1beta/{name=accounts/*/dataSharingSettings}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta/{name=accounts/*/dataSharingSettings}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "GetMeasurementProtocolSecret": { + "requestType": "GetMeasurementProtocolSecretRequest", + "responseType": "MeasurementProtocolSecret", + "options": { + "(google.api.http).get": "/v1beta/{name=properties/*/dataStreams/*/measurementProtocolSecrets/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta/{name=properties/*/dataStreams/*/measurementProtocolSecrets/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListMeasurementProtocolSecrets": { + "requestType": "ListMeasurementProtocolSecretsRequest", + "responseType": "ListMeasurementProtocolSecretsResponse", + "options": { + "(google.api.http).get": "/v1beta/{parent=properties/*/dataStreams/*}/measurementProtocolSecrets", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta/{parent=properties/*/dataStreams/*}/measurementProtocolSecrets" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "CreateMeasurementProtocolSecret": { + "requestType": "CreateMeasurementProtocolSecretRequest", + "responseType": "MeasurementProtocolSecret", + "options": { + "(google.api.http).post": "/v1beta/{parent=properties/*/dataStreams/*}/measurementProtocolSecrets", + "(google.api.http).body": "measurement_protocol_secret", + "(google.api.method_signature)": "parent,measurement_protocol_secret" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta/{parent=properties/*/dataStreams/*}/measurementProtocolSecrets", + "body": "measurement_protocol_secret" + } + }, + { + "(google.api.method_signature)": "parent,measurement_protocol_secret" + } + ] + }, + "DeleteMeasurementProtocolSecret": { + "requestType": "DeleteMeasurementProtocolSecretRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).delete": "/v1beta/{name=properties/*/dataStreams/*/measurementProtocolSecrets/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1beta/{name=properties/*/dataStreams/*/measurementProtocolSecrets/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "UpdateMeasurementProtocolSecret": { + "requestType": "UpdateMeasurementProtocolSecretRequest", + "responseType": "MeasurementProtocolSecret", + "options": { + "(google.api.http).patch": "/v1beta/{measurement_protocol_secret.name=properties/*/dataStreams/*/measurementProtocolSecrets/*}", + "(google.api.http).body": "measurement_protocol_secret", + "(google.api.method_signature)": "measurement_protocol_secret,update_mask" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1beta/{measurement_protocol_secret.name=properties/*/dataStreams/*/measurementProtocolSecrets/*}", + "body": "measurement_protocol_secret" + } + }, + { + "(google.api.method_signature)": "measurement_protocol_secret,update_mask" + } + ] + }, + "AcknowledgeUserDataCollection": { + "requestType": "AcknowledgeUserDataCollectionRequest", + "responseType": "AcknowledgeUserDataCollectionResponse", + "options": { + "(google.api.http).post": "/v1beta/{property=properties/*}:acknowledgeUserDataCollection", + "(google.api.http).body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta/{property=properties/*}:acknowledgeUserDataCollection", + "body": "*" + } + } + ] + }, + "SearchChangeHistoryEvents": { + "requestType": "SearchChangeHistoryEventsRequest", + "responseType": "SearchChangeHistoryEventsResponse", + "options": { + "(google.api.http).post": "/v1beta/{account=accounts/*}:searchChangeHistoryEvents", + "(google.api.http).body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta/{account=accounts/*}:searchChangeHistoryEvents", + "body": "*" + } + } + ] + }, + "CreateConversionEvent": { + "requestType": "CreateConversionEventRequest", + "responseType": "ConversionEvent", + "options": { + "(google.api.http).post": "/v1beta/{parent=properties/*}/conversionEvents", + "(google.api.http).body": "conversion_event", + "(google.api.method_signature)": "parent,conversion_event" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta/{parent=properties/*}/conversionEvents", + "body": "conversion_event" + } + }, + { + "(google.api.method_signature)": "parent,conversion_event" + } + ] + }, + "GetConversionEvent": { + "requestType": "GetConversionEventRequest", + "responseType": "ConversionEvent", + "options": { + "(google.api.http).get": "/v1beta/{name=properties/*/conversionEvents/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta/{name=properties/*/conversionEvents/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "DeleteConversionEvent": { + "requestType": "DeleteConversionEventRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).delete": "/v1beta/{name=properties/*/conversionEvents/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1beta/{name=properties/*/conversionEvents/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListConversionEvents": { + "requestType": "ListConversionEventsRequest", + "responseType": "ListConversionEventsResponse", + "options": { + "(google.api.http).get": "/v1beta/{parent=properties/*}/conversionEvents", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta/{parent=properties/*}/conversionEvents" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "CreateCustomDimension": { + "requestType": "CreateCustomDimensionRequest", + "responseType": "CustomDimension", + "options": { + "(google.api.http).post": "/v1beta/{parent=properties/*}/customDimensions", + "(google.api.http).body": "custom_dimension", + "(google.api.method_signature)": "parent,custom_dimension" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta/{parent=properties/*}/customDimensions", + "body": "custom_dimension" + } + }, + { + "(google.api.method_signature)": "parent,custom_dimension" + } + ] + }, + "UpdateCustomDimension": { + "requestType": "UpdateCustomDimensionRequest", + "responseType": "CustomDimension", + "options": { + "(google.api.http).patch": "/v1beta/{custom_dimension.name=properties/*/customDimensions/*}", + "(google.api.http).body": "custom_dimension", + "(google.api.method_signature)": "custom_dimension,update_mask" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1beta/{custom_dimension.name=properties/*/customDimensions/*}", + "body": "custom_dimension" + } + }, + { + "(google.api.method_signature)": "custom_dimension,update_mask" + } + ] + }, + "ListCustomDimensions": { + "requestType": "ListCustomDimensionsRequest", + "responseType": "ListCustomDimensionsResponse", + "options": { + "(google.api.http).get": "/v1beta/{parent=properties/*}/customDimensions", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta/{parent=properties/*}/customDimensions" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "ArchiveCustomDimension": { + "requestType": "ArchiveCustomDimensionRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).post": "/v1beta/{name=properties/*/customDimensions/*}:archive", + "(google.api.http).body": "*", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta/{name=properties/*/customDimensions/*}:archive", + "body": "*" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "GetCustomDimension": { + "requestType": "GetCustomDimensionRequest", + "responseType": "CustomDimension", + "options": { + "(google.api.http).get": "/v1beta/{name=properties/*/customDimensions/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta/{name=properties/*/customDimensions/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "CreateCustomMetric": { + "requestType": "CreateCustomMetricRequest", + "responseType": "CustomMetric", + "options": { + "(google.api.http).post": "/v1beta/{parent=properties/*}/customMetrics", + "(google.api.http).body": "custom_metric", + "(google.api.method_signature)": "parent,custom_metric" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta/{parent=properties/*}/customMetrics", + "body": "custom_metric" + } + }, + { + "(google.api.method_signature)": "parent,custom_metric" + } + ] + }, + "UpdateCustomMetric": { + "requestType": "UpdateCustomMetricRequest", + "responseType": "CustomMetric", + "options": { + "(google.api.http).patch": "/v1beta/{custom_metric.name=properties/*/customMetrics/*}", + "(google.api.http).body": "custom_metric", + "(google.api.method_signature)": "custom_metric,update_mask" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1beta/{custom_metric.name=properties/*/customMetrics/*}", + "body": "custom_metric" + } + }, + { + "(google.api.method_signature)": "custom_metric,update_mask" + } + ] + }, + "ListCustomMetrics": { + "requestType": "ListCustomMetricsRequest", + "responseType": "ListCustomMetricsResponse", + "options": { + "(google.api.http).get": "/v1beta/{parent=properties/*}/customMetrics", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta/{parent=properties/*}/customMetrics" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "ArchiveCustomMetric": { + "requestType": "ArchiveCustomMetricRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).post": "/v1beta/{name=properties/*/customMetrics/*}:archive", + "(google.api.http).body": "*", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta/{name=properties/*/customMetrics/*}:archive", + "body": "*" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "GetCustomMetric": { + "requestType": "GetCustomMetricRequest", + "responseType": "CustomMetric", + "options": { + "(google.api.http).get": "/v1beta/{name=properties/*/customMetrics/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta/{name=properties/*/customMetrics/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "GetDataRetentionSettings": { + "requestType": "GetDataRetentionSettingsRequest", + "responseType": "DataRetentionSettings", + "options": { + "(google.api.http).get": "/v1beta/{name=properties/*/dataRetentionSettings}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta/{name=properties/*/dataRetentionSettings}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "UpdateDataRetentionSettings": { + "requestType": "UpdateDataRetentionSettingsRequest", + "responseType": "DataRetentionSettings", + "options": { + "(google.api.http).patch": "/v1beta/{data_retention_settings.name=properties/*/dataRetentionSettings}", + "(google.api.http).body": "data_retention_settings", + "(google.api.method_signature)": "data_retention_settings,update_mask" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1beta/{data_retention_settings.name=properties/*/dataRetentionSettings}", + "body": "data_retention_settings" + } + }, + { + "(google.api.method_signature)": "data_retention_settings,update_mask" + } + ] + }, + "CreateDataStream": { + "requestType": "CreateDataStreamRequest", + "responseType": "DataStream", + "options": { + "(google.api.http).post": "/v1beta/{parent=properties/*}/dataStreams", + "(google.api.http).body": "data_stream", + "(google.api.method_signature)": "parent,data_stream" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta/{parent=properties/*}/dataStreams", + "body": "data_stream" + } + }, + { + "(google.api.method_signature)": "parent,data_stream" + } + ] + }, + "DeleteDataStream": { + "requestType": "DeleteDataStreamRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).delete": "/v1beta/{name=properties/*/dataStreams/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1beta/{name=properties/*/dataStreams/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "UpdateDataStream": { + "requestType": "UpdateDataStreamRequest", + "responseType": "DataStream", + "options": { + "(google.api.http).patch": "/v1beta/{data_stream.name=properties/*/dataStreams/*}", + "(google.api.http).body": "data_stream", + "(google.api.method_signature)": "data_stream,update_mask" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1beta/{data_stream.name=properties/*/dataStreams/*}", + "body": "data_stream" + } + }, + { + "(google.api.method_signature)": "data_stream,update_mask" + } + ] + }, + "ListDataStreams": { + "requestType": "ListDataStreamsRequest", + "responseType": "ListDataStreamsResponse", + "options": { + "(google.api.http).get": "/v1beta/{parent=properties/*}/dataStreams", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta/{parent=properties/*}/dataStreams" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetDataStream": { + "requestType": "GetDataStreamRequest", + "responseType": "DataStream", + "options": { + "(google.api.http).get": "/v1beta/{name=properties/*/dataStreams/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta/{name=properties/*/dataStreams/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + } + } + }, + "GetAccountRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "analyticsadmin.googleapis.com/Account" + } + } + } + }, + "ListAccountsRequest": { + "fields": { + "pageSize": { + "type": "int32", + "id": 1 + }, + "pageToken": { + "type": "string", + "id": 2 + }, + "showDeleted": { + "type": "bool", + "id": 3 + } + } + }, + "ListAccountsResponse": { + "fields": { + "accounts": { + "rule": "repeated", + "type": "Account", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "DeleteAccountRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "analyticsadmin.googleapis.com/Account" + } + } + } + }, + "UpdateAccountRequest": { + "fields": { + "account": { + "type": "Account", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "ProvisionAccountTicketRequest": { + "fields": { + "account": { + "type": "Account", + "id": 1 + }, + "redirectUri": { + "type": "string", + "id": 2 + } + } + }, + "ProvisionAccountTicketResponse": { + "fields": { + "accountTicketId": { + "type": "string", + "id": 1 + } + } + }, + "GetPropertyRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "analyticsadmin.googleapis.com/Property" + } + } + } + }, + "ListPropertiesRequest": { + "fields": { + "filter": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + }, + "showDeleted": { + "type": "bool", + "id": 4 + } + } + }, + "ListPropertiesResponse": { + "fields": { + "properties": { + "rule": "repeated", + "type": "Property", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "UpdatePropertyRequest": { + "fields": { + "property": { + "type": "Property", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "CreatePropertyRequest": { + "fields": { + "property": { + "type": "Property", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "DeletePropertyRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "analyticsadmin.googleapis.com/Property" + } + } + } + }, + "CreateFirebaseLinkRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "analyticsadmin.googleapis.com/FirebaseLink" + } + }, + "firebaseLink": { + "type": "FirebaseLink", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "DeleteFirebaseLinkRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "analyticsadmin.googleapis.com/FirebaseLink" + } + } + } + }, + "ListFirebaseLinksRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "analyticsadmin.googleapis.com/FirebaseLink" + } + }, + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + } + } + }, + "ListFirebaseLinksResponse": { + "fields": { + "firebaseLinks": { + "rule": "repeated", + "type": "FirebaseLink", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "CreateGoogleAdsLinkRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "analyticsadmin.googleapis.com/GoogleAdsLink" + } + }, + "googleAdsLink": { + "type": "GoogleAdsLink", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "UpdateGoogleAdsLinkRequest": { + "fields": { + "googleAdsLink": { + "type": "GoogleAdsLink", + "id": 1 + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "DeleteGoogleAdsLinkRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "analyticsadmin.googleapis.com/GoogleAdsLink" + } + } + } + }, + "ListGoogleAdsLinksRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "analyticsadmin.googleapis.com/GoogleAdsLink" + } + }, + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + } + } + }, + "ListGoogleAdsLinksResponse": { + "fields": { + "googleAdsLinks": { + "rule": "repeated", + "type": "GoogleAdsLink", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "GetDataSharingSettingsRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "analyticsadmin.googleapis.com/DataSharingSettings" + } + } + } + }, + "ListAccountSummariesRequest": { + "fields": { + "pageSize": { + "type": "int32", + "id": 1 + }, + "pageToken": { + "type": "string", + "id": 2 + } + } + }, + "ListAccountSummariesResponse": { + "fields": { + "accountSummaries": { + "rule": "repeated", + "type": "AccountSummary", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "AcknowledgeUserDataCollectionRequest": { + "fields": { + "property": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "analyticsadmin.googleapis.com/Property" + } + }, + "acknowledgement": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "AcknowledgeUserDataCollectionResponse": { + "fields": {} + }, + "SearchChangeHistoryEventsRequest": { + "fields": { + "account": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "analyticsadmin.googleapis.com/Account" + } + }, + "property": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "(google.api.resource_reference).type": "analyticsadmin.googleapis.com/Property" + } + }, + "resourceType": { + "rule": "repeated", + "type": "ChangeHistoryResourceType", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "action": { + "rule": "repeated", + "type": "ActionType", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "actorEmail": { + "rule": "repeated", + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "earliestChangeTime": { + "type": "google.protobuf.Timestamp", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "latestChangeTime": { + "type": "google.protobuf.Timestamp", + "id": 7, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageSize": { + "type": "int32", + "id": 8, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 9, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "SearchChangeHistoryEventsResponse": { + "fields": { + "changeHistoryEvents": { + "rule": "repeated", + "type": "ChangeHistoryEvent", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "GetMeasurementProtocolSecretRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "analyticsadmin.googleapis.com/MeasurementProtocolSecret" + } + } + } + }, + "CreateMeasurementProtocolSecretRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "analyticsadmin.googleapis.com/MeasurementProtocolSecret" + } + }, + "measurementProtocolSecret": { + "type": "MeasurementProtocolSecret", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "DeleteMeasurementProtocolSecretRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "analyticsadmin.googleapis.com/MeasurementProtocolSecret" + } + } + } + }, + "UpdateMeasurementProtocolSecretRequest": { + "fields": { + "measurementProtocolSecret": { + "type": "MeasurementProtocolSecret", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 2 + } + } + }, + "ListMeasurementProtocolSecretsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "analyticsadmin.googleapis.com/MeasurementProtocolSecret" + } + }, + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + } + } + }, + "ListMeasurementProtocolSecretsResponse": { + "fields": { + "measurementProtocolSecrets": { + "rule": "repeated", + "type": "MeasurementProtocolSecret", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "CreateConversionEventRequest": { + "fields": { + "conversionEvent": { + "type": "ConversionEvent", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "parent": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "analyticsadmin.googleapis.com/ConversionEvent" + } + } + } + }, + "GetConversionEventRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "analyticsadmin.googleapis.com/ConversionEvent" + } + } + } + }, + "DeleteConversionEventRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "analyticsadmin.googleapis.com/ConversionEvent" + } + } + } + }, + "ListConversionEventsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "analyticsadmin.googleapis.com/ConversionEvent" + } + }, + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + } + } + }, + "ListConversionEventsResponse": { + "fields": { + "conversionEvents": { + "rule": "repeated", + "type": "ConversionEvent", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "CreateCustomDimensionRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "analyticsadmin.googleapis.com/CustomDimension" + } + }, + "customDimension": { + "type": "CustomDimension", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "UpdateCustomDimensionRequest": { + "fields": { + "customDimension": { + "type": "CustomDimension", + "id": 1 + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "ListCustomDimensionsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "analyticsadmin.googleapis.com/CustomDimension" + } + }, + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + } + } + }, + "ListCustomDimensionsResponse": { + "fields": { + "customDimensions": { + "rule": "repeated", + "type": "CustomDimension", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "ArchiveCustomDimensionRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "analyticsadmin.googleapis.com/CustomDimension" + } + } + } + }, + "GetCustomDimensionRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "analyticsadmin.googleapis.com/CustomDimension" + } + } + } + }, + "CreateCustomMetricRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "analyticsadmin.googleapis.com/CustomMetric" + } + }, + "customMetric": { + "type": "CustomMetric", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "UpdateCustomMetricRequest": { + "fields": { + "customMetric": { + "type": "CustomMetric", + "id": 1 + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "ListCustomMetricsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "analyticsadmin.googleapis.com/CustomMetric" + } + }, + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + } + } + }, + "ListCustomMetricsResponse": { + "fields": { + "customMetrics": { + "rule": "repeated", + "type": "CustomMetric", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "ArchiveCustomMetricRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "analyticsadmin.googleapis.com/CustomMetric" + } + } + } + }, + "GetCustomMetricRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "analyticsadmin.googleapis.com/CustomMetric" + } + } + } + }, + "GetDataRetentionSettingsRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "analyticsadmin.googleapis.com/DataRetentionSettings" + } + } + } + }, + "UpdateDataRetentionSettingsRequest": { + "fields": { + "dataRetentionSettings": { + "type": "DataRetentionSettings", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "CreateDataStreamRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "analyticsadmin.googleapis.com/DataStream" + } + }, + "dataStream": { + "type": "DataStream", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "DeleteDataStreamRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "analyticsadmin.googleapis.com/DataStream" + } + } + } + }, + "UpdateDataStreamRequest": { + "fields": { + "dataStream": { + "type": "DataStream", + "id": 1 + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "ListDataStreamsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "analyticsadmin.googleapis.com/DataStream" + } + }, + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + } + } + }, + "ListDataStreamsResponse": { + "fields": { + "dataStreams": { + "rule": "repeated", + "type": "DataStream", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "GetDataStreamRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "analyticsadmin.googleapis.com/DataStream" + } + } + } + }, + "IndustryCategory": { + "values": { + "INDUSTRY_CATEGORY_UNSPECIFIED": 0, + "AUTOMOTIVE": 1, + "BUSINESS_AND_INDUSTRIAL_MARKETS": 2, + "FINANCE": 3, + "HEALTHCARE": 4, + "TECHNOLOGY": 5, + "TRAVEL": 6, + "OTHER": 7, + "ARTS_AND_ENTERTAINMENT": 8, + "BEAUTY_AND_FITNESS": 9, + "BOOKS_AND_LITERATURE": 10, + "FOOD_AND_DRINK": 11, + "GAMES": 12, + "HOBBIES_AND_LEISURE": 13, + "HOME_AND_GARDEN": 14, + "INTERNET_AND_TELECOM": 15, + "LAW_AND_GOVERNMENT": 16, + "NEWS": 17, + "ONLINE_COMMUNITIES": 18, + "PEOPLE_AND_SOCIETY": 19, + "PETS_AND_ANIMALS": 20, + "REAL_ESTATE": 21, + "REFERENCE": 22, + "SCIENCE": 23, + "SPORTS": 24, + "JOBS_AND_EDUCATION": 25, + "SHOPPING": 26 + } + }, + "ServiceLevel": { + "values": { + "SERVICE_LEVEL_UNSPECIFIED": 0, + "GOOGLE_ANALYTICS_STANDARD": 1, + "GOOGLE_ANALYTICS_360": 2 + } + }, + "ActorType": { + "values": { + "ACTOR_TYPE_UNSPECIFIED": 0, + "USER": 1, + "SYSTEM": 2, + "SUPPORT": 3 + } + }, + "ActionType": { + "values": { + "ACTION_TYPE_UNSPECIFIED": 0, + "CREATED": 1, + "UPDATED": 2, + "DELETED": 3 + } + }, + "ChangeHistoryResourceType": { + "values": { + "CHANGE_HISTORY_RESOURCE_TYPE_UNSPECIFIED": 0, + "ACCOUNT": 1, + "PROPERTY": 2, + "FIREBASE_LINK": 6, + "GOOGLE_ADS_LINK": 7, + "GOOGLE_SIGNALS_SETTINGS": 8, + "CONVERSION_EVENT": 9, + "MEASUREMENT_PROTOCOL_SECRET": 10, + "DATA_RETENTION_SETTINGS": 13, + "DISPLAY_VIDEO_360_ADVERTISER_LINK": 14, + "DISPLAY_VIDEO_360_ADVERTISER_LINK_PROPOSAL": 15, + "DATA_STREAM": 18, + "ATTRIBUTION_SETTINGS": 20 + } + }, + "PropertyType": { + "values": { + "PROPERTY_TYPE_UNSPECIFIED": 0, + "PROPERTY_TYPE_ORDINARY": 1, + "PROPERTY_TYPE_SUBPROPERTY": 2, + "PROPERTY_TYPE_ROLLUP": 3 + } + }, + "Account": { + "options": { + "(google.api.resource).type": "analyticsadmin.googleapis.com/Account", + "(google.api.resource).pattern": "accounts/{account}" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "displayName": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "regionCode": { + "type": "string", + "id": 5 + }, + "deleted": { + "type": "bool", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "Property": { + "options": { + "(google.api.resource).type": "analyticsadmin.googleapis.com/Property", + "(google.api.resource).pattern": "properties/{property}" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "propertyType": { + "type": "PropertyType", + "id": 14, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "parent": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + }, + "displayName": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "industryCategory": { + "type": "IndustryCategory", + "id": 6 + }, + "timeZone": { + "type": "string", + "id": 7, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "currencyCode": { + "type": "string", + "id": 8 + }, + "serviceLevel": { + "type": "ServiceLevel", + "id": 10, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "deleteTime": { + "type": "google.protobuf.Timestamp", + "id": 11, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "expireTime": { + "type": "google.protobuf.Timestamp", + "id": 12, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "account": { + "type": "string", + "id": 13, + "options": { + "(google.api.field_behavior)": "IMMUTABLE", + "(google.api.resource_reference).type": "analyticsadmin.googleapis.com/Account" + } + } + } + }, + "DataStream": { + "options": { + "(google.api.resource).type": "analyticsadmin.googleapis.com/DataStream", + "(google.api.resource).pattern": "properties/{property}/dataStreams/{data_stream}" + }, + "oneofs": { + "streamData": { + "oneof": [ + "webStreamData", + "androidAppStreamData", + "iosAppStreamData" + ] + } + }, + "fields": { + "webStreamData": { + "type": "WebStreamData", + "id": 6 + }, + "androidAppStreamData": { + "type": "AndroidAppStreamData", + "id": 7 + }, + "iosAppStreamData": { + "type": "IosAppStreamData", + "id": 8 + }, + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "type": { + "type": "DataStreamType", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "displayName": { + "type": "string", + "id": 3 + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "WebStreamData": { + "fields": { + "measurementId": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "firebaseAppId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "defaultUri": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + } + } + }, + "AndroidAppStreamData": { + "fields": { + "firebaseAppId": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "packageName": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + } + } + }, + "IosAppStreamData": { + "fields": { + "firebaseAppId": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "bundleId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "DataStreamType": { + "values": { + "DATA_STREAM_TYPE_UNSPECIFIED": 0, + "WEB_DATA_STREAM": 1, + "ANDROID_APP_DATA_STREAM": 2, + "IOS_APP_DATA_STREAM": 3 + } + } + } + }, + "FirebaseLink": { + "options": { + "(google.api.resource).type": "analyticsadmin.googleapis.com/FirebaseLink", + "(google.api.resource).pattern": "properties/{property}/firebaseLinks/{firebase_link}" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "project": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "GoogleAdsLink": { + "options": { + "(google.api.resource).type": "analyticsadmin.googleapis.com/GoogleAdsLink", + "(google.api.resource).pattern": "properties/{property}/googleAdsLinks/{google_ads_link}" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "customerId": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + }, + "canManageClients": { + "type": "bool", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "adsPersonalizationEnabled": { + "type": "google.protobuf.BoolValue", + "id": 5 + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 7, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 8, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "creatorEmailAddress": { + "type": "string", + "id": 9, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "DataSharingSettings": { + "options": { + "(google.api.resource).type": "analyticsadmin.googleapis.com/DataSharingSettings", + "(google.api.resource).pattern": "accounts/{account}/dataSharingSettings" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "sharingWithGoogleSupportEnabled": { + "type": "bool", + "id": 2 + }, + "sharingWithGoogleAssignedSalesEnabled": { + "type": "bool", + "id": 3 + }, + "sharingWithGoogleAnySalesEnabled": { + "type": "bool", + "id": 4 + }, + "sharingWithGoogleProductsEnabled": { + "type": "bool", + "id": 5 + }, + "sharingWithOthersEnabled": { + "type": "bool", + "id": 6 + } + } + }, + "AccountSummary": { + "options": { + "(google.api.resource).type": "analyticsadmin.googleapis.com/AccountSummary", + "(google.api.resource).pattern": "accountSummaries/{account_summary}" + }, + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "account": { + "type": "string", + "id": 2, + "options": { + "(google.api.resource_reference).type": "analyticsadmin.googleapis.com/Account" + } + }, + "displayName": { + "type": "string", + "id": 3 + }, + "propertySummaries": { + "rule": "repeated", + "type": "PropertySummary", + "id": 4 + } + } + }, + "PropertySummary": { + "fields": { + "property": { + "type": "string", + "id": 1, + "options": { + "(google.api.resource_reference).type": "analyticsadmin.googleapis.com/Property" + } + }, + "displayName": { + "type": "string", + "id": 2 + }, + "propertyType": { + "type": "PropertyType", + "id": 3 + }, + "parent": { + "type": "string", + "id": 4 + } + } + }, + "MeasurementProtocolSecret": { + "options": { + "(google.api.resource).type": "analyticsadmin.googleapis.com/MeasurementProtocolSecret", + "(google.api.resource).pattern": "properties/{property}/dataStreams/{data_stream}/measurementProtocolSecrets/{measurement_protocol_secret}" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "displayName": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "secretValue": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "ChangeHistoryEvent": { + "fields": { + "id": { + "type": "string", + "id": 1 + }, + "changeTime": { + "type": "google.protobuf.Timestamp", + "id": 2 + }, + "actorType": { + "type": "ActorType", + "id": 3 + }, + "userActorEmail": { + "type": "string", + "id": 4 + }, + "changesFiltered": { + "type": "bool", + "id": 5 + }, + "changes": { + "rule": "repeated", + "type": "ChangeHistoryChange", + "id": 6 + } + } + }, + "ChangeHistoryChange": { + "fields": { + "resource": { + "type": "string", + "id": 1 + }, + "action": { + "type": "ActionType", + "id": 2 + }, + "resourceBeforeChange": { + "type": "ChangeHistoryResource", + "id": 3 + }, + "resourceAfterChange": { + "type": "ChangeHistoryResource", + "id": 4 + } + }, + "nested": { + "ChangeHistoryResource": { + "oneofs": { + "resource": { + "oneof": [ + "account", + "property", + "firebaseLink", + "googleAdsLink", + "conversionEvent", + "measurementProtocolSecret", + "dataRetentionSettings", + "dataStream" + ] + } + }, + "fields": { + "account": { + "type": "Account", + "id": 1 + }, + "property": { + "type": "Property", + "id": 2 + }, + "firebaseLink": { + "type": "FirebaseLink", + "id": 6 + }, + "googleAdsLink": { + "type": "GoogleAdsLink", + "id": 7 + }, + "conversionEvent": { + "type": "ConversionEvent", + "id": 11 + }, + "measurementProtocolSecret": { + "type": "MeasurementProtocolSecret", + "id": 12 + }, + "dataRetentionSettings": { + "type": "DataRetentionSettings", + "id": 15 + }, + "dataStream": { + "type": "DataStream", + "id": 18 + } + } + } + } + }, + "ConversionEvent": { + "options": { + "(google.api.resource).type": "analyticsadmin.googleapis.com/ConversionEvent", + "(google.api.resource).pattern": "properties/{property}/conversionEvents/{conversion_event}" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "eventName": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "deletable": { + "type": "bool", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "custom": { + "type": "bool", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "CustomDimension": { + "options": { + "(google.api.resource).type": "analyticsadmin.googleapis.com/CustomDimension", + "(google.api.resource).pattern": "properties/{property}/customDimensions/{custom_dimension}" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "parameterName": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + }, + "displayName": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "description": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "scope": { + "type": "DimensionScope", + "id": 5, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + }, + "disallowAdsPersonalization": { + "type": "bool", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "DimensionScope": { + "values": { + "DIMENSION_SCOPE_UNSPECIFIED": 0, + "EVENT": 1, + "USER": 2 + } + } + } + }, + "CustomMetric": { + "options": { + "(google.api.resource).type": "analyticsadmin.googleapis.com/CustomMetric", + "(google.api.resource).pattern": "properties/{property}/customMetrics/{custom_metric}" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "parameterName": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + }, + "displayName": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "description": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "measurementUnit": { + "type": "MeasurementUnit", + "id": 5, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "scope": { + "type": "MetricScope", + "id": 6, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + }, + "restrictedMetricType": { + "rule": "repeated", + "type": "RestrictedMetricType", + "id": 8, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "MeasurementUnit": { + "values": { + "MEASUREMENT_UNIT_UNSPECIFIED": 0, + "STANDARD": 1, + "CURRENCY": 2, + "FEET": 3, + "METERS": 4, + "KILOMETERS": 5, + "MILES": 6, + "MILLISECONDS": 7, + "SECONDS": 8, + "MINUTES": 9, + "HOURS": 10 + } + }, + "MetricScope": { + "values": { + "METRIC_SCOPE_UNSPECIFIED": 0, + "EVENT": 1 + } + }, + "RestrictedMetricType": { + "values": { + "RESTRICTED_METRIC_TYPE_UNSPECIFIED": 0, + "COST_DATA": 1, + "REVENUE_DATA": 2 + } + } + } + }, + "DataRetentionSettings": { + "options": { + "(google.api.resource).type": "analyticsadmin.googleapis.com/DataRetentionSettings", + "(google.api.resource).pattern": "properties/{property}/dataRetentionSettings" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "eventDataRetention": { + "type": "RetentionDuration", + "id": 2 + }, + "resetUserDataOnNewActivity": { + "type": "bool", + "id": 3 + } + }, + "nested": { + "RetentionDuration": { + "values": { + "RETENTION_DURATION_UNSPECIFIED": 0, + "TWO_MONTHS": 1, + "FOURTEEN_MONTHS": 3, + "TWENTY_SIX_MONTHS": 4, + "THIRTY_EIGHT_MONTHS": 5, + "FIFTY_MONTHS": 6 + } + } + } + } + } + } + } + } + } + }, + "api": { + "options": { + "go_package": "google.golang.org/genproto/googleapis/api/annotations;annotations", + "java_multiple_files": true, + "java_outer_classname": "ClientProto", + "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" + }, + "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 + } + }, + "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" + } + } + }, + "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": { + "fields": { + "file": { + "rule": "repeated", + "type": "FileDescriptorProto", + "id": 1 + } + } + }, + "FileDescriptorProto": { + "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, + "options": { + "packed": false + } + }, + "weakDependency": { + "rule": "repeated", + "type": "int32", + "id": 11, + "options": { + "packed": false + } + }, + "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": "string", + "id": 13 + } + } + }, + "DescriptorProto": { + "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": { + "fields": { + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "FieldDescriptorProto": { + "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_REQUIRED": 2, + "LABEL_REPEATED": 3 + } + } + } + }, + "OneofDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "options": { + "type": "OneofOptions", + "id": 2 + } + } + }, + "EnumDescriptorProto": { + "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": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "number": { + "type": "int32", + "id": 2 + }, + "options": { + "type": "EnumValueOptions", + "id": 3 + } + } + }, + "ServiceDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "method": { + "rule": "repeated", + "type": "MethodDescriptorProto", + "id": 2 + }, + "options": { + "type": "ServiceOptions", + "id": 3 + } + } + }, + "MethodDescriptorProto": { + "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": { + "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 + } + }, + "phpGenericServices": { + "type": "bool", + "id": 42, + "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 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 38, + 38 + ] + ], + "nested": { + "OptimizeMode": { + "values": { + "SPEED": 1, + "CODE_SIZE": 2, + "LITE_RUNTIME": 3 + } + } + } + }, + "MessageOptions": { + "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 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 4, + 4 + ], + [ + 5, + 5 + ], + [ + 6, + 6 + ], + [ + 8, + 8 + ], + [ + 9, + 9 + ] + ] + }, + "FieldOptions": { + "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 + } + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 4, + 4 + ] + ], + "nested": { + "CType": { + "values": { + "STRING": 0, + "CORD": 1, + "STRING_PIECE": 2 + } + }, + "JSType": { + "values": { + "JS_NORMAL": 0, + "JS_STRING": 1, + "JS_NUMBER": 2 + } + } + } + }, + "OneofOptions": { + "fields": { + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "EnumOptions": { + "fields": { + "allowAlias": { + "type": "bool", + "id": 2 + }, + "deprecated": { + "type": "bool", + "id": 3, + "options": { + "default": false + } + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 5, + 5 + ] + ] + }, + "EnumValueOptions": { + "fields": { + "deprecated": { + "type": "bool", + "id": 1, + "options": { + "default": false + } + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "ServiceOptions": { + "fields": { + "deprecated": { + "type": "bool", + "id": 33, + "options": { + "default": false + } + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "MethodOptions": { + "fields": { + "deprecated": { + "type": "bool", + "id": 33, + "options": { + "default": false + } + }, + "idempotencyLevel": { + "type": "IdempotencyLevel", + "id": 34, + "options": { + "default": "IDEMPOTENCY_UNKNOWN" + } + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "nested": { + "IdempotencyLevel": { + "values": { + "IDEMPOTENCY_UNKNOWN": 0, + "NO_SIDE_EFFECTS": 1, + "IDEMPOTENT": 2 + } + } + } + }, + "UninterpretedOption": { + "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 + } + } + } + } + }, + "SourceCodeInfo": { + "fields": { + "location": { + "rule": "repeated", + "type": "Location", + "id": 1 + } + }, + "nested": { + "Location": { + "fields": { + "path": { + "rule": "repeated", + "type": "int32", + "id": 1 + }, + "span": { + "rule": "repeated", + "type": "int32", + "id": 2 + }, + "leadingComments": { + "type": "string", + "id": 3 + }, + "trailingComments": { + "type": "string", + "id": 4 + }, + "leadingDetachedComments": { + "rule": "repeated", + "type": "string", + "id": 6 + } + } + } + } + }, + "GeneratedCodeInfo": { + "fields": { + "annotation": { + "rule": "repeated", + "type": "Annotation", + "id": 1 + } + }, + "nested": { + "Annotation": { + "fields": { + "path": { + "rule": "repeated", + "type": "int32", + "id": 1 + }, + "sourceFile": { + "type": "string", + "id": 2 + }, + "begin": { + "type": "int32", + "id": 3 + }, + "end": { + "type": "int32", + "id": 4 + }, + "semantic": { + "type": "Semantic", + "id": 5 + } + }, + "nested": { + "Semantic": { + "values": { + "NONE": 0, + "SET": 1, + "ALIAS": 2 + } + } + } + } + } + }, + "Duration": { + "fields": { + "seconds": { + "type": "int64", + "id": 1 + }, + "nanos": { + "type": "int32", + "id": 2 + } + } + }, + "Timestamp": { + "fields": { + "seconds": { + "type": "int64", + "id": 1 + }, + "nanos": { + "type": "int32", + "id": 2 + } + } + }, + "DoubleValue": { + "fields": { + "value": { + "type": "double", + "id": 1 + } + } + }, + "FloatValue": { + "fields": { + "value": { + "type": "float", + "id": 1 + } + } + }, + "Int64Value": { + "fields": { + "value": { + "type": "int64", + "id": 1 + } + } + }, + "UInt64Value": { + "fields": { + "value": { + "type": "uint64", + "id": 1 + } + } + }, + "Int32Value": { + "fields": { + "value": { + "type": "int32", + "id": 1 + } + } + }, + "UInt32Value": { + "fields": { + "value": { + "type": "uint32", + "id": 1 + } + } + }, + "BoolValue": { + "fields": { + "value": { + "type": "bool", + "id": 1 + } + } + }, + "StringValue": { + "fields": { + "value": { + "type": "string", + "id": 1 + } + } + }, + "BytesValue": { + "fields": { + "value": { + "type": "bytes", + "id": 1 + } + } + }, + "Empty": { + "fields": {} + }, + "FieldMask": { + "fields": { + "paths": { + "rule": "repeated", + "type": "string", + "id": 1 + } + } + } + } + } + } + } + } +} \ No newline at end of file diff --git a/packages/google-analytics-admin/samples/README.md b/packages/google-analytics-admin/samples/README.md new file mode 100644 index 00000000000..40867b46a97 --- /dev/null +++ b/packages/google-analytics-admin/samples/README.md @@ -0,0 +1,2606 @@ +[//]: # "This README.md file is auto-generated, all changes to this file will be lost." +[//]: # "To regenerate it, use `python -m synthtool`." +Google Cloud Platform logo + +# [Google Analytics Admin: Node.js Samples](https://github.com/googleapis/google-cloud-node) + +[![Open in Cloud Shell][shell_img]][shell_link] + + + +## Table of Contents + +* [Before you begin](#before-you-begin) +* [Samples](#samples) + * [Analytics_admin_service.acknowledge_user_data_collection](#analytics_admin_service.acknowledge_user_data_collection) + * [Analytics_admin_service.approve_display_video360_advertiser_link_proposal](#analytics_admin_service.approve_display_video360_advertiser_link_proposal) + * [Analytics_admin_service.archive_audience](#analytics_admin_service.archive_audience) + * [Analytics_admin_service.archive_custom_dimension](#analytics_admin_service.archive_custom_dimension) + * [Analytics_admin_service.archive_custom_metric](#analytics_admin_service.archive_custom_metric) + * [Analytics_admin_service.audit_user_links](#analytics_admin_service.audit_user_links) + * [Analytics_admin_service.batch_create_user_links](#analytics_admin_service.batch_create_user_links) + * [Analytics_admin_service.batch_delete_user_links](#analytics_admin_service.batch_delete_user_links) + * [Analytics_admin_service.batch_get_user_links](#analytics_admin_service.batch_get_user_links) + * [Analytics_admin_service.batch_update_user_links](#analytics_admin_service.batch_update_user_links) + * [Analytics_admin_service.cancel_display_video360_advertiser_link_proposal](#analytics_admin_service.cancel_display_video360_advertiser_link_proposal) + * [Analytics_admin_service.create_audience](#analytics_admin_service.create_audience) + * [Analytics_admin_service.create_conversion_event](#analytics_admin_service.create_conversion_event) + * [Analytics_admin_service.create_custom_dimension](#analytics_admin_service.create_custom_dimension) + * [Analytics_admin_service.create_custom_metric](#analytics_admin_service.create_custom_metric) + * [Analytics_admin_service.create_data_stream](#analytics_admin_service.create_data_stream) + * [Analytics_admin_service.create_display_video360_advertiser_link](#analytics_admin_service.create_display_video360_advertiser_link) + * [Analytics_admin_service.create_display_video360_advertiser_link_proposal](#analytics_admin_service.create_display_video360_advertiser_link_proposal) + * [Analytics_admin_service.create_firebase_link](#analytics_admin_service.create_firebase_link) + * [Analytics_admin_service.create_google_ads_link](#analytics_admin_service.create_google_ads_link) + * [Analytics_admin_service.create_measurement_protocol_secret](#analytics_admin_service.create_measurement_protocol_secret) + * [Analytics_admin_service.create_property](#analytics_admin_service.create_property) + * [Analytics_admin_service.create_user_link](#analytics_admin_service.create_user_link) + * [Analytics_admin_service.create_web_data_stream](#analytics_admin_service.create_web_data_stream) + * [Analytics_admin_service.delete_account](#analytics_admin_service.delete_account) + * [Analytics_admin_service.delete_android_app_data_stream](#analytics_admin_service.delete_android_app_data_stream) + * [Analytics_admin_service.delete_conversion_event](#analytics_admin_service.delete_conversion_event) + * [Analytics_admin_service.delete_data_stream](#analytics_admin_service.delete_data_stream) + * [Analytics_admin_service.delete_display_video360_advertiser_link](#analytics_admin_service.delete_display_video360_advertiser_link) + * [Analytics_admin_service.delete_display_video360_advertiser_link_proposal](#analytics_admin_service.delete_display_video360_advertiser_link_proposal) + * [Analytics_admin_service.delete_firebase_link](#analytics_admin_service.delete_firebase_link) + * [Analytics_admin_service.delete_google_ads_link](#analytics_admin_service.delete_google_ads_link) + * [Analytics_admin_service.delete_ios_app_data_stream](#analytics_admin_service.delete_ios_app_data_stream) + * [Analytics_admin_service.delete_measurement_protocol_secret](#analytics_admin_service.delete_measurement_protocol_secret) + * [Analytics_admin_service.delete_property](#analytics_admin_service.delete_property) + * [Analytics_admin_service.delete_user_link](#analytics_admin_service.delete_user_link) + * [Analytics_admin_service.delete_web_data_stream](#analytics_admin_service.delete_web_data_stream) + * [Analytics_admin_service.get_account](#analytics_admin_service.get_account) + * [Analytics_admin_service.get_android_app_data_stream](#analytics_admin_service.get_android_app_data_stream) + * [Analytics_admin_service.get_attribution_settings](#analytics_admin_service.get_attribution_settings) + * [Analytics_admin_service.get_audience](#analytics_admin_service.get_audience) + * [Analytics_admin_service.get_conversion_event](#analytics_admin_service.get_conversion_event) + * [Analytics_admin_service.get_custom_dimension](#analytics_admin_service.get_custom_dimension) + * [Analytics_admin_service.get_custom_metric](#analytics_admin_service.get_custom_metric) + * [Analytics_admin_service.get_data_retention_settings](#analytics_admin_service.get_data_retention_settings) + * [Analytics_admin_service.get_data_sharing_settings](#analytics_admin_service.get_data_sharing_settings) + * [Analytics_admin_service.get_data_stream](#analytics_admin_service.get_data_stream) + * [Analytics_admin_service.get_display_video360_advertiser_link](#analytics_admin_service.get_display_video360_advertiser_link) + * [Analytics_admin_service.get_display_video360_advertiser_link_proposal](#analytics_admin_service.get_display_video360_advertiser_link_proposal) + * [Analytics_admin_service.get_enhanced_measurement_settings](#analytics_admin_service.get_enhanced_measurement_settings) + * [Analytics_admin_service.get_global_site_tag](#analytics_admin_service.get_global_site_tag) + * [Analytics_admin_service.get_google_signals_settings](#analytics_admin_service.get_google_signals_settings) + * [Analytics_admin_service.get_ios_app_data_stream](#analytics_admin_service.get_ios_app_data_stream) + * [Analytics_admin_service.get_measurement_protocol_secret](#analytics_admin_service.get_measurement_protocol_secret) + * [Analytics_admin_service.get_property](#analytics_admin_service.get_property) + * [Analytics_admin_service.get_user_link](#analytics_admin_service.get_user_link) + * [Analytics_admin_service.get_web_data_stream](#analytics_admin_service.get_web_data_stream) + * [Analytics_admin_service.list_account_summaries](#analytics_admin_service.list_account_summaries) + * [Analytics_admin_service.list_accounts](#analytics_admin_service.list_accounts) + * [Analytics_admin_service.list_android_app_data_streams](#analytics_admin_service.list_android_app_data_streams) + * [Analytics_admin_service.list_audiences](#analytics_admin_service.list_audiences) + * [Analytics_admin_service.list_conversion_events](#analytics_admin_service.list_conversion_events) + * [Analytics_admin_service.list_custom_dimensions](#analytics_admin_service.list_custom_dimensions) + * [Analytics_admin_service.list_custom_metrics](#analytics_admin_service.list_custom_metrics) + * [Analytics_admin_service.list_data_streams](#analytics_admin_service.list_data_streams) + * [Analytics_admin_service.list_display_video360_advertiser_link_proposals](#analytics_admin_service.list_display_video360_advertiser_link_proposals) + * [Analytics_admin_service.list_display_video360_advertiser_links](#analytics_admin_service.list_display_video360_advertiser_links) + * [Analytics_admin_service.list_firebase_links](#analytics_admin_service.list_firebase_links) + * [Analytics_admin_service.list_google_ads_links](#analytics_admin_service.list_google_ads_links) + * [Analytics_admin_service.list_ios_app_data_streams](#analytics_admin_service.list_ios_app_data_streams) + * [Analytics_admin_service.list_measurement_protocol_secrets](#analytics_admin_service.list_measurement_protocol_secrets) + * [Analytics_admin_service.list_properties](#analytics_admin_service.list_properties) + * [Analytics_admin_service.list_user_links](#analytics_admin_service.list_user_links) + * [Analytics_admin_service.list_web_data_streams](#analytics_admin_service.list_web_data_streams) + * [Analytics_admin_service.provision_account_ticket](#analytics_admin_service.provision_account_ticket) + * [Analytics_admin_service.run_access_report](#analytics_admin_service.run_access_report) + * [Analytics_admin_service.search_change_history_events](#analytics_admin_service.search_change_history_events) + * [Analytics_admin_service.update_account](#analytics_admin_service.update_account) + * [Analytics_admin_service.update_android_app_data_stream](#analytics_admin_service.update_android_app_data_stream) + * [Analytics_admin_service.update_attribution_settings](#analytics_admin_service.update_attribution_settings) + * [Analytics_admin_service.update_audience](#analytics_admin_service.update_audience) + * [Analytics_admin_service.update_custom_dimension](#analytics_admin_service.update_custom_dimension) + * [Analytics_admin_service.update_custom_metric](#analytics_admin_service.update_custom_metric) + * [Analytics_admin_service.update_data_retention_settings](#analytics_admin_service.update_data_retention_settings) + * [Analytics_admin_service.update_data_stream](#analytics_admin_service.update_data_stream) + * [Analytics_admin_service.update_display_video360_advertiser_link](#analytics_admin_service.update_display_video360_advertiser_link) + * [Analytics_admin_service.update_enhanced_measurement_settings](#analytics_admin_service.update_enhanced_measurement_settings) + * [Analytics_admin_service.update_google_ads_link](#analytics_admin_service.update_google_ads_link) + * [Analytics_admin_service.update_google_signals_settings](#analytics_admin_service.update_google_signals_settings) + * [Analytics_admin_service.update_ios_app_data_stream](#analytics_admin_service.update_ios_app_data_stream) + * [Analytics_admin_service.update_measurement_protocol_secret](#analytics_admin_service.update_measurement_protocol_secret) + * [Analytics_admin_service.update_property](#analytics_admin_service.update_property) + * [Analytics_admin_service.update_user_link](#analytics_admin_service.update_user_link) + * [Analytics_admin_service.update_web_data_stream](#analytics_admin_service.update_web_data_stream) + * [Analytics_admin_service.acknowledge_user_data_collection](#analytics_admin_service.acknowledge_user_data_collection) + * [Analytics_admin_service.archive_custom_dimension](#analytics_admin_service.archive_custom_dimension) + * [Analytics_admin_service.archive_custom_metric](#analytics_admin_service.archive_custom_metric) + * [Analytics_admin_service.create_conversion_event](#analytics_admin_service.create_conversion_event) + * [Analytics_admin_service.create_custom_dimension](#analytics_admin_service.create_custom_dimension) + * [Analytics_admin_service.create_custom_metric](#analytics_admin_service.create_custom_metric) + * [Analytics_admin_service.create_data_stream](#analytics_admin_service.create_data_stream) + * [Analytics_admin_service.create_firebase_link](#analytics_admin_service.create_firebase_link) + * [Analytics_admin_service.create_google_ads_link](#analytics_admin_service.create_google_ads_link) + * [Analytics_admin_service.create_measurement_protocol_secret](#analytics_admin_service.create_measurement_protocol_secret) + * [Analytics_admin_service.create_property](#analytics_admin_service.create_property) + * [Analytics_admin_service.delete_account](#analytics_admin_service.delete_account) + * [Analytics_admin_service.delete_conversion_event](#analytics_admin_service.delete_conversion_event) + * [Analytics_admin_service.delete_data_stream](#analytics_admin_service.delete_data_stream) + * [Analytics_admin_service.delete_firebase_link](#analytics_admin_service.delete_firebase_link) + * [Analytics_admin_service.delete_google_ads_link](#analytics_admin_service.delete_google_ads_link) + * [Analytics_admin_service.delete_measurement_protocol_secret](#analytics_admin_service.delete_measurement_protocol_secret) + * [Analytics_admin_service.delete_property](#analytics_admin_service.delete_property) + * [Analytics_admin_service.get_account](#analytics_admin_service.get_account) + * [Analytics_admin_service.get_conversion_event](#analytics_admin_service.get_conversion_event) + * [Analytics_admin_service.get_custom_dimension](#analytics_admin_service.get_custom_dimension) + * [Analytics_admin_service.get_custom_metric](#analytics_admin_service.get_custom_metric) + * [Analytics_admin_service.get_data_retention_settings](#analytics_admin_service.get_data_retention_settings) + * [Analytics_admin_service.get_data_sharing_settings](#analytics_admin_service.get_data_sharing_settings) + * [Analytics_admin_service.get_data_stream](#analytics_admin_service.get_data_stream) + * [Analytics_admin_service.get_measurement_protocol_secret](#analytics_admin_service.get_measurement_protocol_secret) + * [Analytics_admin_service.get_property](#analytics_admin_service.get_property) + * [Analytics_admin_service.list_account_summaries](#analytics_admin_service.list_account_summaries) + * [Analytics_admin_service.list_accounts](#analytics_admin_service.list_accounts) + * [Analytics_admin_service.list_conversion_events](#analytics_admin_service.list_conversion_events) + * [Analytics_admin_service.list_custom_dimensions](#analytics_admin_service.list_custom_dimensions) + * [Analytics_admin_service.list_custom_metrics](#analytics_admin_service.list_custom_metrics) + * [Analytics_admin_service.list_data_streams](#analytics_admin_service.list_data_streams) + * [Analytics_admin_service.list_firebase_links](#analytics_admin_service.list_firebase_links) + * [Analytics_admin_service.list_google_ads_links](#analytics_admin_service.list_google_ads_links) + * [Analytics_admin_service.list_measurement_protocol_secrets](#analytics_admin_service.list_measurement_protocol_secrets) + * [Analytics_admin_service.list_properties](#analytics_admin_service.list_properties) + * [Analytics_admin_service.provision_account_ticket](#analytics_admin_service.provision_account_ticket) + * [Analytics_admin_service.search_change_history_events](#analytics_admin_service.search_change_history_events) + * [Analytics_admin_service.update_account](#analytics_admin_service.update_account) + * [Analytics_admin_service.update_custom_dimension](#analytics_admin_service.update_custom_dimension) + * [Analytics_admin_service.update_custom_metric](#analytics_admin_service.update_custom_metric) + * [Analytics_admin_service.update_data_retention_settings](#analytics_admin_service.update_data_retention_settings) + * [Analytics_admin_service.update_data_stream](#analytics_admin_service.update_data_stream) + * [Analytics_admin_service.update_google_ads_link](#analytics_admin_service.update_google_ads_link) + * [Analytics_admin_service.update_measurement_protocol_secret](#analytics_admin_service.update_measurement_protocol_secret) + * [Analytics_admin_service.update_property](#analytics_admin_service.update_property) + * [Quickstart](#quickstart) + * [Quickstart.test](#quickstart.test) + +## Before you begin + +Before running the samples, make sure you've followed the steps outlined in +[Using the client library](https://github.com/googleapis/google-cloud-node#using-the-client-library). + +`cd samples` + +`npm install` + +`cd ..` + +## Samples + + + +### Analytics_admin_service.acknowledge_user_data_collection + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.acknowledge_user_data_collection.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.acknowledge_user_data_collection.js,samples/README.md) + +__Usage:__ + + +`node packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.acknowledge_user_data_collection.js` + + +----- + + + + +### Analytics_admin_service.approve_display_video360_advertiser_link_proposal + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.approve_display_video360_advertiser_link_proposal.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.approve_display_video360_advertiser_link_proposal.js,samples/README.md) + +__Usage:__ + + +`node packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.approve_display_video360_advertiser_link_proposal.js` + + +----- + + + + +### Analytics_admin_service.archive_audience + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.archive_audience.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.archive_audience.js,samples/README.md) + +__Usage:__ + + +`node packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.archive_audience.js` + + +----- + + + + +### Analytics_admin_service.archive_custom_dimension + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.archive_custom_dimension.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.archive_custom_dimension.js,samples/README.md) + +__Usage:__ + + +`node packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.archive_custom_dimension.js` + + +----- + + + + +### Analytics_admin_service.archive_custom_metric + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.archive_custom_metric.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.archive_custom_metric.js,samples/README.md) + +__Usage:__ + + +`node packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.archive_custom_metric.js` + + +----- + + + + +### Analytics_admin_service.audit_user_links + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.audit_user_links.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.audit_user_links.js,samples/README.md) + +__Usage:__ + + +`node packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.audit_user_links.js` + + +----- + + + + +### Analytics_admin_service.batch_create_user_links + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.batch_create_user_links.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.batch_create_user_links.js,samples/README.md) + +__Usage:__ + + +`node packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.batch_create_user_links.js` + + +----- + + + + +### Analytics_admin_service.batch_delete_user_links + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.batch_delete_user_links.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.batch_delete_user_links.js,samples/README.md) + +__Usage:__ + + +`node packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.batch_delete_user_links.js` + + +----- + + + + +### Analytics_admin_service.batch_get_user_links + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.batch_get_user_links.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.batch_get_user_links.js,samples/README.md) + +__Usage:__ + + +`node packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.batch_get_user_links.js` + + +----- + + + + +### Analytics_admin_service.batch_update_user_links + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.batch_update_user_links.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.batch_update_user_links.js,samples/README.md) + +__Usage:__ + + +`node packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.batch_update_user_links.js` + + +----- + + + + +### Analytics_admin_service.cancel_display_video360_advertiser_link_proposal + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.cancel_display_video360_advertiser_link_proposal.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.cancel_display_video360_advertiser_link_proposal.js,samples/README.md) + +__Usage:__ + + +`node packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.cancel_display_video360_advertiser_link_proposal.js` + + +----- + + + + +### Analytics_admin_service.create_audience + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_audience.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_audience.js,samples/README.md) + +__Usage:__ + + +`node packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_audience.js` + + +----- + + + + +### Analytics_admin_service.create_conversion_event + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_conversion_event.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_conversion_event.js,samples/README.md) + +__Usage:__ + + +`node packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_conversion_event.js` + + +----- + + + + +### Analytics_admin_service.create_custom_dimension + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_custom_dimension.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_custom_dimension.js,samples/README.md) + +__Usage:__ + + +`node packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_custom_dimension.js` + + +----- + + + + +### Analytics_admin_service.create_custom_metric + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_custom_metric.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_custom_metric.js,samples/README.md) + +__Usage:__ + + +`node packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_custom_metric.js` + + +----- + + + + +### Analytics_admin_service.create_data_stream + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_data_stream.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_data_stream.js,samples/README.md) + +__Usage:__ + + +`node packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_data_stream.js` + + +----- + + + + +### Analytics_admin_service.create_display_video360_advertiser_link + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_display_video360_advertiser_link.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_display_video360_advertiser_link.js,samples/README.md) + +__Usage:__ + + +`node packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_display_video360_advertiser_link.js` + + +----- + + + + +### Analytics_admin_service.create_display_video360_advertiser_link_proposal + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_display_video360_advertiser_link_proposal.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_display_video360_advertiser_link_proposal.js,samples/README.md) + +__Usage:__ + + +`node packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_display_video360_advertiser_link_proposal.js` + + +----- + + + + +### Analytics_admin_service.create_firebase_link + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_firebase_link.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_firebase_link.js,samples/README.md) + +__Usage:__ + + +`node packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_firebase_link.js` + + +----- + + + + +### Analytics_admin_service.create_google_ads_link + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_google_ads_link.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_google_ads_link.js,samples/README.md) + +__Usage:__ + + +`node packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_google_ads_link.js` + + +----- + + + + +### Analytics_admin_service.create_measurement_protocol_secret + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_measurement_protocol_secret.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_measurement_protocol_secret.js,samples/README.md) + +__Usage:__ + + +`node packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_measurement_protocol_secret.js` + + +----- + + + + +### Analytics_admin_service.create_property + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_property.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_property.js,samples/README.md) + +__Usage:__ + + +`node packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_property.js` + + +----- + + + + +### Analytics_admin_service.create_user_link + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_user_link.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_user_link.js,samples/README.md) + +__Usage:__ + + +`node packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_user_link.js` + + +----- + + + + +### Analytics_admin_service.create_web_data_stream + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_web_data_stream.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_web_data_stream.js,samples/README.md) + +__Usage:__ + + +`node packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_web_data_stream.js` + + +----- + + + + +### Analytics_admin_service.delete_account + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_account.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_account.js,samples/README.md) + +__Usage:__ + + +`node packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_account.js` + + +----- + + + + +### Analytics_admin_service.delete_android_app_data_stream + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_android_app_data_stream.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_android_app_data_stream.js,samples/README.md) + +__Usage:__ + + +`node packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_android_app_data_stream.js` + + +----- + + + + +### Analytics_admin_service.delete_conversion_event + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_conversion_event.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_conversion_event.js,samples/README.md) + +__Usage:__ + + +`node packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_conversion_event.js` + + +----- + + + + +### Analytics_admin_service.delete_data_stream + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_data_stream.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_data_stream.js,samples/README.md) + +__Usage:__ + + +`node packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_data_stream.js` + + +----- + + + + +### Analytics_admin_service.delete_display_video360_advertiser_link + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_display_video360_advertiser_link.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_display_video360_advertiser_link.js,samples/README.md) + +__Usage:__ + + +`node packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_display_video360_advertiser_link.js` + + +----- + + + + +### Analytics_admin_service.delete_display_video360_advertiser_link_proposal + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_display_video360_advertiser_link_proposal.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_display_video360_advertiser_link_proposal.js,samples/README.md) + +__Usage:__ + + +`node packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_display_video360_advertiser_link_proposal.js` + + +----- + + + + +### Analytics_admin_service.delete_firebase_link + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_firebase_link.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_firebase_link.js,samples/README.md) + +__Usage:__ + + +`node packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_firebase_link.js` + + +----- + + + + +### Analytics_admin_service.delete_google_ads_link + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_google_ads_link.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_google_ads_link.js,samples/README.md) + +__Usage:__ + + +`node packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_google_ads_link.js` + + +----- + + + + +### Analytics_admin_service.delete_ios_app_data_stream + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_ios_app_data_stream.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_ios_app_data_stream.js,samples/README.md) + +__Usage:__ + + +`node packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_ios_app_data_stream.js` + + +----- + + + + +### Analytics_admin_service.delete_measurement_protocol_secret + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_measurement_protocol_secret.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_measurement_protocol_secret.js,samples/README.md) + +__Usage:__ + + +`node packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_measurement_protocol_secret.js` + + +----- + + + + +### Analytics_admin_service.delete_property + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_property.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_property.js,samples/README.md) + +__Usage:__ + + +`node packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_property.js` + + +----- + + + + +### Analytics_admin_service.delete_user_link + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_user_link.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_user_link.js,samples/README.md) + +__Usage:__ + + +`node packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_user_link.js` + + +----- + + + + +### Analytics_admin_service.delete_web_data_stream + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_web_data_stream.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_web_data_stream.js,samples/README.md) + +__Usage:__ + + +`node packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_web_data_stream.js` + + +----- + + + + +### Analytics_admin_service.get_account + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_account.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_account.js,samples/README.md) + +__Usage:__ + + +`node packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_account.js` + + +----- + + + + +### Analytics_admin_service.get_android_app_data_stream + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_android_app_data_stream.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_android_app_data_stream.js,samples/README.md) + +__Usage:__ + + +`node packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_android_app_data_stream.js` + + +----- + + + + +### Analytics_admin_service.get_attribution_settings + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_attribution_settings.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_attribution_settings.js,samples/README.md) + +__Usage:__ + + +`node packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_attribution_settings.js` + + +----- + + + + +### Analytics_admin_service.get_audience + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_audience.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_audience.js,samples/README.md) + +__Usage:__ + + +`node packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_audience.js` + + +----- + + + + +### Analytics_admin_service.get_conversion_event + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_conversion_event.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_conversion_event.js,samples/README.md) + +__Usage:__ + + +`node packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_conversion_event.js` + + +----- + + + + +### Analytics_admin_service.get_custom_dimension + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_custom_dimension.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_custom_dimension.js,samples/README.md) + +__Usage:__ + + +`node packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_custom_dimension.js` + + +----- + + + + +### Analytics_admin_service.get_custom_metric + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_custom_metric.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_custom_metric.js,samples/README.md) + +__Usage:__ + + +`node packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_custom_metric.js` + + +----- + + + + +### Analytics_admin_service.get_data_retention_settings + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_data_retention_settings.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_data_retention_settings.js,samples/README.md) + +__Usage:__ + + +`node packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_data_retention_settings.js` + + +----- + + + + +### Analytics_admin_service.get_data_sharing_settings + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_data_sharing_settings.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_data_sharing_settings.js,samples/README.md) + +__Usage:__ + + +`node packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_data_sharing_settings.js` + + +----- + + + + +### Analytics_admin_service.get_data_stream + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_data_stream.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_data_stream.js,samples/README.md) + +__Usage:__ + + +`node packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_data_stream.js` + + +----- + + + + +### Analytics_admin_service.get_display_video360_advertiser_link + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_display_video360_advertiser_link.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_display_video360_advertiser_link.js,samples/README.md) + +__Usage:__ + + +`node packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_display_video360_advertiser_link.js` + + +----- + + + + +### Analytics_admin_service.get_display_video360_advertiser_link_proposal + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_display_video360_advertiser_link_proposal.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_display_video360_advertiser_link_proposal.js,samples/README.md) + +__Usage:__ + + +`node packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_display_video360_advertiser_link_proposal.js` + + +----- + + + + +### Analytics_admin_service.get_enhanced_measurement_settings + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_enhanced_measurement_settings.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_enhanced_measurement_settings.js,samples/README.md) + +__Usage:__ + + +`node packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_enhanced_measurement_settings.js` + + +----- + + + + +### Analytics_admin_service.get_global_site_tag + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_global_site_tag.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_global_site_tag.js,samples/README.md) + +__Usage:__ + + +`node packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_global_site_tag.js` + + +----- + + + + +### Analytics_admin_service.get_google_signals_settings + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_google_signals_settings.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_google_signals_settings.js,samples/README.md) + +__Usage:__ + + +`node packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_google_signals_settings.js` + + +----- + + + + +### Analytics_admin_service.get_ios_app_data_stream + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_ios_app_data_stream.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_ios_app_data_stream.js,samples/README.md) + +__Usage:__ + + +`node packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_ios_app_data_stream.js` + + +----- + + + + +### Analytics_admin_service.get_measurement_protocol_secret + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_measurement_protocol_secret.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_measurement_protocol_secret.js,samples/README.md) + +__Usage:__ + + +`node packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_measurement_protocol_secret.js` + + +----- + + + + +### Analytics_admin_service.get_property + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_property.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_property.js,samples/README.md) + +__Usage:__ + + +`node packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_property.js` + + +----- + + + + +### Analytics_admin_service.get_user_link + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_user_link.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_user_link.js,samples/README.md) + +__Usage:__ + + +`node packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_user_link.js` + + +----- + + + + +### Analytics_admin_service.get_web_data_stream + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_web_data_stream.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_web_data_stream.js,samples/README.md) + +__Usage:__ + + +`node packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_web_data_stream.js` + + +----- + + + + +### Analytics_admin_service.list_account_summaries + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_account_summaries.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_account_summaries.js,samples/README.md) + +__Usage:__ + + +`node packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_account_summaries.js` + + +----- + + + + +### Analytics_admin_service.list_accounts + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_accounts.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_accounts.js,samples/README.md) + +__Usage:__ + + +`node packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_accounts.js` + + +----- + + + + +### Analytics_admin_service.list_android_app_data_streams + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_android_app_data_streams.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_android_app_data_streams.js,samples/README.md) + +__Usage:__ + + +`node packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_android_app_data_streams.js` + + +----- + + + + +### Analytics_admin_service.list_audiences + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_audiences.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_audiences.js,samples/README.md) + +__Usage:__ + + +`node packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_audiences.js` + + +----- + + + + +### Analytics_admin_service.list_conversion_events + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_conversion_events.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_conversion_events.js,samples/README.md) + +__Usage:__ + + +`node packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_conversion_events.js` + + +----- + + + + +### Analytics_admin_service.list_custom_dimensions + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_custom_dimensions.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_custom_dimensions.js,samples/README.md) + +__Usage:__ + + +`node packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_custom_dimensions.js` + + +----- + + + + +### Analytics_admin_service.list_custom_metrics + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_custom_metrics.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_custom_metrics.js,samples/README.md) + +__Usage:__ + + +`node packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_custom_metrics.js` + + +----- + + + + +### Analytics_admin_service.list_data_streams + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_data_streams.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_data_streams.js,samples/README.md) + +__Usage:__ + + +`node packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_data_streams.js` + + +----- + + + + +### Analytics_admin_service.list_display_video360_advertiser_link_proposals + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_display_video360_advertiser_link_proposals.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_display_video360_advertiser_link_proposals.js,samples/README.md) + +__Usage:__ + + +`node packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_display_video360_advertiser_link_proposals.js` + + +----- + + + + +### Analytics_admin_service.list_display_video360_advertiser_links + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_display_video360_advertiser_links.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_display_video360_advertiser_links.js,samples/README.md) + +__Usage:__ + + +`node packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_display_video360_advertiser_links.js` + + +----- + + + + +### Analytics_admin_service.list_firebase_links + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_firebase_links.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_firebase_links.js,samples/README.md) + +__Usage:__ + + +`node packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_firebase_links.js` + + +----- + + + + +### Analytics_admin_service.list_google_ads_links + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_google_ads_links.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_google_ads_links.js,samples/README.md) + +__Usage:__ + + +`node packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_google_ads_links.js` + + +----- + + + + +### Analytics_admin_service.list_ios_app_data_streams + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_ios_app_data_streams.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_ios_app_data_streams.js,samples/README.md) + +__Usage:__ + + +`node packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_ios_app_data_streams.js` + + +----- + + + + +### Analytics_admin_service.list_measurement_protocol_secrets + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_measurement_protocol_secrets.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_measurement_protocol_secrets.js,samples/README.md) + +__Usage:__ + + +`node packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_measurement_protocol_secrets.js` + + +----- + + + + +### Analytics_admin_service.list_properties + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_properties.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_properties.js,samples/README.md) + +__Usage:__ + + +`node packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_properties.js` + + +----- + + + + +### Analytics_admin_service.list_user_links + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_user_links.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_user_links.js,samples/README.md) + +__Usage:__ + + +`node packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_user_links.js` + + +----- + + + + +### Analytics_admin_service.list_web_data_streams + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_web_data_streams.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_web_data_streams.js,samples/README.md) + +__Usage:__ + + +`node packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_web_data_streams.js` + + +----- + + + + +### Analytics_admin_service.provision_account_ticket + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.provision_account_ticket.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.provision_account_ticket.js,samples/README.md) + +__Usage:__ + + +`node packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.provision_account_ticket.js` + + +----- + + + + +### Analytics_admin_service.run_access_report + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.run_access_report.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.run_access_report.js,samples/README.md) + +__Usage:__ + + +`node packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.run_access_report.js` + + +----- + + + + +### Analytics_admin_service.search_change_history_events + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.search_change_history_events.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.search_change_history_events.js,samples/README.md) + +__Usage:__ + + +`node packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.search_change_history_events.js` + + +----- + + + + +### Analytics_admin_service.update_account + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_account.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_account.js,samples/README.md) + +__Usage:__ + + +`node packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_account.js` + + +----- + + + + +### Analytics_admin_service.update_android_app_data_stream + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_android_app_data_stream.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_android_app_data_stream.js,samples/README.md) + +__Usage:__ + + +`node packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_android_app_data_stream.js` + + +----- + + + + +### Analytics_admin_service.update_attribution_settings + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_attribution_settings.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_attribution_settings.js,samples/README.md) + +__Usage:__ + + +`node packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_attribution_settings.js` + + +----- + + + + +### Analytics_admin_service.update_audience + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_audience.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_audience.js,samples/README.md) + +__Usage:__ + + +`node packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_audience.js` + + +----- + + + + +### Analytics_admin_service.update_custom_dimension + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_custom_dimension.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_custom_dimension.js,samples/README.md) + +__Usage:__ + + +`node packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_custom_dimension.js` + + +----- + + + + +### Analytics_admin_service.update_custom_metric + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_custom_metric.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_custom_metric.js,samples/README.md) + +__Usage:__ + + +`node packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_custom_metric.js` + + +----- + + + + +### Analytics_admin_service.update_data_retention_settings + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_data_retention_settings.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_data_retention_settings.js,samples/README.md) + +__Usage:__ + + +`node packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_data_retention_settings.js` + + +----- + + + + +### Analytics_admin_service.update_data_stream + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_data_stream.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_data_stream.js,samples/README.md) + +__Usage:__ + + +`node packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_data_stream.js` + + +----- + + + + +### Analytics_admin_service.update_display_video360_advertiser_link + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_display_video360_advertiser_link.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_display_video360_advertiser_link.js,samples/README.md) + +__Usage:__ + + +`node packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_display_video360_advertiser_link.js` + + +----- + + + + +### Analytics_admin_service.update_enhanced_measurement_settings + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_enhanced_measurement_settings.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_enhanced_measurement_settings.js,samples/README.md) + +__Usage:__ + + +`node packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_enhanced_measurement_settings.js` + + +----- + + + + +### Analytics_admin_service.update_google_ads_link + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_google_ads_link.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_google_ads_link.js,samples/README.md) + +__Usage:__ + + +`node packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_google_ads_link.js` + + +----- + + + + +### Analytics_admin_service.update_google_signals_settings + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_google_signals_settings.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_google_signals_settings.js,samples/README.md) + +__Usage:__ + + +`node packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_google_signals_settings.js` + + +----- + + + + +### Analytics_admin_service.update_ios_app_data_stream + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_ios_app_data_stream.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_ios_app_data_stream.js,samples/README.md) + +__Usage:__ + + +`node packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_ios_app_data_stream.js` + + +----- + + + + +### Analytics_admin_service.update_measurement_protocol_secret + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_measurement_protocol_secret.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_measurement_protocol_secret.js,samples/README.md) + +__Usage:__ + + +`node packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_measurement_protocol_secret.js` + + +----- + + + + +### Analytics_admin_service.update_property + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_property.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_property.js,samples/README.md) + +__Usage:__ + + +`node packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_property.js` + + +----- + + + + +### Analytics_admin_service.update_user_link + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_user_link.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_user_link.js,samples/README.md) + +__Usage:__ + + +`node packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_user_link.js` + + +----- + + + + +### Analytics_admin_service.update_web_data_stream + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_web_data_stream.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_web_data_stream.js,samples/README.md) + +__Usage:__ + + +`node packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_web_data_stream.js` + + +----- + + + + +### Analytics_admin_service.acknowledge_user_data_collection + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.acknowledge_user_data_collection.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.acknowledge_user_data_collection.js,samples/README.md) + +__Usage:__ + + +`node packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.acknowledge_user_data_collection.js` + + +----- + + + + +### Analytics_admin_service.archive_custom_dimension + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.archive_custom_dimension.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.archive_custom_dimension.js,samples/README.md) + +__Usage:__ + + +`node packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.archive_custom_dimension.js` + + +----- + + + + +### Analytics_admin_service.archive_custom_metric + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.archive_custom_metric.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.archive_custom_metric.js,samples/README.md) + +__Usage:__ + + +`node packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.archive_custom_metric.js` + + +----- + + + + +### Analytics_admin_service.create_conversion_event + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.create_conversion_event.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.create_conversion_event.js,samples/README.md) + +__Usage:__ + + +`node packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.create_conversion_event.js` + + +----- + + + + +### Analytics_admin_service.create_custom_dimension + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.create_custom_dimension.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.create_custom_dimension.js,samples/README.md) + +__Usage:__ + + +`node packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.create_custom_dimension.js` + + +----- + + + + +### Analytics_admin_service.create_custom_metric + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.create_custom_metric.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.create_custom_metric.js,samples/README.md) + +__Usage:__ + + +`node packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.create_custom_metric.js` + + +----- + + + + +### Analytics_admin_service.create_data_stream + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.create_data_stream.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.create_data_stream.js,samples/README.md) + +__Usage:__ + + +`node packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.create_data_stream.js` + + +----- + + + + +### Analytics_admin_service.create_firebase_link + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.create_firebase_link.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.create_firebase_link.js,samples/README.md) + +__Usage:__ + + +`node packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.create_firebase_link.js` + + +----- + + + + +### Analytics_admin_service.create_google_ads_link + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.create_google_ads_link.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.create_google_ads_link.js,samples/README.md) + +__Usage:__ + + +`node packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.create_google_ads_link.js` + + +----- + + + + +### Analytics_admin_service.create_measurement_protocol_secret + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.create_measurement_protocol_secret.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.create_measurement_protocol_secret.js,samples/README.md) + +__Usage:__ + + +`node packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.create_measurement_protocol_secret.js` + + +----- + + + + +### Analytics_admin_service.create_property + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.create_property.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.create_property.js,samples/README.md) + +__Usage:__ + + +`node packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.create_property.js` + + +----- + + + + +### Analytics_admin_service.delete_account + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.delete_account.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.delete_account.js,samples/README.md) + +__Usage:__ + + +`node packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.delete_account.js` + + +----- + + + + +### Analytics_admin_service.delete_conversion_event + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.delete_conversion_event.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.delete_conversion_event.js,samples/README.md) + +__Usage:__ + + +`node packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.delete_conversion_event.js` + + +----- + + + + +### Analytics_admin_service.delete_data_stream + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.delete_data_stream.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.delete_data_stream.js,samples/README.md) + +__Usage:__ + + +`node packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.delete_data_stream.js` + + +----- + + + + +### Analytics_admin_service.delete_firebase_link + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.delete_firebase_link.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.delete_firebase_link.js,samples/README.md) + +__Usage:__ + + +`node packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.delete_firebase_link.js` + + +----- + + + + +### Analytics_admin_service.delete_google_ads_link + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.delete_google_ads_link.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.delete_google_ads_link.js,samples/README.md) + +__Usage:__ + + +`node packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.delete_google_ads_link.js` + + +----- + + + + +### Analytics_admin_service.delete_measurement_protocol_secret + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.delete_measurement_protocol_secret.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.delete_measurement_protocol_secret.js,samples/README.md) + +__Usage:__ + + +`node packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.delete_measurement_protocol_secret.js` + + +----- + + + + +### Analytics_admin_service.delete_property + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.delete_property.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.delete_property.js,samples/README.md) + +__Usage:__ + + +`node packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.delete_property.js` + + +----- + + + + +### Analytics_admin_service.get_account + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.get_account.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.get_account.js,samples/README.md) + +__Usage:__ + + +`node packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.get_account.js` + + +----- + + + + +### Analytics_admin_service.get_conversion_event + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.get_conversion_event.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.get_conversion_event.js,samples/README.md) + +__Usage:__ + + +`node packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.get_conversion_event.js` + + +----- + + + + +### Analytics_admin_service.get_custom_dimension + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.get_custom_dimension.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.get_custom_dimension.js,samples/README.md) + +__Usage:__ + + +`node packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.get_custom_dimension.js` + + +----- + + + + +### Analytics_admin_service.get_custom_metric + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.get_custom_metric.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.get_custom_metric.js,samples/README.md) + +__Usage:__ + + +`node packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.get_custom_metric.js` + + +----- + + + + +### Analytics_admin_service.get_data_retention_settings + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.get_data_retention_settings.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.get_data_retention_settings.js,samples/README.md) + +__Usage:__ + + +`node packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.get_data_retention_settings.js` + + +----- + + + + +### Analytics_admin_service.get_data_sharing_settings + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.get_data_sharing_settings.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.get_data_sharing_settings.js,samples/README.md) + +__Usage:__ + + +`node packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.get_data_sharing_settings.js` + + +----- + + + + +### Analytics_admin_service.get_data_stream + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.get_data_stream.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.get_data_stream.js,samples/README.md) + +__Usage:__ + + +`node packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.get_data_stream.js` + + +----- + + + + +### Analytics_admin_service.get_measurement_protocol_secret + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.get_measurement_protocol_secret.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.get_measurement_protocol_secret.js,samples/README.md) + +__Usage:__ + + +`node packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.get_measurement_protocol_secret.js` + + +----- + + + + +### Analytics_admin_service.get_property + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.get_property.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.get_property.js,samples/README.md) + +__Usage:__ + + +`node packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.get_property.js` + + +----- + + + + +### Analytics_admin_service.list_account_summaries + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.list_account_summaries.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.list_account_summaries.js,samples/README.md) + +__Usage:__ + + +`node packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.list_account_summaries.js` + + +----- + + + + +### Analytics_admin_service.list_accounts + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.list_accounts.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.list_accounts.js,samples/README.md) + +__Usage:__ + + +`node packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.list_accounts.js` + + +----- + + + + +### Analytics_admin_service.list_conversion_events + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.list_conversion_events.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.list_conversion_events.js,samples/README.md) + +__Usage:__ + + +`node packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.list_conversion_events.js` + + +----- + + + + +### Analytics_admin_service.list_custom_dimensions + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.list_custom_dimensions.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.list_custom_dimensions.js,samples/README.md) + +__Usage:__ + + +`node packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.list_custom_dimensions.js` + + +----- + + + + +### Analytics_admin_service.list_custom_metrics + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.list_custom_metrics.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.list_custom_metrics.js,samples/README.md) + +__Usage:__ + + +`node packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.list_custom_metrics.js` + + +----- + + + + +### Analytics_admin_service.list_data_streams + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.list_data_streams.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.list_data_streams.js,samples/README.md) + +__Usage:__ + + +`node packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.list_data_streams.js` + + +----- + + + + +### Analytics_admin_service.list_firebase_links + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.list_firebase_links.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.list_firebase_links.js,samples/README.md) + +__Usage:__ + + +`node packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.list_firebase_links.js` + + +----- + + + + +### Analytics_admin_service.list_google_ads_links + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.list_google_ads_links.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.list_google_ads_links.js,samples/README.md) + +__Usage:__ + + +`node packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.list_google_ads_links.js` + + +----- + + + + +### Analytics_admin_service.list_measurement_protocol_secrets + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.list_measurement_protocol_secrets.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.list_measurement_protocol_secrets.js,samples/README.md) + +__Usage:__ + + +`node packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.list_measurement_protocol_secrets.js` + + +----- + + + + +### Analytics_admin_service.list_properties + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.list_properties.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.list_properties.js,samples/README.md) + +__Usage:__ + + +`node packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.list_properties.js` + + +----- + + + + +### Analytics_admin_service.provision_account_ticket + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.provision_account_ticket.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.provision_account_ticket.js,samples/README.md) + +__Usage:__ + + +`node packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.provision_account_ticket.js` + + +----- + + + + +### Analytics_admin_service.search_change_history_events + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.search_change_history_events.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.search_change_history_events.js,samples/README.md) + +__Usage:__ + + +`node packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.search_change_history_events.js` + + +----- + + + + +### Analytics_admin_service.update_account + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.update_account.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.update_account.js,samples/README.md) + +__Usage:__ + + +`node packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.update_account.js` + + +----- + + + + +### Analytics_admin_service.update_custom_dimension + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.update_custom_dimension.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.update_custom_dimension.js,samples/README.md) + +__Usage:__ + + +`node packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.update_custom_dimension.js` + + +----- + + + + +### Analytics_admin_service.update_custom_metric + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.update_custom_metric.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.update_custom_metric.js,samples/README.md) + +__Usage:__ + + +`node packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.update_custom_metric.js` + + +----- + + + + +### Analytics_admin_service.update_data_retention_settings + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.update_data_retention_settings.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.update_data_retention_settings.js,samples/README.md) + +__Usage:__ + + +`node packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.update_data_retention_settings.js` + + +----- + + + + +### Analytics_admin_service.update_data_stream + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.update_data_stream.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.update_data_stream.js,samples/README.md) + +__Usage:__ + + +`node packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.update_data_stream.js` + + +----- + + + + +### Analytics_admin_service.update_google_ads_link + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.update_google_ads_link.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.update_google_ads_link.js,samples/README.md) + +__Usage:__ + + +`node packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.update_google_ads_link.js` + + +----- + + + + +### Analytics_admin_service.update_measurement_protocol_secret + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.update_measurement_protocol_secret.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.update_measurement_protocol_secret.js,samples/README.md) + +__Usage:__ + + +`node packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.update_measurement_protocol_secret.js` + + +----- + + + + +### Analytics_admin_service.update_property + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.update_property.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.update_property.js,samples/README.md) + +__Usage:__ + + +`node packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.update_property.js` + + +----- + + + + +### Quickstart + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/quickstart.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/quickstart.js,samples/README.md) + +__Usage:__ + + +`node packages/google-analytics-admin/samples/quickstart.js` + + +----- + + + + +### Quickstart.test + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-analytics-admin/samples/test/quickstart.test.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-analytics-admin/samples/test/quickstart.test.js,samples/README.md) + +__Usage:__ + + +`node packages/google-analytics-admin/samples/test/quickstart.test.js` + + + + + + +[shell_img]: https://gstatic.com/cloudssh/images/open-btn.png +[shell_link]: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=samples/README.md +[product-docs]: https://developers.google.com/analytics diff --git a/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.acknowledge_user_data_collection.js b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.acknowledge_user_data_collection.js new file mode 100644 index 00000000000..577eea00f55 --- /dev/null +++ b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.acknowledge_user_data_collection.js @@ -0,0 +1,72 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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(property, acknowledgement) { + // [START analyticsadmin_v1alpha_generated_AnalyticsAdminService_AcknowledgeUserDataCollection_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 property for which to acknowledge user data collection. + */ + // const property = 'abc123' + /** + * Required. An acknowledgement that the caller of this method understands the terms + * of user data collection. + * This field must contain the exact value: + * "I acknowledge that I have the necessary privacy disclosures and rights + * from my end users for the collection and processing of their data, + * including the association of such data with the visitation information + * Google Analytics collects from my site and/or app property." + */ + // const acknowledgement = 'abc123' + + // Imports the Admin library + const {AnalyticsAdminServiceClient} = require('@google-analytics/admin').v1alpha; + + // Instantiates a client + const adminClient = new AnalyticsAdminServiceClient(); + + async function callAcknowledgeUserDataCollection() { + // Construct request + const request = { + property, + acknowledgement, + }; + + // Run request + const response = await adminClient.acknowledgeUserDataCollection(request); + console.log(response); + } + + callAcknowledgeUserDataCollection(); + // [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_AcknowledgeUserDataCollection_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.approve_display_video360_advertiser_link_proposal.js b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.approve_display_video360_advertiser_link_proposal.js new file mode 100644 index 00000000000..ef5e800d9cb --- /dev/null +++ b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.approve_display_video360_advertiser_link_proposal.js @@ -0,0 +1,62 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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 analyticsadmin_v1alpha_generated_AnalyticsAdminService_ApproveDisplayVideo360AdvertiserLinkProposal_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 DisplayVideo360AdvertiserLinkProposal to approve. + * Example format: properties/1234/displayVideo360AdvertiserLinkProposals/5678 + */ + // const name = 'abc123' + + // Imports the Admin library + const {AnalyticsAdminServiceClient} = require('@google-analytics/admin').v1alpha; + + // Instantiates a client + const adminClient = new AnalyticsAdminServiceClient(); + + async function callApproveDisplayVideo360AdvertiserLinkProposal() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await adminClient.approveDisplayVideo360AdvertiserLinkProposal(request); + console.log(response); + } + + callApproveDisplayVideo360AdvertiserLinkProposal(); + // [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_ApproveDisplayVideo360AdvertiserLinkProposal_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.archive_audience.js b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.archive_audience.js new file mode 100644 index 00000000000..49ca19345d7 --- /dev/null +++ b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.archive_audience.js @@ -0,0 +1,61 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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 analyticsadmin_v1alpha_generated_AnalyticsAdminService_ArchiveAudience_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. Example format: properties/1234/audiences/5678 + */ + // const name = 'abc123' + + // Imports the Admin library + const {AnalyticsAdminServiceClient} = require('@google-analytics/admin').v1alpha; + + // Instantiates a client + const adminClient = new AnalyticsAdminServiceClient(); + + async function callArchiveAudience() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await adminClient.archiveAudience(request); + console.log(response); + } + + callArchiveAudience(); + // [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_ArchiveAudience_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.archive_custom_dimension.js b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.archive_custom_dimension.js new file mode 100644 index 00000000000..bf9f0146941 --- /dev/null +++ b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.archive_custom_dimension.js @@ -0,0 +1,62 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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 analyticsadmin_v1alpha_generated_AnalyticsAdminService_ArchiveCustomDimension_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 CustomDimension to archive. + * Example format: properties/1234/customDimensions/5678 + */ + // const name = 'abc123' + + // Imports the Admin library + const {AnalyticsAdminServiceClient} = require('@google-analytics/admin').v1alpha; + + // Instantiates a client + const adminClient = new AnalyticsAdminServiceClient(); + + async function callArchiveCustomDimension() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await adminClient.archiveCustomDimension(request); + console.log(response); + } + + callArchiveCustomDimension(); + // [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_ArchiveCustomDimension_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.archive_custom_metric.js b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.archive_custom_metric.js new file mode 100644 index 00000000000..65273540dca --- /dev/null +++ b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.archive_custom_metric.js @@ -0,0 +1,62 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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 analyticsadmin_v1alpha_generated_AnalyticsAdminService_ArchiveCustomMetric_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 CustomMetric to archive. + * Example format: properties/1234/customMetrics/5678 + */ + // const name = 'abc123' + + // Imports the Admin library + const {AnalyticsAdminServiceClient} = require('@google-analytics/admin').v1alpha; + + // Instantiates a client + const adminClient = new AnalyticsAdminServiceClient(); + + async function callArchiveCustomMetric() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await adminClient.archiveCustomMetric(request); + console.log(response); + } + + callArchiveCustomMetric(); + // [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_ArchiveCustomMetric_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.audit_user_links.js b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.audit_user_links.js new file mode 100644 index 00000000000..2a5b953e883 --- /dev/null +++ b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.audit_user_links.js @@ -0,0 +1,77 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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 analyticsadmin_v1alpha_generated_AnalyticsAdminService_AuditUserLinks_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. Example format: accounts/1234 + */ + // const parent = 'abc123' + /** + * The maximum number of user links to return. + * The service may return fewer than this value. + * If unspecified, at most 1000 user links will be returned. + * The maximum value is 5000; values above 5000 will be coerced to 5000. + */ + // const pageSize = 1234 + /** + * A page token, received from a previous `AuditUserLinks` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `AuditUserLinks` must + * match the call that provided the page token. + */ + // const pageToken = 'abc123' + + // Imports the Admin library + const {AnalyticsAdminServiceClient} = require('@google-analytics/admin').v1alpha; + + // Instantiates a client + const adminClient = new AnalyticsAdminServiceClient(); + + async function callAuditUserLinks() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = await adminClient.auditUserLinksAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callAuditUserLinks(); + // [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_AuditUserLinks_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.batch_create_user_links.js b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.batch_create_user_links.js new file mode 100644 index 00000000000..53b986704dc --- /dev/null +++ b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.batch_create_user_links.js @@ -0,0 +1,76 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent, requests) { + // [START analyticsadmin_v1alpha_generated_AnalyticsAdminService_BatchCreateUserLinks_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 or property that all user links in the request are for. + * This field is required. The parent field in the CreateUserLinkRequest + * messages must either be empty or match this field. + * Example format: accounts/1234 + */ + // const parent = 'abc123' + /** + * Optional. If set, then email the new users notifying them that they've been granted + * permissions to the resource. Regardless of whether this is set or not, + * notify_new_user field inside each individual request is ignored. + */ + // const notifyNewUsers = true + /** + * Required. The requests specifying the user links to create. + * A maximum of 1000 user links can be created in a batch. + */ + // const requests = 1234 + + // Imports the Admin library + const {AnalyticsAdminServiceClient} = require('@google-analytics/admin').v1alpha; + + // Instantiates a client + const adminClient = new AnalyticsAdminServiceClient(); + + async function callBatchCreateUserLinks() { + // Construct request + const request = { + parent, + requests, + }; + + // Run request + const response = await adminClient.batchCreateUserLinks(request); + console.log(response); + } + + callBatchCreateUserLinks(); + // [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_BatchCreateUserLinks_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.batch_delete_user_links.js b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.batch_delete_user_links.js new file mode 100644 index 00000000000..0d59cfa3ca7 --- /dev/null +++ b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.batch_delete_user_links.js @@ -0,0 +1,70 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent, requests) { + // [START analyticsadmin_v1alpha_generated_AnalyticsAdminService_BatchDeleteUserLinks_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 or property that all user links in the request are + * for. The parent of all values for user link names to delete must match this + * field. + * Example format: accounts/1234 + */ + // const parent = 'abc123' + /** + * Required. The requests specifying the user links to update. + * A maximum of 1000 user links can be updated in a batch. + */ + // const requests = 1234 + + // Imports the Admin library + const {AnalyticsAdminServiceClient} = require('@google-analytics/admin').v1alpha; + + // Instantiates a client + const adminClient = new AnalyticsAdminServiceClient(); + + async function callBatchDeleteUserLinks() { + // Construct request + const request = { + parent, + requests, + }; + + // Run request + const response = await adminClient.batchDeleteUserLinks(request); + console.log(response); + } + + callBatchDeleteUserLinks(); + // [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_BatchDeleteUserLinks_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.batch_get_user_links.js b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.batch_get_user_links.js new file mode 100644 index 00000000000..13bbb261220 --- /dev/null +++ b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.batch_get_user_links.js @@ -0,0 +1,71 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent, names) { + // [START analyticsadmin_v1alpha_generated_AnalyticsAdminService_BatchGetUserLinks_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 or property that all user links in the request are + * for. The parent of all provided values for the 'names' field must match + * this field. + * Example format: accounts/1234 + */ + // const parent = 'abc123' + /** + * Required. The names of the user links to retrieve. + * A maximum of 1000 user links can be retrieved in a batch. + * Format: accounts/{accountId}/userLinks/{userLinkId} + */ + // const names = 'abc123' + + // Imports the Admin library + const {AnalyticsAdminServiceClient} = require('@google-analytics/admin').v1alpha; + + // Instantiates a client + const adminClient = new AnalyticsAdminServiceClient(); + + async function callBatchGetUserLinks() { + // Construct request + const request = { + parent, + names, + }; + + // Run request + const response = await adminClient.batchGetUserLinks(request); + console.log(response); + } + + callBatchGetUserLinks(); + // [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_BatchGetUserLinks_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.batch_update_user_links.js b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.batch_update_user_links.js new file mode 100644 index 00000000000..dc027931097 --- /dev/null +++ b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.batch_update_user_links.js @@ -0,0 +1,70 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent, requests) { + // [START analyticsadmin_v1alpha_generated_AnalyticsAdminService_BatchUpdateUserLinks_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 or property that all user links in the request are + * for. The parent field in the UpdateUserLinkRequest messages must either be + * empty or match this field. + * Example format: accounts/1234 + */ + // const parent = 'abc123' + /** + * Required. The requests specifying the user links to update. + * A maximum of 1000 user links can be updated in a batch. + */ + // const requests = 1234 + + // Imports the Admin library + const {AnalyticsAdminServiceClient} = require('@google-analytics/admin').v1alpha; + + // Instantiates a client + const adminClient = new AnalyticsAdminServiceClient(); + + async function callBatchUpdateUserLinks() { + // Construct request + const request = { + parent, + requests, + }; + + // Run request + const response = await adminClient.batchUpdateUserLinks(request); + console.log(response); + } + + callBatchUpdateUserLinks(); + // [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_BatchUpdateUserLinks_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.cancel_display_video360_advertiser_link_proposal.js b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.cancel_display_video360_advertiser_link_proposal.js new file mode 100644 index 00000000000..2e8683b7ac3 --- /dev/null +++ b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.cancel_display_video360_advertiser_link_proposal.js @@ -0,0 +1,62 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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 analyticsadmin_v1alpha_generated_AnalyticsAdminService_CancelDisplayVideo360AdvertiserLinkProposal_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 DisplayVideo360AdvertiserLinkProposal to cancel. + * Example format: properties/1234/displayVideo360AdvertiserLinkProposals/5678 + */ + // const name = 'abc123' + + // Imports the Admin library + const {AnalyticsAdminServiceClient} = require('@google-analytics/admin').v1alpha; + + // Instantiates a client + const adminClient = new AnalyticsAdminServiceClient(); + + async function callCancelDisplayVideo360AdvertiserLinkProposal() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await adminClient.cancelDisplayVideo360AdvertiserLinkProposal(request); + console.log(response); + } + + callCancelDisplayVideo360AdvertiserLinkProposal(); + // [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_CancelDisplayVideo360AdvertiserLinkProposal_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_audience.js b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_audience.js new file mode 100644 index 00000000000..f4d10ddd1cb --- /dev/null +++ b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_audience.js @@ -0,0 +1,66 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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, audience) { + // [START analyticsadmin_v1alpha_generated_AnalyticsAdminService_CreateAudience_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. Example format: properties/1234 + */ + // const parent = 'abc123' + /** + * Required. The audience to create. + */ + // const audience = {} + + // Imports the Admin library + const {AnalyticsAdminServiceClient} = require('@google-analytics/admin').v1alpha; + + // Instantiates a client + const adminClient = new AnalyticsAdminServiceClient(); + + async function callCreateAudience() { + // Construct request + const request = { + parent, + audience, + }; + + // Run request + const response = await adminClient.createAudience(request); + console.log(response); + } + + callCreateAudience(); + // [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_CreateAudience_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_conversion_event.js b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_conversion_event.js new file mode 100644 index 00000000000..aee5cf3cde4 --- /dev/null +++ b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_conversion_event.js @@ -0,0 +1,67 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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(conversionEvent, parent) { + // [START analyticsadmin_v1alpha_generated_AnalyticsAdminService_CreateConversionEvent_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 conversion event to create. + */ + // const conversionEvent = {} + /** + * Required. The resource name of the parent property where this conversion event will + * be created. Format: properties/123 + */ + // const parent = 'abc123' + + // Imports the Admin library + const {AnalyticsAdminServiceClient} = require('@google-analytics/admin').v1alpha; + + // Instantiates a client + const adminClient = new AnalyticsAdminServiceClient(); + + async function callCreateConversionEvent() { + // Construct request + const request = { + conversionEvent, + parent, + }; + + // Run request + const response = await adminClient.createConversionEvent(request); + console.log(response); + } + + callCreateConversionEvent(); + // [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_CreateConversionEvent_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_custom_dimension.js b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_custom_dimension.js new file mode 100644 index 00000000000..581a35b489b --- /dev/null +++ b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_custom_dimension.js @@ -0,0 +1,66 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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, customDimension) { + // [START analyticsadmin_v1alpha_generated_AnalyticsAdminService_CreateCustomDimension_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. Example format: properties/1234 + */ + // const parent = 'abc123' + /** + * Required. The CustomDimension to create. + */ + // const customDimension = {} + + // Imports the Admin library + const {AnalyticsAdminServiceClient} = require('@google-analytics/admin').v1alpha; + + // Instantiates a client + const adminClient = new AnalyticsAdminServiceClient(); + + async function callCreateCustomDimension() { + // Construct request + const request = { + parent, + customDimension, + }; + + // Run request + const response = await adminClient.createCustomDimension(request); + console.log(response); + } + + callCreateCustomDimension(); + // [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_CreateCustomDimension_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_custom_metric.js b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_custom_metric.js new file mode 100644 index 00000000000..5958c9438c3 --- /dev/null +++ b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_custom_metric.js @@ -0,0 +1,66 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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, customMetric) { + // [START analyticsadmin_v1alpha_generated_AnalyticsAdminService_CreateCustomMetric_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. Example format: properties/1234 + */ + // const parent = 'abc123' + /** + * Required. The CustomMetric to create. + */ + // const customMetric = {} + + // Imports the Admin library + const {AnalyticsAdminServiceClient} = require('@google-analytics/admin').v1alpha; + + // Instantiates a client + const adminClient = new AnalyticsAdminServiceClient(); + + async function callCreateCustomMetric() { + // Construct request + const request = { + parent, + customMetric, + }; + + // Run request + const response = await adminClient.createCustomMetric(request); + console.log(response); + } + + callCreateCustomMetric(); + // [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_CreateCustomMetric_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_data_stream.js b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_data_stream.js new file mode 100644 index 00000000000..b0d1b1f8f6c --- /dev/null +++ b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_data_stream.js @@ -0,0 +1,66 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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, dataStream) { + // [START analyticsadmin_v1alpha_generated_AnalyticsAdminService_CreateDataStream_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. Example format: properties/1234 + */ + // const parent = 'abc123' + /** + * Required. The DataStream to create. + */ + // const dataStream = {} + + // Imports the Admin library + const {AnalyticsAdminServiceClient} = require('@google-analytics/admin').v1alpha; + + // Instantiates a client + const adminClient = new AnalyticsAdminServiceClient(); + + async function callCreateDataStream() { + // Construct request + const request = { + parent, + dataStream, + }; + + // Run request + const response = await adminClient.createDataStream(request); + console.log(response); + } + + callCreateDataStream(); + // [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_CreateDataStream_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_display_video360_advertiser_link.js b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_display_video360_advertiser_link.js new file mode 100644 index 00000000000..145be4cf0c2 --- /dev/null +++ b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_display_video360_advertiser_link.js @@ -0,0 +1,66 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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, displayVideo_360AdvertiserLink) { + // [START analyticsadmin_v1alpha_generated_AnalyticsAdminService_CreateDisplayVideo360AdvertiserLink_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. Example format: properties/1234 + */ + // const parent = 'abc123' + /** + * Required. The DisplayVideo360AdvertiserLink to create. + */ + // const displayVideo_360AdvertiserLink = {} + + // Imports the Admin library + const {AnalyticsAdminServiceClient} = require('@google-analytics/admin').v1alpha; + + // Instantiates a client + const adminClient = new AnalyticsAdminServiceClient(); + + async function callCreateDisplayVideo360AdvertiserLink() { + // Construct request + const request = { + parent, + displayVideo_360AdvertiserLink, + }; + + // Run request + const response = await adminClient.createDisplayVideo360AdvertiserLink(request); + console.log(response); + } + + callCreateDisplayVideo360AdvertiserLink(); + // [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_CreateDisplayVideo360AdvertiserLink_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_display_video360_advertiser_link_proposal.js b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_display_video360_advertiser_link_proposal.js new file mode 100644 index 00000000000..37270de9eab --- /dev/null +++ b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_display_video360_advertiser_link_proposal.js @@ -0,0 +1,66 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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, displayVideo_360AdvertiserLinkProposal) { + // [START analyticsadmin_v1alpha_generated_AnalyticsAdminService_CreateDisplayVideo360AdvertiserLinkProposal_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. Example format: properties/1234 + */ + // const parent = 'abc123' + /** + * Required. The DisplayVideo360AdvertiserLinkProposal to create. + */ + // const displayVideo_360AdvertiserLinkProposal = {} + + // Imports the Admin library + const {AnalyticsAdminServiceClient} = require('@google-analytics/admin').v1alpha; + + // Instantiates a client + const adminClient = new AnalyticsAdminServiceClient(); + + async function callCreateDisplayVideo360AdvertiserLinkProposal() { + // Construct request + const request = { + parent, + displayVideo_360AdvertiserLinkProposal, + }; + + // Run request + const response = await adminClient.createDisplayVideo360AdvertiserLinkProposal(request); + console.log(response); + } + + callCreateDisplayVideo360AdvertiserLinkProposal(); + // [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_CreateDisplayVideo360AdvertiserLinkProposal_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_firebase_link.js b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_firebase_link.js new file mode 100644 index 00000000000..e6d3e44c47c --- /dev/null +++ b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_firebase_link.js @@ -0,0 +1,67 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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, firebaseLink) { + // [START analyticsadmin_v1alpha_generated_AnalyticsAdminService_CreateFirebaseLink_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Format: properties/{property_id} + * Example: properties/1234 + */ + // const parent = 'abc123' + /** + * Required. The Firebase link to create. + */ + // const firebaseLink = {} + + // Imports the Admin library + const {AnalyticsAdminServiceClient} = require('@google-analytics/admin').v1alpha; + + // Instantiates a client + const adminClient = new AnalyticsAdminServiceClient(); + + async function callCreateFirebaseLink() { + // Construct request + const request = { + parent, + firebaseLink, + }; + + // Run request + const response = await adminClient.createFirebaseLink(request); + console.log(response); + } + + callCreateFirebaseLink(); + // [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_CreateFirebaseLink_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_google_ads_link.js b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_google_ads_link.js new file mode 100644 index 00000000000..90f1ace8273 --- /dev/null +++ b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_google_ads_link.js @@ -0,0 +1,66 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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, googleAdsLink) { + // [START analyticsadmin_v1alpha_generated_AnalyticsAdminService_CreateGoogleAdsLink_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. Example format: properties/1234 + */ + // const parent = 'abc123' + /** + * Required. The GoogleAdsLink to create. + */ + // const googleAdsLink = {} + + // Imports the Admin library + const {AnalyticsAdminServiceClient} = require('@google-analytics/admin').v1alpha; + + // Instantiates a client + const adminClient = new AnalyticsAdminServiceClient(); + + async function callCreateGoogleAdsLink() { + // Construct request + const request = { + parent, + googleAdsLink, + }; + + // Run request + const response = await adminClient.createGoogleAdsLink(request); + console.log(response); + } + + callCreateGoogleAdsLink(); + // [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_CreateGoogleAdsLink_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_measurement_protocol_secret.js b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_measurement_protocol_secret.js new file mode 100644 index 00000000000..91a3faf512f --- /dev/null +++ b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_measurement_protocol_secret.js @@ -0,0 +1,67 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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, measurementProtocolSecret) { + // [START analyticsadmin_v1alpha_generated_AnalyticsAdminService_CreateMeasurementProtocolSecret_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent resource where this secret will be created. + * Format: properties/{property}/dataStreams/{dataStream} + */ + // const parent = 'abc123' + /** + * Required. The measurement protocol secret to create. + */ + // const measurementProtocolSecret = {} + + // Imports the Admin library + const {AnalyticsAdminServiceClient} = require('@google-analytics/admin').v1alpha; + + // Instantiates a client + const adminClient = new AnalyticsAdminServiceClient(); + + async function callCreateMeasurementProtocolSecret() { + // Construct request + const request = { + parent, + measurementProtocolSecret, + }; + + // Run request + const response = await adminClient.createMeasurementProtocolSecret(request); + console.log(response); + } + + callCreateMeasurementProtocolSecret(); + // [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_CreateMeasurementProtocolSecret_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_property.js b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_property.js new file mode 100644 index 00000000000..dc0c9c027cf --- /dev/null +++ b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_property.js @@ -0,0 +1,62 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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(property) { + // [START analyticsadmin_v1alpha_generated_AnalyticsAdminService_CreateProperty_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 property to create. + * Note: the supplied property must specify its parent. + */ + // const property = {} + + // Imports the Admin library + const {AnalyticsAdminServiceClient} = require('@google-analytics/admin').v1alpha; + + // Instantiates a client + const adminClient = new AnalyticsAdminServiceClient(); + + async function callCreateProperty() { + // Construct request + const request = { + property, + }; + + // Run request + const response = await adminClient.createProperty(request); + console.log(response); + } + + callCreateProperty(); + // [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_CreateProperty_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_user_link.js b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_user_link.js new file mode 100644 index 00000000000..9c5d32b29b1 --- /dev/null +++ b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_user_link.js @@ -0,0 +1,71 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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, userLink) { + // [START analyticsadmin_v1alpha_generated_AnalyticsAdminService_CreateUserLink_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. Example format: accounts/1234 + */ + // const parent = 'abc123' + /** + * Optional. If set, then email the new user notifying them that they've been granted + * permissions to the resource. + */ + // const notifyNewUser = true + /** + * Required. The user link to create. + */ + // const userLink = {} + + // Imports the Admin library + const {AnalyticsAdminServiceClient} = require('@google-analytics/admin').v1alpha; + + // Instantiates a client + const adminClient = new AnalyticsAdminServiceClient(); + + async function callCreateUserLink() { + // Construct request + const request = { + parent, + userLink, + }; + + // Run request + const response = await adminClient.createUserLink(request); + console.log(response); + } + + callCreateUserLink(); + // [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_CreateUserLink_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_web_data_stream.js b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_web_data_stream.js new file mode 100644 index 00000000000..67d01614dca --- /dev/null +++ b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.create_web_data_stream.js @@ -0,0 +1,64 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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(webDataStream, parent) { + // [START analyticsadmin_v1alpha_generated_AnalyticsAdminService_CreateWebDataStream_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The web stream to create. + */ + // const webDataStream = {} + /** + * Required. The parent resource where this web data stream will be created. + * Format: properties/123 + */ + // const parent = 'abc123' + + // Imports the Admin library + const {AnalyticsAdminServiceClient} = require('@google-analytics/admin').v1alpha; + + // Instantiates a client + const adminClient = new AnalyticsAdminServiceClient(); + + async function callCreateWebDataStream() { + // Construct request + const request = { + webDataStream, + parent, + }; + + // Run request + const response = await adminClient.createWebDataStream(request); + console.log(response); + } + + callCreateWebDataStream(); + // [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_CreateWebDataStream_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_account.js b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_account.js new file mode 100644 index 00000000000..21533dbf7a9 --- /dev/null +++ b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_account.js @@ -0,0 +1,63 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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 analyticsadmin_v1alpha_generated_AnalyticsAdminService_DeleteAccount_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 Account to soft-delete. + * Format: accounts/{account} + * Example: "accounts/100" + */ + // const name = 'abc123' + + // Imports the Admin library + const {AnalyticsAdminServiceClient} = require('@google-analytics/admin').v1alpha; + + // Instantiates a client + const adminClient = new AnalyticsAdminServiceClient(); + + async function callDeleteAccount() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await adminClient.deleteAccount(request); + console.log(response); + } + + callDeleteAccount(); + // [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_DeleteAccount_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_android_app_data_stream.js b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_android_app_data_stream.js new file mode 100644 index 00000000000..49c928df4db --- /dev/null +++ b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_android_app_data_stream.js @@ -0,0 +1,60 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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 analyticsadmin_v1alpha_generated_AnalyticsAdminService_DeleteAndroidAppDataStream_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the android app data stream to delete. + * Format: properties/{property_id}/androidAppDataStreams/{stream_id} + * Example: "properties/123/androidAppDataStreams/456" + */ + // const name = 'abc123' + + // Imports the Admin library + const {AnalyticsAdminServiceClient} = require('@google-analytics/admin').v1alpha; + + // Instantiates a client + const adminClient = new AnalyticsAdminServiceClient(); + + async function callDeleteAndroidAppDataStream() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await adminClient.deleteAndroidAppDataStream(request); + console.log(response); + } + + callDeleteAndroidAppDataStream(); + // [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_DeleteAndroidAppDataStream_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_conversion_event.js b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_conversion_event.js new file mode 100644 index 00000000000..b7710f2809f --- /dev/null +++ b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_conversion_event.js @@ -0,0 +1,63 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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 analyticsadmin_v1alpha_generated_AnalyticsAdminService_DeleteConversionEvent_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 conversion event to delete. + * Format: properties/{property}/conversionEvents/{conversion_event} + * Example: "properties/123/conversionEvents/456" + */ + // const name = 'abc123' + + // Imports the Admin library + const {AnalyticsAdminServiceClient} = require('@google-analytics/admin').v1alpha; + + // Instantiates a client + const adminClient = new AnalyticsAdminServiceClient(); + + async function callDeleteConversionEvent() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await adminClient.deleteConversionEvent(request); + console.log(response); + } + + callDeleteConversionEvent(); + // [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_DeleteConversionEvent_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_data_stream.js b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_data_stream.js new file mode 100644 index 00000000000..5dd0389adbc --- /dev/null +++ b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_data_stream.js @@ -0,0 +1,62 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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 analyticsadmin_v1alpha_generated_AnalyticsAdminService_DeleteDataStream_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 DataStream to delete. + * Example format: properties/1234/dataStreams/5678 + */ + // const name = 'abc123' + + // Imports the Admin library + const {AnalyticsAdminServiceClient} = require('@google-analytics/admin').v1alpha; + + // Instantiates a client + const adminClient = new AnalyticsAdminServiceClient(); + + async function callDeleteDataStream() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await adminClient.deleteDataStream(request); + console.log(response); + } + + callDeleteDataStream(); + // [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_DeleteDataStream_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_display_video360_advertiser_link.js b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_display_video360_advertiser_link.js new file mode 100644 index 00000000000..6d7a487f5ad --- /dev/null +++ b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_display_video360_advertiser_link.js @@ -0,0 +1,62 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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 analyticsadmin_v1alpha_generated_AnalyticsAdminService_DeleteDisplayVideo360AdvertiserLink_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 DisplayVideo360AdvertiserLink to delete. + * Example format: properties/1234/displayVideo360AdvertiserLinks/5678 + */ + // const name = 'abc123' + + // Imports the Admin library + const {AnalyticsAdminServiceClient} = require('@google-analytics/admin').v1alpha; + + // Instantiates a client + const adminClient = new AnalyticsAdminServiceClient(); + + async function callDeleteDisplayVideo360AdvertiserLink() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await adminClient.deleteDisplayVideo360AdvertiserLink(request); + console.log(response); + } + + callDeleteDisplayVideo360AdvertiserLink(); + // [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_DeleteDisplayVideo360AdvertiserLink_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_display_video360_advertiser_link_proposal.js b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_display_video360_advertiser_link_proposal.js new file mode 100644 index 00000000000..41a6351661d --- /dev/null +++ b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_display_video360_advertiser_link_proposal.js @@ -0,0 +1,62 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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 analyticsadmin_v1alpha_generated_AnalyticsAdminService_DeleteDisplayVideo360AdvertiserLinkProposal_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 DisplayVideo360AdvertiserLinkProposal to delete. + * Example format: properties/1234/displayVideo360AdvertiserLinkProposals/5678 + */ + // const name = 'abc123' + + // Imports the Admin library + const {AnalyticsAdminServiceClient} = require('@google-analytics/admin').v1alpha; + + // Instantiates a client + const adminClient = new AnalyticsAdminServiceClient(); + + async function callDeleteDisplayVideo360AdvertiserLinkProposal() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await adminClient.deleteDisplayVideo360AdvertiserLinkProposal(request); + console.log(response); + } + + callDeleteDisplayVideo360AdvertiserLinkProposal(); + // [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_DeleteDisplayVideo360AdvertiserLinkProposal_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_firebase_link.js b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_firebase_link.js new file mode 100644 index 00000000000..c45d479a2b9 --- /dev/null +++ b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_firebase_link.js @@ -0,0 +1,62 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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 analyticsadmin_v1alpha_generated_AnalyticsAdminService_DeleteFirebaseLink_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Format: properties/{property_id}/firebaseLinks/{firebase_link_id} + * Example: properties/1234/firebaseLinks/5678 + */ + // const name = 'abc123' + + // Imports the Admin library + const {AnalyticsAdminServiceClient} = require('@google-analytics/admin').v1alpha; + + // Instantiates a client + const adminClient = new AnalyticsAdminServiceClient(); + + async function callDeleteFirebaseLink() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await adminClient.deleteFirebaseLink(request); + console.log(response); + } + + callDeleteFirebaseLink(); + // [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_DeleteFirebaseLink_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_google_ads_link.js b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_google_ads_link.js new file mode 100644 index 00000000000..fd73be10bd5 --- /dev/null +++ b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_google_ads_link.js @@ -0,0 +1,61 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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 analyticsadmin_v1alpha_generated_AnalyticsAdminService_DeleteGoogleAdsLink_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. Example format: properties/1234/googleAdsLinks/5678 + */ + // const name = 'abc123' + + // Imports the Admin library + const {AnalyticsAdminServiceClient} = require('@google-analytics/admin').v1alpha; + + // Instantiates a client + const adminClient = new AnalyticsAdminServiceClient(); + + async function callDeleteGoogleAdsLink() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await adminClient.deleteGoogleAdsLink(request); + console.log(response); + } + + callDeleteGoogleAdsLink(); + // [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_DeleteGoogleAdsLink_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_ios_app_data_stream.js b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_ios_app_data_stream.js new file mode 100644 index 00000000000..66f2b9dd94d --- /dev/null +++ b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_ios_app_data_stream.js @@ -0,0 +1,60 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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 analyticsadmin_v1alpha_generated_AnalyticsAdminService_DeleteIosAppDataStream_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the iOS app data stream to delete. + * Format: properties/{property_id}/iosAppDataStreams/{stream_id} + * Example: "properties/123/iosAppDataStreams/456" + */ + // const name = 'abc123' + + // Imports the Admin library + const {AnalyticsAdminServiceClient} = require('@google-analytics/admin').v1alpha; + + // Instantiates a client + const adminClient = new AnalyticsAdminServiceClient(); + + async function callDeleteIosAppDataStream() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await adminClient.deleteIosAppDataStream(request); + console.log(response); + } + + callDeleteIosAppDataStream(); + // [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_DeleteIosAppDataStream_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_measurement_protocol_secret.js b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_measurement_protocol_secret.js new file mode 100644 index 00000000000..14936d60079 --- /dev/null +++ b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_measurement_protocol_secret.js @@ -0,0 +1,63 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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 analyticsadmin_v1alpha_generated_AnalyticsAdminService_DeleteMeasurementProtocolSecret_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 MeasurementProtocolSecret to delete. + * Format: + * properties/{property}/dataStreams/{dataStream}/measurementProtocolSecrets/{measurementProtocolSecret} + */ + // const name = 'abc123' + + // Imports the Admin library + const {AnalyticsAdminServiceClient} = require('@google-analytics/admin').v1alpha; + + // Instantiates a client + const adminClient = new AnalyticsAdminServiceClient(); + + async function callDeleteMeasurementProtocolSecret() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await adminClient.deleteMeasurementProtocolSecret(request); + console.log(response); + } + + callDeleteMeasurementProtocolSecret(); + // [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_DeleteMeasurementProtocolSecret_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_property.js b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_property.js new file mode 100644 index 00000000000..7cd20c8ee49 --- /dev/null +++ b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_property.js @@ -0,0 +1,63 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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 analyticsadmin_v1alpha_generated_AnalyticsAdminService_DeleteProperty_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 Property to soft-delete. + * Format: properties/{property_id} + * Example: "properties/1000" + */ + // const name = 'abc123' + + // Imports the Admin library + const {AnalyticsAdminServiceClient} = require('@google-analytics/admin').v1alpha; + + // Instantiates a client + const adminClient = new AnalyticsAdminServiceClient(); + + async function callDeleteProperty() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await adminClient.deleteProperty(request); + console.log(response); + } + + callDeleteProperty(); + // [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_DeleteProperty_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_user_link.js b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_user_link.js new file mode 100644 index 00000000000..b4d6114d8ec --- /dev/null +++ b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_user_link.js @@ -0,0 +1,61 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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 analyticsadmin_v1alpha_generated_AnalyticsAdminService_DeleteUserLink_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. Example format: accounts/1234/userLinks/5678 + */ + // const name = 'abc123' + + // Imports the Admin library + const {AnalyticsAdminServiceClient} = require('@google-analytics/admin').v1alpha; + + // Instantiates a client + const adminClient = new AnalyticsAdminServiceClient(); + + async function callDeleteUserLink() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await adminClient.deleteUserLink(request); + console.log(response); + } + + callDeleteUserLink(); + // [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_DeleteUserLink_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_web_data_stream.js b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_web_data_stream.js new file mode 100644 index 00000000000..cf8c8fe6f19 --- /dev/null +++ b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.delete_web_data_stream.js @@ -0,0 +1,60 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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 analyticsadmin_v1alpha_generated_AnalyticsAdminService_DeleteWebDataStream_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the web data stream to delete. + * Format: properties/{property_id}/webDataStreams/{stream_id} + * Example: "properties/123/webDataStreams/456" + */ + // const name = 'abc123' + + // Imports the Admin library + const {AnalyticsAdminServiceClient} = require('@google-analytics/admin').v1alpha; + + // Instantiates a client + const adminClient = new AnalyticsAdminServiceClient(); + + async function callDeleteWebDataStream() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await adminClient.deleteWebDataStream(request); + console.log(response); + } + + callDeleteWebDataStream(); + // [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_DeleteWebDataStream_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_account.js b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_account.js new file mode 100644 index 00000000000..19782ca0f50 --- /dev/null +++ b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_account.js @@ -0,0 +1,63 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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 analyticsadmin_v1alpha_generated_AnalyticsAdminService_GetAccount_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 account to lookup. + * Format: accounts/{account} + * Example: "accounts/100" + */ + // const name = 'abc123' + + // Imports the Admin library + const {AnalyticsAdminServiceClient} = require('@google-analytics/admin').v1alpha; + + // Instantiates a client + const adminClient = new AnalyticsAdminServiceClient(); + + async function callGetAccount() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await adminClient.getAccount(request); + console.log(response); + } + + callGetAccount(); + // [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_GetAccount_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_android_app_data_stream.js b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_android_app_data_stream.js new file mode 100644 index 00000000000..76889efa1eb --- /dev/null +++ b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_android_app_data_stream.js @@ -0,0 +1,60 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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 analyticsadmin_v1alpha_generated_AnalyticsAdminService_GetAndroidAppDataStream_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the android app data stream to lookup. + * Format: properties/{property_id}/androidAppDataStreams/{stream_id} + * Example: "properties/123/androidAppDataStreams/456" + */ + // const name = 'abc123' + + // Imports the Admin library + const {AnalyticsAdminServiceClient} = require('@google-analytics/admin').v1alpha; + + // Instantiates a client + const adminClient = new AnalyticsAdminServiceClient(); + + async function callGetAndroidAppDataStream() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await adminClient.getAndroidAppDataStream(request); + console.log(response); + } + + callGetAndroidAppDataStream(); + // [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_GetAndroidAppDataStream_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_attribution_settings.js b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_attribution_settings.js new file mode 100644 index 00000000000..0a673ca00a9 --- /dev/null +++ b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_attribution_settings.js @@ -0,0 +1,62 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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 analyticsadmin_v1alpha_generated_AnalyticsAdminService_GetAttributionSettings_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 attribution settings to retrieve. + * Format: properties/{property}/attributionSettings + */ + // const name = 'abc123' + + // Imports the Admin library + const {AnalyticsAdminServiceClient} = require('@google-analytics/admin').v1alpha; + + // Instantiates a client + const adminClient = new AnalyticsAdminServiceClient(); + + async function callGetAttributionSettings() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await adminClient.getAttributionSettings(request); + console.log(response); + } + + callGetAttributionSettings(); + // [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_GetAttributionSettings_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_audience.js b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_audience.js new file mode 100644 index 00000000000..e29af31a855 --- /dev/null +++ b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_audience.js @@ -0,0 +1,62 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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 analyticsadmin_v1alpha_generated_AnalyticsAdminService_GetAudience_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the Audience to get. + * Example format: properties/1234/audiences/5678 + */ + // const name = 'abc123' + + // Imports the Admin library + const {AnalyticsAdminServiceClient} = require('@google-analytics/admin').v1alpha; + + // Instantiates a client + const adminClient = new AnalyticsAdminServiceClient(); + + async function callGetAudience() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await adminClient.getAudience(request); + console.log(response); + } + + callGetAudience(); + // [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_GetAudience_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_conversion_event.js b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_conversion_event.js new file mode 100644 index 00000000000..ce65b739bbc --- /dev/null +++ b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_conversion_event.js @@ -0,0 +1,63 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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 analyticsadmin_v1alpha_generated_AnalyticsAdminService_GetConversionEvent_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 conversion event to retrieve. + * Format: properties/{property}/conversionEvents/{conversion_event} + * Example: "properties/123/conversionEvents/456" + */ + // const name = 'abc123' + + // Imports the Admin library + const {AnalyticsAdminServiceClient} = require('@google-analytics/admin').v1alpha; + + // Instantiates a client + const adminClient = new AnalyticsAdminServiceClient(); + + async function callGetConversionEvent() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await adminClient.getConversionEvent(request); + console.log(response); + } + + callGetConversionEvent(); + // [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_GetConversionEvent_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_custom_dimension.js b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_custom_dimension.js new file mode 100644 index 00000000000..96f1e3452dd --- /dev/null +++ b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_custom_dimension.js @@ -0,0 +1,62 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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 analyticsadmin_v1alpha_generated_AnalyticsAdminService_GetCustomDimension_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 CustomDimension to get. + * Example format: properties/1234/customDimensions/5678 + */ + // const name = 'abc123' + + // Imports the Admin library + const {AnalyticsAdminServiceClient} = require('@google-analytics/admin').v1alpha; + + // Instantiates a client + const adminClient = new AnalyticsAdminServiceClient(); + + async function callGetCustomDimension() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await adminClient.getCustomDimension(request); + console.log(response); + } + + callGetCustomDimension(); + // [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_GetCustomDimension_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_custom_metric.js b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_custom_metric.js new file mode 100644 index 00000000000..5e8514bfedb --- /dev/null +++ b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_custom_metric.js @@ -0,0 +1,62 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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 analyticsadmin_v1alpha_generated_AnalyticsAdminService_GetCustomMetric_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 CustomMetric to get. + * Example format: properties/1234/customMetrics/5678 + */ + // const name = 'abc123' + + // Imports the Admin library + const {AnalyticsAdminServiceClient} = require('@google-analytics/admin').v1alpha; + + // Instantiates a client + const adminClient = new AnalyticsAdminServiceClient(); + + async function callGetCustomMetric() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await adminClient.getCustomMetric(request); + console.log(response); + } + + callGetCustomMetric(); + // [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_GetCustomMetric_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_data_retention_settings.js b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_data_retention_settings.js new file mode 100644 index 00000000000..643ff30678b --- /dev/null +++ b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_data_retention_settings.js @@ -0,0 +1,64 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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 analyticsadmin_v1alpha_generated_AnalyticsAdminService_GetDataRetentionSettings_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 settings to lookup. + * Format: + * properties/{property}/dataRetentionSettings + * Example: "properties/1000/dataRetentionSettings" + */ + // const name = 'abc123' + + // Imports the Admin library + const {AnalyticsAdminServiceClient} = require('@google-analytics/admin').v1alpha; + + // Instantiates a client + const adminClient = new AnalyticsAdminServiceClient(); + + async function callGetDataRetentionSettings() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await adminClient.getDataRetentionSettings(request); + console.log(response); + } + + callGetDataRetentionSettings(); + // [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_GetDataRetentionSettings_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_data_sharing_settings.js b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_data_sharing_settings.js new file mode 100644 index 00000000000..a98b542bf8f --- /dev/null +++ b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_data_sharing_settings.js @@ -0,0 +1,63 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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 analyticsadmin_v1alpha_generated_AnalyticsAdminService_GetDataSharingSettings_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 settings to lookup. + * Format: accounts/{account}/dataSharingSettings + * Example: "accounts/1000/dataSharingSettings" + */ + // const name = 'abc123' + + // Imports the Admin library + const {AnalyticsAdminServiceClient} = require('@google-analytics/admin').v1alpha; + + // Instantiates a client + const adminClient = new AnalyticsAdminServiceClient(); + + async function callGetDataSharingSettings() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await adminClient.getDataSharingSettings(request); + console.log(response); + } + + callGetDataSharingSettings(); + // [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_GetDataSharingSettings_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_data_stream.js b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_data_stream.js new file mode 100644 index 00000000000..c41a6c08bcd --- /dev/null +++ b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_data_stream.js @@ -0,0 +1,62 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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 analyticsadmin_v1alpha_generated_AnalyticsAdminService_GetDataStream_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 DataStream to get. + * Example format: properties/1234/dataStreams/5678 + */ + // const name = 'abc123' + + // Imports the Admin library + const {AnalyticsAdminServiceClient} = require('@google-analytics/admin').v1alpha; + + // Instantiates a client + const adminClient = new AnalyticsAdminServiceClient(); + + async function callGetDataStream() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await adminClient.getDataStream(request); + console.log(response); + } + + callGetDataStream(); + // [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_GetDataStream_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_display_video360_advertiser_link.js b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_display_video360_advertiser_link.js new file mode 100644 index 00000000000..9d646a5d016 --- /dev/null +++ b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_display_video360_advertiser_link.js @@ -0,0 +1,62 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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 analyticsadmin_v1alpha_generated_AnalyticsAdminService_GetDisplayVideo360AdvertiserLink_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 DisplayVideo360AdvertiserLink to get. + * Example format: properties/1234/displayVideo360AdvertiserLink/5678 + */ + // const name = 'abc123' + + // Imports the Admin library + const {AnalyticsAdminServiceClient} = require('@google-analytics/admin').v1alpha; + + // Instantiates a client + const adminClient = new AnalyticsAdminServiceClient(); + + async function callGetDisplayVideo360AdvertiserLink() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await adminClient.getDisplayVideo360AdvertiserLink(request); + console.log(response); + } + + callGetDisplayVideo360AdvertiserLink(); + // [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_GetDisplayVideo360AdvertiserLink_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_display_video360_advertiser_link_proposal.js b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_display_video360_advertiser_link_proposal.js new file mode 100644 index 00000000000..a27aba5d68b --- /dev/null +++ b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_display_video360_advertiser_link_proposal.js @@ -0,0 +1,62 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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 analyticsadmin_v1alpha_generated_AnalyticsAdminService_GetDisplayVideo360AdvertiserLinkProposal_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 DisplayVideo360AdvertiserLinkProposal to get. + * Example format: properties/1234/displayVideo360AdvertiserLinkProposals/5678 + */ + // const name = 'abc123' + + // Imports the Admin library + const {AnalyticsAdminServiceClient} = require('@google-analytics/admin').v1alpha; + + // Instantiates a client + const adminClient = new AnalyticsAdminServiceClient(); + + async function callGetDisplayVideo360AdvertiserLinkProposal() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await adminClient.getDisplayVideo360AdvertiserLinkProposal(request); + console.log(response); + } + + callGetDisplayVideo360AdvertiserLinkProposal(); + // [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_GetDisplayVideo360AdvertiserLinkProposal_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_enhanced_measurement_settings.js b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_enhanced_measurement_settings.js new file mode 100644 index 00000000000..c015586ecec --- /dev/null +++ b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_enhanced_measurement_settings.js @@ -0,0 +1,56 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + +function main(name) { + // [START analyticsadmin_v1alpha_generated_AnalyticsAdminService_GetEnhancedMeasurementSettings_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the settings to lookup. + * Format: + * properties/{property_id}/webDataStreams/{stream_id}/enhancedMeasurementSettings + * Example: "properties/1000/webDataStreams/2000/enhancedMeasurementSettings" + */ + // const name = 'abc123' + + // Imports the Admin library + const {AnalyticsAdminServiceClient} = + require('@google-analytics/admin').v1alpha; + + // Instantiates a client + const adminClient = new AnalyticsAdminServiceClient(); + + async function callGetEnhancedMeasurementSettings() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await adminClient.getEnhancedMeasurementSettings(request); + console.log(response); + } + + callGetEnhancedMeasurementSettings(); + // [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_GetEnhancedMeasurementSettings_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_global_site_tag.js b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_global_site_tag.js new file mode 100644 index 00000000000..077e52524fd --- /dev/null +++ b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_global_site_tag.js @@ -0,0 +1,64 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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 analyticsadmin_v1alpha_generated_AnalyticsAdminService_GetGlobalSiteTag_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 site tag to lookup. + * Note that site tags are singletons and do not have unique IDs. + * Format: properties/{property_id}/dataStreams/{stream_id}/globalSiteTag + * Example: "properties/123/dataStreams/456/globalSiteTag" + */ + // const name = 'abc123' + + // Imports the Admin library + const {AnalyticsAdminServiceClient} = require('@google-analytics/admin').v1alpha; + + // Instantiates a client + const adminClient = new AnalyticsAdminServiceClient(); + + async function callGetGlobalSiteTag() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await adminClient.getGlobalSiteTag(request); + console.log(response); + } + + callGetGlobalSiteTag(); + // [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_GetGlobalSiteTag_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_google_signals_settings.js b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_google_signals_settings.js new file mode 100644 index 00000000000..6511ece8b63 --- /dev/null +++ b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_google_signals_settings.js @@ -0,0 +1,62 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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 analyticsadmin_v1alpha_generated_AnalyticsAdminService_GetGoogleSignalsSettings_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 google signals settings to retrieve. + * Format: properties/{property}/googleSignalsSettings + */ + // const name = 'abc123' + + // Imports the Admin library + const {AnalyticsAdminServiceClient} = require('@google-analytics/admin').v1alpha; + + // Instantiates a client + const adminClient = new AnalyticsAdminServiceClient(); + + async function callGetGoogleSignalsSettings() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await adminClient.getGoogleSignalsSettings(request); + console.log(response); + } + + callGetGoogleSignalsSettings(); + // [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_GetGoogleSignalsSettings_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_ios_app_data_stream.js b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_ios_app_data_stream.js new file mode 100644 index 00000000000..7101b4ffb87 --- /dev/null +++ b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_ios_app_data_stream.js @@ -0,0 +1,60 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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 analyticsadmin_v1alpha_generated_AnalyticsAdminService_GetIosAppDataStream_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the iOS app data stream to lookup. + * Format: properties/{property_id}/iosAppDataStreams/{stream_id} + * Example: "properties/123/iosAppDataStreams/456" + */ + // const name = 'abc123' + + // Imports the Admin library + const {AnalyticsAdminServiceClient} = require('@google-analytics/admin').v1alpha; + + // Instantiates a client + const adminClient = new AnalyticsAdminServiceClient(); + + async function callGetIosAppDataStream() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await adminClient.getIosAppDataStream(request); + console.log(response); + } + + callGetIosAppDataStream(); + // [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_GetIosAppDataStream_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_measurement_protocol_secret.js b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_measurement_protocol_secret.js new file mode 100644 index 00000000000..e8522f62f34 --- /dev/null +++ b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_measurement_protocol_secret.js @@ -0,0 +1,63 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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 analyticsadmin_v1alpha_generated_AnalyticsAdminService_GetMeasurementProtocolSecret_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 measurement protocol secret to lookup. + * Format: + * properties/{property}/dataStreams/{dataStream}/measurementProtocolSecrets/{measurementProtocolSecret} + */ + // const name = 'abc123' + + // Imports the Admin library + const {AnalyticsAdminServiceClient} = require('@google-analytics/admin').v1alpha; + + // Instantiates a client + const adminClient = new AnalyticsAdminServiceClient(); + + async function callGetMeasurementProtocolSecret() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await adminClient.getMeasurementProtocolSecret(request); + console.log(response); + } + + callGetMeasurementProtocolSecret(); + // [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_GetMeasurementProtocolSecret_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_property.js b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_property.js new file mode 100644 index 00000000000..61df45cee8c --- /dev/null +++ b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_property.js @@ -0,0 +1,63 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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 analyticsadmin_v1alpha_generated_AnalyticsAdminService_GetProperty_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 property to lookup. + * Format: properties/{property_id} + * Example: "properties/1000" + */ + // const name = 'abc123' + + // Imports the Admin library + const {AnalyticsAdminServiceClient} = require('@google-analytics/admin').v1alpha; + + // Instantiates a client + const adminClient = new AnalyticsAdminServiceClient(); + + async function callGetProperty() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await adminClient.getProperty(request); + console.log(response); + } + + callGetProperty(); + // [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_GetProperty_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_user_link.js b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_user_link.js new file mode 100644 index 00000000000..fefd655bd45 --- /dev/null +++ b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_user_link.js @@ -0,0 +1,61 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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 analyticsadmin_v1alpha_generated_AnalyticsAdminService_GetUserLink_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. Example format: accounts/1234/userLinks/5678 + */ + // const name = 'abc123' + + // Imports the Admin library + const {AnalyticsAdminServiceClient} = require('@google-analytics/admin').v1alpha; + + // Instantiates a client + const adminClient = new AnalyticsAdminServiceClient(); + + async function callGetUserLink() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await adminClient.getUserLink(request); + console.log(response); + } + + callGetUserLink(); + // [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_GetUserLink_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_web_data_stream.js b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_web_data_stream.js new file mode 100644 index 00000000000..db5780ee37a --- /dev/null +++ b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.get_web_data_stream.js @@ -0,0 +1,60 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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 analyticsadmin_v1alpha_generated_AnalyticsAdminService_GetWebDataStream_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the web data stream to lookup. + * Format: properties/{property_id}/webDataStreams/{stream_id} + * Example: "properties/123/webDataStreams/456" + */ + // const name = 'abc123' + + // Imports the Admin library + const {AnalyticsAdminServiceClient} = require('@google-analytics/admin').v1alpha; + + // Instantiates a client + const adminClient = new AnalyticsAdminServiceClient(); + + async function callGetWebDataStream() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await adminClient.getWebDataStream(request); + console.log(response); + } + + callGetWebDataStream(); + // [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_GetWebDataStream_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_account_summaries.js b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_account_summaries.js new file mode 100644 index 00000000000..dafe9e1bb5b --- /dev/null +++ b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_account_summaries.js @@ -0,0 +1,72 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main() { + // [START analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListAccountSummaries_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. + */ + /** + * The maximum number of AccountSummary resources to return. The service may + * return fewer than this value, even if there are additional pages. + * If unspecified, at most 50 resources will be returned. + * The maximum value is 200; (higher values will be coerced to the maximum) + */ + // const pageSize = 1234 + /** + * A page token, received from a previous `ListAccountSummaries` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListAccountSummaries` + * must match the call that provided the page token. + */ + // const pageToken = 'abc123' + + // Imports the Admin library + const {AnalyticsAdminServiceClient} = require('@google-analytics/admin').v1alpha; + + // Instantiates a client + const adminClient = new AnalyticsAdminServiceClient(); + + async function callListAccountSummaries() { + // Construct request + const request = { + }; + + // Run request + const iterable = await adminClient.listAccountSummariesAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListAccountSummaries(); + // [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListAccountSummaries_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_accounts.js b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_accounts.js new file mode 100644 index 00000000000..68a9749b57d --- /dev/null +++ b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_accounts.js @@ -0,0 +1,78 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main() { + // [START analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListAccounts_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. + */ + /** + * The maximum number of resources to return. The service may return + * fewer than this value, even if there are additional pages. + * If unspecified, at most 50 resources will be returned. + * The maximum value is 200; (higher values will be coerced to the maximum) + */ + // const pageSize = 1234 + /** + * A page token, received from a previous `ListAccounts` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListAccounts` must + * match the call that provided the page token. + */ + // const pageToken = 'abc123' + /** + * Whether to include soft-deleted (ie: "trashed") Accounts in the + * results. Accounts can be inspected to determine whether they are deleted or + * not. + */ + // const showDeleted = true + + // Imports the Admin library + const {AnalyticsAdminServiceClient} = require('@google-analytics/admin').v1alpha; + + // Instantiates a client + const adminClient = new AnalyticsAdminServiceClient(); + + async function callListAccounts() { + // Construct request + const request = { + }; + + // Run request + const iterable = await adminClient.listAccountsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListAccounts(); + // [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListAccounts_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_android_app_data_streams.js b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_android_app_data_streams.js new file mode 100644 index 00000000000..e22d7ffcf77 --- /dev/null +++ b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_android_app_data_streams.js @@ -0,0 +1,76 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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 analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListAndroidAppDataStreams_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the parent property. + * For example, to limit results to app streams under the property with Id + * 123: "properties/123" + */ + // const parent = 'abc123' + /** + * The maximum number of resources to return. + * If unspecified, at most 50 resources will be returned. + * The maximum value is 200; (higher values will be coerced to the maximum) + */ + // const pageSize = 1234 + /** + * A page token, received from a previous call. Provide this to + * retrieve the subsequent page. + * When paginating, all other parameters provided to + * `ListAndroidAppDataStreams` must match the call that provided the page + * token. + */ + // const pageToken = 'abc123' + + // Imports the Admin library + const {AnalyticsAdminServiceClient} = require('@google-analytics/admin').v1alpha; + + // Instantiates a client + const adminClient = new AnalyticsAdminServiceClient(); + + async function callListAndroidAppDataStreams() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = await adminClient.listAndroidAppDataStreamsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListAndroidAppDataStreams(); + // [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListAndroidAppDataStreams_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_audiences.js b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_audiences.js new file mode 100644 index 00000000000..852b499ee49 --- /dev/null +++ b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_audiences.js @@ -0,0 +1,76 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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 analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListAudiences_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. Example format: properties/1234 + */ + // const parent = 'abc123' + /** + * The maximum number of resources to return. + * If unspecified, at most 50 resources will be returned. + * The maximum value is 200 (higher values will be coerced to the maximum). + */ + // const pageSize = 1234 + /** + * A page token, received from a previous `ListAudiences` call. Provide this + * to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListAudiences` must + * match the call that provided the page token. + */ + // const pageToken = 'abc123' + + // Imports the Admin library + const {AnalyticsAdminServiceClient} = require('@google-analytics/admin').v1alpha; + + // Instantiates a client + const adminClient = new AnalyticsAdminServiceClient(); + + async function callListAudiences() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = await adminClient.listAudiencesAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListAudiences(); + // [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListAudiences_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_conversion_events.js b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_conversion_events.js new file mode 100644 index 00000000000..f3c374a67b6 --- /dev/null +++ b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_conversion_events.js @@ -0,0 +1,77 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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 analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListConversionEvents_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 parent property. + * Example: 'properties/123' + */ + // const parent = 'abc123' + /** + * The maximum number of resources to return. + * If unspecified, at most 50 resources will be returned. + * The maximum value is 200; (higher values will be coerced to the maximum) + */ + // const pageSize = 1234 + /** + * A page token, received from a previous `ListConversionEvents` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListConversionEvents` + * must match the call that provided the page token. + */ + // const pageToken = 'abc123' + + // Imports the Admin library + const {AnalyticsAdminServiceClient} = require('@google-analytics/admin').v1alpha; + + // Instantiates a client + const adminClient = new AnalyticsAdminServiceClient(); + + async function callListConversionEvents() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = await adminClient.listConversionEventsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListConversionEvents(); + // [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListConversionEvents_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_custom_dimensions.js b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_custom_dimensions.js new file mode 100644 index 00000000000..3744725dee7 --- /dev/null +++ b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_custom_dimensions.js @@ -0,0 +1,76 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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 analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListCustomDimensions_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. Example format: properties/1234 + */ + // const parent = 'abc123' + /** + * The maximum number of resources to return. + * If unspecified, at most 50 resources will be returned. + * The maximum value is 200 (higher values will be coerced to the maximum). + */ + // const pageSize = 1234 + /** + * A page token, received from a previous `ListCustomDimensions` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListCustomDimensions` + * must match the call that provided the page token. + */ + // const pageToken = 'abc123' + + // Imports the Admin library + const {AnalyticsAdminServiceClient} = require('@google-analytics/admin').v1alpha; + + // Instantiates a client + const adminClient = new AnalyticsAdminServiceClient(); + + async function callListCustomDimensions() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = await adminClient.listCustomDimensionsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListCustomDimensions(); + // [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListCustomDimensions_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_custom_metrics.js b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_custom_metrics.js new file mode 100644 index 00000000000..465f8baf35e --- /dev/null +++ b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_custom_metrics.js @@ -0,0 +1,76 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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 analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListCustomMetrics_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. Example format: properties/1234 + */ + // const parent = 'abc123' + /** + * The maximum number of resources to return. + * If unspecified, at most 50 resources will be returned. + * The maximum value is 200 (higher values will be coerced to the maximum). + */ + // const pageSize = 1234 + /** + * A page token, received from a previous `ListCustomMetrics` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListCustomMetrics` must + * match the call that provided the page token. + */ + // const pageToken = 'abc123' + + // Imports the Admin library + const {AnalyticsAdminServiceClient} = require('@google-analytics/admin').v1alpha; + + // Instantiates a client + const adminClient = new AnalyticsAdminServiceClient(); + + async function callListCustomMetrics() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = await adminClient.listCustomMetricsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListCustomMetrics(); + // [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListCustomMetrics_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_data_streams.js b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_data_streams.js new file mode 100644 index 00000000000..eb4dc601bdb --- /dev/null +++ b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_data_streams.js @@ -0,0 +1,76 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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 analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListDataStreams_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. Example format: properties/1234 + */ + // const parent = 'abc123' + /** + * The maximum number of resources to return. + * If unspecified, at most 50 resources will be returned. + * The maximum value is 200 (higher values will be coerced to the maximum). + */ + // const pageSize = 1234 + /** + * A page token, received from a previous `ListDataStreams` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListDataStreams` must + * match the call that provided the page token. + */ + // const pageToken = 'abc123' + + // Imports the Admin library + const {AnalyticsAdminServiceClient} = require('@google-analytics/admin').v1alpha; + + // Instantiates a client + const adminClient = new AnalyticsAdminServiceClient(); + + async function callListDataStreams() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = await adminClient.listDataStreamsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListDataStreams(); + // [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListDataStreams_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_display_video360_advertiser_link_proposals.js b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_display_video360_advertiser_link_proposals.js new file mode 100644 index 00000000000..4515609feb3 --- /dev/null +++ b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_display_video360_advertiser_link_proposals.js @@ -0,0 +1,78 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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 analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListDisplayVideo360AdvertiserLinkProposals_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. Example format: properties/1234 + */ + // const parent = 'abc123' + /** + * The maximum number of resources to return. + * If unspecified, at most 50 resources will be returned. + * The maximum value is 200 (higher values will be coerced to the maximum). + */ + // const pageSize = 1234 + /** + * A page token, received from a previous + * `ListDisplayVideo360AdvertiserLinkProposals` call. Provide this to retrieve + * the subsequent page. + * When paginating, all other parameters provided to + * `ListDisplayVideo360AdvertiserLinkProposals` must match the call that + * provided the page token. + */ + // const pageToken = 'abc123' + + // Imports the Admin library + const {AnalyticsAdminServiceClient} = require('@google-analytics/admin').v1alpha; + + // Instantiates a client + const adminClient = new AnalyticsAdminServiceClient(); + + async function callListDisplayVideo360AdvertiserLinkProposals() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = await adminClient.listDisplayVideo360AdvertiserLinkProposalsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListDisplayVideo360AdvertiserLinkProposals(); + // [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListDisplayVideo360AdvertiserLinkProposals_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_display_video360_advertiser_links.js b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_display_video360_advertiser_links.js new file mode 100644 index 00000000000..e55c44b51b4 --- /dev/null +++ b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_display_video360_advertiser_links.js @@ -0,0 +1,77 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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 analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListDisplayVideo360AdvertiserLinks_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. Example format: properties/1234 + */ + // const parent = 'abc123' + /** + * The maximum number of resources to return. + * If unspecified, at most 50 resources will be returned. + * The maximum value is 200 (higher values will be coerced to the maximum). + */ + // const pageSize = 1234 + /** + * A page token, received from a previous `ListDisplayVideo360AdvertiserLinks` + * call. Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * `ListDisplayVideo360AdvertiserLinks` must match the call that provided the + * page token. + */ + // const pageToken = 'abc123' + + // Imports the Admin library + const {AnalyticsAdminServiceClient} = require('@google-analytics/admin').v1alpha; + + // Instantiates a client + const adminClient = new AnalyticsAdminServiceClient(); + + async function callListDisplayVideo360AdvertiserLinks() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = await adminClient.listDisplayVideo360AdvertiserLinksAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListDisplayVideo360AdvertiserLinks(); + // [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListDisplayVideo360AdvertiserLinks_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_firebase_links.js b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_firebase_links.js new file mode 100644 index 00000000000..bf132250083 --- /dev/null +++ b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_firebase_links.js @@ -0,0 +1,78 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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 analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListFirebaseLinks_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Format: properties/{property_id} + * Example: properties/1234 + */ + // const parent = 'abc123' + /** + * The maximum number of resources to return. The service may return + * fewer than this value, even if there are additional pages. + * If unspecified, at most 50 resources will be returned. + * The maximum value is 200; (higher values will be coerced to the maximum) + */ + // const pageSize = 1234 + /** + * A page token, received from a previous `ListFirebaseLinks` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListProperties` must + * match the call that provided the page token. + */ + // const pageToken = 'abc123' + + // Imports the Admin library + const {AnalyticsAdminServiceClient} = require('@google-analytics/admin').v1alpha; + + // Instantiates a client + const adminClient = new AnalyticsAdminServiceClient(); + + async function callListFirebaseLinks() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = await adminClient.listFirebaseLinksAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListFirebaseLinks(); + // [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListFirebaseLinks_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_google_ads_links.js b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_google_ads_links.js new file mode 100644 index 00000000000..261283aad0f --- /dev/null +++ b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_google_ads_links.js @@ -0,0 +1,76 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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 analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListGoogleAdsLinks_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. Example format: properties/1234 + */ + // const parent = 'abc123' + /** + * The maximum number of resources to return. + * If unspecified, at most 50 resources will be returned. + * The maximum value is 200 (higher values will be coerced to the maximum). + */ + // const pageSize = 1234 + /** + * A page token, received from a previous `ListGoogleAdsLinks` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListGoogleAdsLinks` must + * match the call that provided the page token. + */ + // const pageToken = 'abc123' + + // Imports the Admin library + const {AnalyticsAdminServiceClient} = require('@google-analytics/admin').v1alpha; + + // Instantiates a client + const adminClient = new AnalyticsAdminServiceClient(); + + async function callListGoogleAdsLinks() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = await adminClient.listGoogleAdsLinksAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListGoogleAdsLinks(); + // [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListGoogleAdsLinks_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_ios_app_data_streams.js b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_ios_app_data_streams.js new file mode 100644 index 00000000000..adc4ece241c --- /dev/null +++ b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_ios_app_data_streams.js @@ -0,0 +1,75 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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 analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListIosAppDataStreams_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the parent property. + * For example, to list results of app streams under the property with Id + * 123: "properties/123" + */ + // const parent = 'abc123' + /** + * The maximum number of resources to return. + * If unspecified, at most 50 resources will be returned. + * The maximum value is 200; (higher values will be coerced to the maximum) + */ + // const pageSize = 1234 + /** + * A page token, received from a previous `ListIosAppDataStreams` + * call. Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListIosAppDataStreams` + * must match the call that provided the page token. + */ + // const pageToken = 'abc123' + + // Imports the Admin library + const {AnalyticsAdminServiceClient} = require('@google-analytics/admin').v1alpha; + + // Instantiates a client + const adminClient = new AnalyticsAdminServiceClient(); + + async function callListIosAppDataStreams() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = await adminClient.listIosAppDataStreamsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListIosAppDataStreams(); + // [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListIosAppDataStreams_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_measurement_protocol_secrets.js b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_measurement_protocol_secrets.js new file mode 100644 index 00000000000..1997d718824 --- /dev/null +++ b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_measurement_protocol_secrets.js @@ -0,0 +1,78 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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 analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListMeasurementProtocolSecrets_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 parent stream. + * Format: + * properties/{property}/dataStreams/{dataStream}/measurementProtocolSecrets + */ + // const parent = 'abc123' + /** + * The maximum number of resources to return. + * If unspecified, at most 10 resources will be returned. + * The maximum value is 10. Higher values will be coerced to the maximum. + */ + // const pageSize = 1234 + /** + * A page token, received from a previous `ListMeasurementProtocolSecrets` + * call. Provide this to retrieve the subsequent page. When paginating, all + * other parameters provided to `ListMeasurementProtocolSecrets` must match + * the call that provided the page token. + */ + // const pageToken = 'abc123' + + // Imports the Admin library + const {AnalyticsAdminServiceClient} = require('@google-analytics/admin').v1alpha; + + // Instantiates a client + const adminClient = new AnalyticsAdminServiceClient(); + + async function callListMeasurementProtocolSecrets() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = await adminClient.listMeasurementProtocolSecretsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListMeasurementProtocolSecrets(); + // [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListMeasurementProtocolSecrets_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_properties.js b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_properties.js new file mode 100644 index 00000000000..2944109154d --- /dev/null +++ b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_properties.js @@ -0,0 +1,97 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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(filter) { + // [START analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListProperties_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. An expression for filtering the results of the request. + * Fields eligible for filtering are: + * `parent:`(The resource name of the parent account/property) or + * `ancestor:`(The resource name of the parent account) or + * `firebase_project:`(The id or number of the linked firebase project). + * Some examples of filters: + * ``` + * | Filter | Description | + * |-----------------------------|-------------------------------------------| + * | parent:accounts/123 | The account with account id: 123. | + * | parent:properties/123 | The property with property id: 123. | + * | ancestor:accounts/123 | The account with account id: 123. | + * | firebase_project:project-id | The firebase project with id: project-id. | + * | firebase_project:123 | The firebase project with number: 123. | + * ``` + */ + // const filter = 'abc123' + /** + * The maximum number of resources to return. The service may return + * fewer than this value, even if there are additional pages. + * If unspecified, at most 50 resources will be returned. + * The maximum value is 200; (higher values will be coerced to the maximum) + */ + // const pageSize = 1234 + /** + * A page token, received from a previous `ListProperties` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListProperties` must + * match the call that provided the page token. + */ + // const pageToken = 'abc123' + /** + * Whether to include soft-deleted (ie: "trashed") Properties in the + * results. Properties can be inspected to determine whether they are deleted + * or not. + */ + // const showDeleted = true + + // Imports the Admin library + const {AnalyticsAdminServiceClient} = require('@google-analytics/admin').v1alpha; + + // Instantiates a client + const adminClient = new AnalyticsAdminServiceClient(); + + async function callListProperties() { + // Construct request + const request = { + filter, + }; + + // Run request + const iterable = await adminClient.listPropertiesAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListProperties(); + // [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListProperties_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_user_links.js b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_user_links.js new file mode 100644 index 00000000000..dc07e9ba163 --- /dev/null +++ b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_user_links.js @@ -0,0 +1,77 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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 analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListUserLinks_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. Example format: accounts/1234 + */ + // const parent = 'abc123' + /** + * The maximum number of user links to return. + * The service may return fewer than this value. + * If unspecified, at most 200 user links will be returned. + * The maximum value is 500; values above 500 will be coerced to 500. + */ + // const pageSize = 1234 + /** + * A page token, received from a previous `ListUserLinks` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListUserLinks` must + * match the call that provided the page token. + */ + // const pageToken = 'abc123' + + // Imports the Admin library + const {AnalyticsAdminServiceClient} = require('@google-analytics/admin').v1alpha; + + // Instantiates a client + const adminClient = new AnalyticsAdminServiceClient(); + + async function callListUserLinks() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = await adminClient.listUserLinksAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListUserLinks(); + // [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListUserLinks_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_web_data_streams.js b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_web_data_streams.js new file mode 100644 index 00000000000..a7106477940 --- /dev/null +++ b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.list_web_data_streams.js @@ -0,0 +1,75 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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 analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListWebDataStreams_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the parent property. + * For example, to list results of web streams under the property with Id + * 123: "properties/123" + */ + // const parent = 'abc123' + /** + * The maximum number of resources to return. + * If unspecified, at most 50 resources will be returned. + * The maximum value is 200; (higher values will be coerced to the maximum) + */ + // const pageSize = 1234 + /** + * A page token, received from a previous `ListWebDataStreams` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListWebDataStreams` must + * match the call that provided the page token. + */ + // const pageToken = 'abc123' + + // Imports the Admin library + const {AnalyticsAdminServiceClient} = require('@google-analytics/admin').v1alpha; + + // Instantiates a client + const adminClient = new AnalyticsAdminServiceClient(); + + async function callListWebDataStreams() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = await adminClient.listWebDataStreamsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListWebDataStreams(); + // [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListWebDataStreams_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.provision_account_ticket.js b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.provision_account_ticket.js new file mode 100644 index 00000000000..df8e58bdd87 --- /dev/null +++ b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.provision_account_ticket.js @@ -0,0 +1,65 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main() { + // [START analyticsadmin_v1alpha_generated_AnalyticsAdminService_ProvisionAccountTicket_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. + */ + /** + * The account to create. + */ + // const account = {} + /** + * Redirect URI where the user will be sent after accepting Terms of Service. + * Must be configured in Developers Console as a Redirect URI + */ + // const redirectUri = 'abc123' + + // Imports the Admin library + const {AnalyticsAdminServiceClient} = require('@google-analytics/admin').v1alpha; + + // Instantiates a client + const adminClient = new AnalyticsAdminServiceClient(); + + async function callProvisionAccountTicket() { + // Construct request + const request = { + }; + + // Run request + const response = await adminClient.provisionAccountTicket(request); + console.log(response); + } + + callProvisionAccountTicket(); + // [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_ProvisionAccountTicket_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.run_access_report.js b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.run_access_report.js new file mode 100644 index 00000000000..4cbdc6a09db --- /dev/null +++ b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.run_access_report.js @@ -0,0 +1,134 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main() { + // [START analyticsadmin_v1alpha_generated_AnalyticsAdminService_RunAccessReport_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. + */ + /** + * The Data Access Report is requested for this property. + * For example if "123" is your GA4 property ID, then entity should be + * "properties/123". + */ + // const entity = 'abc123' + /** + * The dimensions requested and displayed in the response. Requests are + * allowed up to 9 dimensions. + */ + // const dimensions = 1234 + /** + * The metrics requested and displayed in the response. Requests are allowed + * up to 10 metrics. + */ + // const metrics = 1234 + /** + * Date ranges of access records to read. If multiple date ranges are + * requested, each response row will contain a zero based date range index. If + * two date ranges overlap, the access records for the overlapping days is + * included in the response rows for both date ranges. Requests are allowed up + * to 2 date ranges. + */ + // const dateRanges = 1234 + /** + * Dimension filters allow you to restrict report response to specific + * dimension values which match the filter. For example, filtering on access + * records of a single user. To learn more, see Fundamentals of Dimension + * Filters (https://developers.google.com/analytics/devguides/reporting/data/v1/basics#dimension_filters) + * for examples. Metrics cannot be used in this filter. + */ + // const dimensionFilter = {} + /** + * Metric filters allow you to restrict report response to specific metric + * values which match the filter. Metric filters are applied after aggregating + * the report's rows, similar to SQL having-clause. Dimensions cannot be used + * in this filter. + */ + // const metricFilter = {} + /** + * The row count of the start row. The first row is counted as row 0. If + * offset is unspecified, it is treated as 0. If offset is zero, then this + * method will return the first page of results with `limit` entries. + * To learn more about this pagination parameter, see + * Pagination (https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). + */ + // const offset = 1234 + /** + * The number of rows to return. If unspecified, 10,000 rows are returned. The + * API returns a maximum of 100,000 rows per request, no matter how many you + * ask for. `limit` must be positive. + * The API may return fewer rows than the requested `limit`, if there aren't + * as many remaining rows as the `limit`. For instance, there are fewer than + * 300 possible values for the dimension `country`, so when reporting on only + * `country`, you can't get more than 300 rows, even if you set `limit` to a + * higher value. + * To learn more about this pagination parameter, see + * Pagination (https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). + */ + // const limit = 1234 + /** + * This request's time zone if specified. If unspecified, the property's time + * zone is used. The request's time zone is used to interpret the start & end + * dates of the report. + * Formatted as strings from the IANA Time Zone database + * (https://www.iana.org/time-zones); for example "America/New_York" or + * "Asia/Tokyo". + */ + // const timeZone = 'abc123' + /** + * Specifies how rows are ordered in the response. + */ + // const orderBys = 1234 + /** + * Toggles whether to return the current state of this Analytics Property's + * quota. Quota is returned in AccessQuota (#AccessQuota). + */ + // const returnEntityQuota = true + + // Imports the Admin library + const {AnalyticsAdminServiceClient} = require('@google-analytics/admin').v1alpha; + + // Instantiates a client + const adminClient = new AnalyticsAdminServiceClient(); + + async function callRunAccessReport() { + // Construct request + const request = { + }; + + // Run request + const response = await adminClient.runAccessReport(request); + console.log(response); + } + + callRunAccessReport(); + // [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_RunAccessReport_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.search_change_history_events.js b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.search_change_history_events.js new file mode 100644 index 00000000000..c59e9fddb77 --- /dev/null +++ b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.search_change_history_events.js @@ -0,0 +1,104 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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(account) { + // [START analyticsadmin_v1alpha_generated_AnalyticsAdminService_SearchChangeHistoryEvents_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 resource for which to return change history resources. + */ + // const account = 'abc123' + /** + * Optional. Resource name for a child property. If set, only return changes + * made to this property or its child resources. + */ + // const property = 'abc123' + /** + * Optional. If set, only return changes if they are for a resource that matches at + * least one of these types. + */ + // const resourceType = 1234 + /** + * Optional. If set, only return changes that match one or more of these types of + * actions. + */ + // const action = 1234 + /** + * Optional. If set, only return changes if they are made by a user in this list. + */ + // const actorEmail = 'abc123' + /** + * Optional. If set, only return changes made after this time (inclusive). + */ + // const earliestChangeTime = {} + /** + * Optional. If set, only return changes made before this time (inclusive). + */ + // const latestChangeTime = {} + /** + * Optional. The maximum number of ChangeHistoryEvent items to return. + * The service may return fewer than this value, even if there are additional + * pages. If unspecified, at most 50 items will be returned. + * The maximum value is 200 (higher values will be coerced to the maximum). + */ + // const pageSize = 1234 + /** + * Optional. A page token, received from a previous `SearchChangeHistoryEvents` call. + * Provide this to retrieve the subsequent page. When paginating, all other + * parameters provided to `SearchChangeHistoryEvents` must match the call that + * provided the page token. + */ + // const pageToken = 'abc123' + + // Imports the Admin library + const {AnalyticsAdminServiceClient} = require('@google-analytics/admin').v1alpha; + + // Instantiates a client + const adminClient = new AnalyticsAdminServiceClient(); + + async function callSearchChangeHistoryEvents() { + // Construct request + const request = { + account, + }; + + // Run request + const iterable = await adminClient.searchChangeHistoryEventsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callSearchChangeHistoryEvents(); + // [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_SearchChangeHistoryEvents_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_account.js b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_account.js new file mode 100644 index 00000000000..c3580e38f65 --- /dev/null +++ b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_account.js @@ -0,0 +1,69 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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(account, updateMask) { + // [START analyticsadmin_v1alpha_generated_AnalyticsAdminService_UpdateAccount_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 to update. + * The account's `name` field is used to identify the account. + */ + // const account = {} + /** + * Required. The list of fields to be updated. Field names must be in snake case + * (e.g., "field_to_update"). Omitted fields will not be updated. To replace + * the entire entity, use one path with the string "*" to match all fields. + */ + // const updateMask = {} + + // Imports the Admin library + const {AnalyticsAdminServiceClient} = require('@google-analytics/admin').v1alpha; + + // Instantiates a client + const adminClient = new AnalyticsAdminServiceClient(); + + async function callUpdateAccount() { + // Construct request + const request = { + account, + updateMask, + }; + + // Run request + const response = await adminClient.updateAccount(request); + console.log(response); + } + + callUpdateAccount(); + // [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_UpdateAccount_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_android_app_data_stream.js b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_android_app_data_stream.js new file mode 100644 index 00000000000..11cc1620d5f --- /dev/null +++ b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_android_app_data_stream.js @@ -0,0 +1,66 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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(androidAppDataStream, updateMask) { + // [START analyticsadmin_v1alpha_generated_AnalyticsAdminService_UpdateAndroidAppDataStream_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The android app stream to update. + * The `name` field is used to identify the android app stream to be updated. + */ + // const androidAppDataStream = {} + /** + * Required. The list of fields to be updated. Field names must be in snake case + * (e.g., "field_to_update"). Omitted fields will not be updated. To replace + * the entire entity, use one path with the string "*" to match all fields. + */ + // const updateMask = {} + + // Imports the Admin library + const {AnalyticsAdminServiceClient} = require('@google-analytics/admin').v1alpha; + + // Instantiates a client + const adminClient = new AnalyticsAdminServiceClient(); + + async function callUpdateAndroidAppDataStream() { + // Construct request + const request = { + androidAppDataStream, + updateMask, + }; + + // Run request + const response = await adminClient.updateAndroidAppDataStream(request); + console.log(response); + } + + callUpdateAndroidAppDataStream(); + // [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_UpdateAndroidAppDataStream_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_attribution_settings.js b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_attribution_settings.js new file mode 100644 index 00000000000..222adb533eb --- /dev/null +++ b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_attribution_settings.js @@ -0,0 +1,69 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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(attributionSettings, updateMask) { + // [START analyticsadmin_v1alpha_generated_AnalyticsAdminService_UpdateAttributionSettings_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 attribution settings to update. + * The `name` field is used to identify the settings to be updated. + */ + // const attributionSettings = {} + /** + * Required. The list of fields to be updated. Field names must be in snake case + * (e.g., "field_to_update"). Omitted fields will not be updated. To replace + * the entire entity, use one path with the string "*" to match all fields. + */ + // const updateMask = {} + + // Imports the Admin library + const {AnalyticsAdminServiceClient} = require('@google-analytics/admin').v1alpha; + + // Instantiates a client + const adminClient = new AnalyticsAdminServiceClient(); + + async function callUpdateAttributionSettings() { + // Construct request + const request = { + attributionSettings, + updateMask, + }; + + // Run request + const response = await adminClient.updateAttributionSettings(request); + console.log(response); + } + + callUpdateAttributionSettings(); + // [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_UpdateAttributionSettings_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_audience.js b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_audience.js new file mode 100644 index 00000000000..b5c23ad72d1 --- /dev/null +++ b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_audience.js @@ -0,0 +1,69 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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(audience, updateMask) { + // [START analyticsadmin_v1alpha_generated_AnalyticsAdminService_UpdateAudience_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The audience to update. + * The audience's `name` field is used to identify the audience to be updated. + */ + // const audience = {} + /** + * Required. The list of fields to be updated. Field names must be in snake case + * (e.g., "field_to_update"). Omitted fields will not be updated. To replace + * the entire entity, use one path with the string "*" to match all fields. + */ + // const updateMask = {} + + // Imports the Admin library + const {AnalyticsAdminServiceClient} = require('@google-analytics/admin').v1alpha; + + // Instantiates a client + const adminClient = new AnalyticsAdminServiceClient(); + + async function callUpdateAudience() { + // Construct request + const request = { + audience, + updateMask, + }; + + // Run request + const response = await adminClient.updateAudience(request); + console.log(response); + } + + callUpdateAudience(); + // [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_UpdateAudience_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_custom_dimension.js b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_custom_dimension.js new file mode 100644 index 00000000000..ebaf1ac001b --- /dev/null +++ b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_custom_dimension.js @@ -0,0 +1,67 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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(updateMask) { + // [START analyticsadmin_v1alpha_generated_AnalyticsAdminService_UpdateCustomDimension_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. + */ + /** + * The CustomDimension to update + */ + // const customDimension = {} + /** + * Required. The list of fields to be updated. Omitted fields will not be updated. + * To replace the entire entity, use one path with the string "*" to match + * all fields. + */ + // const updateMask = {} + + // Imports the Admin library + const {AnalyticsAdminServiceClient} = require('@google-analytics/admin').v1alpha; + + // Instantiates a client + const adminClient = new AnalyticsAdminServiceClient(); + + async function callUpdateCustomDimension() { + // Construct request + const request = { + updateMask, + }; + + // Run request + const response = await adminClient.updateCustomDimension(request); + console.log(response); + } + + callUpdateCustomDimension(); + // [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_UpdateCustomDimension_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_custom_metric.js b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_custom_metric.js new file mode 100644 index 00000000000..dfdfd553548 --- /dev/null +++ b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_custom_metric.js @@ -0,0 +1,67 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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(updateMask) { + // [START analyticsadmin_v1alpha_generated_AnalyticsAdminService_UpdateCustomMetric_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. + */ + /** + * The CustomMetric to update + */ + // const customMetric = {} + /** + * Required. The list of fields to be updated. Omitted fields will not be updated. + * To replace the entire entity, use one path with the string "*" to match + * all fields. + */ + // const updateMask = {} + + // Imports the Admin library + const {AnalyticsAdminServiceClient} = require('@google-analytics/admin').v1alpha; + + // Instantiates a client + const adminClient = new AnalyticsAdminServiceClient(); + + async function callUpdateCustomMetric() { + // Construct request + const request = { + updateMask, + }; + + // Run request + const response = await adminClient.updateCustomMetric(request); + console.log(response); + } + + callUpdateCustomMetric(); + // [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_UpdateCustomMetric_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_data_retention_settings.js b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_data_retention_settings.js new file mode 100644 index 00000000000..61d890f08eb --- /dev/null +++ b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_data_retention_settings.js @@ -0,0 +1,69 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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(dataRetentionSettings, updateMask) { + // [START analyticsadmin_v1alpha_generated_AnalyticsAdminService_UpdateDataRetentionSettings_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 settings to update. + * The `name` field is used to identify the settings to be updated. + */ + // const dataRetentionSettings = {} + /** + * Required. The list of fields to be updated. Field names must be in snake case + * (e.g., "field_to_update"). Omitted fields will not be updated. To replace + * the entire entity, use one path with the string "*" to match all fields. + */ + // const updateMask = {} + + // Imports the Admin library + const {AnalyticsAdminServiceClient} = require('@google-analytics/admin').v1alpha; + + // Instantiates a client + const adminClient = new AnalyticsAdminServiceClient(); + + async function callUpdateDataRetentionSettings() { + // Construct request + const request = { + dataRetentionSettings, + updateMask, + }; + + // Run request + const response = await adminClient.updateDataRetentionSettings(request); + console.log(response); + } + + callUpdateDataRetentionSettings(); + // [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_UpdateDataRetentionSettings_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_data_stream.js b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_data_stream.js new file mode 100644 index 00000000000..0d1ef2f2ac0 --- /dev/null +++ b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_data_stream.js @@ -0,0 +1,67 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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(updateMask) { + // [START analyticsadmin_v1alpha_generated_AnalyticsAdminService_UpdateDataStream_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. + */ + /** + * The DataStream to update + */ + // const dataStream = {} + /** + * Required. The list of fields to be updated. Omitted fields will not be updated. + * To replace the entire entity, use one path with the string "*" to match + * all fields. + */ + // const updateMask = {} + + // Imports the Admin library + const {AnalyticsAdminServiceClient} = require('@google-analytics/admin').v1alpha; + + // Instantiates a client + const adminClient = new AnalyticsAdminServiceClient(); + + async function callUpdateDataStream() { + // Construct request + const request = { + updateMask, + }; + + // Run request + const response = await adminClient.updateDataStream(request); + console.log(response); + } + + callUpdateDataStream(); + // [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_UpdateDataStream_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_display_video360_advertiser_link.js b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_display_video360_advertiser_link.js new file mode 100644 index 00000000000..bb721bbc482 --- /dev/null +++ b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_display_video360_advertiser_link.js @@ -0,0 +1,67 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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(updateMask) { + // [START analyticsadmin_v1alpha_generated_AnalyticsAdminService_UpdateDisplayVideo360AdvertiserLink_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. + */ + /** + * The DisplayVideo360AdvertiserLink to update + */ + // const displayVideo_360AdvertiserLink = {} + /** + * Required. The list of fields to be updated. Omitted fields will not be updated. + * To replace the entire entity, use one path with the string "*" to match + * all fields. + */ + // const updateMask = {} + + // Imports the Admin library + const {AnalyticsAdminServiceClient} = require('@google-analytics/admin').v1alpha; + + // Instantiates a client + const adminClient = new AnalyticsAdminServiceClient(); + + async function callUpdateDisplayVideo360AdvertiserLink() { + // Construct request + const request = { + updateMask, + }; + + // Run request + const response = await adminClient.updateDisplayVideo360AdvertiserLink(request); + console.log(response); + } + + callUpdateDisplayVideo360AdvertiserLink(); + // [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_UpdateDisplayVideo360AdvertiserLink_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_enhanced_measurement_settings.js b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_enhanced_measurement_settings.js new file mode 100644 index 00000000000..4d72d6be8d4 --- /dev/null +++ b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_enhanced_measurement_settings.js @@ -0,0 +1,63 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; + +function main(enhancedMeasurementSettings, updateMask) { + // [START analyticsadmin_v1alpha_generated_AnalyticsAdminService_UpdateEnhancedMeasurementSettings_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The settings to update. + * The `name` field is used to identify the settings to be updated. + */ + // const enhancedMeasurementSettings = {} + /** + * Required. The list of fields to be updated. Field names must be in snake case + * (e.g., "field_to_update"). Omitted fields will not be updated. To replace + * the entire entity, use one path with the string "*" to match all fields. + */ + // const updateMask = {} + + // Imports the Admin library + const {AnalyticsAdminServiceClient} = + require('@google-analytics/admin').v1alpha; + + // Instantiates a client + const adminClient = new AnalyticsAdminServiceClient(); + + async function callUpdateEnhancedMeasurementSettings() { + // Construct request + const request = { + enhancedMeasurementSettings, + updateMask, + }; + + // Run request + const response = await adminClient.updateEnhancedMeasurementSettings( + request + ); + console.log(response); + } + + callUpdateEnhancedMeasurementSettings(); + // [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_UpdateEnhancedMeasurementSettings_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_google_ads_link.js b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_google_ads_link.js new file mode 100644 index 00000000000..af044749023 --- /dev/null +++ b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_google_ads_link.js @@ -0,0 +1,67 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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(updateMask) { + // [START analyticsadmin_v1alpha_generated_AnalyticsAdminService_UpdateGoogleAdsLink_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. + */ + /** + * The GoogleAdsLink to update + */ + // const googleAdsLink = {} + /** + * Required. The list of fields to be updated. Field names must be in snake case + * (e.g., "field_to_update"). Omitted fields will not be updated. To replace + * the entire entity, use one path with the string "*" to match all fields. + */ + // const updateMask = {} + + // Imports the Admin library + const {AnalyticsAdminServiceClient} = require('@google-analytics/admin').v1alpha; + + // Instantiates a client + const adminClient = new AnalyticsAdminServiceClient(); + + async function callUpdateGoogleAdsLink() { + // Construct request + const request = { + updateMask, + }; + + // Run request + const response = await adminClient.updateGoogleAdsLink(request); + console.log(response); + } + + callUpdateGoogleAdsLink(); + // [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_UpdateGoogleAdsLink_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_google_signals_settings.js b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_google_signals_settings.js new file mode 100644 index 00000000000..8e1142f2b38 --- /dev/null +++ b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_google_signals_settings.js @@ -0,0 +1,69 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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(googleSignalsSettings, updateMask) { + // [START analyticsadmin_v1alpha_generated_AnalyticsAdminService_UpdateGoogleSignalsSettings_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 settings to update. + * The `name` field is used to identify the settings to be updated. + */ + // const googleSignalsSettings = {} + /** + * Required. The list of fields to be updated. Field names must be in snake case + * (e.g., "field_to_update"). Omitted fields will not be updated. To replace + * the entire entity, use one path with the string "*" to match all fields. + */ + // const updateMask = {} + + // Imports the Admin library + const {AnalyticsAdminServiceClient} = require('@google-analytics/admin').v1alpha; + + // Instantiates a client + const adminClient = new AnalyticsAdminServiceClient(); + + async function callUpdateGoogleSignalsSettings() { + // Construct request + const request = { + googleSignalsSettings, + updateMask, + }; + + // Run request + const response = await adminClient.updateGoogleSignalsSettings(request); + console.log(response); + } + + callUpdateGoogleSignalsSettings(); + // [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_UpdateGoogleSignalsSettings_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_ios_app_data_stream.js b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_ios_app_data_stream.js new file mode 100644 index 00000000000..257f8696bbc --- /dev/null +++ b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_ios_app_data_stream.js @@ -0,0 +1,66 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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(iosAppDataStream, updateMask) { + // [START analyticsadmin_v1alpha_generated_AnalyticsAdminService_UpdateIosAppDataStream_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The iOS app stream to update. + * The `name` field is used to identify the iOS app stream to be updated. + */ + // const iosAppDataStream = {} + /** + * Required. The list of fields to be updated. Field names must be in snake case + * (e.g., "field_to_update"). Omitted fields will not be updated. To replace + * the entire entity, use one path with the string "*" to match all fields. + */ + // const updateMask = {} + + // Imports the Admin library + const {AnalyticsAdminServiceClient} = require('@google-analytics/admin').v1alpha; + + // Instantiates a client + const adminClient = new AnalyticsAdminServiceClient(); + + async function callUpdateIosAppDataStream() { + // Construct request + const request = { + iosAppDataStream, + updateMask, + }; + + // Run request + const response = await adminClient.updateIosAppDataStream(request); + console.log(response); + } + + callUpdateIosAppDataStream(); + // [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_UpdateIosAppDataStream_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_measurement_protocol_secret.js b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_measurement_protocol_secret.js new file mode 100644 index 00000000000..1439a5e32e7 --- /dev/null +++ b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_measurement_protocol_secret.js @@ -0,0 +1,65 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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(measurementProtocolSecret) { + // [START analyticsadmin_v1alpha_generated_AnalyticsAdminService_UpdateMeasurementProtocolSecret_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 measurement protocol secret to update. + */ + // const measurementProtocolSecret = {} + /** + * The list of fields to be updated. Omitted fields will not be updated. + */ + // const updateMask = {} + + // Imports the Admin library + const {AnalyticsAdminServiceClient} = require('@google-analytics/admin').v1alpha; + + // Instantiates a client + const adminClient = new AnalyticsAdminServiceClient(); + + async function callUpdateMeasurementProtocolSecret() { + // Construct request + const request = { + measurementProtocolSecret, + }; + + // Run request + const response = await adminClient.updateMeasurementProtocolSecret(request); + console.log(response); + } + + callUpdateMeasurementProtocolSecret(); + // [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_UpdateMeasurementProtocolSecret_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_property.js b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_property.js new file mode 100644 index 00000000000..172c157cbcd --- /dev/null +++ b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_property.js @@ -0,0 +1,70 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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(property, updateMask) { + // [START analyticsadmin_v1alpha_generated_AnalyticsAdminService_UpdateProperty_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 property to update. + * The property's `name` field is used to identify the property to be + * updated. + */ + // const property = {} + /** + * Required. The list of fields to be updated. Field names must be in snake case + * (e.g., "field_to_update"). Omitted fields will not be updated. To replace + * the entire entity, use one path with the string "*" to match all fields. + */ + // const updateMask = {} + + // Imports the Admin library + const {AnalyticsAdminServiceClient} = require('@google-analytics/admin').v1alpha; + + // Instantiates a client + const adminClient = new AnalyticsAdminServiceClient(); + + async function callUpdateProperty() { + // Construct request + const request = { + property, + updateMask, + }; + + // Run request + const response = await adminClient.updateProperty(request); + console.log(response); + } + + callUpdateProperty(); + // [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_UpdateProperty_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_user_link.js b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_user_link.js new file mode 100644 index 00000000000..d14e6aa2f9e --- /dev/null +++ b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_user_link.js @@ -0,0 +1,61 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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(userLink) { + // [START analyticsadmin_v1alpha_generated_AnalyticsAdminService_UpdateUserLink_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 link to update. + */ + // const userLink = {} + + // Imports the Admin library + const {AnalyticsAdminServiceClient} = require('@google-analytics/admin').v1alpha; + + // Instantiates a client + const adminClient = new AnalyticsAdminServiceClient(); + + async function callUpdateUserLink() { + // Construct request + const request = { + userLink, + }; + + // Run request + const response = await adminClient.updateUserLink(request); + console.log(response); + } + + callUpdateUserLink(); + // [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_UpdateUserLink_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_web_data_stream.js b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_web_data_stream.js new file mode 100644 index 00000000000..d951eeeb3f0 --- /dev/null +++ b/packages/google-analytics-admin/samples/generated/v1alpha/analytics_admin_service.update_web_data_stream.js @@ -0,0 +1,66 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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(webDataStream, updateMask) { + // [START analyticsadmin_v1alpha_generated_AnalyticsAdminService_UpdateWebDataStream_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The web stream to update. + * The `name` field is used to identify the web stream to be updated. + */ + // const webDataStream = {} + /** + * Required. The list of fields to be updated. Field names must be in snake case + * (e.g., "field_to_update"). Omitted fields will not be updated. To replace + * the entire entity, use one path with the string "*" to match all fields. + */ + // const updateMask = {} + + // Imports the Admin library + const {AnalyticsAdminServiceClient} = require('@google-analytics/admin').v1alpha; + + // Instantiates a client + const adminClient = new AnalyticsAdminServiceClient(); + + async function callUpdateWebDataStream() { + // Construct request + const request = { + webDataStream, + updateMask, + }; + + // Run request + const response = await adminClient.updateWebDataStream(request); + console.log(response); + } + + callUpdateWebDataStream(); + // [END analyticsadmin_v1alpha_generated_AnalyticsAdminService_UpdateWebDataStream_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-analytics-admin/samples/generated/v1alpha/snippet_metadata.google.analytics.admin.v1alpha.json b/packages/google-analytics-admin/samples/generated/v1alpha/snippet_metadata.google.analytics.admin.v1alpha.json new file mode 100644 index 00000000000..cdaf892c297 --- /dev/null +++ b/packages/google-analytics-admin/samples/generated/v1alpha/snippet_metadata.google.analytics.admin.v1alpha.json @@ -0,0 +1,3491 @@ +{ + "clientLibrary": { + "name": "nodejs-admin", + "version": "4.3.0", + "language": "TYPESCRIPT", + "apis": [ + { + "id": "google.analytics.admin.v1alpha", + "version": "v1alpha" + } + ] + }, + "snippets": [ + { + "regionTag": "analyticsadmin_v1alpha_generated_AnalyticsAdminService_GetAccount_async", + "title": "AnalyticsAdminService getAccount Sample", + "origin": "API_DEFINITION", + "description": " Lookup for a single Account.", + "canonical": true, + "file": "analytics_admin_service.get_account.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 55, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetAccount", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.GetAccount", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.analytics.admin.v1alpha.Account", + "client": { + "shortName": "AnalyticsAdminServiceClient", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminServiceClient" + }, + "method": { + "shortName": "GetAccount", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.GetAccount", + "service": { + "shortName": "AnalyticsAdminService", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService" + } + } + } + }, + { + "regionTag": "analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListAccounts_async", + "title": "AnalyticsAdminService listAccounts Sample", + "origin": "API_DEFINITION", + "description": " Returns all accounts accessible by the caller. Note that these accounts might not currently have GA4 properties. Soft-deleted (ie: \"trashed\") accounts are excluded by default. Returns an empty list if no relevant accounts are found.", + "canonical": true, + "file": "analytics_admin_service.list_accounts.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 70, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListAccounts", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.ListAccounts", + "async": true, + "parameters": [ + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "show_deleted", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.analytics.admin.v1alpha.ListAccountsResponse", + "client": { + "shortName": "AnalyticsAdminServiceClient", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminServiceClient" + }, + "method": { + "shortName": "ListAccounts", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.ListAccounts", + "service": { + "shortName": "AnalyticsAdminService", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService" + } + } + } + }, + { + "regionTag": "analyticsadmin_v1alpha_generated_AnalyticsAdminService_DeleteAccount_async", + "title": "AnalyticsAdminService deleteAccount Sample", + "origin": "API_DEFINITION", + "description": " Marks target Account as soft-deleted (ie: \"trashed\") and returns it. This API does not have a method to restore soft-deleted accounts. However, they can be restored using the Trash Can UI. If the accounts are not restored before the expiration time, the account and all child resources (eg: Properties, GoogleAdsLinks, Streams, UserLinks) will be permanently purged. https://support.google.com/analytics/answer/6154772 Returns an error if the target is not found.", + "canonical": true, + "file": "analytics_admin_service.delete_account.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 55, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteAccount", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.DeleteAccount", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "AnalyticsAdminServiceClient", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminServiceClient" + }, + "method": { + "shortName": "DeleteAccount", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.DeleteAccount", + "service": { + "shortName": "AnalyticsAdminService", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService" + } + } + } + }, + { + "regionTag": "analyticsadmin_v1alpha_generated_AnalyticsAdminService_UpdateAccount_async", + "title": "AnalyticsAdminService updateAccount Sample", + "origin": "API_DEFINITION", + "description": " Updates an account.", + "canonical": true, + "file": "analytics_admin_service.update_account.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 61, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateAccount", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.UpdateAccount", + "async": true, + "parameters": [ + { + "name": "account", + "type": ".google.analytics.admin.v1alpha.Account" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + } + ], + "resultType": ".google.analytics.admin.v1alpha.Account", + "client": { + "shortName": "AnalyticsAdminServiceClient", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminServiceClient" + }, + "method": { + "shortName": "UpdateAccount", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.UpdateAccount", + "service": { + "shortName": "AnalyticsAdminService", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService" + } + } + } + }, + { + "regionTag": "analyticsadmin_v1alpha_generated_AnalyticsAdminService_ProvisionAccountTicket_async", + "title": "AnalyticsAdminService provisionAccountTicket Sample", + "origin": "API_DEFINITION", + "description": " Requests a ticket for creating an account.", + "canonical": true, + "file": "analytics_admin_service.provision_account_ticket.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 57, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ProvisionAccountTicket", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.ProvisionAccountTicket", + "async": true, + "parameters": [ + { + "name": "account", + "type": ".google.analytics.admin.v1alpha.Account" + }, + { + "name": "redirect_uri", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.analytics.admin.v1alpha.ProvisionAccountTicketResponse", + "client": { + "shortName": "AnalyticsAdminServiceClient", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminServiceClient" + }, + "method": { + "shortName": "ProvisionAccountTicket", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.ProvisionAccountTicket", + "service": { + "shortName": "AnalyticsAdminService", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService" + } + } + } + }, + { + "regionTag": "analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListAccountSummaries_async", + "title": "AnalyticsAdminService listAccountSummaries Sample", + "origin": "API_DEFINITION", + "description": " Returns summaries of all accounts accessible by the caller.", + "canonical": true, + "file": "analytics_admin_service.list_account_summaries.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 64, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListAccountSummaries", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.ListAccountSummaries", + "async": true, + "parameters": [ + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.analytics.admin.v1alpha.ListAccountSummariesResponse", + "client": { + "shortName": "AnalyticsAdminServiceClient", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminServiceClient" + }, + "method": { + "shortName": "ListAccountSummaries", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.ListAccountSummaries", + "service": { + "shortName": "AnalyticsAdminService", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService" + } + } + } + }, + { + "regionTag": "analyticsadmin_v1alpha_generated_AnalyticsAdminService_GetProperty_async", + "title": "AnalyticsAdminService getProperty Sample", + "origin": "API_DEFINITION", + "description": " Lookup for a single \"GA4\" Property.", + "canonical": true, + "file": "analytics_admin_service.get_property.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 55, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetProperty", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.GetProperty", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.analytics.admin.v1alpha.Property", + "client": { + "shortName": "AnalyticsAdminServiceClient", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminServiceClient" + }, + "method": { + "shortName": "GetProperty", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.GetProperty", + "service": { + "shortName": "AnalyticsAdminService", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService" + } + } + } + }, + { + "regionTag": "analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListProperties_async", + "title": "AnalyticsAdminService listProperties Sample", + "origin": "API_DEFINITION", + "description": " Returns child Properties under the specified parent Account. Only \"GA4\" properties will be returned. Properties will be excluded if the caller does not have access. Soft-deleted (ie: \"trashed\") properties are excluded by default. Returns an empty list if no relevant properties are found.", + "canonical": true, + "file": "analytics_admin_service.list_properties.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 89, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListProperties", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.ListProperties", + "async": true, + "parameters": [ + { + "name": "filter", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "show_deleted", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.analytics.admin.v1alpha.ListPropertiesResponse", + "client": { + "shortName": "AnalyticsAdminServiceClient", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminServiceClient" + }, + "method": { + "shortName": "ListProperties", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.ListProperties", + "service": { + "shortName": "AnalyticsAdminService", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService" + } + } + } + }, + { + "regionTag": "analyticsadmin_v1alpha_generated_AnalyticsAdminService_CreateProperty_async", + "title": "AnalyticsAdminService createProperty Sample", + "origin": "API_DEFINITION", + "description": " Creates an \"GA4\" property with the specified location and attributes.", + "canonical": true, + "file": "analytics_admin_service.create_property.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateProperty", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.CreateProperty", + "async": true, + "parameters": [ + { + "name": "property", + "type": ".google.analytics.admin.v1alpha.Property" + } + ], + "resultType": ".google.analytics.admin.v1alpha.Property", + "client": { + "shortName": "AnalyticsAdminServiceClient", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminServiceClient" + }, + "method": { + "shortName": "CreateProperty", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.CreateProperty", + "service": { + "shortName": "AnalyticsAdminService", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService" + } + } + } + }, + { + "regionTag": "analyticsadmin_v1alpha_generated_AnalyticsAdminService_DeleteProperty_async", + "title": "AnalyticsAdminService deleteProperty Sample", + "origin": "API_DEFINITION", + "description": " Marks target Property as soft-deleted (ie: \"trashed\") and returns it. This API does not have a method to restore soft-deleted properties. However, they can be restored using the Trash Can UI. If the properties are not restored before the expiration time, the Property and all child resources (eg: GoogleAdsLinks, Streams, UserLinks) will be permanently purged. https://support.google.com/analytics/answer/6154772 Returns an error if the target is not found, or is not an GA4 Property.", + "canonical": true, + "file": "analytics_admin_service.delete_property.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 55, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteProperty", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.DeleteProperty", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.analytics.admin.v1alpha.Property", + "client": { + "shortName": "AnalyticsAdminServiceClient", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminServiceClient" + }, + "method": { + "shortName": "DeleteProperty", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.DeleteProperty", + "service": { + "shortName": "AnalyticsAdminService", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService" + } + } + } + }, + { + "regionTag": "analyticsadmin_v1alpha_generated_AnalyticsAdminService_UpdateProperty_async", + "title": "AnalyticsAdminService updateProperty Sample", + "origin": "API_DEFINITION", + "description": " Updates a property.", + "canonical": true, + "file": "analytics_admin_service.update_property.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 62, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateProperty", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.UpdateProperty", + "async": true, + "parameters": [ + { + "name": "property", + "type": ".google.analytics.admin.v1alpha.Property" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + } + ], + "resultType": ".google.analytics.admin.v1alpha.Property", + "client": { + "shortName": "AnalyticsAdminServiceClient", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminServiceClient" + }, + "method": { + "shortName": "UpdateProperty", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.UpdateProperty", + "service": { + "shortName": "AnalyticsAdminService", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService" + } + } + } + }, + { + "regionTag": "analyticsadmin_v1alpha_generated_AnalyticsAdminService_GetUserLink_async", + "title": "AnalyticsAdminService getUserLink Sample", + "origin": "API_DEFINITION", + "description": " Gets information about a user's link to an account or property.", + "canonical": true, + "file": "analytics_admin_service.get_user_link.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 53, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetUserLink", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.GetUserLink", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.analytics.admin.v1alpha.UserLink", + "client": { + "shortName": "AnalyticsAdminServiceClient", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminServiceClient" + }, + "method": { + "shortName": "GetUserLink", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.GetUserLink", + "service": { + "shortName": "AnalyticsAdminService", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService" + } + } + } + }, + { + "regionTag": "analyticsadmin_v1alpha_generated_AnalyticsAdminService_BatchGetUserLinks_async", + "title": "AnalyticsAdminService batchGetUserLinks Sample", + "origin": "API_DEFINITION", + "description": " Gets information about multiple users' links to an account or property.", + "canonical": true, + "file": "analytics_admin_service.batch_get_user_links.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 63, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "BatchGetUserLinks", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.BatchGetUserLinks", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "names", + "type": "TYPE_STRING[]" + } + ], + "resultType": ".google.analytics.admin.v1alpha.BatchGetUserLinksResponse", + "client": { + "shortName": "AnalyticsAdminServiceClient", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminServiceClient" + }, + "method": { + "shortName": "BatchGetUserLinks", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.BatchGetUserLinks", + "service": { + "shortName": "AnalyticsAdminService", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService" + } + } + } + }, + { + "regionTag": "analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListUserLinks_async", + "title": "AnalyticsAdminService listUserLinks Sample", + "origin": "API_DEFINITION", + "description": " Lists all user links on an account or property.", + "canonical": true, + "file": "analytics_admin_service.list_user_links.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 69, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListUserLinks", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.ListUserLinks", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.analytics.admin.v1alpha.ListUserLinksResponse", + "client": { + "shortName": "AnalyticsAdminServiceClient", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminServiceClient" + }, + "method": { + "shortName": "ListUserLinks", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.ListUserLinks", + "service": { + "shortName": "AnalyticsAdminService", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService" + } + } + } + }, + { + "regionTag": "analyticsadmin_v1alpha_generated_AnalyticsAdminService_AuditUserLinks_async", + "title": "AnalyticsAdminService auditUserLinks Sample", + "origin": "API_DEFINITION", + "description": " Lists all user links on an account or property, including implicit ones that come from effective permissions granted by groups or organization admin roles. If a returned user link does not have direct permissions, they cannot be removed from the account or property directly with the DeleteUserLink command. They have to be removed from the group/etc that gives them permissions, which is currently only usable/discoverable in the GA or GMP UIs.", + "canonical": true, + "file": "analytics_admin_service.audit_user_links.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 69, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "AuditUserLinks", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.AuditUserLinks", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.analytics.admin.v1alpha.AuditUserLinksResponse", + "client": { + "shortName": "AnalyticsAdminServiceClient", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminServiceClient" + }, + "method": { + "shortName": "AuditUserLinks", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.AuditUserLinks", + "service": { + "shortName": "AnalyticsAdminService", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService" + } + } + } + }, + { + "regionTag": "analyticsadmin_v1alpha_generated_AnalyticsAdminService_CreateUserLink_async", + "title": "AnalyticsAdminService createUserLink Sample", + "origin": "API_DEFINITION", + "description": " Creates a user link on an account or property. If the user with the specified email already has permissions on the account or property, then the user's existing permissions will be unioned with the permissions specified in the new UserLink.", + "canonical": true, + "file": "analytics_admin_service.create_user_link.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 63, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateUserLink", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.CreateUserLink", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "notify_new_user", + "type": "TYPE_BOOL" + }, + { + "name": "user_link", + "type": ".google.analytics.admin.v1alpha.UserLink" + } + ], + "resultType": ".google.analytics.admin.v1alpha.UserLink", + "client": { + "shortName": "AnalyticsAdminServiceClient", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminServiceClient" + }, + "method": { + "shortName": "CreateUserLink", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.CreateUserLink", + "service": { + "shortName": "AnalyticsAdminService", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService" + } + } + } + }, + { + "regionTag": "analyticsadmin_v1alpha_generated_AnalyticsAdminService_BatchCreateUserLinks_async", + "title": "AnalyticsAdminService batchCreateUserLinks Sample", + "origin": "API_DEFINITION", + "description": " Creates information about multiple users' links to an account or property. This method is transactional. If any UserLink cannot be created, none of the UserLinks will be created.", + "canonical": true, + "file": "analytics_admin_service.batch_create_user_links.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 68, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "BatchCreateUserLinks", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.BatchCreateUserLinks", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "notify_new_users", + "type": "TYPE_BOOL" + }, + { + "name": "requests", + "type": "TYPE_MESSAGE[]" + } + ], + "resultType": ".google.analytics.admin.v1alpha.BatchCreateUserLinksResponse", + "client": { + "shortName": "AnalyticsAdminServiceClient", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminServiceClient" + }, + "method": { + "shortName": "BatchCreateUserLinks", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.BatchCreateUserLinks", + "service": { + "shortName": "AnalyticsAdminService", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService" + } + } + } + }, + { + "regionTag": "analyticsadmin_v1alpha_generated_AnalyticsAdminService_UpdateUserLink_async", + "title": "AnalyticsAdminService updateUserLink Sample", + "origin": "API_DEFINITION", + "description": " Updates a user link on an account or property.", + "canonical": true, + "file": "analytics_admin_service.update_user_link.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 53, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateUserLink", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.UpdateUserLink", + "async": true, + "parameters": [ + { + "name": "user_link", + "type": ".google.analytics.admin.v1alpha.UserLink" + } + ], + "resultType": ".google.analytics.admin.v1alpha.UserLink", + "client": { + "shortName": "AnalyticsAdminServiceClient", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminServiceClient" + }, + "method": { + "shortName": "UpdateUserLink", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.UpdateUserLink", + "service": { + "shortName": "AnalyticsAdminService", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService" + } + } + } + }, + { + "regionTag": "analyticsadmin_v1alpha_generated_AnalyticsAdminService_BatchUpdateUserLinks_async", + "title": "AnalyticsAdminService batchUpdateUserLinks Sample", + "origin": "API_DEFINITION", + "description": " Updates information about multiple users' links to an account or property.", + "canonical": true, + "file": "analytics_admin_service.batch_update_user_links.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 62, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "BatchUpdateUserLinks", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.BatchUpdateUserLinks", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "requests", + "type": "TYPE_MESSAGE[]" + } + ], + "resultType": ".google.analytics.admin.v1alpha.BatchUpdateUserLinksResponse", + "client": { + "shortName": "AnalyticsAdminServiceClient", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminServiceClient" + }, + "method": { + "shortName": "BatchUpdateUserLinks", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.BatchUpdateUserLinks", + "service": { + "shortName": "AnalyticsAdminService", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService" + } + } + } + }, + { + "regionTag": "analyticsadmin_v1alpha_generated_AnalyticsAdminService_DeleteUserLink_async", + "title": "AnalyticsAdminService deleteUserLink Sample", + "origin": "API_DEFINITION", + "description": " Deletes a user link on an account or property.", + "canonical": true, + "file": "analytics_admin_service.delete_user_link.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 53, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteUserLink", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.DeleteUserLink", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "AnalyticsAdminServiceClient", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminServiceClient" + }, + "method": { + "shortName": "DeleteUserLink", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.DeleteUserLink", + "service": { + "shortName": "AnalyticsAdminService", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService" + } + } + } + }, + { + "regionTag": "analyticsadmin_v1alpha_generated_AnalyticsAdminService_BatchDeleteUserLinks_async", + "title": "AnalyticsAdminService batchDeleteUserLinks Sample", + "origin": "API_DEFINITION", + "description": " Deletes information about multiple users' links to an account or property.", + "canonical": true, + "file": "analytics_admin_service.batch_delete_user_links.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 62, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "BatchDeleteUserLinks", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.BatchDeleteUserLinks", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "requests", + "type": "TYPE_MESSAGE[]" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "AnalyticsAdminServiceClient", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminServiceClient" + }, + "method": { + "shortName": "BatchDeleteUserLinks", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.BatchDeleteUserLinks", + "service": { + "shortName": "AnalyticsAdminService", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService" + } + } + } + }, + { + "regionTag": "analyticsadmin_v1alpha_generated_AnalyticsAdminService_CreateFirebaseLink_async", + "title": "AnalyticsAdminService createFirebaseLink Sample", + "origin": "API_DEFINITION", + "description": " Creates a FirebaseLink. Properties can have at most one FirebaseLink.", + "canonical": true, + "file": "analytics_admin_service.create_firebase_link.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 59, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateFirebaseLink", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.CreateFirebaseLink", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "firebase_link", + "type": ".google.analytics.admin.v1alpha.FirebaseLink" + } + ], + "resultType": ".google.analytics.admin.v1alpha.FirebaseLink", + "client": { + "shortName": "AnalyticsAdminServiceClient", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminServiceClient" + }, + "method": { + "shortName": "CreateFirebaseLink", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.CreateFirebaseLink", + "service": { + "shortName": "AnalyticsAdminService", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService" + } + } + } + }, + { + "regionTag": "analyticsadmin_v1alpha_generated_AnalyticsAdminService_DeleteFirebaseLink_async", + "title": "AnalyticsAdminService deleteFirebaseLink Sample", + "origin": "API_DEFINITION", + "description": " Deletes a FirebaseLink on a property", + "canonical": true, + "file": "analytics_admin_service.delete_firebase_link.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteFirebaseLink", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.DeleteFirebaseLink", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "AnalyticsAdminServiceClient", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminServiceClient" + }, + "method": { + "shortName": "DeleteFirebaseLink", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.DeleteFirebaseLink", + "service": { + "shortName": "AnalyticsAdminService", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService" + } + } + } + }, + { + "regionTag": "analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListFirebaseLinks_async", + "title": "AnalyticsAdminService listFirebaseLinks Sample", + "origin": "API_DEFINITION", + "description": " Lists FirebaseLinks on a property. Properties can have at most one FirebaseLink.", + "canonical": true, + "file": "analytics_admin_service.list_firebase_links.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 70, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListFirebaseLinks", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.ListFirebaseLinks", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.analytics.admin.v1alpha.ListFirebaseLinksResponse", + "client": { + "shortName": "AnalyticsAdminServiceClient", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminServiceClient" + }, + "method": { + "shortName": "ListFirebaseLinks", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.ListFirebaseLinks", + "service": { + "shortName": "AnalyticsAdminService", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService" + } + } + } + }, + { + "regionTag": "analyticsadmin_v1alpha_generated_AnalyticsAdminService_GetGlobalSiteTag_async", + "title": "AnalyticsAdminService getGlobalSiteTag Sample", + "origin": "API_DEFINITION", + "description": " Returns the Site Tag for the specified web stream. Site Tags are immutable singletons.", + "canonical": true, + "file": "analytics_admin_service.get_global_site_tag.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 56, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetGlobalSiteTag", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.GetGlobalSiteTag", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.analytics.admin.v1alpha.GlobalSiteTag", + "client": { + "shortName": "AnalyticsAdminServiceClient", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminServiceClient" + }, + "method": { + "shortName": "GetGlobalSiteTag", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.GetGlobalSiteTag", + "service": { + "shortName": "AnalyticsAdminService", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService" + } + } + } + }, + { + "regionTag": "analyticsadmin_v1alpha_generated_AnalyticsAdminService_CreateGoogleAdsLink_async", + "title": "AnalyticsAdminService createGoogleAdsLink Sample", + "origin": "API_DEFINITION", + "description": " Creates a GoogleAdsLink.", + "canonical": true, + "file": "analytics_admin_service.create_google_ads_link.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 58, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateGoogleAdsLink", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.CreateGoogleAdsLink", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "google_ads_link", + "type": ".google.analytics.admin.v1alpha.GoogleAdsLink" + } + ], + "resultType": ".google.analytics.admin.v1alpha.GoogleAdsLink", + "client": { + "shortName": "AnalyticsAdminServiceClient", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminServiceClient" + }, + "method": { + "shortName": "CreateGoogleAdsLink", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.CreateGoogleAdsLink", + "service": { + "shortName": "AnalyticsAdminService", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService" + } + } + } + }, + { + "regionTag": "analyticsadmin_v1alpha_generated_AnalyticsAdminService_UpdateGoogleAdsLink_async", + "title": "AnalyticsAdminService updateGoogleAdsLink Sample", + "origin": "API_DEFINITION", + "description": " Updates a GoogleAdsLink on a property", + "canonical": true, + "file": "analytics_admin_service.update_google_ads_link.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 59, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateGoogleAdsLink", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.UpdateGoogleAdsLink", + "async": true, + "parameters": [ + { + "name": "google_ads_link", + "type": ".google.analytics.admin.v1alpha.GoogleAdsLink" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + } + ], + "resultType": ".google.analytics.admin.v1alpha.GoogleAdsLink", + "client": { + "shortName": "AnalyticsAdminServiceClient", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminServiceClient" + }, + "method": { + "shortName": "UpdateGoogleAdsLink", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.UpdateGoogleAdsLink", + "service": { + "shortName": "AnalyticsAdminService", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService" + } + } + } + }, + { + "regionTag": "analyticsadmin_v1alpha_generated_AnalyticsAdminService_DeleteGoogleAdsLink_async", + "title": "AnalyticsAdminService deleteGoogleAdsLink Sample", + "origin": "API_DEFINITION", + "description": " Deletes a GoogleAdsLink on a property", + "canonical": true, + "file": "analytics_admin_service.delete_google_ads_link.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 53, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteGoogleAdsLink", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.DeleteGoogleAdsLink", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "AnalyticsAdminServiceClient", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminServiceClient" + }, + "method": { + "shortName": "DeleteGoogleAdsLink", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.DeleteGoogleAdsLink", + "service": { + "shortName": "AnalyticsAdminService", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService" + } + } + } + }, + { + "regionTag": "analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListGoogleAdsLinks_async", + "title": "AnalyticsAdminService listGoogleAdsLinks Sample", + "origin": "API_DEFINITION", + "description": " Lists GoogleAdsLinks on a property.", + "canonical": true, + "file": "analytics_admin_service.list_google_ads_links.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 68, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListGoogleAdsLinks", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.ListGoogleAdsLinks", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.analytics.admin.v1alpha.ListGoogleAdsLinksResponse", + "client": { + "shortName": "AnalyticsAdminServiceClient", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminServiceClient" + }, + "method": { + "shortName": "ListGoogleAdsLinks", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.ListGoogleAdsLinks", + "service": { + "shortName": "AnalyticsAdminService", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService" + } + } + } + }, + { + "regionTag": "analyticsadmin_v1alpha_generated_AnalyticsAdminService_GetDataSharingSettings_async", + "title": "AnalyticsAdminService getDataSharingSettings Sample", + "origin": "API_DEFINITION", + "description": " Get data sharing settings on an account. Data sharing settings are singletons.", + "canonical": true, + "file": "analytics_admin_service.get_data_sharing_settings.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 55, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetDataSharingSettings", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.GetDataSharingSettings", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.analytics.admin.v1alpha.DataSharingSettings", + "client": { + "shortName": "AnalyticsAdminServiceClient", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminServiceClient" + }, + "method": { + "shortName": "GetDataSharingSettings", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.GetDataSharingSettings", + "service": { + "shortName": "AnalyticsAdminService", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService" + } + } + } + }, + { + "regionTag": "analyticsadmin_v1alpha_generated_AnalyticsAdminService_GetMeasurementProtocolSecret_async", + "title": "AnalyticsAdminService getMeasurementProtocolSecret Sample", + "origin": "API_DEFINITION", + "description": " Lookup for a single \"GA4\" MeasurementProtocolSecret.", + "canonical": true, + "file": "analytics_admin_service.get_measurement_protocol_secret.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 55, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetMeasurementProtocolSecret", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.GetMeasurementProtocolSecret", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.analytics.admin.v1alpha.MeasurementProtocolSecret", + "client": { + "shortName": "AnalyticsAdminServiceClient", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminServiceClient" + }, + "method": { + "shortName": "GetMeasurementProtocolSecret", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.GetMeasurementProtocolSecret", + "service": { + "shortName": "AnalyticsAdminService", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService" + } + } + } + }, + { + "regionTag": "analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListMeasurementProtocolSecrets_async", + "title": "AnalyticsAdminService listMeasurementProtocolSecrets Sample", + "origin": "API_DEFINITION", + "description": " Returns child MeasurementProtocolSecrets under the specified parent Property.", + "canonical": true, + "file": "analytics_admin_service.list_measurement_protocol_secrets.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 70, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListMeasurementProtocolSecrets", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.ListMeasurementProtocolSecrets", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.analytics.admin.v1alpha.ListMeasurementProtocolSecretsResponse", + "client": { + "shortName": "AnalyticsAdminServiceClient", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminServiceClient" + }, + "method": { + "shortName": "ListMeasurementProtocolSecrets", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.ListMeasurementProtocolSecrets", + "service": { + "shortName": "AnalyticsAdminService", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService" + } + } + } + }, + { + "regionTag": "analyticsadmin_v1alpha_generated_AnalyticsAdminService_CreateMeasurementProtocolSecret_async", + "title": "AnalyticsAdminService createMeasurementProtocolSecret Sample", + "origin": "API_DEFINITION", + "description": " Creates a measurement protocol secret.", + "canonical": true, + "file": "analytics_admin_service.create_measurement_protocol_secret.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 59, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateMeasurementProtocolSecret", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.CreateMeasurementProtocolSecret", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "measurement_protocol_secret", + "type": ".google.analytics.admin.v1alpha.MeasurementProtocolSecret" + } + ], + "resultType": ".google.analytics.admin.v1alpha.MeasurementProtocolSecret", + "client": { + "shortName": "AnalyticsAdminServiceClient", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminServiceClient" + }, + "method": { + "shortName": "CreateMeasurementProtocolSecret", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.CreateMeasurementProtocolSecret", + "service": { + "shortName": "AnalyticsAdminService", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService" + } + } + } + }, + { + "regionTag": "analyticsadmin_v1alpha_generated_AnalyticsAdminService_DeleteMeasurementProtocolSecret_async", + "title": "AnalyticsAdminService deleteMeasurementProtocolSecret Sample", + "origin": "API_DEFINITION", + "description": " Deletes target MeasurementProtocolSecret.", + "canonical": true, + "file": "analytics_admin_service.delete_measurement_protocol_secret.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 55, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteMeasurementProtocolSecret", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.DeleteMeasurementProtocolSecret", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "AnalyticsAdminServiceClient", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminServiceClient" + }, + "method": { + "shortName": "DeleteMeasurementProtocolSecret", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.DeleteMeasurementProtocolSecret", + "service": { + "shortName": "AnalyticsAdminService", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService" + } + } + } + }, + { + "regionTag": "analyticsadmin_v1alpha_generated_AnalyticsAdminService_UpdateMeasurementProtocolSecret_async", + "title": "AnalyticsAdminService updateMeasurementProtocolSecret Sample", + "origin": "API_DEFINITION", + "description": " Updates a measurement protocol secret.", + "canonical": true, + "file": "analytics_admin_service.update_measurement_protocol_secret.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 57, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateMeasurementProtocolSecret", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.UpdateMeasurementProtocolSecret", + "async": true, + "parameters": [ + { + "name": "measurement_protocol_secret", + "type": ".google.analytics.admin.v1alpha.MeasurementProtocolSecret" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + } + ], + "resultType": ".google.analytics.admin.v1alpha.MeasurementProtocolSecret", + "client": { + "shortName": "AnalyticsAdminServiceClient", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminServiceClient" + }, + "method": { + "shortName": "UpdateMeasurementProtocolSecret", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.UpdateMeasurementProtocolSecret", + "service": { + "shortName": "AnalyticsAdminService", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService" + } + } + } + }, + { + "regionTag": "analyticsadmin_v1alpha_generated_AnalyticsAdminService_AcknowledgeUserDataCollection_async", + "title": "AnalyticsAdminService acknowledgeUserDataCollection Sample", + "origin": "API_DEFINITION", + "description": " Acknowledges the terms of user data collection for the specified property. This acknowledgement must be completed (either in the Google Analytics UI or via this API) before MeasurementProtocolSecret resources may be created.", + "canonical": true, + "file": "analytics_admin_service.acknowledge_user_data_collection.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 64, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "AcknowledgeUserDataCollection", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.AcknowledgeUserDataCollection", + "async": true, + "parameters": [ + { + "name": "property", + "type": "TYPE_STRING" + }, + { + "name": "acknowledgement", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.analytics.admin.v1alpha.AcknowledgeUserDataCollectionResponse", + "client": { + "shortName": "AnalyticsAdminServiceClient", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminServiceClient" + }, + "method": { + "shortName": "AcknowledgeUserDataCollection", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.AcknowledgeUserDataCollection", + "service": { + "shortName": "AnalyticsAdminService", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService" + } + } + } + }, + { + "regionTag": "analyticsadmin_v1alpha_generated_AnalyticsAdminService_SearchChangeHistoryEvents_async", + "title": "AnalyticsAdminService searchChangeHistoryEvents Sample", + "origin": "API_DEFINITION", + "description": " Searches through all changes to an account or its children given the specified set of filters.", + "canonical": true, + "file": "analytics_admin_service.search_change_history_events.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 96, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "SearchChangeHistoryEvents", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.SearchChangeHistoryEvents", + "async": true, + "parameters": [ + { + "name": "account", + "type": "TYPE_STRING" + }, + { + "name": "property", + "type": "TYPE_STRING" + }, + { + "name": "resource_type", + "type": "TYPE_ENUM[]" + }, + { + "name": "action", + "type": "TYPE_ENUM[]" + }, + { + "name": "actor_email", + "type": "TYPE_STRING[]" + }, + { + "name": "earliest_change_time", + "type": ".google.protobuf.Timestamp" + }, + { + "name": "latest_change_time", + "type": ".google.protobuf.Timestamp" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.analytics.admin.v1alpha.SearchChangeHistoryEventsResponse", + "client": { + "shortName": "AnalyticsAdminServiceClient", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminServiceClient" + }, + "method": { + "shortName": "SearchChangeHistoryEvents", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.SearchChangeHistoryEvents", + "service": { + "shortName": "AnalyticsAdminService", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService" + } + } + } + }, + { + "regionTag": "analyticsadmin_v1alpha_generated_AnalyticsAdminService_GetGoogleSignalsSettings_async", + "title": "AnalyticsAdminService getGoogleSignalsSettings Sample", + "origin": "API_DEFINITION", + "description": " Lookup for Google Signals settings for a property.", + "canonical": true, + "file": "analytics_admin_service.get_google_signals_settings.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetGoogleSignalsSettings", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.GetGoogleSignalsSettings", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.analytics.admin.v1alpha.GoogleSignalsSettings", + "client": { + "shortName": "AnalyticsAdminServiceClient", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminServiceClient" + }, + "method": { + "shortName": "GetGoogleSignalsSettings", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.GetGoogleSignalsSettings", + "service": { + "shortName": "AnalyticsAdminService", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService" + } + } + } + }, + { + "regionTag": "analyticsadmin_v1alpha_generated_AnalyticsAdminService_UpdateGoogleSignalsSettings_async", + "title": "AnalyticsAdminService updateGoogleSignalsSettings Sample", + "origin": "API_DEFINITION", + "description": " Updates Google Signals settings for a property.", + "canonical": true, + "file": "analytics_admin_service.update_google_signals_settings.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 61, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateGoogleSignalsSettings", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.UpdateGoogleSignalsSettings", + "async": true, + "parameters": [ + { + "name": "google_signals_settings", + "type": ".google.analytics.admin.v1alpha.GoogleSignalsSettings" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + } + ], + "resultType": ".google.analytics.admin.v1alpha.GoogleSignalsSettings", + "client": { + "shortName": "AnalyticsAdminServiceClient", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminServiceClient" + }, + "method": { + "shortName": "UpdateGoogleSignalsSettings", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.UpdateGoogleSignalsSettings", + "service": { + "shortName": "AnalyticsAdminService", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService" + } + } + } + }, + { + "regionTag": "analyticsadmin_v1alpha_generated_AnalyticsAdminService_CreateConversionEvent_async", + "title": "AnalyticsAdminService createConversionEvent Sample", + "origin": "API_DEFINITION", + "description": " Creates a conversion event with the specified attributes.", + "canonical": true, + "file": "analytics_admin_service.create_conversion_event.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 59, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateConversionEvent", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.CreateConversionEvent", + "async": true, + "parameters": [ + { + "name": "conversion_event", + "type": ".google.analytics.admin.v1alpha.ConversionEvent" + }, + { + "name": "parent", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.analytics.admin.v1alpha.ConversionEvent", + "client": { + "shortName": "AnalyticsAdminServiceClient", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminServiceClient" + }, + "method": { + "shortName": "CreateConversionEvent", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.CreateConversionEvent", + "service": { + "shortName": "AnalyticsAdminService", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService" + } + } + } + }, + { + "regionTag": "analyticsadmin_v1alpha_generated_AnalyticsAdminService_GetConversionEvent_async", + "title": "AnalyticsAdminService getConversionEvent Sample", + "origin": "API_DEFINITION", + "description": " Retrieve a single conversion event.", + "canonical": true, + "file": "analytics_admin_service.get_conversion_event.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 55, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetConversionEvent", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.GetConversionEvent", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.analytics.admin.v1alpha.ConversionEvent", + "client": { + "shortName": "AnalyticsAdminServiceClient", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminServiceClient" + }, + "method": { + "shortName": "GetConversionEvent", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.GetConversionEvent", + "service": { + "shortName": "AnalyticsAdminService", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService" + } + } + } + }, + { + "regionTag": "analyticsadmin_v1alpha_generated_AnalyticsAdminService_DeleteConversionEvent_async", + "title": "AnalyticsAdminService deleteConversionEvent Sample", + "origin": "API_DEFINITION", + "description": " Deletes a conversion event in a property.", + "canonical": true, + "file": "analytics_admin_service.delete_conversion_event.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 55, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteConversionEvent", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.DeleteConversionEvent", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "AnalyticsAdminServiceClient", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminServiceClient" + }, + "method": { + "shortName": "DeleteConversionEvent", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.DeleteConversionEvent", + "service": { + "shortName": "AnalyticsAdminService", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService" + } + } + } + }, + { + "regionTag": "analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListConversionEvents_async", + "title": "AnalyticsAdminService listConversionEvents Sample", + "origin": "API_DEFINITION", + "description": " Returns a list of conversion events in the specified parent property. Returns an empty list if no conversion events are found.", + "canonical": true, + "file": "analytics_admin_service.list_conversion_events.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 69, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListConversionEvents", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.ListConversionEvents", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.analytics.admin.v1alpha.ListConversionEventsResponse", + "client": { + "shortName": "AnalyticsAdminServiceClient", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminServiceClient" + }, + "method": { + "shortName": "ListConversionEvents", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.ListConversionEvents", + "service": { + "shortName": "AnalyticsAdminService", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService" + } + } + } + }, + { + "regionTag": "analyticsadmin_v1alpha_generated_AnalyticsAdminService_GetDisplayVideo360AdvertiserLink_async", + "title": "AnalyticsAdminService getDisplayVideo360AdvertiserLink Sample", + "origin": "API_DEFINITION", + "description": " Look up a single DisplayVideo360AdvertiserLink", + "canonical": true, + "file": "analytics_admin_service.get_display_video360_advertiser_link.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetDisplayVideo360AdvertiserLink", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.GetDisplayVideo360AdvertiserLink", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink", + "client": { + "shortName": "AnalyticsAdminServiceClient", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminServiceClient" + }, + "method": { + "shortName": "GetDisplayVideo360AdvertiserLink", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.GetDisplayVideo360AdvertiserLink", + "service": { + "shortName": "AnalyticsAdminService", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService" + } + } + } + }, + { + "regionTag": "analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListDisplayVideo360AdvertiserLinks_async", + "title": "AnalyticsAdminService listDisplayVideo360AdvertiserLinks Sample", + "origin": "API_DEFINITION", + "description": " Lists all DisplayVideo360AdvertiserLinks on a property.", + "canonical": true, + "file": "analytics_admin_service.list_display_video360_advertiser_links.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 69, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListDisplayVideo360AdvertiserLinks", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.ListDisplayVideo360AdvertiserLinks", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinksResponse", + "client": { + "shortName": "AnalyticsAdminServiceClient", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminServiceClient" + }, + "method": { + "shortName": "ListDisplayVideo360AdvertiserLinks", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.ListDisplayVideo360AdvertiserLinks", + "service": { + "shortName": "AnalyticsAdminService", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService" + } + } + } + }, + { + "regionTag": "analyticsadmin_v1alpha_generated_AnalyticsAdminService_CreateDisplayVideo360AdvertiserLink_async", + "title": "AnalyticsAdminService createDisplayVideo360AdvertiserLink Sample", + "origin": "API_DEFINITION", + "description": " Creates a DisplayVideo360AdvertiserLink. This can only be utilized by users who have proper authorization both on the Google Analytics property and on the Display & Video 360 advertiser. Users who do not have access to the Display & Video 360 advertiser should instead seek to create a DisplayVideo360LinkProposal.", + "canonical": true, + "file": "analytics_admin_service.create_display_video360_advertiser_link.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 58, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateDisplayVideo360AdvertiserLink", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.CreateDisplayVideo360AdvertiserLink", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "display_video_360_advertiser_link", + "type": ".google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink" + } + ], + "resultType": ".google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink", + "client": { + "shortName": "AnalyticsAdminServiceClient", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminServiceClient" + }, + "method": { + "shortName": "CreateDisplayVideo360AdvertiserLink", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.CreateDisplayVideo360AdvertiserLink", + "service": { + "shortName": "AnalyticsAdminService", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService" + } + } + } + }, + { + "regionTag": "analyticsadmin_v1alpha_generated_AnalyticsAdminService_DeleteDisplayVideo360AdvertiserLink_async", + "title": "AnalyticsAdminService deleteDisplayVideo360AdvertiserLink Sample", + "origin": "API_DEFINITION", + "description": " Deletes a DisplayVideo360AdvertiserLink on a property.", + "canonical": true, + "file": "analytics_admin_service.delete_display_video360_advertiser_link.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteDisplayVideo360AdvertiserLink", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.DeleteDisplayVideo360AdvertiserLink", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "AnalyticsAdminServiceClient", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminServiceClient" + }, + "method": { + "shortName": "DeleteDisplayVideo360AdvertiserLink", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.DeleteDisplayVideo360AdvertiserLink", + "service": { + "shortName": "AnalyticsAdminService", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService" + } + } + } + }, + { + "regionTag": "analyticsadmin_v1alpha_generated_AnalyticsAdminService_UpdateDisplayVideo360AdvertiserLink_async", + "title": "AnalyticsAdminService updateDisplayVideo360AdvertiserLink Sample", + "origin": "API_DEFINITION", + "description": " Updates a DisplayVideo360AdvertiserLink on a property.", + "canonical": true, + "file": "analytics_admin_service.update_display_video360_advertiser_link.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 59, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateDisplayVideo360AdvertiserLink", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.UpdateDisplayVideo360AdvertiserLink", + "async": true, + "parameters": [ + { + "name": "display_video_360_advertiser_link", + "type": ".google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + } + ], + "resultType": ".google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink", + "client": { + "shortName": "AnalyticsAdminServiceClient", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminServiceClient" + }, + "method": { + "shortName": "UpdateDisplayVideo360AdvertiserLink", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.UpdateDisplayVideo360AdvertiserLink", + "service": { + "shortName": "AnalyticsAdminService", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService" + } + } + } + }, + { + "regionTag": "analyticsadmin_v1alpha_generated_AnalyticsAdminService_GetDisplayVideo360AdvertiserLinkProposal_async", + "title": "AnalyticsAdminService getDisplayVideo360AdvertiserLinkProposal Sample", + "origin": "API_DEFINITION", + "description": " Lookup for a single DisplayVideo360AdvertiserLinkProposal.", + "canonical": true, + "file": "analytics_admin_service.get_display_video360_advertiser_link_proposal.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetDisplayVideo360AdvertiserLinkProposal", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.GetDisplayVideo360AdvertiserLinkProposal", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal", + "client": { + "shortName": "AnalyticsAdminServiceClient", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminServiceClient" + }, + "method": { + "shortName": "GetDisplayVideo360AdvertiserLinkProposal", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.GetDisplayVideo360AdvertiserLinkProposal", + "service": { + "shortName": "AnalyticsAdminService", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService" + } + } + } + }, + { + "regionTag": "analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListDisplayVideo360AdvertiserLinkProposals_async", + "title": "AnalyticsAdminService listDisplayVideo360AdvertiserLinkProposals Sample", + "origin": "API_DEFINITION", + "description": " Lists DisplayVideo360AdvertiserLinkProposals on a property.", + "canonical": true, + "file": "analytics_admin_service.list_display_video360_advertiser_link_proposals.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 70, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListDisplayVideo360AdvertiserLinkProposals", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.ListDisplayVideo360AdvertiserLinkProposals", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinkProposalsResponse", + "client": { + "shortName": "AnalyticsAdminServiceClient", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminServiceClient" + }, + "method": { + "shortName": "ListDisplayVideo360AdvertiserLinkProposals", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.ListDisplayVideo360AdvertiserLinkProposals", + "service": { + "shortName": "AnalyticsAdminService", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService" + } + } + } + }, + { + "regionTag": "analyticsadmin_v1alpha_generated_AnalyticsAdminService_CreateDisplayVideo360AdvertiserLinkProposal_async", + "title": "AnalyticsAdminService createDisplayVideo360AdvertiserLinkProposal Sample", + "origin": "API_DEFINITION", + "description": " Creates a DisplayVideo360AdvertiserLinkProposal.", + "canonical": true, + "file": "analytics_admin_service.create_display_video360_advertiser_link_proposal.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 58, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateDisplayVideo360AdvertiserLinkProposal", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.CreateDisplayVideo360AdvertiserLinkProposal", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "display_video_360_advertiser_link_proposal", + "type": ".google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal" + } + ], + "resultType": ".google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal", + "client": { + "shortName": "AnalyticsAdminServiceClient", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminServiceClient" + }, + "method": { + "shortName": "CreateDisplayVideo360AdvertiserLinkProposal", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.CreateDisplayVideo360AdvertiserLinkProposal", + "service": { + "shortName": "AnalyticsAdminService", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService" + } + } + } + }, + { + "regionTag": "analyticsadmin_v1alpha_generated_AnalyticsAdminService_DeleteDisplayVideo360AdvertiserLinkProposal_async", + "title": "AnalyticsAdminService deleteDisplayVideo360AdvertiserLinkProposal Sample", + "origin": "API_DEFINITION", + "description": " Deletes a DisplayVideo360AdvertiserLinkProposal on a property. This can only be used on cancelled proposals.", + "canonical": true, + "file": "analytics_admin_service.delete_display_video360_advertiser_link_proposal.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteDisplayVideo360AdvertiserLinkProposal", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.DeleteDisplayVideo360AdvertiserLinkProposal", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "AnalyticsAdminServiceClient", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminServiceClient" + }, + "method": { + "shortName": "DeleteDisplayVideo360AdvertiserLinkProposal", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.DeleteDisplayVideo360AdvertiserLinkProposal", + "service": { + "shortName": "AnalyticsAdminService", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService" + } + } + } + }, + { + "regionTag": "analyticsadmin_v1alpha_generated_AnalyticsAdminService_ApproveDisplayVideo360AdvertiserLinkProposal_async", + "title": "AnalyticsAdminService approveDisplayVideo360AdvertiserLinkProposal Sample", + "origin": "API_DEFINITION", + "description": " Approves a DisplayVideo360AdvertiserLinkProposal. The DisplayVideo360AdvertiserLinkProposal will be deleted and a new DisplayVideo360AdvertiserLink will be created.", + "canonical": true, + "file": "analytics_admin_service.approve_display_video360_advertiser_link_proposal.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ApproveDisplayVideo360AdvertiserLinkProposal", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.ApproveDisplayVideo360AdvertiserLinkProposal", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.analytics.admin.v1alpha.ApproveDisplayVideo360AdvertiserLinkProposalResponse", + "client": { + "shortName": "AnalyticsAdminServiceClient", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminServiceClient" + }, + "method": { + "shortName": "ApproveDisplayVideo360AdvertiserLinkProposal", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.ApproveDisplayVideo360AdvertiserLinkProposal", + "service": { + "shortName": "AnalyticsAdminService", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService" + } + } + } + }, + { + "regionTag": "analyticsadmin_v1alpha_generated_AnalyticsAdminService_CancelDisplayVideo360AdvertiserLinkProposal_async", + "title": "AnalyticsAdminService cancelDisplayVideo360AdvertiserLinkProposal Sample", + "origin": "API_DEFINITION", + "description": " Cancels a DisplayVideo360AdvertiserLinkProposal. Cancelling can mean either: - Declining a proposal initiated from Display & Video 360 - Withdrawing a proposal initiated from Google Analytics After being cancelled, a proposal will eventually be deleted automatically.", + "canonical": true, + "file": "analytics_admin_service.cancel_display_video360_advertiser_link_proposal.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CancelDisplayVideo360AdvertiserLinkProposal", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.CancelDisplayVideo360AdvertiserLinkProposal", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal", + "client": { + "shortName": "AnalyticsAdminServiceClient", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminServiceClient" + }, + "method": { + "shortName": "CancelDisplayVideo360AdvertiserLinkProposal", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.CancelDisplayVideo360AdvertiserLinkProposal", + "service": { + "shortName": "AnalyticsAdminService", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService" + } + } + } + }, + { + "regionTag": "analyticsadmin_v1alpha_generated_AnalyticsAdminService_CreateCustomDimension_async", + "title": "AnalyticsAdminService createCustomDimension Sample", + "origin": "API_DEFINITION", + "description": " Creates a CustomDimension.", + "canonical": true, + "file": "analytics_admin_service.create_custom_dimension.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 58, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateCustomDimension", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.CreateCustomDimension", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "custom_dimension", + "type": ".google.analytics.admin.v1alpha.CustomDimension" + } + ], + "resultType": ".google.analytics.admin.v1alpha.CustomDimension", + "client": { + "shortName": "AnalyticsAdminServiceClient", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminServiceClient" + }, + "method": { + "shortName": "CreateCustomDimension", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.CreateCustomDimension", + "service": { + "shortName": "AnalyticsAdminService", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService" + } + } + } + }, + { + "regionTag": "analyticsadmin_v1alpha_generated_AnalyticsAdminService_UpdateCustomDimension_async", + "title": "AnalyticsAdminService updateCustomDimension Sample", + "origin": "API_DEFINITION", + "description": " Updates a CustomDimension on a property.", + "canonical": true, + "file": "analytics_admin_service.update_custom_dimension.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 59, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateCustomDimension", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.UpdateCustomDimension", + "async": true, + "parameters": [ + { + "name": "custom_dimension", + "type": ".google.analytics.admin.v1alpha.CustomDimension" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + } + ], + "resultType": ".google.analytics.admin.v1alpha.CustomDimension", + "client": { + "shortName": "AnalyticsAdminServiceClient", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminServiceClient" + }, + "method": { + "shortName": "UpdateCustomDimension", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.UpdateCustomDimension", + "service": { + "shortName": "AnalyticsAdminService", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService" + } + } + } + }, + { + "regionTag": "analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListCustomDimensions_async", + "title": "AnalyticsAdminService listCustomDimensions Sample", + "origin": "API_DEFINITION", + "description": " Lists CustomDimensions on a property.", + "canonical": true, + "file": "analytics_admin_service.list_custom_dimensions.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 68, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListCustomDimensions", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.ListCustomDimensions", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.analytics.admin.v1alpha.ListCustomDimensionsResponse", + "client": { + "shortName": "AnalyticsAdminServiceClient", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminServiceClient" + }, + "method": { + "shortName": "ListCustomDimensions", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.ListCustomDimensions", + "service": { + "shortName": "AnalyticsAdminService", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService" + } + } + } + }, + { + "regionTag": "analyticsadmin_v1alpha_generated_AnalyticsAdminService_ArchiveCustomDimension_async", + "title": "AnalyticsAdminService archiveCustomDimension Sample", + "origin": "API_DEFINITION", + "description": " Archives a CustomDimension on a property.", + "canonical": true, + "file": "analytics_admin_service.archive_custom_dimension.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ArchiveCustomDimension", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.ArchiveCustomDimension", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "AnalyticsAdminServiceClient", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminServiceClient" + }, + "method": { + "shortName": "ArchiveCustomDimension", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.ArchiveCustomDimension", + "service": { + "shortName": "AnalyticsAdminService", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService" + } + } + } + }, + { + "regionTag": "analyticsadmin_v1alpha_generated_AnalyticsAdminService_GetCustomDimension_async", + "title": "AnalyticsAdminService getCustomDimension Sample", + "origin": "API_DEFINITION", + "description": " Lookup for a single CustomDimension.", + "canonical": true, + "file": "analytics_admin_service.get_custom_dimension.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetCustomDimension", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.GetCustomDimension", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.analytics.admin.v1alpha.CustomDimension", + "client": { + "shortName": "AnalyticsAdminServiceClient", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminServiceClient" + }, + "method": { + "shortName": "GetCustomDimension", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.GetCustomDimension", + "service": { + "shortName": "AnalyticsAdminService", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService" + } + } + } + }, + { + "regionTag": "analyticsadmin_v1alpha_generated_AnalyticsAdminService_CreateCustomMetric_async", + "title": "AnalyticsAdminService createCustomMetric Sample", + "origin": "API_DEFINITION", + "description": " Creates a CustomMetric.", + "canonical": true, + "file": "analytics_admin_service.create_custom_metric.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 58, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateCustomMetric", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.CreateCustomMetric", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "custom_metric", + "type": ".google.analytics.admin.v1alpha.CustomMetric" + } + ], + "resultType": ".google.analytics.admin.v1alpha.CustomMetric", + "client": { + "shortName": "AnalyticsAdminServiceClient", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminServiceClient" + }, + "method": { + "shortName": "CreateCustomMetric", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.CreateCustomMetric", + "service": { + "shortName": "AnalyticsAdminService", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService" + } + } + } + }, + { + "regionTag": "analyticsadmin_v1alpha_generated_AnalyticsAdminService_UpdateCustomMetric_async", + "title": "AnalyticsAdminService updateCustomMetric Sample", + "origin": "API_DEFINITION", + "description": " Updates a CustomMetric on a property.", + "canonical": true, + "file": "analytics_admin_service.update_custom_metric.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 59, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateCustomMetric", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.UpdateCustomMetric", + "async": true, + "parameters": [ + { + "name": "custom_metric", + "type": ".google.analytics.admin.v1alpha.CustomMetric" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + } + ], + "resultType": ".google.analytics.admin.v1alpha.CustomMetric", + "client": { + "shortName": "AnalyticsAdminServiceClient", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminServiceClient" + }, + "method": { + "shortName": "UpdateCustomMetric", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.UpdateCustomMetric", + "service": { + "shortName": "AnalyticsAdminService", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService" + } + } + } + }, + { + "regionTag": "analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListCustomMetrics_async", + "title": "AnalyticsAdminService listCustomMetrics Sample", + "origin": "API_DEFINITION", + "description": " Lists CustomMetrics on a property.", + "canonical": true, + "file": "analytics_admin_service.list_custom_metrics.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 68, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListCustomMetrics", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.ListCustomMetrics", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.analytics.admin.v1alpha.ListCustomMetricsResponse", + "client": { + "shortName": "AnalyticsAdminServiceClient", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminServiceClient" + }, + "method": { + "shortName": "ListCustomMetrics", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.ListCustomMetrics", + "service": { + "shortName": "AnalyticsAdminService", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService" + } + } + } + }, + { + "regionTag": "analyticsadmin_v1alpha_generated_AnalyticsAdminService_ArchiveCustomMetric_async", + "title": "AnalyticsAdminService archiveCustomMetric Sample", + "origin": "API_DEFINITION", + "description": " Archives a CustomMetric on a property.", + "canonical": true, + "file": "analytics_admin_service.archive_custom_metric.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ArchiveCustomMetric", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.ArchiveCustomMetric", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "AnalyticsAdminServiceClient", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminServiceClient" + }, + "method": { + "shortName": "ArchiveCustomMetric", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.ArchiveCustomMetric", + "service": { + "shortName": "AnalyticsAdminService", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService" + } + } + } + }, + { + "regionTag": "analyticsadmin_v1alpha_generated_AnalyticsAdminService_GetCustomMetric_async", + "title": "AnalyticsAdminService getCustomMetric Sample", + "origin": "API_DEFINITION", + "description": " Lookup for a single CustomMetric.", + "canonical": true, + "file": "analytics_admin_service.get_custom_metric.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetCustomMetric", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.GetCustomMetric", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.analytics.admin.v1alpha.CustomMetric", + "client": { + "shortName": "AnalyticsAdminServiceClient", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminServiceClient" + }, + "method": { + "shortName": "GetCustomMetric", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.GetCustomMetric", + "service": { + "shortName": "AnalyticsAdminService", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService" + } + } + } + }, + { + "regionTag": "analyticsadmin_v1alpha_generated_AnalyticsAdminService_GetDataRetentionSettings_async", + "title": "AnalyticsAdminService getDataRetentionSettings Sample", + "origin": "API_DEFINITION", + "description": " Returns the singleton data retention settings for this property.", + "canonical": true, + "file": "analytics_admin_service.get_data_retention_settings.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 56, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetDataRetentionSettings", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.GetDataRetentionSettings", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.analytics.admin.v1alpha.DataRetentionSettings", + "client": { + "shortName": "AnalyticsAdminServiceClient", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminServiceClient" + }, + "method": { + "shortName": "GetDataRetentionSettings", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.GetDataRetentionSettings", + "service": { + "shortName": "AnalyticsAdminService", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService" + } + } + } + }, + { + "regionTag": "analyticsadmin_v1alpha_generated_AnalyticsAdminService_UpdateDataRetentionSettings_async", + "title": "AnalyticsAdminService updateDataRetentionSettings Sample", + "origin": "API_DEFINITION", + "description": " Updates the singleton data retention settings for this property.", + "canonical": true, + "file": "analytics_admin_service.update_data_retention_settings.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 61, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateDataRetentionSettings", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.UpdateDataRetentionSettings", + "async": true, + "parameters": [ + { + "name": "data_retention_settings", + "type": ".google.analytics.admin.v1alpha.DataRetentionSettings" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + } + ], + "resultType": ".google.analytics.admin.v1alpha.DataRetentionSettings", + "client": { + "shortName": "AnalyticsAdminServiceClient", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminServiceClient" + }, + "method": { + "shortName": "UpdateDataRetentionSettings", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.UpdateDataRetentionSettings", + "service": { + "shortName": "AnalyticsAdminService", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService" + } + } + } + }, + { + "regionTag": "analyticsadmin_v1alpha_generated_AnalyticsAdminService_CreateDataStream_async", + "title": "AnalyticsAdminService createDataStream Sample", + "origin": "API_DEFINITION", + "description": " Creates a DataStream.", + "canonical": true, + "file": "analytics_admin_service.create_data_stream.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 58, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateDataStream", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.CreateDataStream", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "data_stream", + "type": ".google.analytics.admin.v1alpha.DataStream" + } + ], + "resultType": ".google.analytics.admin.v1alpha.DataStream", + "client": { + "shortName": "AnalyticsAdminServiceClient", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminServiceClient" + }, + "method": { + "shortName": "CreateDataStream", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.CreateDataStream", + "service": { + "shortName": "AnalyticsAdminService", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService" + } + } + } + }, + { + "regionTag": "analyticsadmin_v1alpha_generated_AnalyticsAdminService_DeleteDataStream_async", + "title": "AnalyticsAdminService deleteDataStream Sample", + "origin": "API_DEFINITION", + "description": " Deletes a DataStream on a property.", + "canonical": true, + "file": "analytics_admin_service.delete_data_stream.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteDataStream", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.DeleteDataStream", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "AnalyticsAdminServiceClient", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminServiceClient" + }, + "method": { + "shortName": "DeleteDataStream", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.DeleteDataStream", + "service": { + "shortName": "AnalyticsAdminService", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService" + } + } + } + }, + { + "regionTag": "analyticsadmin_v1alpha_generated_AnalyticsAdminService_UpdateDataStream_async", + "title": "AnalyticsAdminService updateDataStream Sample", + "origin": "API_DEFINITION", + "description": " Updates a DataStream on a property.", + "canonical": true, + "file": "analytics_admin_service.update_data_stream.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 59, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateDataStream", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.UpdateDataStream", + "async": true, + "parameters": [ + { + "name": "data_stream", + "type": ".google.analytics.admin.v1alpha.DataStream" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + } + ], + "resultType": ".google.analytics.admin.v1alpha.DataStream", + "client": { + "shortName": "AnalyticsAdminServiceClient", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminServiceClient" + }, + "method": { + "shortName": "UpdateDataStream", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.UpdateDataStream", + "service": { + "shortName": "AnalyticsAdminService", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService" + } + } + } + }, + { + "regionTag": "analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListDataStreams_async", + "title": "AnalyticsAdminService listDataStreams Sample", + "origin": "API_DEFINITION", + "description": " Lists DataStreams on a property.", + "canonical": true, + "file": "analytics_admin_service.list_data_streams.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 68, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListDataStreams", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.ListDataStreams", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.analytics.admin.v1alpha.ListDataStreamsResponse", + "client": { + "shortName": "AnalyticsAdminServiceClient", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminServiceClient" + }, + "method": { + "shortName": "ListDataStreams", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.ListDataStreams", + "service": { + "shortName": "AnalyticsAdminService", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService" + } + } + } + }, + { + "regionTag": "analyticsadmin_v1alpha_generated_AnalyticsAdminService_GetDataStream_async", + "title": "AnalyticsAdminService getDataStream Sample", + "origin": "API_DEFINITION", + "description": " Lookup for a single DataStream.", + "canonical": true, + "file": "analytics_admin_service.get_data_stream.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetDataStream", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.GetDataStream", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.analytics.admin.v1alpha.DataStream", + "client": { + "shortName": "AnalyticsAdminServiceClient", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminServiceClient" + }, + "method": { + "shortName": "GetDataStream", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.GetDataStream", + "service": { + "shortName": "AnalyticsAdminService", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService" + } + } + } + }, + { + "regionTag": "analyticsadmin_v1alpha_generated_AnalyticsAdminService_GetAudience_async", + "title": "AnalyticsAdminService getAudience Sample", + "origin": "API_DEFINITION", + "description": " Lookup for a single Audience. Audiences created before 2020 may not be supported.", + "canonical": true, + "file": "analytics_admin_service.get_audience.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetAudience", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.GetAudience", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.analytics.admin.v1alpha.Audience", + "client": { + "shortName": "AnalyticsAdminServiceClient", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminServiceClient" + }, + "method": { + "shortName": "GetAudience", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.GetAudience", + "service": { + "shortName": "AnalyticsAdminService", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService" + } + } + } + }, + { + "regionTag": "analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListAudiences_async", + "title": "AnalyticsAdminService listAudiences Sample", + "origin": "API_DEFINITION", + "description": " Lists Audiences on a property. Audiences created before 2020 may not be supported.", + "canonical": true, + "file": "analytics_admin_service.list_audiences.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 68, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListAudiences", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.ListAudiences", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.analytics.admin.v1alpha.ListAudiencesResponse", + "client": { + "shortName": "AnalyticsAdminServiceClient", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminServiceClient" + }, + "method": { + "shortName": "ListAudiences", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.ListAudiences", + "service": { + "shortName": "AnalyticsAdminService", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService" + } + } + } + }, + { + "regionTag": "analyticsadmin_v1alpha_generated_AnalyticsAdminService_CreateAudience_async", + "title": "AnalyticsAdminService createAudience Sample", + "origin": "API_DEFINITION", + "description": " Creates an Audience.", + "canonical": true, + "file": "analytics_admin_service.create_audience.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 58, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateAudience", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.CreateAudience", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "audience", + "type": ".google.analytics.admin.v1alpha.Audience" + } + ], + "resultType": ".google.analytics.admin.v1alpha.Audience", + "client": { + "shortName": "AnalyticsAdminServiceClient", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminServiceClient" + }, + "method": { + "shortName": "CreateAudience", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.CreateAudience", + "service": { + "shortName": "AnalyticsAdminService", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService" + } + } + } + }, + { + "regionTag": "analyticsadmin_v1alpha_generated_AnalyticsAdminService_UpdateAudience_async", + "title": "AnalyticsAdminService updateAudience Sample", + "origin": "API_DEFINITION", + "description": " Updates an Audience on a property.", + "canonical": true, + "file": "analytics_admin_service.update_audience.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 61, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateAudience", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.UpdateAudience", + "async": true, + "parameters": [ + { + "name": "audience", + "type": ".google.analytics.admin.v1alpha.Audience" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + } + ], + "resultType": ".google.analytics.admin.v1alpha.Audience", + "client": { + "shortName": "AnalyticsAdminServiceClient", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminServiceClient" + }, + "method": { + "shortName": "UpdateAudience", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.UpdateAudience", + "service": { + "shortName": "AnalyticsAdminService", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService" + } + } + } + }, + { + "regionTag": "analyticsadmin_v1alpha_generated_AnalyticsAdminService_ArchiveAudience_async", + "title": "AnalyticsAdminService archiveAudience Sample", + "origin": "API_DEFINITION", + "description": " Archives an Audience on a property.", + "canonical": true, + "file": "analytics_admin_service.archive_audience.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 53, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ArchiveAudience", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.ArchiveAudience", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "AnalyticsAdminServiceClient", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminServiceClient" + }, + "method": { + "shortName": "ArchiveAudience", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.ArchiveAudience", + "service": { + "shortName": "AnalyticsAdminService", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService" + } + } + } + }, + { + "regionTag": "analyticsadmin_v1alpha_generated_AnalyticsAdminService_GetAttributionSettings_async", + "title": "AnalyticsAdminService getAttributionSettings Sample", + "origin": "API_DEFINITION", + "description": " Lookup for a AttributionSettings singleton.", + "canonical": true, + "file": "analytics_admin_service.get_attribution_settings.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetAttributionSettings", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.GetAttributionSettings", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.analytics.admin.v1alpha.AttributionSettings", + "client": { + "shortName": "AnalyticsAdminServiceClient", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminServiceClient" + }, + "method": { + "shortName": "GetAttributionSettings", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.GetAttributionSettings", + "service": { + "shortName": "AnalyticsAdminService", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService" + } + } + } + }, + { + "regionTag": "analyticsadmin_v1alpha_generated_AnalyticsAdminService_UpdateAttributionSettings_async", + "title": "AnalyticsAdminService updateAttributionSettings Sample", + "origin": "API_DEFINITION", + "description": " Updates attribution settings on a property.", + "canonical": true, + "file": "analytics_admin_service.update_attribution_settings.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 61, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateAttributionSettings", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.UpdateAttributionSettings", + "async": true, + "parameters": [ + { + "name": "attribution_settings", + "type": ".google.analytics.admin.v1alpha.AttributionSettings" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + } + ], + "resultType": ".google.analytics.admin.v1alpha.AttributionSettings", + "client": { + "shortName": "AnalyticsAdminServiceClient", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminServiceClient" + }, + "method": { + "shortName": "UpdateAttributionSettings", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.UpdateAttributionSettings", + "service": { + "shortName": "AnalyticsAdminService", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService" + } + } + } + }, + { + "regionTag": "analyticsadmin_v1alpha_generated_AnalyticsAdminService_RunAccessReport_async", + "title": "AnalyticsAdminService runAccessReport Sample", + "origin": "API_DEFINITION", + "description": " Returns a customized report of data access records. The report provides records of each time a user reads Google Analytics reporting data. Access records are retained for up to 2 years. Data Access Reports can be requested for a property. The property must be in Google Analytics 360. This method is only available to Administrators. These data access records include GA4 UI Reporting, GA4 UI Explorations, GA4 Data API, and other products like Firebase & Admob that can retrieve data from Google Analytics through a linkage. These records don't include property configuration changes like adding a stream or changing a property's time zone. For configuration change history, see [searchChangeHistoryEvents](https://developers.google.com/analytics/devguides/config/admin/v1/rest/v1alpha/accounts/searchChangeHistoryEvents).", + "canonical": true, + "file": "analytics_admin_service.run_access_report.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 126, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "RunAccessReport", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.RunAccessReport", + "async": true, + "parameters": [ + { + "name": "entity", + "type": "TYPE_STRING" + }, + { + "name": "dimensions", + "type": "TYPE_MESSAGE[]" + }, + { + "name": "metrics", + "type": "TYPE_MESSAGE[]" + }, + { + "name": "date_ranges", + "type": "TYPE_MESSAGE[]" + }, + { + "name": "dimension_filter", + "type": ".google.analytics.admin.v1alpha.AccessFilterExpression" + }, + { + "name": "metric_filter", + "type": ".google.analytics.admin.v1alpha.AccessFilterExpression" + }, + { + "name": "offset", + "type": "TYPE_INT64" + }, + { + "name": "limit", + "type": "TYPE_INT64" + }, + { + "name": "time_zone", + "type": "TYPE_STRING" + }, + { + "name": "order_bys", + "type": "TYPE_MESSAGE[]" + }, + { + "name": "return_entity_quota", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.analytics.admin.v1alpha.RunAccessReportResponse", + "client": { + "shortName": "AnalyticsAdminServiceClient", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminServiceClient" + }, + "method": { + "shortName": "RunAccessReport", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService.RunAccessReport", + "service": { + "shortName": "AnalyticsAdminService", + "fullName": "google.analytics.admin.v1alpha.AnalyticsAdminService" + } + } + } + } + ] +} \ No newline at end of file diff --git a/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.acknowledge_user_data_collection.js b/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.acknowledge_user_data_collection.js new file mode 100644 index 00000000000..a22069b0e8c --- /dev/null +++ b/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.acknowledge_user_data_collection.js @@ -0,0 +1,72 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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(property, acknowledgement) { + // [START analyticsadmin_v1beta_generated_AnalyticsAdminService_AcknowledgeUserDataCollection_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 property for which to acknowledge user data collection. + */ + // const property = 'abc123' + /** + * Required. An acknowledgement that the caller of this method understands the terms + * of user data collection. + * This field must contain the exact value: + * "I acknowledge that I have the necessary privacy disclosures and rights + * from my end users for the collection and processing of their data, + * including the association of such data with the visitation information + * Google Analytics collects from my site and/or app property." + */ + // const acknowledgement = 'abc123' + + // Imports the Admin library + const {AnalyticsAdminServiceClient} = require('@google-cloud/admin').v1beta; + + // Instantiates a client + const adminClient = new AnalyticsAdminServiceClient(); + + async function callAcknowledgeUserDataCollection() { + // Construct request + const request = { + property, + acknowledgement, + }; + + // Run request + const response = await adminClient.acknowledgeUserDataCollection(request); + console.log(response); + } + + callAcknowledgeUserDataCollection(); + // [END analyticsadmin_v1beta_generated_AnalyticsAdminService_AcknowledgeUserDataCollection_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.archive_custom_dimension.js b/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.archive_custom_dimension.js new file mode 100644 index 00000000000..42f2159cd7a --- /dev/null +++ b/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.archive_custom_dimension.js @@ -0,0 +1,62 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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 analyticsadmin_v1beta_generated_AnalyticsAdminService_ArchiveCustomDimension_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 CustomDimension to archive. + * Example format: properties/1234/customDimensions/5678 + */ + // const name = 'abc123' + + // Imports the Admin library + const {AnalyticsAdminServiceClient} = require('@google-cloud/admin').v1beta; + + // Instantiates a client + const adminClient = new AnalyticsAdminServiceClient(); + + async function callArchiveCustomDimension() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await adminClient.archiveCustomDimension(request); + console.log(response); + } + + callArchiveCustomDimension(); + // [END analyticsadmin_v1beta_generated_AnalyticsAdminService_ArchiveCustomDimension_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.archive_custom_metric.js b/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.archive_custom_metric.js new file mode 100644 index 00000000000..0ab93913118 --- /dev/null +++ b/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.archive_custom_metric.js @@ -0,0 +1,62 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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 analyticsadmin_v1beta_generated_AnalyticsAdminService_ArchiveCustomMetric_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 CustomMetric to archive. + * Example format: properties/1234/customMetrics/5678 + */ + // const name = 'abc123' + + // Imports the Admin library + const {AnalyticsAdminServiceClient} = require('@google-cloud/admin').v1beta; + + // Instantiates a client + const adminClient = new AnalyticsAdminServiceClient(); + + async function callArchiveCustomMetric() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await adminClient.archiveCustomMetric(request); + console.log(response); + } + + callArchiveCustomMetric(); + // [END analyticsadmin_v1beta_generated_AnalyticsAdminService_ArchiveCustomMetric_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.create_conversion_event.js b/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.create_conversion_event.js new file mode 100644 index 00000000000..a426dfee5ec --- /dev/null +++ b/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.create_conversion_event.js @@ -0,0 +1,67 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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(conversionEvent, parent) { + // [START analyticsadmin_v1beta_generated_AnalyticsAdminService_CreateConversionEvent_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 conversion event to create. + */ + // const conversionEvent = {} + /** + * Required. The resource name of the parent property where this conversion event will + * be created. Format: properties/123 + */ + // const parent = 'abc123' + + // Imports the Admin library + const {AnalyticsAdminServiceClient} = require('@google-cloud/admin').v1beta; + + // Instantiates a client + const adminClient = new AnalyticsAdminServiceClient(); + + async function callCreateConversionEvent() { + // Construct request + const request = { + conversionEvent, + parent, + }; + + // Run request + const response = await adminClient.createConversionEvent(request); + console.log(response); + } + + callCreateConversionEvent(); + // [END analyticsadmin_v1beta_generated_AnalyticsAdminService_CreateConversionEvent_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.create_custom_dimension.js b/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.create_custom_dimension.js new file mode 100644 index 00000000000..b274dfceab1 --- /dev/null +++ b/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.create_custom_dimension.js @@ -0,0 +1,66 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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, customDimension) { + // [START analyticsadmin_v1beta_generated_AnalyticsAdminService_CreateCustomDimension_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. Example format: properties/1234 + */ + // const parent = 'abc123' + /** + * Required. The CustomDimension to create. + */ + // const customDimension = {} + + // Imports the Admin library + const {AnalyticsAdminServiceClient} = require('@google-cloud/admin').v1beta; + + // Instantiates a client + const adminClient = new AnalyticsAdminServiceClient(); + + async function callCreateCustomDimension() { + // Construct request + const request = { + parent, + customDimension, + }; + + // Run request + const response = await adminClient.createCustomDimension(request); + console.log(response); + } + + callCreateCustomDimension(); + // [END analyticsadmin_v1beta_generated_AnalyticsAdminService_CreateCustomDimension_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.create_custom_metric.js b/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.create_custom_metric.js new file mode 100644 index 00000000000..7920206b298 --- /dev/null +++ b/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.create_custom_metric.js @@ -0,0 +1,66 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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, customMetric) { + // [START analyticsadmin_v1beta_generated_AnalyticsAdminService_CreateCustomMetric_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. Example format: properties/1234 + */ + // const parent = 'abc123' + /** + * Required. The CustomMetric to create. + */ + // const customMetric = {} + + // Imports the Admin library + const {AnalyticsAdminServiceClient} = require('@google-cloud/admin').v1beta; + + // Instantiates a client + const adminClient = new AnalyticsAdminServiceClient(); + + async function callCreateCustomMetric() { + // Construct request + const request = { + parent, + customMetric, + }; + + // Run request + const response = await adminClient.createCustomMetric(request); + console.log(response); + } + + callCreateCustomMetric(); + // [END analyticsadmin_v1beta_generated_AnalyticsAdminService_CreateCustomMetric_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.create_data_stream.js b/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.create_data_stream.js new file mode 100644 index 00000000000..6cb30d4c9da --- /dev/null +++ b/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.create_data_stream.js @@ -0,0 +1,66 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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, dataStream) { + // [START analyticsadmin_v1beta_generated_AnalyticsAdminService_CreateDataStream_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. Example format: properties/1234 + */ + // const parent = 'abc123' + /** + * Required. The DataStream to create. + */ + // const dataStream = {} + + // Imports the Admin library + const {AnalyticsAdminServiceClient} = require('@google-cloud/admin').v1beta; + + // Instantiates a client + const adminClient = new AnalyticsAdminServiceClient(); + + async function callCreateDataStream() { + // Construct request + const request = { + parent, + dataStream, + }; + + // Run request + const response = await adminClient.createDataStream(request); + console.log(response); + } + + callCreateDataStream(); + // [END analyticsadmin_v1beta_generated_AnalyticsAdminService_CreateDataStream_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.create_firebase_link.js b/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.create_firebase_link.js new file mode 100644 index 00000000000..5ddbbc4d5c0 --- /dev/null +++ b/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.create_firebase_link.js @@ -0,0 +1,67 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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, firebaseLink) { + // [START analyticsadmin_v1beta_generated_AnalyticsAdminService_CreateFirebaseLink_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Format: properties/{property_id} + * Example: properties/1234 + */ + // const parent = 'abc123' + /** + * Required. The Firebase link to create. + */ + // const firebaseLink = {} + + // Imports the Admin library + const {AnalyticsAdminServiceClient} = require('@google-cloud/admin').v1beta; + + // Instantiates a client + const adminClient = new AnalyticsAdminServiceClient(); + + async function callCreateFirebaseLink() { + // Construct request + const request = { + parent, + firebaseLink, + }; + + // Run request + const response = await adminClient.createFirebaseLink(request); + console.log(response); + } + + callCreateFirebaseLink(); + // [END analyticsadmin_v1beta_generated_AnalyticsAdminService_CreateFirebaseLink_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.create_google_ads_link.js b/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.create_google_ads_link.js new file mode 100644 index 00000000000..ecaa1981e6f --- /dev/null +++ b/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.create_google_ads_link.js @@ -0,0 +1,66 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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, googleAdsLink) { + // [START analyticsadmin_v1beta_generated_AnalyticsAdminService_CreateGoogleAdsLink_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. Example format: properties/1234 + */ + // const parent = 'abc123' + /** + * Required. The GoogleAdsLink to create. + */ + // const googleAdsLink = {} + + // Imports the Admin library + const {AnalyticsAdminServiceClient} = require('@google-cloud/admin').v1beta; + + // Instantiates a client + const adminClient = new AnalyticsAdminServiceClient(); + + async function callCreateGoogleAdsLink() { + // Construct request + const request = { + parent, + googleAdsLink, + }; + + // Run request + const response = await adminClient.createGoogleAdsLink(request); + console.log(response); + } + + callCreateGoogleAdsLink(); + // [END analyticsadmin_v1beta_generated_AnalyticsAdminService_CreateGoogleAdsLink_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.create_measurement_protocol_secret.js b/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.create_measurement_protocol_secret.js new file mode 100644 index 00000000000..f37da66933f --- /dev/null +++ b/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.create_measurement_protocol_secret.js @@ -0,0 +1,67 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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, measurementProtocolSecret) { + // [START analyticsadmin_v1beta_generated_AnalyticsAdminService_CreateMeasurementProtocolSecret_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent resource where this secret will be created. + * Format: properties/{property}/dataStreams/{dataStream} + */ + // const parent = 'abc123' + /** + * Required. The measurement protocol secret to create. + */ + // const measurementProtocolSecret = {} + + // Imports the Admin library + const {AnalyticsAdminServiceClient} = require('@google-cloud/admin').v1beta; + + // Instantiates a client + const adminClient = new AnalyticsAdminServiceClient(); + + async function callCreateMeasurementProtocolSecret() { + // Construct request + const request = { + parent, + measurementProtocolSecret, + }; + + // Run request + const response = await adminClient.createMeasurementProtocolSecret(request); + console.log(response); + } + + callCreateMeasurementProtocolSecret(); + // [END analyticsadmin_v1beta_generated_AnalyticsAdminService_CreateMeasurementProtocolSecret_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.create_property.js b/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.create_property.js new file mode 100644 index 00000000000..f1818fe885a --- /dev/null +++ b/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.create_property.js @@ -0,0 +1,62 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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(property) { + // [START analyticsadmin_v1beta_generated_AnalyticsAdminService_CreateProperty_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 property to create. + * Note: the supplied property must specify its parent. + */ + // const property = {} + + // Imports the Admin library + const {AnalyticsAdminServiceClient} = require('@google-cloud/admin').v1beta; + + // Instantiates a client + const adminClient = new AnalyticsAdminServiceClient(); + + async function callCreateProperty() { + // Construct request + const request = { + property, + }; + + // Run request + const response = await adminClient.createProperty(request); + console.log(response); + } + + callCreateProperty(); + // [END analyticsadmin_v1beta_generated_AnalyticsAdminService_CreateProperty_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.delete_account.js b/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.delete_account.js new file mode 100644 index 00000000000..b499ff4b792 --- /dev/null +++ b/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.delete_account.js @@ -0,0 +1,63 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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 analyticsadmin_v1beta_generated_AnalyticsAdminService_DeleteAccount_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 Account to soft-delete. + * Format: accounts/{account} + * Example: "accounts/100" + */ + // const name = 'abc123' + + // Imports the Admin library + const {AnalyticsAdminServiceClient} = require('@google-cloud/admin').v1beta; + + // Instantiates a client + const adminClient = new AnalyticsAdminServiceClient(); + + async function callDeleteAccount() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await adminClient.deleteAccount(request); + console.log(response); + } + + callDeleteAccount(); + // [END analyticsadmin_v1beta_generated_AnalyticsAdminService_DeleteAccount_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.delete_conversion_event.js b/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.delete_conversion_event.js new file mode 100644 index 00000000000..189082eb8b1 --- /dev/null +++ b/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.delete_conversion_event.js @@ -0,0 +1,63 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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 analyticsadmin_v1beta_generated_AnalyticsAdminService_DeleteConversionEvent_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 conversion event to delete. + * Format: properties/{property}/conversionEvents/{conversion_event} + * Example: "properties/123/conversionEvents/456" + */ + // const name = 'abc123' + + // Imports the Admin library + const {AnalyticsAdminServiceClient} = require('@google-cloud/admin').v1beta; + + // Instantiates a client + const adminClient = new AnalyticsAdminServiceClient(); + + async function callDeleteConversionEvent() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await adminClient.deleteConversionEvent(request); + console.log(response); + } + + callDeleteConversionEvent(); + // [END analyticsadmin_v1beta_generated_AnalyticsAdminService_DeleteConversionEvent_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.delete_data_stream.js b/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.delete_data_stream.js new file mode 100644 index 00000000000..e86366dba6d --- /dev/null +++ b/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.delete_data_stream.js @@ -0,0 +1,62 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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 analyticsadmin_v1beta_generated_AnalyticsAdminService_DeleteDataStream_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 DataStream to delete. + * Example format: properties/1234/dataStreams/5678 + */ + // const name = 'abc123' + + // Imports the Admin library + const {AnalyticsAdminServiceClient} = require('@google-cloud/admin').v1beta; + + // Instantiates a client + const adminClient = new AnalyticsAdminServiceClient(); + + async function callDeleteDataStream() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await adminClient.deleteDataStream(request); + console.log(response); + } + + callDeleteDataStream(); + // [END analyticsadmin_v1beta_generated_AnalyticsAdminService_DeleteDataStream_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.delete_firebase_link.js b/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.delete_firebase_link.js new file mode 100644 index 00000000000..f76497d418f --- /dev/null +++ b/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.delete_firebase_link.js @@ -0,0 +1,62 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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 analyticsadmin_v1beta_generated_AnalyticsAdminService_DeleteFirebaseLink_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Format: properties/{property_id}/firebaseLinks/{firebase_link_id} + * Example: properties/1234/firebaseLinks/5678 + */ + // const name = 'abc123' + + // Imports the Admin library + const {AnalyticsAdminServiceClient} = require('@google-cloud/admin').v1beta; + + // Instantiates a client + const adminClient = new AnalyticsAdminServiceClient(); + + async function callDeleteFirebaseLink() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await adminClient.deleteFirebaseLink(request); + console.log(response); + } + + callDeleteFirebaseLink(); + // [END analyticsadmin_v1beta_generated_AnalyticsAdminService_DeleteFirebaseLink_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.delete_google_ads_link.js b/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.delete_google_ads_link.js new file mode 100644 index 00000000000..d682820094b --- /dev/null +++ b/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.delete_google_ads_link.js @@ -0,0 +1,61 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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 analyticsadmin_v1beta_generated_AnalyticsAdminService_DeleteGoogleAdsLink_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. Example format: properties/1234/googleAdsLinks/5678 + */ + // const name = 'abc123' + + // Imports the Admin library + const {AnalyticsAdminServiceClient} = require('@google-cloud/admin').v1beta; + + // Instantiates a client + const adminClient = new AnalyticsAdminServiceClient(); + + async function callDeleteGoogleAdsLink() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await adminClient.deleteGoogleAdsLink(request); + console.log(response); + } + + callDeleteGoogleAdsLink(); + // [END analyticsadmin_v1beta_generated_AnalyticsAdminService_DeleteGoogleAdsLink_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.delete_measurement_protocol_secret.js b/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.delete_measurement_protocol_secret.js new file mode 100644 index 00000000000..a3c3a9b739b --- /dev/null +++ b/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.delete_measurement_protocol_secret.js @@ -0,0 +1,63 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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 analyticsadmin_v1beta_generated_AnalyticsAdminService_DeleteMeasurementProtocolSecret_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 MeasurementProtocolSecret to delete. + * Format: + * properties/{property}/dataStreams/{dataStream}/measurementProtocolSecrets/{measurementProtocolSecret} + */ + // const name = 'abc123' + + // Imports the Admin library + const {AnalyticsAdminServiceClient} = require('@google-cloud/admin').v1beta; + + // Instantiates a client + const adminClient = new AnalyticsAdminServiceClient(); + + async function callDeleteMeasurementProtocolSecret() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await adminClient.deleteMeasurementProtocolSecret(request); + console.log(response); + } + + callDeleteMeasurementProtocolSecret(); + // [END analyticsadmin_v1beta_generated_AnalyticsAdminService_DeleteMeasurementProtocolSecret_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.delete_property.js b/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.delete_property.js new file mode 100644 index 00000000000..88f30db5d30 --- /dev/null +++ b/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.delete_property.js @@ -0,0 +1,63 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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 analyticsadmin_v1beta_generated_AnalyticsAdminService_DeleteProperty_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 Property to soft-delete. + * Format: properties/{property_id} + * Example: "properties/1000" + */ + // const name = 'abc123' + + // Imports the Admin library + const {AnalyticsAdminServiceClient} = require('@google-cloud/admin').v1beta; + + // Instantiates a client + const adminClient = new AnalyticsAdminServiceClient(); + + async function callDeleteProperty() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await adminClient.deleteProperty(request); + console.log(response); + } + + callDeleteProperty(); + // [END analyticsadmin_v1beta_generated_AnalyticsAdminService_DeleteProperty_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.get_account.js b/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.get_account.js new file mode 100644 index 00000000000..980f7da1474 --- /dev/null +++ b/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.get_account.js @@ -0,0 +1,63 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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 analyticsadmin_v1beta_generated_AnalyticsAdminService_GetAccount_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 account to lookup. + * Format: accounts/{account} + * Example: "accounts/100" + */ + // const name = 'abc123' + + // Imports the Admin library + const {AnalyticsAdminServiceClient} = require('@google-cloud/admin').v1beta; + + // Instantiates a client + const adminClient = new AnalyticsAdminServiceClient(); + + async function callGetAccount() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await adminClient.getAccount(request); + console.log(response); + } + + callGetAccount(); + // [END analyticsadmin_v1beta_generated_AnalyticsAdminService_GetAccount_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.get_conversion_event.js b/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.get_conversion_event.js new file mode 100644 index 00000000000..5b1a45f23b4 --- /dev/null +++ b/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.get_conversion_event.js @@ -0,0 +1,63 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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 analyticsadmin_v1beta_generated_AnalyticsAdminService_GetConversionEvent_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 conversion event to retrieve. + * Format: properties/{property}/conversionEvents/{conversion_event} + * Example: "properties/123/conversionEvents/456" + */ + // const name = 'abc123' + + // Imports the Admin library + const {AnalyticsAdminServiceClient} = require('@google-cloud/admin').v1beta; + + // Instantiates a client + const adminClient = new AnalyticsAdminServiceClient(); + + async function callGetConversionEvent() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await adminClient.getConversionEvent(request); + console.log(response); + } + + callGetConversionEvent(); + // [END analyticsadmin_v1beta_generated_AnalyticsAdminService_GetConversionEvent_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.get_custom_dimension.js b/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.get_custom_dimension.js new file mode 100644 index 00000000000..eac58816518 --- /dev/null +++ b/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.get_custom_dimension.js @@ -0,0 +1,62 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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 analyticsadmin_v1beta_generated_AnalyticsAdminService_GetCustomDimension_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 CustomDimension to get. + * Example format: properties/1234/customDimensions/5678 + */ + // const name = 'abc123' + + // Imports the Admin library + const {AnalyticsAdminServiceClient} = require('@google-cloud/admin').v1beta; + + // Instantiates a client + const adminClient = new AnalyticsAdminServiceClient(); + + async function callGetCustomDimension() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await adminClient.getCustomDimension(request); + console.log(response); + } + + callGetCustomDimension(); + // [END analyticsadmin_v1beta_generated_AnalyticsAdminService_GetCustomDimension_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.get_custom_metric.js b/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.get_custom_metric.js new file mode 100644 index 00000000000..f96b833ce79 --- /dev/null +++ b/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.get_custom_metric.js @@ -0,0 +1,62 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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 analyticsadmin_v1beta_generated_AnalyticsAdminService_GetCustomMetric_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 CustomMetric to get. + * Example format: properties/1234/customMetrics/5678 + */ + // const name = 'abc123' + + // Imports the Admin library + const {AnalyticsAdminServiceClient} = require('@google-cloud/admin').v1beta; + + // Instantiates a client + const adminClient = new AnalyticsAdminServiceClient(); + + async function callGetCustomMetric() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await adminClient.getCustomMetric(request); + console.log(response); + } + + callGetCustomMetric(); + // [END analyticsadmin_v1beta_generated_AnalyticsAdminService_GetCustomMetric_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.get_data_retention_settings.js b/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.get_data_retention_settings.js new file mode 100644 index 00000000000..b5a4aff0bf5 --- /dev/null +++ b/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.get_data_retention_settings.js @@ -0,0 +1,64 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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 analyticsadmin_v1beta_generated_AnalyticsAdminService_GetDataRetentionSettings_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 settings to lookup. + * Format: + * properties/{property}/dataRetentionSettings + * Example: "properties/1000/dataRetentionSettings" + */ + // const name = 'abc123' + + // Imports the Admin library + const {AnalyticsAdminServiceClient} = require('@google-cloud/admin').v1beta; + + // Instantiates a client + const adminClient = new AnalyticsAdminServiceClient(); + + async function callGetDataRetentionSettings() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await adminClient.getDataRetentionSettings(request); + console.log(response); + } + + callGetDataRetentionSettings(); + // [END analyticsadmin_v1beta_generated_AnalyticsAdminService_GetDataRetentionSettings_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.get_data_sharing_settings.js b/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.get_data_sharing_settings.js new file mode 100644 index 00000000000..ba84785ec1b --- /dev/null +++ b/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.get_data_sharing_settings.js @@ -0,0 +1,63 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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 analyticsadmin_v1beta_generated_AnalyticsAdminService_GetDataSharingSettings_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 settings to lookup. + * Format: accounts/{account}/dataSharingSettings + * Example: "accounts/1000/dataSharingSettings" + */ + // const name = 'abc123' + + // Imports the Admin library + const {AnalyticsAdminServiceClient} = require('@google-cloud/admin').v1beta; + + // Instantiates a client + const adminClient = new AnalyticsAdminServiceClient(); + + async function callGetDataSharingSettings() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await adminClient.getDataSharingSettings(request); + console.log(response); + } + + callGetDataSharingSettings(); + // [END analyticsadmin_v1beta_generated_AnalyticsAdminService_GetDataSharingSettings_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.get_data_stream.js b/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.get_data_stream.js new file mode 100644 index 00000000000..6f9e0c94869 --- /dev/null +++ b/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.get_data_stream.js @@ -0,0 +1,62 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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 analyticsadmin_v1beta_generated_AnalyticsAdminService_GetDataStream_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 DataStream to get. + * Example format: properties/1234/dataStreams/5678 + */ + // const name = 'abc123' + + // Imports the Admin library + const {AnalyticsAdminServiceClient} = require('@google-cloud/admin').v1beta; + + // Instantiates a client + const adminClient = new AnalyticsAdminServiceClient(); + + async function callGetDataStream() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await adminClient.getDataStream(request); + console.log(response); + } + + callGetDataStream(); + // [END analyticsadmin_v1beta_generated_AnalyticsAdminService_GetDataStream_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.get_measurement_protocol_secret.js b/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.get_measurement_protocol_secret.js new file mode 100644 index 00000000000..e8d27527557 --- /dev/null +++ b/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.get_measurement_protocol_secret.js @@ -0,0 +1,63 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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 analyticsadmin_v1beta_generated_AnalyticsAdminService_GetMeasurementProtocolSecret_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 measurement protocol secret to lookup. + * Format: + * properties/{property}/dataStreams/{dataStream}/measurementProtocolSecrets/{measurementProtocolSecret} + */ + // const name = 'abc123' + + // Imports the Admin library + const {AnalyticsAdminServiceClient} = require('@google-cloud/admin').v1beta; + + // Instantiates a client + const adminClient = new AnalyticsAdminServiceClient(); + + async function callGetMeasurementProtocolSecret() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await adminClient.getMeasurementProtocolSecret(request); + console.log(response); + } + + callGetMeasurementProtocolSecret(); + // [END analyticsadmin_v1beta_generated_AnalyticsAdminService_GetMeasurementProtocolSecret_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.get_property.js b/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.get_property.js new file mode 100644 index 00000000000..948986741dd --- /dev/null +++ b/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.get_property.js @@ -0,0 +1,63 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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 analyticsadmin_v1beta_generated_AnalyticsAdminService_GetProperty_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 property to lookup. + * Format: properties/{property_id} + * Example: "properties/1000" + */ + // const name = 'abc123' + + // Imports the Admin library + const {AnalyticsAdminServiceClient} = require('@google-cloud/admin').v1beta; + + // Instantiates a client + const adminClient = new AnalyticsAdminServiceClient(); + + async function callGetProperty() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await adminClient.getProperty(request); + console.log(response); + } + + callGetProperty(); + // [END analyticsadmin_v1beta_generated_AnalyticsAdminService_GetProperty_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.list_account_summaries.js b/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.list_account_summaries.js new file mode 100644 index 00000000000..821569f7930 --- /dev/null +++ b/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.list_account_summaries.js @@ -0,0 +1,72 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main() { + // [START analyticsadmin_v1beta_generated_AnalyticsAdminService_ListAccountSummaries_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. + */ + /** + * The maximum number of AccountSummary resources to return. The service may + * return fewer than this value, even if there are additional pages. + * If unspecified, at most 50 resources will be returned. + * The maximum value is 200; (higher values will be coerced to the maximum) + */ + // const pageSize = 1234 + /** + * A page token, received from a previous `ListAccountSummaries` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListAccountSummaries` + * must match the call that provided the page token. + */ + // const pageToken = 'abc123' + + // Imports the Admin library + const {AnalyticsAdminServiceClient} = require('@google-cloud/admin').v1beta; + + // Instantiates a client + const adminClient = new AnalyticsAdminServiceClient(); + + async function callListAccountSummaries() { + // Construct request + const request = { + }; + + // Run request + const iterable = await adminClient.listAccountSummariesAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListAccountSummaries(); + // [END analyticsadmin_v1beta_generated_AnalyticsAdminService_ListAccountSummaries_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.list_accounts.js b/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.list_accounts.js new file mode 100644 index 00000000000..e605c98ae18 --- /dev/null +++ b/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.list_accounts.js @@ -0,0 +1,78 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main() { + // [START analyticsadmin_v1beta_generated_AnalyticsAdminService_ListAccounts_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. + */ + /** + * The maximum number of resources to return. The service may return + * fewer than this value, even if there are additional pages. + * If unspecified, at most 50 resources will be returned. + * The maximum value is 200; (higher values will be coerced to the maximum) + */ + // const pageSize = 1234 + /** + * A page token, received from a previous `ListAccounts` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListAccounts` must + * match the call that provided the page token. + */ + // const pageToken = 'abc123' + /** + * Whether to include soft-deleted (ie: "trashed") Accounts in the + * results. Accounts can be inspected to determine whether they are deleted or + * not. + */ + // const showDeleted = true + + // Imports the Admin library + const {AnalyticsAdminServiceClient} = require('@google-cloud/admin').v1beta; + + // Instantiates a client + const adminClient = new AnalyticsAdminServiceClient(); + + async function callListAccounts() { + // Construct request + const request = { + }; + + // Run request + const iterable = await adminClient.listAccountsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListAccounts(); + // [END analyticsadmin_v1beta_generated_AnalyticsAdminService_ListAccounts_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.list_conversion_events.js b/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.list_conversion_events.js new file mode 100644 index 00000000000..b8dab7faede --- /dev/null +++ b/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.list_conversion_events.js @@ -0,0 +1,77 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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 analyticsadmin_v1beta_generated_AnalyticsAdminService_ListConversionEvents_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 parent property. + * Example: 'properties/123' + */ + // const parent = 'abc123' + /** + * The maximum number of resources to return. + * If unspecified, at most 50 resources will be returned. + * The maximum value is 200; (higher values will be coerced to the maximum) + */ + // const pageSize = 1234 + /** + * A page token, received from a previous `ListConversionEvents` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListConversionEvents` + * must match the call that provided the page token. + */ + // const pageToken = 'abc123' + + // Imports the Admin library + const {AnalyticsAdminServiceClient} = require('@google-cloud/admin').v1beta; + + // Instantiates a client + const adminClient = new AnalyticsAdminServiceClient(); + + async function callListConversionEvents() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = await adminClient.listConversionEventsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListConversionEvents(); + // [END analyticsadmin_v1beta_generated_AnalyticsAdminService_ListConversionEvents_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.list_custom_dimensions.js b/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.list_custom_dimensions.js new file mode 100644 index 00000000000..8496756e779 --- /dev/null +++ b/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.list_custom_dimensions.js @@ -0,0 +1,76 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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 analyticsadmin_v1beta_generated_AnalyticsAdminService_ListCustomDimensions_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. Example format: properties/1234 + */ + // const parent = 'abc123' + /** + * The maximum number of resources to return. + * If unspecified, at most 50 resources will be returned. + * The maximum value is 200 (higher values will be coerced to the maximum). + */ + // const pageSize = 1234 + /** + * A page token, received from a previous `ListCustomDimensions` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListCustomDimensions` + * must match the call that provided the page token. + */ + // const pageToken = 'abc123' + + // Imports the Admin library + const {AnalyticsAdminServiceClient} = require('@google-cloud/admin').v1beta; + + // Instantiates a client + const adminClient = new AnalyticsAdminServiceClient(); + + async function callListCustomDimensions() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = await adminClient.listCustomDimensionsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListCustomDimensions(); + // [END analyticsadmin_v1beta_generated_AnalyticsAdminService_ListCustomDimensions_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.list_custom_metrics.js b/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.list_custom_metrics.js new file mode 100644 index 00000000000..4a80a2730c2 --- /dev/null +++ b/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.list_custom_metrics.js @@ -0,0 +1,76 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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 analyticsadmin_v1beta_generated_AnalyticsAdminService_ListCustomMetrics_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. Example format: properties/1234 + */ + // const parent = 'abc123' + /** + * The maximum number of resources to return. + * If unspecified, at most 50 resources will be returned. + * The maximum value is 200 (higher values will be coerced to the maximum). + */ + // const pageSize = 1234 + /** + * A page token, received from a previous `ListCustomMetrics` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListCustomMetrics` must + * match the call that provided the page token. + */ + // const pageToken = 'abc123' + + // Imports the Admin library + const {AnalyticsAdminServiceClient} = require('@google-cloud/admin').v1beta; + + // Instantiates a client + const adminClient = new AnalyticsAdminServiceClient(); + + async function callListCustomMetrics() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = await adminClient.listCustomMetricsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListCustomMetrics(); + // [END analyticsadmin_v1beta_generated_AnalyticsAdminService_ListCustomMetrics_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.list_data_streams.js b/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.list_data_streams.js new file mode 100644 index 00000000000..9e749a16820 --- /dev/null +++ b/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.list_data_streams.js @@ -0,0 +1,76 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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 analyticsadmin_v1beta_generated_AnalyticsAdminService_ListDataStreams_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. Example format: properties/1234 + */ + // const parent = 'abc123' + /** + * The maximum number of resources to return. + * If unspecified, at most 50 resources will be returned. + * The maximum value is 200 (higher values will be coerced to the maximum). + */ + // const pageSize = 1234 + /** + * A page token, received from a previous `ListDataStreams` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListDataStreams` must + * match the call that provided the page token. + */ + // const pageToken = 'abc123' + + // Imports the Admin library + const {AnalyticsAdminServiceClient} = require('@google-cloud/admin').v1beta; + + // Instantiates a client + const adminClient = new AnalyticsAdminServiceClient(); + + async function callListDataStreams() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = await adminClient.listDataStreamsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListDataStreams(); + // [END analyticsadmin_v1beta_generated_AnalyticsAdminService_ListDataStreams_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.list_firebase_links.js b/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.list_firebase_links.js new file mode 100644 index 00000000000..4cb08ac2fa1 --- /dev/null +++ b/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.list_firebase_links.js @@ -0,0 +1,78 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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 analyticsadmin_v1beta_generated_AnalyticsAdminService_ListFirebaseLinks_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Format: properties/{property_id} + * Example: properties/1234 + */ + // const parent = 'abc123' + /** + * The maximum number of resources to return. The service may return + * fewer than this value, even if there are additional pages. + * If unspecified, at most 50 resources will be returned. + * The maximum value is 200; (higher values will be coerced to the maximum) + */ + // const pageSize = 1234 + /** + * A page token, received from a previous `ListFirebaseLinks` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListProperties` must + * match the call that provided the page token. + */ + // const pageToken = 'abc123' + + // Imports the Admin library + const {AnalyticsAdminServiceClient} = require('@google-cloud/admin').v1beta; + + // Instantiates a client + const adminClient = new AnalyticsAdminServiceClient(); + + async function callListFirebaseLinks() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = await adminClient.listFirebaseLinksAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListFirebaseLinks(); + // [END analyticsadmin_v1beta_generated_AnalyticsAdminService_ListFirebaseLinks_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.list_google_ads_links.js b/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.list_google_ads_links.js new file mode 100644 index 00000000000..982120b3e06 --- /dev/null +++ b/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.list_google_ads_links.js @@ -0,0 +1,76 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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 analyticsadmin_v1beta_generated_AnalyticsAdminService_ListGoogleAdsLinks_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. Example format: properties/1234 + */ + // const parent = 'abc123' + /** + * The maximum number of resources to return. + * If unspecified, at most 50 resources will be returned. + * The maximum value is 200 (higher values will be coerced to the maximum). + */ + // const pageSize = 1234 + /** + * A page token, received from a previous `ListGoogleAdsLinks` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListGoogleAdsLinks` must + * match the call that provided the page token. + */ + // const pageToken = 'abc123' + + // Imports the Admin library + const {AnalyticsAdminServiceClient} = require('@google-cloud/admin').v1beta; + + // Instantiates a client + const adminClient = new AnalyticsAdminServiceClient(); + + async function callListGoogleAdsLinks() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = await adminClient.listGoogleAdsLinksAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListGoogleAdsLinks(); + // [END analyticsadmin_v1beta_generated_AnalyticsAdminService_ListGoogleAdsLinks_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.list_measurement_protocol_secrets.js b/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.list_measurement_protocol_secrets.js new file mode 100644 index 00000000000..a13848e90a1 --- /dev/null +++ b/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.list_measurement_protocol_secrets.js @@ -0,0 +1,78 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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 analyticsadmin_v1beta_generated_AnalyticsAdminService_ListMeasurementProtocolSecrets_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 parent stream. + * Format: + * properties/{property}/dataStreams/{dataStream}/measurementProtocolSecrets + */ + // const parent = 'abc123' + /** + * The maximum number of resources to return. + * If unspecified, at most 10 resources will be returned. + * The maximum value is 10. Higher values will be coerced to the maximum. + */ + // const pageSize = 1234 + /** + * A page token, received from a previous `ListMeasurementProtocolSecrets` + * call. Provide this to retrieve the subsequent page. When paginating, all + * other parameters provided to `ListMeasurementProtocolSecrets` must match + * the call that provided the page token. + */ + // const pageToken = 'abc123' + + // Imports the Admin library + const {AnalyticsAdminServiceClient} = require('@google-cloud/admin').v1beta; + + // Instantiates a client + const adminClient = new AnalyticsAdminServiceClient(); + + async function callListMeasurementProtocolSecrets() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = await adminClient.listMeasurementProtocolSecretsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListMeasurementProtocolSecrets(); + // [END analyticsadmin_v1beta_generated_AnalyticsAdminService_ListMeasurementProtocolSecrets_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.list_properties.js b/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.list_properties.js new file mode 100644 index 00000000000..7eff4a3b6ce --- /dev/null +++ b/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.list_properties.js @@ -0,0 +1,97 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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(filter) { + // [START analyticsadmin_v1beta_generated_AnalyticsAdminService_ListProperties_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. An expression for filtering the results of the request. + * Fields eligible for filtering are: + * `parent:`(The resource name of the parent account/property) or + * `ancestor:`(The resource name of the parent account) or + * `firebase_project:`(The id or number of the linked firebase project). + * Some examples of filters: + * ``` + * | Filter | Description | + * |-----------------------------|-------------------------------------------| + * | parent:accounts/123 | The account with account id: 123. | + * | parent:properties/123 | The property with property id: 123. | + * | ancestor:accounts/123 | The account with account id: 123. | + * | firebase_project:project-id | The firebase project with id: project-id. | + * | firebase_project:123 | The firebase project with number: 123. | + * ``` + */ + // const filter = 'abc123' + /** + * The maximum number of resources to return. The service may return + * fewer than this value, even if there are additional pages. + * If unspecified, at most 50 resources will be returned. + * The maximum value is 200; (higher values will be coerced to the maximum) + */ + // const pageSize = 1234 + /** + * A page token, received from a previous `ListProperties` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListProperties` must + * match the call that provided the page token. + */ + // const pageToken = 'abc123' + /** + * Whether to include soft-deleted (ie: "trashed") Properties in the + * results. Properties can be inspected to determine whether they are deleted + * or not. + */ + // const showDeleted = true + + // Imports the Admin library + const {AnalyticsAdminServiceClient} = require('@google-cloud/admin').v1beta; + + // Instantiates a client + const adminClient = new AnalyticsAdminServiceClient(); + + async function callListProperties() { + // Construct request + const request = { + filter, + }; + + // Run request + const iterable = await adminClient.listPropertiesAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListProperties(); + // [END analyticsadmin_v1beta_generated_AnalyticsAdminService_ListProperties_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.provision_account_ticket.js b/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.provision_account_ticket.js new file mode 100644 index 00000000000..6eff98904ba --- /dev/null +++ b/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.provision_account_ticket.js @@ -0,0 +1,65 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main() { + // [START analyticsadmin_v1beta_generated_AnalyticsAdminService_ProvisionAccountTicket_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. + */ + /** + * The account to create. + */ + // const account = {} + /** + * Redirect URI where the user will be sent after accepting Terms of Service. + * Must be configured in Developers Console as a Redirect URI + */ + // const redirectUri = 'abc123' + + // Imports the Admin library + const {AnalyticsAdminServiceClient} = require('@google-cloud/admin').v1beta; + + // Instantiates a client + const adminClient = new AnalyticsAdminServiceClient(); + + async function callProvisionAccountTicket() { + // Construct request + const request = { + }; + + // Run request + const response = await adminClient.provisionAccountTicket(request); + console.log(response); + } + + callProvisionAccountTicket(); + // [END analyticsadmin_v1beta_generated_AnalyticsAdminService_ProvisionAccountTicket_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.search_change_history_events.js b/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.search_change_history_events.js new file mode 100644 index 00000000000..a9770d49284 --- /dev/null +++ b/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.search_change_history_events.js @@ -0,0 +1,104 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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(account) { + // [START analyticsadmin_v1beta_generated_AnalyticsAdminService_SearchChangeHistoryEvents_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 resource for which to return change history resources. + */ + // const account = 'abc123' + /** + * Optional. Resource name for a child property. If set, only return changes + * made to this property or its child resources. + */ + // const property = 'abc123' + /** + * Optional. If set, only return changes if they are for a resource that matches at + * least one of these types. + */ + // const resourceType = 1234 + /** + * Optional. If set, only return changes that match one or more of these types of + * actions. + */ + // const action = 1234 + /** + * Optional. If set, only return changes if they are made by a user in this list. + */ + // const actorEmail = 'abc123' + /** + * Optional. If set, only return changes made after this time (inclusive). + */ + // const earliestChangeTime = {} + /** + * Optional. If set, only return changes made before this time (inclusive). + */ + // const latestChangeTime = {} + /** + * Optional. The maximum number of ChangeHistoryEvent items to return. + * The service may return fewer than this value, even if there are additional + * pages. If unspecified, at most 50 items will be returned. + * The maximum value is 200 (higher values will be coerced to the maximum). + */ + // const pageSize = 1234 + /** + * Optional. A page token, received from a previous `SearchChangeHistoryEvents` call. + * Provide this to retrieve the subsequent page. When paginating, all other + * parameters provided to `SearchChangeHistoryEvents` must match the call that + * provided the page token. + */ + // const pageToken = 'abc123' + + // Imports the Admin library + const {AnalyticsAdminServiceClient} = require('@google-cloud/admin').v1beta; + + // Instantiates a client + const adminClient = new AnalyticsAdminServiceClient(); + + async function callSearchChangeHistoryEvents() { + // Construct request + const request = { + account, + }; + + // Run request + const iterable = await adminClient.searchChangeHistoryEventsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callSearchChangeHistoryEvents(); + // [END analyticsadmin_v1beta_generated_AnalyticsAdminService_SearchChangeHistoryEvents_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.update_account.js b/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.update_account.js new file mode 100644 index 00000000000..e6d2fec2705 --- /dev/null +++ b/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.update_account.js @@ -0,0 +1,69 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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(account, updateMask) { + // [START analyticsadmin_v1beta_generated_AnalyticsAdminService_UpdateAccount_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 to update. + * The account's `name` field is used to identify the account. + */ + // const account = {} + /** + * Required. The list of fields to be updated. Field names must be in snake case + * (e.g., "field_to_update"). Omitted fields will not be updated. To replace + * the entire entity, use one path with the string "*" to match all fields. + */ + // const updateMask = {} + + // Imports the Admin library + const {AnalyticsAdminServiceClient} = require('@google-cloud/admin').v1beta; + + // Instantiates a client + const adminClient = new AnalyticsAdminServiceClient(); + + async function callUpdateAccount() { + // Construct request + const request = { + account, + updateMask, + }; + + // Run request + const response = await adminClient.updateAccount(request); + console.log(response); + } + + callUpdateAccount(); + // [END analyticsadmin_v1beta_generated_AnalyticsAdminService_UpdateAccount_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.update_custom_dimension.js b/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.update_custom_dimension.js new file mode 100644 index 00000000000..2ca869907de --- /dev/null +++ b/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.update_custom_dimension.js @@ -0,0 +1,67 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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(updateMask) { + // [START analyticsadmin_v1beta_generated_AnalyticsAdminService_UpdateCustomDimension_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. + */ + /** + * The CustomDimension to update + */ + // const customDimension = {} + /** + * Required. The list of fields to be updated. Omitted fields will not be updated. + * To replace the entire entity, use one path with the string "*" to match + * all fields. + */ + // const updateMask = {} + + // Imports the Admin library + const {AnalyticsAdminServiceClient} = require('@google-cloud/admin').v1beta; + + // Instantiates a client + const adminClient = new AnalyticsAdminServiceClient(); + + async function callUpdateCustomDimension() { + // Construct request + const request = { + updateMask, + }; + + // Run request + const response = await adminClient.updateCustomDimension(request); + console.log(response); + } + + callUpdateCustomDimension(); + // [END analyticsadmin_v1beta_generated_AnalyticsAdminService_UpdateCustomDimension_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.update_custom_metric.js b/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.update_custom_metric.js new file mode 100644 index 00000000000..cc8594bad62 --- /dev/null +++ b/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.update_custom_metric.js @@ -0,0 +1,67 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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(updateMask) { + // [START analyticsadmin_v1beta_generated_AnalyticsAdminService_UpdateCustomMetric_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. + */ + /** + * The CustomMetric to update + */ + // const customMetric = {} + /** + * Required. The list of fields to be updated. Omitted fields will not be updated. + * To replace the entire entity, use one path with the string "*" to match + * all fields. + */ + // const updateMask = {} + + // Imports the Admin library + const {AnalyticsAdminServiceClient} = require('@google-cloud/admin').v1beta; + + // Instantiates a client + const adminClient = new AnalyticsAdminServiceClient(); + + async function callUpdateCustomMetric() { + // Construct request + const request = { + updateMask, + }; + + // Run request + const response = await adminClient.updateCustomMetric(request); + console.log(response); + } + + callUpdateCustomMetric(); + // [END analyticsadmin_v1beta_generated_AnalyticsAdminService_UpdateCustomMetric_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.update_data_retention_settings.js b/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.update_data_retention_settings.js new file mode 100644 index 00000000000..8f99afa4cbb --- /dev/null +++ b/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.update_data_retention_settings.js @@ -0,0 +1,69 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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(dataRetentionSettings, updateMask) { + // [START analyticsadmin_v1beta_generated_AnalyticsAdminService_UpdateDataRetentionSettings_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 settings to update. + * The `name` field is used to identify the settings to be updated. + */ + // const dataRetentionSettings = {} + /** + * Required. The list of fields to be updated. Field names must be in snake case + * (e.g., "field_to_update"). Omitted fields will not be updated. To replace + * the entire entity, use one path with the string "*" to match all fields. + */ + // const updateMask = {} + + // Imports the Admin library + const {AnalyticsAdminServiceClient} = require('@google-cloud/admin').v1beta; + + // Instantiates a client + const adminClient = new AnalyticsAdminServiceClient(); + + async function callUpdateDataRetentionSettings() { + // Construct request + const request = { + dataRetentionSettings, + updateMask, + }; + + // Run request + const response = await adminClient.updateDataRetentionSettings(request); + console.log(response); + } + + callUpdateDataRetentionSettings(); + // [END analyticsadmin_v1beta_generated_AnalyticsAdminService_UpdateDataRetentionSettings_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.update_data_stream.js b/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.update_data_stream.js new file mode 100644 index 00000000000..941ca8f83f9 --- /dev/null +++ b/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.update_data_stream.js @@ -0,0 +1,67 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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(updateMask) { + // [START analyticsadmin_v1beta_generated_AnalyticsAdminService_UpdateDataStream_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. + */ + /** + * The DataStream to update + */ + // const dataStream = {} + /** + * Required. The list of fields to be updated. Omitted fields will not be updated. + * To replace the entire entity, use one path with the string "*" to match + * all fields. + */ + // const updateMask = {} + + // Imports the Admin library + const {AnalyticsAdminServiceClient} = require('@google-cloud/admin').v1beta; + + // Instantiates a client + const adminClient = new AnalyticsAdminServiceClient(); + + async function callUpdateDataStream() { + // Construct request + const request = { + updateMask, + }; + + // Run request + const response = await adminClient.updateDataStream(request); + console.log(response); + } + + callUpdateDataStream(); + // [END analyticsadmin_v1beta_generated_AnalyticsAdminService_UpdateDataStream_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.update_google_ads_link.js b/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.update_google_ads_link.js new file mode 100644 index 00000000000..9962e166ea5 --- /dev/null +++ b/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.update_google_ads_link.js @@ -0,0 +1,67 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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(updateMask) { + // [START analyticsadmin_v1beta_generated_AnalyticsAdminService_UpdateGoogleAdsLink_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. + */ + /** + * The GoogleAdsLink to update + */ + // const googleAdsLink = {} + /** + * Required. The list of fields to be updated. Field names must be in snake case + * (e.g., "field_to_update"). Omitted fields will not be updated. To replace + * the entire entity, use one path with the string "*" to match all fields. + */ + // const updateMask = {} + + // Imports the Admin library + const {AnalyticsAdminServiceClient} = require('@google-cloud/admin').v1beta; + + // Instantiates a client + const adminClient = new AnalyticsAdminServiceClient(); + + async function callUpdateGoogleAdsLink() { + // Construct request + const request = { + updateMask, + }; + + // Run request + const response = await adminClient.updateGoogleAdsLink(request); + console.log(response); + } + + callUpdateGoogleAdsLink(); + // [END analyticsadmin_v1beta_generated_AnalyticsAdminService_UpdateGoogleAdsLink_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.update_measurement_protocol_secret.js b/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.update_measurement_protocol_secret.js new file mode 100644 index 00000000000..50cc470ac69 --- /dev/null +++ b/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.update_measurement_protocol_secret.js @@ -0,0 +1,65 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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(measurementProtocolSecret) { + // [START analyticsadmin_v1beta_generated_AnalyticsAdminService_UpdateMeasurementProtocolSecret_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 measurement protocol secret to update. + */ + // const measurementProtocolSecret = {} + /** + * The list of fields to be updated. Omitted fields will not be updated. + */ + // const updateMask = {} + + // Imports the Admin library + const {AnalyticsAdminServiceClient} = require('@google-cloud/admin').v1beta; + + // Instantiates a client + const adminClient = new AnalyticsAdminServiceClient(); + + async function callUpdateMeasurementProtocolSecret() { + // Construct request + const request = { + measurementProtocolSecret, + }; + + // Run request + const response = await adminClient.updateMeasurementProtocolSecret(request); + console.log(response); + } + + callUpdateMeasurementProtocolSecret(); + // [END analyticsadmin_v1beta_generated_AnalyticsAdminService_UpdateMeasurementProtocolSecret_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.update_property.js b/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.update_property.js new file mode 100644 index 00000000000..7759e1969ef --- /dev/null +++ b/packages/google-analytics-admin/samples/generated/v1beta/analytics_admin_service.update_property.js @@ -0,0 +1,70 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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(property, updateMask) { + // [START analyticsadmin_v1beta_generated_AnalyticsAdminService_UpdateProperty_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 property to update. + * The property's `name` field is used to identify the property to be + * updated. + */ + // const property = {} + /** + * Required. The list of fields to be updated. Field names must be in snake case + * (e.g., "field_to_update"). Omitted fields will not be updated. To replace + * the entire entity, use one path with the string "*" to match all fields. + */ + // const updateMask = {} + + // Imports the Admin library + const {AnalyticsAdminServiceClient} = require('@google-cloud/admin').v1beta; + + // Instantiates a client + const adminClient = new AnalyticsAdminServiceClient(); + + async function callUpdateProperty() { + // Construct request + const request = { + property, + updateMask, + }; + + // Run request + const response = await adminClient.updateProperty(request); + console.log(response); + } + + callUpdateProperty(); + // [END analyticsadmin_v1beta_generated_AnalyticsAdminService_UpdateProperty_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-analytics-admin/samples/generated/v1beta/snippet_metadata.google.analytics.admin.v1beta.json b/packages/google-analytics-admin/samples/generated/v1beta/snippet_metadata.google.analytics.admin.v1beta.json new file mode 100644 index 00000000000..0d8fc0a701a --- /dev/null +++ b/packages/google-analytics-admin/samples/generated/v1beta/snippet_metadata.google.analytics.admin.v1beta.json @@ -0,0 +1,2075 @@ +{ + "clientLibrary": { + "name": "nodejs-admin", + "version": "4.3.0", + "language": "TYPESCRIPT", + "apis": [ + { + "id": "google.analytics.admin.v1beta", + "version": "v1beta" + } + ] + }, + "snippets": [ + { + "regionTag": "analyticsadmin_v1beta_generated_AnalyticsAdminService_GetAccount_async", + "title": "AnalyticsAdminService getAccount Sample", + "origin": "API_DEFINITION", + "description": " Lookup for a single Account.", + "canonical": true, + "file": "analytics_admin_service.get_account.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 55, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetAccount", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminService.GetAccount", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.analytics.admin.v1beta.Account", + "client": { + "shortName": "AnalyticsAdminServiceClient", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminServiceClient" + }, + "method": { + "shortName": "GetAccount", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminService.GetAccount", + "service": { + "shortName": "AnalyticsAdminService", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminService" + } + } + } + }, + { + "regionTag": "analyticsadmin_v1beta_generated_AnalyticsAdminService_ListAccounts_async", + "title": "AnalyticsAdminService listAccounts Sample", + "origin": "API_DEFINITION", + "description": " Returns all accounts accessible by the caller. Note that these accounts might not currently have GA4 properties. Soft-deleted (ie: \"trashed\") accounts are excluded by default. Returns an empty list if no relevant accounts are found.", + "canonical": true, + "file": "analytics_admin_service.list_accounts.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 70, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListAccounts", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminService.ListAccounts", + "async": true, + "parameters": [ + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "show_deleted", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.analytics.admin.v1beta.ListAccountsResponse", + "client": { + "shortName": "AnalyticsAdminServiceClient", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminServiceClient" + }, + "method": { + "shortName": "ListAccounts", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminService.ListAccounts", + "service": { + "shortName": "AnalyticsAdminService", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminService" + } + } + } + }, + { + "regionTag": "analyticsadmin_v1beta_generated_AnalyticsAdminService_DeleteAccount_async", + "title": "AnalyticsAdminService deleteAccount Sample", + "origin": "API_DEFINITION", + "description": " Marks target Account as soft-deleted (ie: \"trashed\") and returns it. This API does not have a method to restore soft-deleted accounts. However, they can be restored using the Trash Can UI. If the accounts are not restored before the expiration time, the account and all child resources (eg: Properties, GoogleAdsLinks, Streams, UserLinks) will be permanently purged. https://support.google.com/analytics/answer/6154772 Returns an error if the target is not found.", + "canonical": true, + "file": "analytics_admin_service.delete_account.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 55, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteAccount", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminService.DeleteAccount", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "AnalyticsAdminServiceClient", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminServiceClient" + }, + "method": { + "shortName": "DeleteAccount", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminService.DeleteAccount", + "service": { + "shortName": "AnalyticsAdminService", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminService" + } + } + } + }, + { + "regionTag": "analyticsadmin_v1beta_generated_AnalyticsAdminService_UpdateAccount_async", + "title": "AnalyticsAdminService updateAccount Sample", + "origin": "API_DEFINITION", + "description": " Updates an account.", + "canonical": true, + "file": "analytics_admin_service.update_account.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 61, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateAccount", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminService.UpdateAccount", + "async": true, + "parameters": [ + { + "name": "account", + "type": ".google.analytics.admin.v1beta.Account" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + } + ], + "resultType": ".google.analytics.admin.v1beta.Account", + "client": { + "shortName": "AnalyticsAdminServiceClient", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminServiceClient" + }, + "method": { + "shortName": "UpdateAccount", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminService.UpdateAccount", + "service": { + "shortName": "AnalyticsAdminService", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminService" + } + } + } + }, + { + "regionTag": "analyticsadmin_v1beta_generated_AnalyticsAdminService_ProvisionAccountTicket_async", + "title": "AnalyticsAdminService provisionAccountTicket Sample", + "origin": "API_DEFINITION", + "description": " Requests a ticket for creating an account.", + "canonical": true, + "file": "analytics_admin_service.provision_account_ticket.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 57, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ProvisionAccountTicket", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminService.ProvisionAccountTicket", + "async": true, + "parameters": [ + { + "name": "account", + "type": ".google.analytics.admin.v1beta.Account" + }, + { + "name": "redirect_uri", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.analytics.admin.v1beta.ProvisionAccountTicketResponse", + "client": { + "shortName": "AnalyticsAdminServiceClient", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminServiceClient" + }, + "method": { + "shortName": "ProvisionAccountTicket", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminService.ProvisionAccountTicket", + "service": { + "shortName": "AnalyticsAdminService", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminService" + } + } + } + }, + { + "regionTag": "analyticsadmin_v1beta_generated_AnalyticsAdminService_ListAccountSummaries_async", + "title": "AnalyticsAdminService listAccountSummaries Sample", + "origin": "API_DEFINITION", + "description": " Returns summaries of all accounts accessible by the caller.", + "canonical": true, + "file": "analytics_admin_service.list_account_summaries.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 64, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListAccountSummaries", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminService.ListAccountSummaries", + "async": true, + "parameters": [ + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.analytics.admin.v1beta.ListAccountSummariesResponse", + "client": { + "shortName": "AnalyticsAdminServiceClient", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminServiceClient" + }, + "method": { + "shortName": "ListAccountSummaries", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminService.ListAccountSummaries", + "service": { + "shortName": "AnalyticsAdminService", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminService" + } + } + } + }, + { + "regionTag": "analyticsadmin_v1beta_generated_AnalyticsAdminService_GetProperty_async", + "title": "AnalyticsAdminService getProperty Sample", + "origin": "API_DEFINITION", + "description": " Lookup for a single \"GA4\" Property.", + "canonical": true, + "file": "analytics_admin_service.get_property.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 55, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetProperty", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminService.GetProperty", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.analytics.admin.v1beta.Property", + "client": { + "shortName": "AnalyticsAdminServiceClient", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminServiceClient" + }, + "method": { + "shortName": "GetProperty", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminService.GetProperty", + "service": { + "shortName": "AnalyticsAdminService", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminService" + } + } + } + }, + { + "regionTag": "analyticsadmin_v1beta_generated_AnalyticsAdminService_ListProperties_async", + "title": "AnalyticsAdminService listProperties Sample", + "origin": "API_DEFINITION", + "description": " Returns child Properties under the specified parent Account. Only \"GA4\" properties will be returned. Properties will be excluded if the caller does not have access. Soft-deleted (ie: \"trashed\") properties are excluded by default. Returns an empty list if no relevant properties are found.", + "canonical": true, + "file": "analytics_admin_service.list_properties.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 89, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListProperties", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminService.ListProperties", + "async": true, + "parameters": [ + { + "name": "filter", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "show_deleted", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.analytics.admin.v1beta.ListPropertiesResponse", + "client": { + "shortName": "AnalyticsAdminServiceClient", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminServiceClient" + }, + "method": { + "shortName": "ListProperties", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminService.ListProperties", + "service": { + "shortName": "AnalyticsAdminService", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminService" + } + } + } + }, + { + "regionTag": "analyticsadmin_v1beta_generated_AnalyticsAdminService_CreateProperty_async", + "title": "AnalyticsAdminService createProperty Sample", + "origin": "API_DEFINITION", + "description": " Creates an \"GA4\" property with the specified location and attributes.", + "canonical": true, + "file": "analytics_admin_service.create_property.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateProperty", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminService.CreateProperty", + "async": true, + "parameters": [ + { + "name": "property", + "type": ".google.analytics.admin.v1beta.Property" + } + ], + "resultType": ".google.analytics.admin.v1beta.Property", + "client": { + "shortName": "AnalyticsAdminServiceClient", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminServiceClient" + }, + "method": { + "shortName": "CreateProperty", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminService.CreateProperty", + "service": { + "shortName": "AnalyticsAdminService", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminService" + } + } + } + }, + { + "regionTag": "analyticsadmin_v1beta_generated_AnalyticsAdminService_DeleteProperty_async", + "title": "AnalyticsAdminService deleteProperty Sample", + "origin": "API_DEFINITION", + "description": " Marks target Property as soft-deleted (ie: \"trashed\") and returns it. This API does not have a method to restore soft-deleted properties. However, they can be restored using the Trash Can UI. If the properties are not restored before the expiration time, the Property and all child resources (eg: GoogleAdsLinks, Streams, UserLinks) will be permanently purged. https://support.google.com/analytics/answer/6154772 Returns an error if the target is not found, or is not an GA4 Property.", + "canonical": true, + "file": "analytics_admin_service.delete_property.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 55, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteProperty", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminService.DeleteProperty", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.analytics.admin.v1beta.Property", + "client": { + "shortName": "AnalyticsAdminServiceClient", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminServiceClient" + }, + "method": { + "shortName": "DeleteProperty", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminService.DeleteProperty", + "service": { + "shortName": "AnalyticsAdminService", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminService" + } + } + } + }, + { + "regionTag": "analyticsadmin_v1beta_generated_AnalyticsAdminService_UpdateProperty_async", + "title": "AnalyticsAdminService updateProperty Sample", + "origin": "API_DEFINITION", + "description": " Updates a property.", + "canonical": true, + "file": "analytics_admin_service.update_property.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 62, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateProperty", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminService.UpdateProperty", + "async": true, + "parameters": [ + { + "name": "property", + "type": ".google.analytics.admin.v1beta.Property" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + } + ], + "resultType": ".google.analytics.admin.v1beta.Property", + "client": { + "shortName": "AnalyticsAdminServiceClient", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminServiceClient" + }, + "method": { + "shortName": "UpdateProperty", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminService.UpdateProperty", + "service": { + "shortName": "AnalyticsAdminService", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminService" + } + } + } + }, + { + "regionTag": "analyticsadmin_v1beta_generated_AnalyticsAdminService_CreateFirebaseLink_async", + "title": "AnalyticsAdminService createFirebaseLink Sample", + "origin": "API_DEFINITION", + "description": " Creates a FirebaseLink. Properties can have at most one FirebaseLink.", + "canonical": true, + "file": "analytics_admin_service.create_firebase_link.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 59, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateFirebaseLink", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminService.CreateFirebaseLink", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "firebase_link", + "type": ".google.analytics.admin.v1beta.FirebaseLink" + } + ], + "resultType": ".google.analytics.admin.v1beta.FirebaseLink", + "client": { + "shortName": "AnalyticsAdminServiceClient", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminServiceClient" + }, + "method": { + "shortName": "CreateFirebaseLink", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminService.CreateFirebaseLink", + "service": { + "shortName": "AnalyticsAdminService", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminService" + } + } + } + }, + { + "regionTag": "analyticsadmin_v1beta_generated_AnalyticsAdminService_DeleteFirebaseLink_async", + "title": "AnalyticsAdminService deleteFirebaseLink Sample", + "origin": "API_DEFINITION", + "description": " Deletes a FirebaseLink on a property", + "canonical": true, + "file": "analytics_admin_service.delete_firebase_link.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteFirebaseLink", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminService.DeleteFirebaseLink", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "AnalyticsAdminServiceClient", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminServiceClient" + }, + "method": { + "shortName": "DeleteFirebaseLink", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminService.DeleteFirebaseLink", + "service": { + "shortName": "AnalyticsAdminService", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminService" + } + } + } + }, + { + "regionTag": "analyticsadmin_v1beta_generated_AnalyticsAdminService_ListFirebaseLinks_async", + "title": "AnalyticsAdminService listFirebaseLinks Sample", + "origin": "API_DEFINITION", + "description": " Lists FirebaseLinks on a property. Properties can have at most one FirebaseLink.", + "canonical": true, + "file": "analytics_admin_service.list_firebase_links.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 70, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListFirebaseLinks", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminService.ListFirebaseLinks", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.analytics.admin.v1beta.ListFirebaseLinksResponse", + "client": { + "shortName": "AnalyticsAdminServiceClient", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminServiceClient" + }, + "method": { + "shortName": "ListFirebaseLinks", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminService.ListFirebaseLinks", + "service": { + "shortName": "AnalyticsAdminService", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminService" + } + } + } + }, + { + "regionTag": "analyticsadmin_v1beta_generated_AnalyticsAdminService_CreateGoogleAdsLink_async", + "title": "AnalyticsAdminService createGoogleAdsLink Sample", + "origin": "API_DEFINITION", + "description": " Creates a GoogleAdsLink.", + "canonical": true, + "file": "analytics_admin_service.create_google_ads_link.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 58, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateGoogleAdsLink", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminService.CreateGoogleAdsLink", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "google_ads_link", + "type": ".google.analytics.admin.v1beta.GoogleAdsLink" + } + ], + "resultType": ".google.analytics.admin.v1beta.GoogleAdsLink", + "client": { + "shortName": "AnalyticsAdminServiceClient", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminServiceClient" + }, + "method": { + "shortName": "CreateGoogleAdsLink", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminService.CreateGoogleAdsLink", + "service": { + "shortName": "AnalyticsAdminService", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminService" + } + } + } + }, + { + "regionTag": "analyticsadmin_v1beta_generated_AnalyticsAdminService_UpdateGoogleAdsLink_async", + "title": "AnalyticsAdminService updateGoogleAdsLink Sample", + "origin": "API_DEFINITION", + "description": " Updates a GoogleAdsLink on a property", + "canonical": true, + "file": "analytics_admin_service.update_google_ads_link.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 59, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateGoogleAdsLink", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminService.UpdateGoogleAdsLink", + "async": true, + "parameters": [ + { + "name": "google_ads_link", + "type": ".google.analytics.admin.v1beta.GoogleAdsLink" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + } + ], + "resultType": ".google.analytics.admin.v1beta.GoogleAdsLink", + "client": { + "shortName": "AnalyticsAdminServiceClient", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminServiceClient" + }, + "method": { + "shortName": "UpdateGoogleAdsLink", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminService.UpdateGoogleAdsLink", + "service": { + "shortName": "AnalyticsAdminService", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminService" + } + } + } + }, + { + "regionTag": "analyticsadmin_v1beta_generated_AnalyticsAdminService_DeleteGoogleAdsLink_async", + "title": "AnalyticsAdminService deleteGoogleAdsLink Sample", + "origin": "API_DEFINITION", + "description": " Deletes a GoogleAdsLink on a property", + "canonical": true, + "file": "analytics_admin_service.delete_google_ads_link.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 53, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteGoogleAdsLink", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminService.DeleteGoogleAdsLink", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "AnalyticsAdminServiceClient", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminServiceClient" + }, + "method": { + "shortName": "DeleteGoogleAdsLink", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminService.DeleteGoogleAdsLink", + "service": { + "shortName": "AnalyticsAdminService", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminService" + } + } + } + }, + { + "regionTag": "analyticsadmin_v1beta_generated_AnalyticsAdminService_ListGoogleAdsLinks_async", + "title": "AnalyticsAdminService listGoogleAdsLinks Sample", + "origin": "API_DEFINITION", + "description": " Lists GoogleAdsLinks on a property.", + "canonical": true, + "file": "analytics_admin_service.list_google_ads_links.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 68, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListGoogleAdsLinks", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminService.ListGoogleAdsLinks", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.analytics.admin.v1beta.ListGoogleAdsLinksResponse", + "client": { + "shortName": "AnalyticsAdminServiceClient", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminServiceClient" + }, + "method": { + "shortName": "ListGoogleAdsLinks", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminService.ListGoogleAdsLinks", + "service": { + "shortName": "AnalyticsAdminService", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminService" + } + } + } + }, + { + "regionTag": "analyticsadmin_v1beta_generated_AnalyticsAdminService_GetDataSharingSettings_async", + "title": "AnalyticsAdminService getDataSharingSettings Sample", + "origin": "API_DEFINITION", + "description": " Get data sharing settings on an account. Data sharing settings are singletons.", + "canonical": true, + "file": "analytics_admin_service.get_data_sharing_settings.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 55, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetDataSharingSettings", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminService.GetDataSharingSettings", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.analytics.admin.v1beta.DataSharingSettings", + "client": { + "shortName": "AnalyticsAdminServiceClient", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminServiceClient" + }, + "method": { + "shortName": "GetDataSharingSettings", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminService.GetDataSharingSettings", + "service": { + "shortName": "AnalyticsAdminService", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminService" + } + } + } + }, + { + "regionTag": "analyticsadmin_v1beta_generated_AnalyticsAdminService_GetMeasurementProtocolSecret_async", + "title": "AnalyticsAdminService getMeasurementProtocolSecret Sample", + "origin": "API_DEFINITION", + "description": " Lookup for a single \"GA4\" MeasurementProtocolSecret.", + "canonical": true, + "file": "analytics_admin_service.get_measurement_protocol_secret.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 55, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetMeasurementProtocolSecret", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminService.GetMeasurementProtocolSecret", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.analytics.admin.v1beta.MeasurementProtocolSecret", + "client": { + "shortName": "AnalyticsAdminServiceClient", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminServiceClient" + }, + "method": { + "shortName": "GetMeasurementProtocolSecret", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminService.GetMeasurementProtocolSecret", + "service": { + "shortName": "AnalyticsAdminService", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminService" + } + } + } + }, + { + "regionTag": "analyticsadmin_v1beta_generated_AnalyticsAdminService_ListMeasurementProtocolSecrets_async", + "title": "AnalyticsAdminService listMeasurementProtocolSecrets Sample", + "origin": "API_DEFINITION", + "description": " Returns child MeasurementProtocolSecrets under the specified parent Property.", + "canonical": true, + "file": "analytics_admin_service.list_measurement_protocol_secrets.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 70, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListMeasurementProtocolSecrets", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminService.ListMeasurementProtocolSecrets", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.analytics.admin.v1beta.ListMeasurementProtocolSecretsResponse", + "client": { + "shortName": "AnalyticsAdminServiceClient", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminServiceClient" + }, + "method": { + "shortName": "ListMeasurementProtocolSecrets", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminService.ListMeasurementProtocolSecrets", + "service": { + "shortName": "AnalyticsAdminService", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminService" + } + } + } + }, + { + "regionTag": "analyticsadmin_v1beta_generated_AnalyticsAdminService_CreateMeasurementProtocolSecret_async", + "title": "AnalyticsAdminService createMeasurementProtocolSecret Sample", + "origin": "API_DEFINITION", + "description": " Creates a measurement protocol secret.", + "canonical": true, + "file": "analytics_admin_service.create_measurement_protocol_secret.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 59, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateMeasurementProtocolSecret", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminService.CreateMeasurementProtocolSecret", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "measurement_protocol_secret", + "type": ".google.analytics.admin.v1beta.MeasurementProtocolSecret" + } + ], + "resultType": ".google.analytics.admin.v1beta.MeasurementProtocolSecret", + "client": { + "shortName": "AnalyticsAdminServiceClient", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminServiceClient" + }, + "method": { + "shortName": "CreateMeasurementProtocolSecret", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminService.CreateMeasurementProtocolSecret", + "service": { + "shortName": "AnalyticsAdminService", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminService" + } + } + } + }, + { + "regionTag": "analyticsadmin_v1beta_generated_AnalyticsAdminService_DeleteMeasurementProtocolSecret_async", + "title": "AnalyticsAdminService deleteMeasurementProtocolSecret Sample", + "origin": "API_DEFINITION", + "description": " Deletes target MeasurementProtocolSecret.", + "canonical": true, + "file": "analytics_admin_service.delete_measurement_protocol_secret.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 55, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteMeasurementProtocolSecret", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminService.DeleteMeasurementProtocolSecret", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "AnalyticsAdminServiceClient", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminServiceClient" + }, + "method": { + "shortName": "DeleteMeasurementProtocolSecret", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminService.DeleteMeasurementProtocolSecret", + "service": { + "shortName": "AnalyticsAdminService", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminService" + } + } + } + }, + { + "regionTag": "analyticsadmin_v1beta_generated_AnalyticsAdminService_UpdateMeasurementProtocolSecret_async", + "title": "AnalyticsAdminService updateMeasurementProtocolSecret Sample", + "origin": "API_DEFINITION", + "description": " Updates a measurement protocol secret.", + "canonical": true, + "file": "analytics_admin_service.update_measurement_protocol_secret.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 57, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateMeasurementProtocolSecret", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminService.UpdateMeasurementProtocolSecret", + "async": true, + "parameters": [ + { + "name": "measurement_protocol_secret", + "type": ".google.analytics.admin.v1beta.MeasurementProtocolSecret" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + } + ], + "resultType": ".google.analytics.admin.v1beta.MeasurementProtocolSecret", + "client": { + "shortName": "AnalyticsAdminServiceClient", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminServiceClient" + }, + "method": { + "shortName": "UpdateMeasurementProtocolSecret", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminService.UpdateMeasurementProtocolSecret", + "service": { + "shortName": "AnalyticsAdminService", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminService" + } + } + } + }, + { + "regionTag": "analyticsadmin_v1beta_generated_AnalyticsAdminService_AcknowledgeUserDataCollection_async", + "title": "AnalyticsAdminService acknowledgeUserDataCollection Sample", + "origin": "API_DEFINITION", + "description": " Acknowledges the terms of user data collection for the specified property. This acknowledgement must be completed (either in the Google Analytics UI or via this API) before MeasurementProtocolSecret resources may be created.", + "canonical": true, + "file": "analytics_admin_service.acknowledge_user_data_collection.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 64, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "AcknowledgeUserDataCollection", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminService.AcknowledgeUserDataCollection", + "async": true, + "parameters": [ + { + "name": "property", + "type": "TYPE_STRING" + }, + { + "name": "acknowledgement", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.analytics.admin.v1beta.AcknowledgeUserDataCollectionResponse", + "client": { + "shortName": "AnalyticsAdminServiceClient", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminServiceClient" + }, + "method": { + "shortName": "AcknowledgeUserDataCollection", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminService.AcknowledgeUserDataCollection", + "service": { + "shortName": "AnalyticsAdminService", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminService" + } + } + } + }, + { + "regionTag": "analyticsadmin_v1beta_generated_AnalyticsAdminService_SearchChangeHistoryEvents_async", + "title": "AnalyticsAdminService searchChangeHistoryEvents Sample", + "origin": "API_DEFINITION", + "description": " Searches through all changes to an account or its children given the specified set of filters.", + "canonical": true, + "file": "analytics_admin_service.search_change_history_events.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 96, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "SearchChangeHistoryEvents", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminService.SearchChangeHistoryEvents", + "async": true, + "parameters": [ + { + "name": "account", + "type": "TYPE_STRING" + }, + { + "name": "property", + "type": "TYPE_STRING" + }, + { + "name": "resource_type", + "type": "TYPE_ENUM[]" + }, + { + "name": "action", + "type": "TYPE_ENUM[]" + }, + { + "name": "actor_email", + "type": "TYPE_STRING[]" + }, + { + "name": "earliest_change_time", + "type": ".google.protobuf.Timestamp" + }, + { + "name": "latest_change_time", + "type": ".google.protobuf.Timestamp" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.analytics.admin.v1beta.SearchChangeHistoryEventsResponse", + "client": { + "shortName": "AnalyticsAdminServiceClient", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminServiceClient" + }, + "method": { + "shortName": "SearchChangeHistoryEvents", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminService.SearchChangeHistoryEvents", + "service": { + "shortName": "AnalyticsAdminService", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminService" + } + } + } + }, + { + "regionTag": "analyticsadmin_v1beta_generated_AnalyticsAdminService_CreateConversionEvent_async", + "title": "AnalyticsAdminService createConversionEvent Sample", + "origin": "API_DEFINITION", + "description": " Creates a conversion event with the specified attributes.", + "canonical": true, + "file": "analytics_admin_service.create_conversion_event.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 59, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateConversionEvent", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminService.CreateConversionEvent", + "async": true, + "parameters": [ + { + "name": "conversion_event", + "type": ".google.analytics.admin.v1beta.ConversionEvent" + }, + { + "name": "parent", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.analytics.admin.v1beta.ConversionEvent", + "client": { + "shortName": "AnalyticsAdminServiceClient", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminServiceClient" + }, + "method": { + "shortName": "CreateConversionEvent", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminService.CreateConversionEvent", + "service": { + "shortName": "AnalyticsAdminService", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminService" + } + } + } + }, + { + "regionTag": "analyticsadmin_v1beta_generated_AnalyticsAdminService_GetConversionEvent_async", + "title": "AnalyticsAdminService getConversionEvent Sample", + "origin": "API_DEFINITION", + "description": " Retrieve a single conversion event.", + "canonical": true, + "file": "analytics_admin_service.get_conversion_event.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 55, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetConversionEvent", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminService.GetConversionEvent", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.analytics.admin.v1beta.ConversionEvent", + "client": { + "shortName": "AnalyticsAdminServiceClient", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminServiceClient" + }, + "method": { + "shortName": "GetConversionEvent", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminService.GetConversionEvent", + "service": { + "shortName": "AnalyticsAdminService", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminService" + } + } + } + }, + { + "regionTag": "analyticsadmin_v1beta_generated_AnalyticsAdminService_DeleteConversionEvent_async", + "title": "AnalyticsAdminService deleteConversionEvent Sample", + "origin": "API_DEFINITION", + "description": " Deletes a conversion event in a property.", + "canonical": true, + "file": "analytics_admin_service.delete_conversion_event.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 55, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteConversionEvent", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminService.DeleteConversionEvent", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "AnalyticsAdminServiceClient", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminServiceClient" + }, + "method": { + "shortName": "DeleteConversionEvent", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminService.DeleteConversionEvent", + "service": { + "shortName": "AnalyticsAdminService", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminService" + } + } + } + }, + { + "regionTag": "analyticsadmin_v1beta_generated_AnalyticsAdminService_ListConversionEvents_async", + "title": "AnalyticsAdminService listConversionEvents Sample", + "origin": "API_DEFINITION", + "description": " Returns a list of conversion events in the specified parent property. Returns an empty list if no conversion events are found.", + "canonical": true, + "file": "analytics_admin_service.list_conversion_events.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 69, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListConversionEvents", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminService.ListConversionEvents", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.analytics.admin.v1beta.ListConversionEventsResponse", + "client": { + "shortName": "AnalyticsAdminServiceClient", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminServiceClient" + }, + "method": { + "shortName": "ListConversionEvents", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminService.ListConversionEvents", + "service": { + "shortName": "AnalyticsAdminService", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminService" + } + } + } + }, + { + "regionTag": "analyticsadmin_v1beta_generated_AnalyticsAdminService_CreateCustomDimension_async", + "title": "AnalyticsAdminService createCustomDimension Sample", + "origin": "API_DEFINITION", + "description": " Creates a CustomDimension.", + "canonical": true, + "file": "analytics_admin_service.create_custom_dimension.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 58, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateCustomDimension", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminService.CreateCustomDimension", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "custom_dimension", + "type": ".google.analytics.admin.v1beta.CustomDimension" + } + ], + "resultType": ".google.analytics.admin.v1beta.CustomDimension", + "client": { + "shortName": "AnalyticsAdminServiceClient", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminServiceClient" + }, + "method": { + "shortName": "CreateCustomDimension", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminService.CreateCustomDimension", + "service": { + "shortName": "AnalyticsAdminService", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminService" + } + } + } + }, + { + "regionTag": "analyticsadmin_v1beta_generated_AnalyticsAdminService_UpdateCustomDimension_async", + "title": "AnalyticsAdminService updateCustomDimension Sample", + "origin": "API_DEFINITION", + "description": " Updates a CustomDimension on a property.", + "canonical": true, + "file": "analytics_admin_service.update_custom_dimension.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 59, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateCustomDimension", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminService.UpdateCustomDimension", + "async": true, + "parameters": [ + { + "name": "custom_dimension", + "type": ".google.analytics.admin.v1beta.CustomDimension" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + } + ], + "resultType": ".google.analytics.admin.v1beta.CustomDimension", + "client": { + "shortName": "AnalyticsAdminServiceClient", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminServiceClient" + }, + "method": { + "shortName": "UpdateCustomDimension", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminService.UpdateCustomDimension", + "service": { + "shortName": "AnalyticsAdminService", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminService" + } + } + } + }, + { + "regionTag": "analyticsadmin_v1beta_generated_AnalyticsAdminService_ListCustomDimensions_async", + "title": "AnalyticsAdminService listCustomDimensions Sample", + "origin": "API_DEFINITION", + "description": " Lists CustomDimensions on a property.", + "canonical": true, + "file": "analytics_admin_service.list_custom_dimensions.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 68, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListCustomDimensions", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminService.ListCustomDimensions", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.analytics.admin.v1beta.ListCustomDimensionsResponse", + "client": { + "shortName": "AnalyticsAdminServiceClient", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminServiceClient" + }, + "method": { + "shortName": "ListCustomDimensions", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminService.ListCustomDimensions", + "service": { + "shortName": "AnalyticsAdminService", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminService" + } + } + } + }, + { + "regionTag": "analyticsadmin_v1beta_generated_AnalyticsAdminService_ArchiveCustomDimension_async", + "title": "AnalyticsAdminService archiveCustomDimension Sample", + "origin": "API_DEFINITION", + "description": " Archives a CustomDimension on a property.", + "canonical": true, + "file": "analytics_admin_service.archive_custom_dimension.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ArchiveCustomDimension", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminService.ArchiveCustomDimension", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "AnalyticsAdminServiceClient", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminServiceClient" + }, + "method": { + "shortName": "ArchiveCustomDimension", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminService.ArchiveCustomDimension", + "service": { + "shortName": "AnalyticsAdminService", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminService" + } + } + } + }, + { + "regionTag": "analyticsadmin_v1beta_generated_AnalyticsAdminService_GetCustomDimension_async", + "title": "AnalyticsAdminService getCustomDimension Sample", + "origin": "API_DEFINITION", + "description": " Lookup for a single CustomDimension.", + "canonical": true, + "file": "analytics_admin_service.get_custom_dimension.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetCustomDimension", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminService.GetCustomDimension", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.analytics.admin.v1beta.CustomDimension", + "client": { + "shortName": "AnalyticsAdminServiceClient", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminServiceClient" + }, + "method": { + "shortName": "GetCustomDimension", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminService.GetCustomDimension", + "service": { + "shortName": "AnalyticsAdminService", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminService" + } + } + } + }, + { + "regionTag": "analyticsadmin_v1beta_generated_AnalyticsAdminService_CreateCustomMetric_async", + "title": "AnalyticsAdminService createCustomMetric Sample", + "origin": "API_DEFINITION", + "description": " Creates a CustomMetric.", + "canonical": true, + "file": "analytics_admin_service.create_custom_metric.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 58, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateCustomMetric", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminService.CreateCustomMetric", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "custom_metric", + "type": ".google.analytics.admin.v1beta.CustomMetric" + } + ], + "resultType": ".google.analytics.admin.v1beta.CustomMetric", + "client": { + "shortName": "AnalyticsAdminServiceClient", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminServiceClient" + }, + "method": { + "shortName": "CreateCustomMetric", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminService.CreateCustomMetric", + "service": { + "shortName": "AnalyticsAdminService", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminService" + } + } + } + }, + { + "regionTag": "analyticsadmin_v1beta_generated_AnalyticsAdminService_UpdateCustomMetric_async", + "title": "AnalyticsAdminService updateCustomMetric Sample", + "origin": "API_DEFINITION", + "description": " Updates a CustomMetric on a property.", + "canonical": true, + "file": "analytics_admin_service.update_custom_metric.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 59, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateCustomMetric", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminService.UpdateCustomMetric", + "async": true, + "parameters": [ + { + "name": "custom_metric", + "type": ".google.analytics.admin.v1beta.CustomMetric" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + } + ], + "resultType": ".google.analytics.admin.v1beta.CustomMetric", + "client": { + "shortName": "AnalyticsAdminServiceClient", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminServiceClient" + }, + "method": { + "shortName": "UpdateCustomMetric", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminService.UpdateCustomMetric", + "service": { + "shortName": "AnalyticsAdminService", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminService" + } + } + } + }, + { + "regionTag": "analyticsadmin_v1beta_generated_AnalyticsAdminService_ListCustomMetrics_async", + "title": "AnalyticsAdminService listCustomMetrics Sample", + "origin": "API_DEFINITION", + "description": " Lists CustomMetrics on a property.", + "canonical": true, + "file": "analytics_admin_service.list_custom_metrics.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 68, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListCustomMetrics", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminService.ListCustomMetrics", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.analytics.admin.v1beta.ListCustomMetricsResponse", + "client": { + "shortName": "AnalyticsAdminServiceClient", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminServiceClient" + }, + "method": { + "shortName": "ListCustomMetrics", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminService.ListCustomMetrics", + "service": { + "shortName": "AnalyticsAdminService", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminService" + } + } + } + }, + { + "regionTag": "analyticsadmin_v1beta_generated_AnalyticsAdminService_ArchiveCustomMetric_async", + "title": "AnalyticsAdminService archiveCustomMetric Sample", + "origin": "API_DEFINITION", + "description": " Archives a CustomMetric on a property.", + "canonical": true, + "file": "analytics_admin_service.archive_custom_metric.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ArchiveCustomMetric", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminService.ArchiveCustomMetric", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "AnalyticsAdminServiceClient", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminServiceClient" + }, + "method": { + "shortName": "ArchiveCustomMetric", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminService.ArchiveCustomMetric", + "service": { + "shortName": "AnalyticsAdminService", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminService" + } + } + } + }, + { + "regionTag": "analyticsadmin_v1beta_generated_AnalyticsAdminService_GetCustomMetric_async", + "title": "AnalyticsAdminService getCustomMetric Sample", + "origin": "API_DEFINITION", + "description": " Lookup for a single CustomMetric.", + "canonical": true, + "file": "analytics_admin_service.get_custom_metric.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetCustomMetric", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminService.GetCustomMetric", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.analytics.admin.v1beta.CustomMetric", + "client": { + "shortName": "AnalyticsAdminServiceClient", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminServiceClient" + }, + "method": { + "shortName": "GetCustomMetric", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminService.GetCustomMetric", + "service": { + "shortName": "AnalyticsAdminService", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminService" + } + } + } + }, + { + "regionTag": "analyticsadmin_v1beta_generated_AnalyticsAdminService_GetDataRetentionSettings_async", + "title": "AnalyticsAdminService getDataRetentionSettings Sample", + "origin": "API_DEFINITION", + "description": " Returns the singleton data retention settings for this property.", + "canonical": true, + "file": "analytics_admin_service.get_data_retention_settings.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 56, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetDataRetentionSettings", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminService.GetDataRetentionSettings", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.analytics.admin.v1beta.DataRetentionSettings", + "client": { + "shortName": "AnalyticsAdminServiceClient", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminServiceClient" + }, + "method": { + "shortName": "GetDataRetentionSettings", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminService.GetDataRetentionSettings", + "service": { + "shortName": "AnalyticsAdminService", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminService" + } + } + } + }, + { + "regionTag": "analyticsadmin_v1beta_generated_AnalyticsAdminService_UpdateDataRetentionSettings_async", + "title": "AnalyticsAdminService updateDataRetentionSettings Sample", + "origin": "API_DEFINITION", + "description": " Updates the singleton data retention settings for this property.", + "canonical": true, + "file": "analytics_admin_service.update_data_retention_settings.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 61, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateDataRetentionSettings", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminService.UpdateDataRetentionSettings", + "async": true, + "parameters": [ + { + "name": "data_retention_settings", + "type": ".google.analytics.admin.v1beta.DataRetentionSettings" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + } + ], + "resultType": ".google.analytics.admin.v1beta.DataRetentionSettings", + "client": { + "shortName": "AnalyticsAdminServiceClient", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminServiceClient" + }, + "method": { + "shortName": "UpdateDataRetentionSettings", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminService.UpdateDataRetentionSettings", + "service": { + "shortName": "AnalyticsAdminService", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminService" + } + } + } + }, + { + "regionTag": "analyticsadmin_v1beta_generated_AnalyticsAdminService_CreateDataStream_async", + "title": "AnalyticsAdminService createDataStream Sample", + "origin": "API_DEFINITION", + "description": " Creates a DataStream.", + "canonical": true, + "file": "analytics_admin_service.create_data_stream.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 58, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateDataStream", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminService.CreateDataStream", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "data_stream", + "type": ".google.analytics.admin.v1beta.DataStream" + } + ], + "resultType": ".google.analytics.admin.v1beta.DataStream", + "client": { + "shortName": "AnalyticsAdminServiceClient", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminServiceClient" + }, + "method": { + "shortName": "CreateDataStream", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminService.CreateDataStream", + "service": { + "shortName": "AnalyticsAdminService", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminService" + } + } + } + }, + { + "regionTag": "analyticsadmin_v1beta_generated_AnalyticsAdminService_DeleteDataStream_async", + "title": "AnalyticsAdminService deleteDataStream Sample", + "origin": "API_DEFINITION", + "description": " Deletes a DataStream on a property.", + "canonical": true, + "file": "analytics_admin_service.delete_data_stream.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteDataStream", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminService.DeleteDataStream", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "AnalyticsAdminServiceClient", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminServiceClient" + }, + "method": { + "shortName": "DeleteDataStream", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminService.DeleteDataStream", + "service": { + "shortName": "AnalyticsAdminService", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminService" + } + } + } + }, + { + "regionTag": "analyticsadmin_v1beta_generated_AnalyticsAdminService_UpdateDataStream_async", + "title": "AnalyticsAdminService updateDataStream Sample", + "origin": "API_DEFINITION", + "description": " Updates a DataStream on a property.", + "canonical": true, + "file": "analytics_admin_service.update_data_stream.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 59, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateDataStream", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminService.UpdateDataStream", + "async": true, + "parameters": [ + { + "name": "data_stream", + "type": ".google.analytics.admin.v1beta.DataStream" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + } + ], + "resultType": ".google.analytics.admin.v1beta.DataStream", + "client": { + "shortName": "AnalyticsAdminServiceClient", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminServiceClient" + }, + "method": { + "shortName": "UpdateDataStream", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminService.UpdateDataStream", + "service": { + "shortName": "AnalyticsAdminService", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminService" + } + } + } + }, + { + "regionTag": "analyticsadmin_v1beta_generated_AnalyticsAdminService_ListDataStreams_async", + "title": "AnalyticsAdminService listDataStreams Sample", + "origin": "API_DEFINITION", + "description": " Lists DataStreams on a property.", + "canonical": true, + "file": "analytics_admin_service.list_data_streams.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 68, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListDataStreams", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminService.ListDataStreams", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.analytics.admin.v1beta.ListDataStreamsResponse", + "client": { + "shortName": "AnalyticsAdminServiceClient", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminServiceClient" + }, + "method": { + "shortName": "ListDataStreams", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminService.ListDataStreams", + "service": { + "shortName": "AnalyticsAdminService", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminService" + } + } + } + }, + { + "regionTag": "analyticsadmin_v1beta_generated_AnalyticsAdminService_GetDataStream_async", + "title": "AnalyticsAdminService getDataStream Sample", + "origin": "API_DEFINITION", + "description": " Lookup for a single DataStream.", + "canonical": true, + "file": "analytics_admin_service.get_data_stream.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetDataStream", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminService.GetDataStream", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.analytics.admin.v1beta.DataStream", + "client": { + "shortName": "AnalyticsAdminServiceClient", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminServiceClient" + }, + "method": { + "shortName": "GetDataStream", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminService.GetDataStream", + "service": { + "shortName": "AnalyticsAdminService", + "fullName": "google.analytics.admin.v1beta.AnalyticsAdminService" + } + } + } + } + ] +} \ No newline at end of file diff --git a/packages/google-analytics-admin/samples/package.json b/packages/google-analytics-admin/samples/package.json new file mode 100644 index 00000000000..d8f18fc51e3 --- /dev/null +++ b/packages/google-analytics-admin/samples/package.json @@ -0,0 +1,29 @@ +{ + "name": "analytics-admin-samples", + "private": true, + "license": "Apache-2.0", + "author": "Google LLC", + "repository": "googleapis/nodejs-analytics-admin", + "engines": { + "node": ">=12.0.0" + }, + "files": [ + "*.js" + ], + "scripts": { + "test": "c8 mocha --timeout 600000 test/*.js" + }, + "dependencies": { + "@google-analytics/admin": "^4.3.0", + "google-auth-library": "^7.0.0", + "google-gax": "^2.6.3", + "http": "0.0.1-security", + "open": "^8.0.0", + "server-destroy": "^1.0.1" + }, + "devDependencies": { + "c8": "^7.1.0", + "chai": "^4.2.0", + "mocha": "^8.0.0" + } +} diff --git a/packages/google-analytics-admin/samples/quickstart.js b/packages/google-analytics-admin/samples/quickstart.js new file mode 100644 index 00000000000..6748c9a935d --- /dev/null +++ b/packages/google-analytics-admin/samples/quickstart.js @@ -0,0 +1,70 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.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. + +'use strict'; + +/** This application demonstrates the usage of the Analytics Admin API using + service account credentials. For more information on service accounts, see + https://cloud.google.com/iam/docs/understanding-service-accounts + The following document provides instructions on setting service account + credentials for your application: + https://cloud.google.com/docs/authentication/production + In a nutshell, you need to: + 1. Create a service account and download the key JSON file. + https://cloud.google.com/docs/authentication/production#creating_a_service_account + 2. Provide service account credentials using one of the following options: + - set the GOOGLE_APPLICATION_CREDENTIALS environment variable, the API + client will use the value of this variable to find the service account key + JSON file. + https://cloud.google.com/docs/authentication/production#setting_the_environment_variable + OR + - manually pass the path to the service account key JSON file to the API client + by specifying the keyFilename parameter in the constructor. + https://cloud.google.com/docs/authentication/production#passing_the_path_to_the_service_account_key_in_code + */ + +// [START analytics_admin_quickstart] +// Imports the Google Analytics Admin API client library +const analyticsAdmin = require('@google-analytics/admin'); + +async function main() { + // Instantiates a client using default credentials. + // TODO(developer): uncomment and use the following line in order to + // manually set the path to the service account JSON file instead of + // using the value from the GOOGLE_APPLICATION_CREDENTIALS environment + // variable. + // const analyticsAdminClient = new analyticsAdmin.AnalyticsAdminServiceClient( + // {keyFilename: "your_key_json_file_path"}); + const analyticsAdminClient = new analyticsAdmin.AnalyticsAdminServiceClient(); + + // Calls listAccounts() method of the Google Analytics Admin API and prints + // the response for each account. + const [accounts] = await analyticsAdminClient.listAccounts(); + + console.log('Accounts:'); + accounts.forEach(account => { + console.log(account); + }); +} + +main(...process.argv.slice(2)).catch(err => { + console.error(err.message); + process.exitCode = 1; +}); +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); + +// [END analytics_admin_quickstart] diff --git a/packages/google-analytics-admin/samples/test/quickstart.test.js b/packages/google-analytics-admin/samples/test/quickstart.test.js new file mode 100644 index 00000000000..de63dbe0b6f --- /dev/null +++ b/packages/google-analytics-admin/samples/test/quickstart.test.js @@ -0,0 +1,38 @@ +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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'; + +const path = require('path'); +const {assert} = require('chai'); +const cp = require('child_process'); +const {describe, it} = require('mocha'); + +const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); + +const cwd = path.join(__dirname, '..'); + +describe.skip('Quickstart', async () => { + it('should run quickstart', async () => { + try { + execSync('node quickstart.js', {cwd}); + } catch (err) { + // Since we don't have credentials, we need to assert this eror + assert.match(err, /insufficient authentication scopes/); + } + }); +}); diff --git a/packages/google-analytics-admin/src/index.ts b/packages/google-analytics-admin/src/index.ts new file mode 100644 index 00000000000..cc7d6dfc448 --- /dev/null +++ b/packages/google-analytics-admin/src/index.ts @@ -0,0 +1,28 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, 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 v1alpha from './v1alpha'; +import * as v1beta from './v1beta'; + +const AnalyticsAdminServiceClient = v1alpha.AnalyticsAdminServiceClient; +type AnalyticsAdminServiceClient = v1alpha.AnalyticsAdminServiceClient; + +export {v1alpha, v1beta, AnalyticsAdminServiceClient}; +export default {v1alpha, v1beta, AnalyticsAdminServiceClient}; +import * as protos from '../protos/protos'; +export {protos}; diff --git a/packages/google-analytics-admin/src/v1alpha/analytics_admin_service_client.ts b/packages/google-analytics-admin/src/v1alpha/analytics_admin_service_client.ts new file mode 100644 index 00000000000..3169fba0fb3 --- /dev/null +++ b/packages/google-analytics-admin/src/v1alpha/analytics_admin_service_client.ts @@ -0,0 +1,11060 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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'); +/** + * Client JSON configuration object, loaded from + * `src/v1alpha/analytics_admin_service_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ +import * as gapicConfig from './analytics_admin_service_client_config.json'; +const version = require('../../../package.json').version; + +/** + * Service Interface for the Analytics Admin API (GA4). + * @class + * @memberof v1alpha + */ +export class AnalyticsAdminServiceClient { + 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}; + 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}; + analyticsAdminServiceStub?: Promise<{[name: string]: Function}>; + + /** + * Construct an instance of AnalyticsAdminServiceClient. + * + * @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://developers.google.com/identity/protocols/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 | "rest"} [options.fallback] - Use HTTP fallback mode. + * Pass "rest" to use HTTP/1.1 REST API instead of gRPC. + * 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 AnalyticsAdminServiceClient({fallback: 'rest'}, gax); + * ``` + */ + constructor( + opts?: ClientOptions, + gaxInstance?: typeof gax | typeof gax.fallback + ) { + // Ensure that options include all the required fields. + const staticMembers = this + .constructor as typeof AnalyticsAdminServiceClient; + const servicePath = + opts?.servicePath || opts?.apiEndpoint || staticMembers.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); + + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. + if (servicePath !== staticMembers.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 = staticMembers.servicePath; + + // Set the default scopes in auth client if needed. + if (servicePath === staticMembers.servicePath) { + this.auth.defaultScopes = staticMembers.scopes; + } + + // Determine the client header string. + const clientHeader = [`gax/${this._gaxModule.version}`, `gapic/${version}`]; + if (typeof process !== 'undefined' && '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 if (opts.fallback === 'rest') { + 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( + 'accounts/{account}' + ), + accountSummaryPathTemplate: new this._gaxModule.PathTemplate( + 'accountSummaries/{account_summary}' + ), + accountUserLinkPathTemplate: new this._gaxModule.PathTemplate( + 'accounts/{account}/userLinks/{user_link}' + ), + attributionSettingsPathTemplate: new this._gaxModule.PathTemplate( + 'properties/{property}/attributionSettings' + ), + audiencePathTemplate: new this._gaxModule.PathTemplate( + 'properties/{property}/audiences/{audience}' + ), + conversionEventPathTemplate: new this._gaxModule.PathTemplate( + 'properties/{property}/conversionEvents/{conversion_event}' + ), + customDimensionPathTemplate: new this._gaxModule.PathTemplate( + 'properties/{property}/customDimensions/{custom_dimension}' + ), + customMetricPathTemplate: new this._gaxModule.PathTemplate( + 'properties/{property}/customMetrics/{custom_metric}' + ), + dataRetentionSettingsPathTemplate: new this._gaxModule.PathTemplate( + 'properties/{property}/dataRetentionSettings' + ), + dataSharingSettingsPathTemplate: new this._gaxModule.PathTemplate( + 'accounts/{account}/dataSharingSettings' + ), + dataStreamPathTemplate: new this._gaxModule.PathTemplate( + 'properties/{property}/dataStreams/{data_stream}' + ), + displayVideo360AdvertiserLinkPathTemplate: + new this._gaxModule.PathTemplate( + 'properties/{property}/displayVideo360AdvertiserLinks/{display_video_360_advertiser_link}' + ), + displayVideo360AdvertiserLinkProposalPathTemplate: + new this._gaxModule.PathTemplate( + 'properties/{property}/displayVideo360AdvertiserLinkProposals/{display_video_360_advertiser_link_proposal}' + ), + firebaseLinkPathTemplate: new this._gaxModule.PathTemplate( + 'properties/{property}/firebaseLinks/{firebase_link}' + ), + globalSiteTagPathTemplate: new this._gaxModule.PathTemplate( + 'properties/{property}/dataStreams/{data_stream}/globalSiteTag' + ), + googleAdsLinkPathTemplate: new this._gaxModule.PathTemplate( + 'properties/{property}/googleAdsLinks/{google_ads_link}' + ), + googleSignalsSettingsPathTemplate: new this._gaxModule.PathTemplate( + 'properties/{property}/googleSignalsSettings' + ), + measurementProtocolSecretPathTemplate: new this._gaxModule.PathTemplate( + 'properties/{property}/dataStreams/{data_stream}/measurementProtocolSecrets/{measurement_protocol_secret}' + ), + propertyPathTemplate: new this._gaxModule.PathTemplate( + 'properties/{property}' + ), + propertyUserLinkPathTemplate: new this._gaxModule.PathTemplate( + 'properties/{property}/userLinks/{user_link}' + ), + }; + + // 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 = { + listAccounts: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'accounts' + ), + listAccountSummaries: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'accountSummaries' + ), + listProperties: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'properties' + ), + listUserLinks: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'userLinks' + ), + auditUserLinks: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'userLinks' + ), + listFirebaseLinks: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'firebaseLinks' + ), + listGoogleAdsLinks: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'googleAdsLinks' + ), + listMeasurementProtocolSecrets: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'measurementProtocolSecrets' + ), + searchChangeHistoryEvents: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'changeHistoryEvents' + ), + listConversionEvents: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'conversionEvents' + ), + listDisplayVideo360AdvertiserLinks: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'displayVideo_360AdvertiserLinks' + ), + listDisplayVideo360AdvertiserLinkProposals: + new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'displayVideo_360AdvertiserLinkProposals' + ), + listCustomDimensions: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'customDimensions' + ), + listCustomMetrics: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'customMetrics' + ), + listDataStreams: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'dataStreams' + ), + listAudiences: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'audiences' + ), + }; + + // Put together the default options sent with requests. + this._defaults = this._gaxGrpc.constructSettings( + 'google.analytics.admin.v1alpha.AnalyticsAdminService', + 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.analyticsAdminServiceStub) { + return this.analyticsAdminServiceStub; + } + + // Put together the "service stub" for + // google.analytics.admin.v1alpha.AnalyticsAdminService. + this.analyticsAdminServiceStub = this._gaxGrpc.createStub( + this._opts.fallback + ? (this._protos as protobuf.Root).lookupService( + 'google.analytics.admin.v1alpha.AnalyticsAdminService' + ) + : // eslint-disable-next-line @typescript-eslint/no-explicit-any + (this._protos as any).google.analytics.admin.v1alpha + .AnalyticsAdminService, + 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 analyticsAdminServiceStubMethods = [ + 'getAccount', + 'listAccounts', + 'deleteAccount', + 'updateAccount', + 'provisionAccountTicket', + 'listAccountSummaries', + 'getProperty', + 'listProperties', + 'createProperty', + 'deleteProperty', + 'updateProperty', + 'getUserLink', + 'batchGetUserLinks', + 'listUserLinks', + 'auditUserLinks', + 'createUserLink', + 'batchCreateUserLinks', + 'updateUserLink', + 'batchUpdateUserLinks', + 'deleteUserLink', + 'batchDeleteUserLinks', + 'createFirebaseLink', + 'deleteFirebaseLink', + 'listFirebaseLinks', + 'getGlobalSiteTag', + 'createGoogleAdsLink', + 'updateGoogleAdsLink', + 'deleteGoogleAdsLink', + 'listGoogleAdsLinks', + 'getDataSharingSettings', + 'getMeasurementProtocolSecret', + 'listMeasurementProtocolSecrets', + 'createMeasurementProtocolSecret', + 'deleteMeasurementProtocolSecret', + 'updateMeasurementProtocolSecret', + 'acknowledgeUserDataCollection', + 'searchChangeHistoryEvents', + 'getGoogleSignalsSettings', + 'updateGoogleSignalsSettings', + 'createConversionEvent', + 'getConversionEvent', + 'deleteConversionEvent', + 'listConversionEvents', + 'getDisplayVideo360AdvertiserLink', + 'listDisplayVideo360AdvertiserLinks', + 'createDisplayVideo360AdvertiserLink', + 'deleteDisplayVideo360AdvertiserLink', + 'updateDisplayVideo360AdvertiserLink', + 'getDisplayVideo360AdvertiserLinkProposal', + 'listDisplayVideo360AdvertiserLinkProposals', + 'createDisplayVideo360AdvertiserLinkProposal', + 'deleteDisplayVideo360AdvertiserLinkProposal', + 'approveDisplayVideo360AdvertiserLinkProposal', + 'cancelDisplayVideo360AdvertiserLinkProposal', + 'createCustomDimension', + 'updateCustomDimension', + 'listCustomDimensions', + 'archiveCustomDimension', + 'getCustomDimension', + 'createCustomMetric', + 'updateCustomMetric', + 'listCustomMetrics', + 'archiveCustomMetric', + 'getCustomMetric', + 'getDataRetentionSettings', + 'updateDataRetentionSettings', + 'createDataStream', + 'deleteDataStream', + 'updateDataStream', + 'listDataStreams', + 'getDataStream', + 'getAudience', + 'listAudiences', + 'createAudience', + 'updateAudience', + 'archiveAudience', + 'getAttributionSettings', + 'updateAttributionSettings', + 'runAccessReport', + ]; + for (const methodName of analyticsAdminServiceStubMethods) { + const callPromise = this.analyticsAdminServiceStub.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.analyticsAdminServiceStub; + } + + /** + * The DNS address for this API service. + * @returns {string} The DNS address for this service. + */ + static get servicePath() { + return 'analyticsadmin.googleapis.com'; + } + + /** + * The DNS address for this API service - same as servicePath(), + * exists for compatibility reasons. + * @returns {string} The DNS address for this service. + */ + static get apiEndpoint() { + return 'analyticsadmin.googleapis.com'; + } + + /** + * The port for this API service. + * @returns {number} The default port for this service. + */ + static get port() { + return 443; + } + + /** + * The scopes needed to make gRPC calls for every method defined + * in this service. + * @returns {string[]} List of default scopes. + */ + static get scopes() { + return [ + 'https://www.googleapis.com/auth/analytics.edit', + 'https://www.googleapis.com/auth/analytics.manage.users', + 'https://www.googleapis.com/auth/analytics.manage.users.readonly', + 'https://www.googleapis.com/auth/analytics.readonly', + ]; + } + + getProjectId(): Promise; + getProjectId(callback: Callback): void; + /** + * Return the project ID used by this class. + * @returns {Promise} A promise that resolves to string containing the project ID. + */ + getProjectId( + callback?: Callback + ): Promise | void { + if (callback) { + this.auth.getProjectId(callback); + return; + } + return this.auth.getProjectId(); + } + + // ------------------- + // -- Service calls -- + // ------------------- + /** + * Lookup for a single Account. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the account to lookup. + * Format: accounts/{account} + * Example: "accounts/100" + * @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 [Account]{@link google.analytics.admin.v1alpha.Account}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1alpha/analytics_admin_service.get_account.js + * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_GetAccount_async + */ + getAccount( + request?: protos.google.analytics.admin.v1alpha.IGetAccountRequest, + options?: CallOptions + ): Promise< + [ + protos.google.analytics.admin.v1alpha.IAccount, + protos.google.analytics.admin.v1alpha.IGetAccountRequest | undefined, + {} | undefined + ] + >; + getAccount( + request: protos.google.analytics.admin.v1alpha.IGetAccountRequest, + options: CallOptions, + callback: Callback< + protos.google.analytics.admin.v1alpha.IAccount, + | protos.google.analytics.admin.v1alpha.IGetAccountRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getAccount( + request: protos.google.analytics.admin.v1alpha.IGetAccountRequest, + callback: Callback< + protos.google.analytics.admin.v1alpha.IAccount, + | protos.google.analytics.admin.v1alpha.IGetAccountRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getAccount( + request?: protos.google.analytics.admin.v1alpha.IGetAccountRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.analytics.admin.v1alpha.IAccount, + | protos.google.analytics.admin.v1alpha.IGetAccountRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.analytics.admin.v1alpha.IAccount, + | protos.google.analytics.admin.v1alpha.IGetAccountRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.analytics.admin.v1alpha.IAccount, + protos.google.analytics.admin.v1alpha.IGetAccountRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.getAccount(request, options, callback); + } + /** + * Marks target Account as soft-deleted (ie: "trashed") and returns it. + * + * This API does not have a method to restore soft-deleted accounts. + * However, they can be restored using the Trash Can UI. + * + * If the accounts are not restored before the expiration time, the account + * and all child resources (eg: Properties, GoogleAdsLinks, Streams, + * UserLinks) will be permanently purged. + * https://support.google.com/analytics/answer/6154772 + * + * Returns an error if the target is not found. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the Account to soft-delete. + * Format: accounts/{account} + * Example: "accounts/100" + * @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 [Empty]{@link google.protobuf.Empty}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1alpha/analytics_admin_service.delete_account.js + * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_DeleteAccount_async + */ + deleteAccount( + request?: protos.google.analytics.admin.v1alpha.IDeleteAccountRequest, + options?: CallOptions + ): Promise< + [ + protos.google.protobuf.IEmpty, + protos.google.analytics.admin.v1alpha.IDeleteAccountRequest | undefined, + {} | undefined + ] + >; + deleteAccount( + request: protos.google.analytics.admin.v1alpha.IDeleteAccountRequest, + options: CallOptions, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.analytics.admin.v1alpha.IDeleteAccountRequest + | null + | undefined, + {} | null | undefined + > + ): void; + deleteAccount( + request: protos.google.analytics.admin.v1alpha.IDeleteAccountRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.analytics.admin.v1alpha.IDeleteAccountRequest + | null + | undefined, + {} | null | undefined + > + ): void; + deleteAccount( + request?: protos.google.analytics.admin.v1alpha.IDeleteAccountRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.protobuf.IEmpty, + | protos.google.analytics.admin.v1alpha.IDeleteAccountRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.IEmpty, + | protos.google.analytics.admin.v1alpha.IDeleteAccountRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.protobuf.IEmpty, + protos.google.analytics.admin.v1alpha.IDeleteAccountRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.deleteAccount(request, options, callback); + } + /** + * Updates an account. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.analytics.admin.v1alpha.Account} request.account + * Required. The account to update. + * The account's `name` field is used to identify the account. + * @param {google.protobuf.FieldMask} request.updateMask + * Required. The list of fields to be updated. Field names must be in snake case + * (e.g., "field_to_update"). Omitted fields will not be updated. To replace + * the entire entity, use one path with the string "*" to match all fields. + * @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 [Account]{@link google.analytics.admin.v1alpha.Account}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1alpha/analytics_admin_service.update_account.js + * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_UpdateAccount_async + */ + updateAccount( + request?: protos.google.analytics.admin.v1alpha.IUpdateAccountRequest, + options?: CallOptions + ): Promise< + [ + protos.google.analytics.admin.v1alpha.IAccount, + protos.google.analytics.admin.v1alpha.IUpdateAccountRequest | undefined, + {} | undefined + ] + >; + updateAccount( + request: protos.google.analytics.admin.v1alpha.IUpdateAccountRequest, + options: CallOptions, + callback: Callback< + protos.google.analytics.admin.v1alpha.IAccount, + | protos.google.analytics.admin.v1alpha.IUpdateAccountRequest + | null + | undefined, + {} | null | undefined + > + ): void; + updateAccount( + request: protos.google.analytics.admin.v1alpha.IUpdateAccountRequest, + callback: Callback< + protos.google.analytics.admin.v1alpha.IAccount, + | protos.google.analytics.admin.v1alpha.IUpdateAccountRequest + | null + | undefined, + {} | null | undefined + > + ): void; + updateAccount( + request?: protos.google.analytics.admin.v1alpha.IUpdateAccountRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.analytics.admin.v1alpha.IAccount, + | protos.google.analytics.admin.v1alpha.IUpdateAccountRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.analytics.admin.v1alpha.IAccount, + | protos.google.analytics.admin.v1alpha.IUpdateAccountRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.analytics.admin.v1alpha.IAccount, + protos.google.analytics.admin.v1alpha.IUpdateAccountRequest | 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({ + 'account.name': request.account!.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.updateAccount(request, options, callback); + } + /** + * Requests a ticket for creating an account. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.analytics.admin.v1alpha.Account} request.account + * The account to create. + * @param {string} request.redirectUri + * Redirect URI where the user will be sent after accepting Terms of Service. + * Must be configured in Developers Console as a Redirect URI + * @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 [ProvisionAccountTicketResponse]{@link google.analytics.admin.v1alpha.ProvisionAccountTicketResponse}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1alpha/analytics_admin_service.provision_account_ticket.js + * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_ProvisionAccountTicket_async + */ + provisionAccountTicket( + request?: protos.google.analytics.admin.v1alpha.IProvisionAccountTicketRequest, + options?: CallOptions + ): Promise< + [ + protos.google.analytics.admin.v1alpha.IProvisionAccountTicketResponse, + ( + | protos.google.analytics.admin.v1alpha.IProvisionAccountTicketRequest + | undefined + ), + {} | undefined + ] + >; + provisionAccountTicket( + request: protos.google.analytics.admin.v1alpha.IProvisionAccountTicketRequest, + options: CallOptions, + callback: Callback< + protos.google.analytics.admin.v1alpha.IProvisionAccountTicketResponse, + | protos.google.analytics.admin.v1alpha.IProvisionAccountTicketRequest + | null + | undefined, + {} | null | undefined + > + ): void; + provisionAccountTicket( + request: protos.google.analytics.admin.v1alpha.IProvisionAccountTicketRequest, + callback: Callback< + protos.google.analytics.admin.v1alpha.IProvisionAccountTicketResponse, + | protos.google.analytics.admin.v1alpha.IProvisionAccountTicketRequest + | null + | undefined, + {} | null | undefined + > + ): void; + provisionAccountTicket( + request?: protos.google.analytics.admin.v1alpha.IProvisionAccountTicketRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.analytics.admin.v1alpha.IProvisionAccountTicketResponse, + | protos.google.analytics.admin.v1alpha.IProvisionAccountTicketRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.analytics.admin.v1alpha.IProvisionAccountTicketResponse, + | protos.google.analytics.admin.v1alpha.IProvisionAccountTicketRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.analytics.admin.v1alpha.IProvisionAccountTicketResponse, + ( + | protos.google.analytics.admin.v1alpha.IProvisionAccountTicketRequest + | 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(); + return this.innerApiCalls.provisionAccountTicket( + request, + options, + callback + ); + } + /** + * Lookup for a single "GA4" Property. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the property to lookup. + * Format: properties/{property_id} + * Example: "properties/1000" + * @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 [Property]{@link google.analytics.admin.v1alpha.Property}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1alpha/analytics_admin_service.get_property.js + * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_GetProperty_async + */ + getProperty( + request?: protos.google.analytics.admin.v1alpha.IGetPropertyRequest, + options?: CallOptions + ): Promise< + [ + protos.google.analytics.admin.v1alpha.IProperty, + protos.google.analytics.admin.v1alpha.IGetPropertyRequest | undefined, + {} | undefined + ] + >; + getProperty( + request: protos.google.analytics.admin.v1alpha.IGetPropertyRequest, + options: CallOptions, + callback: Callback< + protos.google.analytics.admin.v1alpha.IProperty, + | protos.google.analytics.admin.v1alpha.IGetPropertyRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getProperty( + request: protos.google.analytics.admin.v1alpha.IGetPropertyRequest, + callback: Callback< + protos.google.analytics.admin.v1alpha.IProperty, + | protos.google.analytics.admin.v1alpha.IGetPropertyRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getProperty( + request?: protos.google.analytics.admin.v1alpha.IGetPropertyRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.analytics.admin.v1alpha.IProperty, + | protos.google.analytics.admin.v1alpha.IGetPropertyRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.analytics.admin.v1alpha.IProperty, + | protos.google.analytics.admin.v1alpha.IGetPropertyRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.analytics.admin.v1alpha.IProperty, + protos.google.analytics.admin.v1alpha.IGetPropertyRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.getProperty(request, options, callback); + } + /** + * Creates an "GA4" property with the specified location and attributes. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.analytics.admin.v1alpha.Property} request.property + * Required. The property to create. + * Note: the supplied property must specify its parent. + * @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 [Property]{@link google.analytics.admin.v1alpha.Property}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1alpha/analytics_admin_service.create_property.js + * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_CreateProperty_async + */ + createProperty( + request?: protos.google.analytics.admin.v1alpha.ICreatePropertyRequest, + options?: CallOptions + ): Promise< + [ + protos.google.analytics.admin.v1alpha.IProperty, + protos.google.analytics.admin.v1alpha.ICreatePropertyRequest | undefined, + {} | undefined + ] + >; + createProperty( + request: protos.google.analytics.admin.v1alpha.ICreatePropertyRequest, + options: CallOptions, + callback: Callback< + protos.google.analytics.admin.v1alpha.IProperty, + | protos.google.analytics.admin.v1alpha.ICreatePropertyRequest + | null + | undefined, + {} | null | undefined + > + ): void; + createProperty( + request: protos.google.analytics.admin.v1alpha.ICreatePropertyRequest, + callback: Callback< + protos.google.analytics.admin.v1alpha.IProperty, + | protos.google.analytics.admin.v1alpha.ICreatePropertyRequest + | null + | undefined, + {} | null | undefined + > + ): void; + createProperty( + request?: protos.google.analytics.admin.v1alpha.ICreatePropertyRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.analytics.admin.v1alpha.IProperty, + | protos.google.analytics.admin.v1alpha.ICreatePropertyRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.analytics.admin.v1alpha.IProperty, + | protos.google.analytics.admin.v1alpha.ICreatePropertyRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.analytics.admin.v1alpha.IProperty, + protos.google.analytics.admin.v1alpha.ICreatePropertyRequest | 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(); + return this.innerApiCalls.createProperty(request, options, callback); + } + /** + * Marks target Property as soft-deleted (ie: "trashed") and returns it. + * + * This API does not have a method to restore soft-deleted properties. + * However, they can be restored using the Trash Can UI. + * + * If the properties are not restored before the expiration time, the Property + * and all child resources (eg: GoogleAdsLinks, Streams, UserLinks) + * will be permanently purged. + * https://support.google.com/analytics/answer/6154772 + * + * Returns an error if the target is not found, or is not an GA4 Property. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the Property to soft-delete. + * Format: properties/{property_id} + * Example: "properties/1000" + * @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 [Property]{@link google.analytics.admin.v1alpha.Property}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1alpha/analytics_admin_service.delete_property.js + * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_DeleteProperty_async + */ + deleteProperty( + request?: protos.google.analytics.admin.v1alpha.IDeletePropertyRequest, + options?: CallOptions + ): Promise< + [ + protos.google.analytics.admin.v1alpha.IProperty, + protos.google.analytics.admin.v1alpha.IDeletePropertyRequest | undefined, + {} | undefined + ] + >; + deleteProperty( + request: protos.google.analytics.admin.v1alpha.IDeletePropertyRequest, + options: CallOptions, + callback: Callback< + protos.google.analytics.admin.v1alpha.IProperty, + | protos.google.analytics.admin.v1alpha.IDeletePropertyRequest + | null + | undefined, + {} | null | undefined + > + ): void; + deleteProperty( + request: protos.google.analytics.admin.v1alpha.IDeletePropertyRequest, + callback: Callback< + protos.google.analytics.admin.v1alpha.IProperty, + | protos.google.analytics.admin.v1alpha.IDeletePropertyRequest + | null + | undefined, + {} | null | undefined + > + ): void; + deleteProperty( + request?: protos.google.analytics.admin.v1alpha.IDeletePropertyRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.analytics.admin.v1alpha.IProperty, + | protos.google.analytics.admin.v1alpha.IDeletePropertyRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.analytics.admin.v1alpha.IProperty, + | protos.google.analytics.admin.v1alpha.IDeletePropertyRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.analytics.admin.v1alpha.IProperty, + protos.google.analytics.admin.v1alpha.IDeletePropertyRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.deleteProperty(request, options, callback); + } + /** + * Updates a property. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.analytics.admin.v1alpha.Property} request.property + * Required. The property to update. + * The property's `name` field is used to identify the property to be + * updated. + * @param {google.protobuf.FieldMask} request.updateMask + * Required. The list of fields to be updated. Field names must be in snake case + * (e.g., "field_to_update"). Omitted fields will not be updated. To replace + * the entire entity, use one path with the string "*" to match all fields. + * @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 [Property]{@link google.analytics.admin.v1alpha.Property}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1alpha/analytics_admin_service.update_property.js + * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_UpdateProperty_async + */ + updateProperty( + request?: protos.google.analytics.admin.v1alpha.IUpdatePropertyRequest, + options?: CallOptions + ): Promise< + [ + protos.google.analytics.admin.v1alpha.IProperty, + protos.google.analytics.admin.v1alpha.IUpdatePropertyRequest | undefined, + {} | undefined + ] + >; + updateProperty( + request: protos.google.analytics.admin.v1alpha.IUpdatePropertyRequest, + options: CallOptions, + callback: Callback< + protos.google.analytics.admin.v1alpha.IProperty, + | protos.google.analytics.admin.v1alpha.IUpdatePropertyRequest + | null + | undefined, + {} | null | undefined + > + ): void; + updateProperty( + request: protos.google.analytics.admin.v1alpha.IUpdatePropertyRequest, + callback: Callback< + protos.google.analytics.admin.v1alpha.IProperty, + | protos.google.analytics.admin.v1alpha.IUpdatePropertyRequest + | null + | undefined, + {} | null | undefined + > + ): void; + updateProperty( + request?: protos.google.analytics.admin.v1alpha.IUpdatePropertyRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.analytics.admin.v1alpha.IProperty, + | protos.google.analytics.admin.v1alpha.IUpdatePropertyRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.analytics.admin.v1alpha.IProperty, + | protos.google.analytics.admin.v1alpha.IUpdatePropertyRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.analytics.admin.v1alpha.IProperty, + protos.google.analytics.admin.v1alpha.IUpdatePropertyRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + 'property.name': request.property!.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.updateProperty(request, options, callback); + } + /** + * Gets information about a user's link to an account or property. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Example format: accounts/1234/userLinks/5678 + * @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 [UserLink]{@link google.analytics.admin.v1alpha.UserLink}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1alpha/analytics_admin_service.get_user_link.js + * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_GetUserLink_async + */ + getUserLink( + request?: protos.google.analytics.admin.v1alpha.IGetUserLinkRequest, + options?: CallOptions + ): Promise< + [ + protos.google.analytics.admin.v1alpha.IUserLink, + protos.google.analytics.admin.v1alpha.IGetUserLinkRequest | undefined, + {} | undefined + ] + >; + getUserLink( + request: protos.google.analytics.admin.v1alpha.IGetUserLinkRequest, + options: CallOptions, + callback: Callback< + protos.google.analytics.admin.v1alpha.IUserLink, + | protos.google.analytics.admin.v1alpha.IGetUserLinkRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getUserLink( + request: protos.google.analytics.admin.v1alpha.IGetUserLinkRequest, + callback: Callback< + protos.google.analytics.admin.v1alpha.IUserLink, + | protos.google.analytics.admin.v1alpha.IGetUserLinkRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getUserLink( + request?: protos.google.analytics.admin.v1alpha.IGetUserLinkRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.analytics.admin.v1alpha.IUserLink, + | protos.google.analytics.admin.v1alpha.IGetUserLinkRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.analytics.admin.v1alpha.IUserLink, + | protos.google.analytics.admin.v1alpha.IGetUserLinkRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.analytics.admin.v1alpha.IUserLink, + protos.google.analytics.admin.v1alpha.IGetUserLinkRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.getUserLink(request, options, callback); + } + /** + * Gets information about multiple users' links to an account or property. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The account or property that all user links in the request are + * for. The parent of all provided values for the 'names' field must match + * this field. + * Example format: accounts/1234 + * @param {string[]} request.names + * Required. The names of the user links to retrieve. + * A maximum of 1000 user links can be retrieved in a batch. + * Format: accounts/{accountId}/userLinks/{userLinkId} + * @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 [BatchGetUserLinksResponse]{@link google.analytics.admin.v1alpha.BatchGetUserLinksResponse}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1alpha/analytics_admin_service.batch_get_user_links.js + * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_BatchGetUserLinks_async + */ + batchGetUserLinks( + request?: protos.google.analytics.admin.v1alpha.IBatchGetUserLinksRequest, + options?: CallOptions + ): Promise< + [ + protos.google.analytics.admin.v1alpha.IBatchGetUserLinksResponse, + ( + | protos.google.analytics.admin.v1alpha.IBatchGetUserLinksRequest + | undefined + ), + {} | undefined + ] + >; + batchGetUserLinks( + request: protos.google.analytics.admin.v1alpha.IBatchGetUserLinksRequest, + options: CallOptions, + callback: Callback< + protos.google.analytics.admin.v1alpha.IBatchGetUserLinksResponse, + | protos.google.analytics.admin.v1alpha.IBatchGetUserLinksRequest + | null + | undefined, + {} | null | undefined + > + ): void; + batchGetUserLinks( + request: protos.google.analytics.admin.v1alpha.IBatchGetUserLinksRequest, + callback: Callback< + protos.google.analytics.admin.v1alpha.IBatchGetUserLinksResponse, + | protos.google.analytics.admin.v1alpha.IBatchGetUserLinksRequest + | null + | undefined, + {} | null | undefined + > + ): void; + batchGetUserLinks( + request?: protos.google.analytics.admin.v1alpha.IBatchGetUserLinksRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.analytics.admin.v1alpha.IBatchGetUserLinksResponse, + | protos.google.analytics.admin.v1alpha.IBatchGetUserLinksRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.analytics.admin.v1alpha.IBatchGetUserLinksResponse, + | protos.google.analytics.admin.v1alpha.IBatchGetUserLinksRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.analytics.admin.v1alpha.IBatchGetUserLinksResponse, + ( + | protos.google.analytics.admin.v1alpha.IBatchGetUserLinksRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize(); + return this.innerApiCalls.batchGetUserLinks(request, options, callback); + } + /** + * Creates a user link on an account or property. + * + * If the user with the specified email already has permissions on the + * account or property, then the user's existing permissions will be unioned + * with the permissions specified in the new UserLink. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Example format: accounts/1234 + * @param {boolean} [request.notifyNewUser] + * Optional. If set, then email the new user notifying them that they've been granted + * permissions to the resource. + * @param {google.analytics.admin.v1alpha.UserLink} request.userLink + * Required. The user 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 [UserLink]{@link google.analytics.admin.v1alpha.UserLink}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1alpha/analytics_admin_service.create_user_link.js + * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_CreateUserLink_async + */ + createUserLink( + request?: protos.google.analytics.admin.v1alpha.ICreateUserLinkRequest, + options?: CallOptions + ): Promise< + [ + protos.google.analytics.admin.v1alpha.IUserLink, + protos.google.analytics.admin.v1alpha.ICreateUserLinkRequest | undefined, + {} | undefined + ] + >; + createUserLink( + request: protos.google.analytics.admin.v1alpha.ICreateUserLinkRequest, + options: CallOptions, + callback: Callback< + protos.google.analytics.admin.v1alpha.IUserLink, + | protos.google.analytics.admin.v1alpha.ICreateUserLinkRequest + | null + | undefined, + {} | null | undefined + > + ): void; + createUserLink( + request: protos.google.analytics.admin.v1alpha.ICreateUserLinkRequest, + callback: Callback< + protos.google.analytics.admin.v1alpha.IUserLink, + | protos.google.analytics.admin.v1alpha.ICreateUserLinkRequest + | null + | undefined, + {} | null | undefined + > + ): void; + createUserLink( + request?: protos.google.analytics.admin.v1alpha.ICreateUserLinkRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.analytics.admin.v1alpha.IUserLink, + | protos.google.analytics.admin.v1alpha.ICreateUserLinkRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.analytics.admin.v1alpha.IUserLink, + | protos.google.analytics.admin.v1alpha.ICreateUserLinkRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.analytics.admin.v1alpha.IUserLink, + protos.google.analytics.admin.v1alpha.ICreateUserLinkRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize(); + return this.innerApiCalls.createUserLink(request, options, callback); + } + /** + * Creates information about multiple users' links to an account or property. + * + * This method is transactional. If any UserLink cannot be created, none of + * the UserLinks will be created. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The account or property that all user links in the request are for. + * This field is required. The parent field in the CreateUserLinkRequest + * messages must either be empty or match this field. + * Example format: accounts/1234 + * @param {boolean} [request.notifyNewUsers] + * Optional. If set, then email the new users notifying them that they've been granted + * permissions to the resource. Regardless of whether this is set or not, + * notify_new_user field inside each individual request is ignored. + * @param {number[]} request.requests + * Required. The requests specifying the user links to create. + * A maximum of 1000 user links can be created in a batch. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [BatchCreateUserLinksResponse]{@link google.analytics.admin.v1alpha.BatchCreateUserLinksResponse}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1alpha/analytics_admin_service.batch_create_user_links.js + * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_BatchCreateUserLinks_async + */ + batchCreateUserLinks( + request?: protos.google.analytics.admin.v1alpha.IBatchCreateUserLinksRequest, + options?: CallOptions + ): Promise< + [ + protos.google.analytics.admin.v1alpha.IBatchCreateUserLinksResponse, + ( + | protos.google.analytics.admin.v1alpha.IBatchCreateUserLinksRequest + | undefined + ), + {} | undefined + ] + >; + batchCreateUserLinks( + request: protos.google.analytics.admin.v1alpha.IBatchCreateUserLinksRequest, + options: CallOptions, + callback: Callback< + protos.google.analytics.admin.v1alpha.IBatchCreateUserLinksResponse, + | protos.google.analytics.admin.v1alpha.IBatchCreateUserLinksRequest + | null + | undefined, + {} | null | undefined + > + ): void; + batchCreateUserLinks( + request: protos.google.analytics.admin.v1alpha.IBatchCreateUserLinksRequest, + callback: Callback< + protos.google.analytics.admin.v1alpha.IBatchCreateUserLinksResponse, + | protos.google.analytics.admin.v1alpha.IBatchCreateUserLinksRequest + | null + | undefined, + {} | null | undefined + > + ): void; + batchCreateUserLinks( + request?: protos.google.analytics.admin.v1alpha.IBatchCreateUserLinksRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.analytics.admin.v1alpha.IBatchCreateUserLinksResponse, + | protos.google.analytics.admin.v1alpha.IBatchCreateUserLinksRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.analytics.admin.v1alpha.IBatchCreateUserLinksResponse, + | protos.google.analytics.admin.v1alpha.IBatchCreateUserLinksRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.analytics.admin.v1alpha.IBatchCreateUserLinksResponse, + ( + | protos.google.analytics.admin.v1alpha.IBatchCreateUserLinksRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize(); + return this.innerApiCalls.batchCreateUserLinks(request, options, callback); + } + /** + * Updates a user link on an account or property. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.analytics.admin.v1alpha.UserLink} request.userLink + * Required. The user link to update. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [UserLink]{@link google.analytics.admin.v1alpha.UserLink}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1alpha/analytics_admin_service.update_user_link.js + * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_UpdateUserLink_async + */ + updateUserLink( + request?: protos.google.analytics.admin.v1alpha.IUpdateUserLinkRequest, + options?: CallOptions + ): Promise< + [ + protos.google.analytics.admin.v1alpha.IUserLink, + protos.google.analytics.admin.v1alpha.IUpdateUserLinkRequest | undefined, + {} | undefined + ] + >; + updateUserLink( + request: protos.google.analytics.admin.v1alpha.IUpdateUserLinkRequest, + options: CallOptions, + callback: Callback< + protos.google.analytics.admin.v1alpha.IUserLink, + | protos.google.analytics.admin.v1alpha.IUpdateUserLinkRequest + | null + | undefined, + {} | null | undefined + > + ): void; + updateUserLink( + request: protos.google.analytics.admin.v1alpha.IUpdateUserLinkRequest, + callback: Callback< + protos.google.analytics.admin.v1alpha.IUserLink, + | protos.google.analytics.admin.v1alpha.IUpdateUserLinkRequest + | null + | undefined, + {} | null | undefined + > + ): void; + updateUserLink( + request?: protos.google.analytics.admin.v1alpha.IUpdateUserLinkRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.analytics.admin.v1alpha.IUserLink, + | protos.google.analytics.admin.v1alpha.IUpdateUserLinkRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.analytics.admin.v1alpha.IUserLink, + | protos.google.analytics.admin.v1alpha.IUpdateUserLinkRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.analytics.admin.v1alpha.IUserLink, + protos.google.analytics.admin.v1alpha.IUpdateUserLinkRequest | 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_link.name': request.userLink!.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.updateUserLink(request, options, callback); + } + /** + * Updates information about multiple users' links to an account or property. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The account or property that all user links in the request are + * for. The parent field in the UpdateUserLinkRequest messages must either be + * empty or match this field. + * Example format: accounts/1234 + * @param {number[]} request.requests + * Required. The requests specifying the user links to update. + * A maximum of 1000 user links can be updated in a batch. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [BatchUpdateUserLinksResponse]{@link google.analytics.admin.v1alpha.BatchUpdateUserLinksResponse}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1alpha/analytics_admin_service.batch_update_user_links.js + * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_BatchUpdateUserLinks_async + */ + batchUpdateUserLinks( + request?: protos.google.analytics.admin.v1alpha.IBatchUpdateUserLinksRequest, + options?: CallOptions + ): Promise< + [ + protos.google.analytics.admin.v1alpha.IBatchUpdateUserLinksResponse, + ( + | protos.google.analytics.admin.v1alpha.IBatchUpdateUserLinksRequest + | undefined + ), + {} | undefined + ] + >; + batchUpdateUserLinks( + request: protos.google.analytics.admin.v1alpha.IBatchUpdateUserLinksRequest, + options: CallOptions, + callback: Callback< + protos.google.analytics.admin.v1alpha.IBatchUpdateUserLinksResponse, + | protos.google.analytics.admin.v1alpha.IBatchUpdateUserLinksRequest + | null + | undefined, + {} | null | undefined + > + ): void; + batchUpdateUserLinks( + request: protos.google.analytics.admin.v1alpha.IBatchUpdateUserLinksRequest, + callback: Callback< + protos.google.analytics.admin.v1alpha.IBatchUpdateUserLinksResponse, + | protos.google.analytics.admin.v1alpha.IBatchUpdateUserLinksRequest + | null + | undefined, + {} | null | undefined + > + ): void; + batchUpdateUserLinks( + request?: protos.google.analytics.admin.v1alpha.IBatchUpdateUserLinksRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.analytics.admin.v1alpha.IBatchUpdateUserLinksResponse, + | protos.google.analytics.admin.v1alpha.IBatchUpdateUserLinksRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.analytics.admin.v1alpha.IBatchUpdateUserLinksResponse, + | protos.google.analytics.admin.v1alpha.IBatchUpdateUserLinksRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.analytics.admin.v1alpha.IBatchUpdateUserLinksResponse, + ( + | protos.google.analytics.admin.v1alpha.IBatchUpdateUserLinksRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize(); + return this.innerApiCalls.batchUpdateUserLinks(request, options, callback); + } + /** + * Deletes a user link on an account or property. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Example format: accounts/1234/userLinks/5678 + * @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 [Empty]{@link google.protobuf.Empty}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1alpha/analytics_admin_service.delete_user_link.js + * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_DeleteUserLink_async + */ + deleteUserLink( + request?: protos.google.analytics.admin.v1alpha.IDeleteUserLinkRequest, + options?: CallOptions + ): Promise< + [ + protos.google.protobuf.IEmpty, + protos.google.analytics.admin.v1alpha.IDeleteUserLinkRequest | undefined, + {} | undefined + ] + >; + deleteUserLink( + request: protos.google.analytics.admin.v1alpha.IDeleteUserLinkRequest, + options: CallOptions, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.analytics.admin.v1alpha.IDeleteUserLinkRequest + | null + | undefined, + {} | null | undefined + > + ): void; + deleteUserLink( + request: protos.google.analytics.admin.v1alpha.IDeleteUserLinkRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.analytics.admin.v1alpha.IDeleteUserLinkRequest + | null + | undefined, + {} | null | undefined + > + ): void; + deleteUserLink( + request?: protos.google.analytics.admin.v1alpha.IDeleteUserLinkRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.protobuf.IEmpty, + | protos.google.analytics.admin.v1alpha.IDeleteUserLinkRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.IEmpty, + | protos.google.analytics.admin.v1alpha.IDeleteUserLinkRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.protobuf.IEmpty, + protos.google.analytics.admin.v1alpha.IDeleteUserLinkRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.deleteUserLink(request, options, callback); + } + /** + * Deletes information about multiple users' links to an account or property. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The account or property that all user links in the request are + * for. The parent of all values for user link names to delete must match this + * field. + * Example format: accounts/1234 + * @param {number[]} request.requests + * Required. The requests specifying the user links to update. + * A maximum of 1000 user links can be updated in a batch. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Empty]{@link google.protobuf.Empty}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1alpha/analytics_admin_service.batch_delete_user_links.js + * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_BatchDeleteUserLinks_async + */ + batchDeleteUserLinks( + request?: protos.google.analytics.admin.v1alpha.IBatchDeleteUserLinksRequest, + options?: CallOptions + ): Promise< + [ + protos.google.protobuf.IEmpty, + ( + | protos.google.analytics.admin.v1alpha.IBatchDeleteUserLinksRequest + | undefined + ), + {} | undefined + ] + >; + batchDeleteUserLinks( + request: protos.google.analytics.admin.v1alpha.IBatchDeleteUserLinksRequest, + options: CallOptions, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.analytics.admin.v1alpha.IBatchDeleteUserLinksRequest + | null + | undefined, + {} | null | undefined + > + ): void; + batchDeleteUserLinks( + request: protos.google.analytics.admin.v1alpha.IBatchDeleteUserLinksRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.analytics.admin.v1alpha.IBatchDeleteUserLinksRequest + | null + | undefined, + {} | null | undefined + > + ): void; + batchDeleteUserLinks( + request?: protos.google.analytics.admin.v1alpha.IBatchDeleteUserLinksRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.protobuf.IEmpty, + | protos.google.analytics.admin.v1alpha.IBatchDeleteUserLinksRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.IEmpty, + | protos.google.analytics.admin.v1alpha.IBatchDeleteUserLinksRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.protobuf.IEmpty, + ( + | protos.google.analytics.admin.v1alpha.IBatchDeleteUserLinksRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize(); + return this.innerApiCalls.batchDeleteUserLinks(request, options, callback); + } + /** + * Creates a FirebaseLink. + * + * Properties can have at most one FirebaseLink. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Format: properties/{property_id} + * Example: properties/1234 + * @param {google.analytics.admin.v1alpha.FirebaseLink} request.firebaseLink + * Required. The Firebase 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 [FirebaseLink]{@link google.analytics.admin.v1alpha.FirebaseLink}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1alpha/analytics_admin_service.create_firebase_link.js + * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_CreateFirebaseLink_async + */ + createFirebaseLink( + request?: protos.google.analytics.admin.v1alpha.ICreateFirebaseLinkRequest, + options?: CallOptions + ): Promise< + [ + protos.google.analytics.admin.v1alpha.IFirebaseLink, + ( + | protos.google.analytics.admin.v1alpha.ICreateFirebaseLinkRequest + | undefined + ), + {} | undefined + ] + >; + createFirebaseLink( + request: protos.google.analytics.admin.v1alpha.ICreateFirebaseLinkRequest, + options: CallOptions, + callback: Callback< + protos.google.analytics.admin.v1alpha.IFirebaseLink, + | protos.google.analytics.admin.v1alpha.ICreateFirebaseLinkRequest + | null + | undefined, + {} | null | undefined + > + ): void; + createFirebaseLink( + request: protos.google.analytics.admin.v1alpha.ICreateFirebaseLinkRequest, + callback: Callback< + protos.google.analytics.admin.v1alpha.IFirebaseLink, + | protos.google.analytics.admin.v1alpha.ICreateFirebaseLinkRequest + | null + | undefined, + {} | null | undefined + > + ): void; + createFirebaseLink( + request?: protos.google.analytics.admin.v1alpha.ICreateFirebaseLinkRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.analytics.admin.v1alpha.IFirebaseLink, + | protos.google.analytics.admin.v1alpha.ICreateFirebaseLinkRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.analytics.admin.v1alpha.IFirebaseLink, + | protos.google.analytics.admin.v1alpha.ICreateFirebaseLinkRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.analytics.admin.v1alpha.IFirebaseLink, + ( + | protos.google.analytics.admin.v1alpha.ICreateFirebaseLinkRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize(); + return this.innerApiCalls.createFirebaseLink(request, options, callback); + } + /** + * Deletes a FirebaseLink on a property + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Format: properties/{property_id}/firebaseLinks/{firebase_link_id} + * Example: properties/1234/firebaseLinks/5678 + * @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 [Empty]{@link google.protobuf.Empty}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1alpha/analytics_admin_service.delete_firebase_link.js + * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_DeleteFirebaseLink_async + */ + deleteFirebaseLink( + request?: protos.google.analytics.admin.v1alpha.IDeleteFirebaseLinkRequest, + options?: CallOptions + ): Promise< + [ + protos.google.protobuf.IEmpty, + ( + | protos.google.analytics.admin.v1alpha.IDeleteFirebaseLinkRequest + | undefined + ), + {} | undefined + ] + >; + deleteFirebaseLink( + request: protos.google.analytics.admin.v1alpha.IDeleteFirebaseLinkRequest, + options: CallOptions, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.analytics.admin.v1alpha.IDeleteFirebaseLinkRequest + | null + | undefined, + {} | null | undefined + > + ): void; + deleteFirebaseLink( + request: protos.google.analytics.admin.v1alpha.IDeleteFirebaseLinkRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.analytics.admin.v1alpha.IDeleteFirebaseLinkRequest + | null + | undefined, + {} | null | undefined + > + ): void; + deleteFirebaseLink( + request?: protos.google.analytics.admin.v1alpha.IDeleteFirebaseLinkRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.protobuf.IEmpty, + | protos.google.analytics.admin.v1alpha.IDeleteFirebaseLinkRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.IEmpty, + | protos.google.analytics.admin.v1alpha.IDeleteFirebaseLinkRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.protobuf.IEmpty, + ( + | protos.google.analytics.admin.v1alpha.IDeleteFirebaseLinkRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.deleteFirebaseLink(request, options, callback); + } + /** + * Returns the Site Tag for the specified web stream. + * Site Tags are immutable singletons. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the site tag to lookup. + * Note that site tags are singletons and do not have unique IDs. + * Format: properties/{property_id}/dataStreams/{stream_id}/globalSiteTag + * Example: "properties/123/dataStreams/456/globalSiteTag" + * @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 [GlobalSiteTag]{@link google.analytics.admin.v1alpha.GlobalSiteTag}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1alpha/analytics_admin_service.get_global_site_tag.js + * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_GetGlobalSiteTag_async + */ + getGlobalSiteTag( + request?: protos.google.analytics.admin.v1alpha.IGetGlobalSiteTagRequest, + options?: CallOptions + ): Promise< + [ + protos.google.analytics.admin.v1alpha.IGlobalSiteTag, + ( + | protos.google.analytics.admin.v1alpha.IGetGlobalSiteTagRequest + | undefined + ), + {} | undefined + ] + >; + getGlobalSiteTag( + request: protos.google.analytics.admin.v1alpha.IGetGlobalSiteTagRequest, + options: CallOptions, + callback: Callback< + protos.google.analytics.admin.v1alpha.IGlobalSiteTag, + | protos.google.analytics.admin.v1alpha.IGetGlobalSiteTagRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getGlobalSiteTag( + request: protos.google.analytics.admin.v1alpha.IGetGlobalSiteTagRequest, + callback: Callback< + protos.google.analytics.admin.v1alpha.IGlobalSiteTag, + | protos.google.analytics.admin.v1alpha.IGetGlobalSiteTagRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getGlobalSiteTag( + request?: protos.google.analytics.admin.v1alpha.IGetGlobalSiteTagRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.analytics.admin.v1alpha.IGlobalSiteTag, + | protos.google.analytics.admin.v1alpha.IGetGlobalSiteTagRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.analytics.admin.v1alpha.IGlobalSiteTag, + | protos.google.analytics.admin.v1alpha.IGetGlobalSiteTagRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.analytics.admin.v1alpha.IGlobalSiteTag, + ( + | protos.google.analytics.admin.v1alpha.IGetGlobalSiteTagRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.getGlobalSiteTag(request, options, callback); + } + /** + * Creates a GoogleAdsLink. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Example format: properties/1234 + * @param {google.analytics.admin.v1alpha.GoogleAdsLink} request.googleAdsLink + * Required. The GoogleAdsLink 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 [GoogleAdsLink]{@link google.analytics.admin.v1alpha.GoogleAdsLink}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1alpha/analytics_admin_service.create_google_ads_link.js + * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_CreateGoogleAdsLink_async + */ + createGoogleAdsLink( + request?: protos.google.analytics.admin.v1alpha.ICreateGoogleAdsLinkRequest, + options?: CallOptions + ): Promise< + [ + protos.google.analytics.admin.v1alpha.IGoogleAdsLink, + ( + | protos.google.analytics.admin.v1alpha.ICreateGoogleAdsLinkRequest + | undefined + ), + {} | undefined + ] + >; + createGoogleAdsLink( + request: protos.google.analytics.admin.v1alpha.ICreateGoogleAdsLinkRequest, + options: CallOptions, + callback: Callback< + protos.google.analytics.admin.v1alpha.IGoogleAdsLink, + | protos.google.analytics.admin.v1alpha.ICreateGoogleAdsLinkRequest + | null + | undefined, + {} | null | undefined + > + ): void; + createGoogleAdsLink( + request: protos.google.analytics.admin.v1alpha.ICreateGoogleAdsLinkRequest, + callback: Callback< + protos.google.analytics.admin.v1alpha.IGoogleAdsLink, + | protos.google.analytics.admin.v1alpha.ICreateGoogleAdsLinkRequest + | null + | undefined, + {} | null | undefined + > + ): void; + createGoogleAdsLink( + request?: protos.google.analytics.admin.v1alpha.ICreateGoogleAdsLinkRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.analytics.admin.v1alpha.IGoogleAdsLink, + | protos.google.analytics.admin.v1alpha.ICreateGoogleAdsLinkRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.analytics.admin.v1alpha.IGoogleAdsLink, + | protos.google.analytics.admin.v1alpha.ICreateGoogleAdsLinkRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.analytics.admin.v1alpha.IGoogleAdsLink, + ( + | protos.google.analytics.admin.v1alpha.ICreateGoogleAdsLinkRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize(); + return this.innerApiCalls.createGoogleAdsLink(request, options, callback); + } + /** + * Updates a GoogleAdsLink on a property + * + * @param {Object} request + * The request object that will be sent. + * @param {google.analytics.admin.v1alpha.GoogleAdsLink} request.googleAdsLink + * The GoogleAdsLink to update + * @param {google.protobuf.FieldMask} request.updateMask + * Required. The list of fields to be updated. Field names must be in snake case + * (e.g., "field_to_update"). Omitted fields will not be updated. To replace + * the entire entity, use one path with the string "*" to match all fields. + * @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 [GoogleAdsLink]{@link google.analytics.admin.v1alpha.GoogleAdsLink}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1alpha/analytics_admin_service.update_google_ads_link.js + * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_UpdateGoogleAdsLink_async + */ + updateGoogleAdsLink( + request?: protos.google.analytics.admin.v1alpha.IUpdateGoogleAdsLinkRequest, + options?: CallOptions + ): Promise< + [ + protos.google.analytics.admin.v1alpha.IGoogleAdsLink, + ( + | protos.google.analytics.admin.v1alpha.IUpdateGoogleAdsLinkRequest + | undefined + ), + {} | undefined + ] + >; + updateGoogleAdsLink( + request: protos.google.analytics.admin.v1alpha.IUpdateGoogleAdsLinkRequest, + options: CallOptions, + callback: Callback< + protos.google.analytics.admin.v1alpha.IGoogleAdsLink, + | protos.google.analytics.admin.v1alpha.IUpdateGoogleAdsLinkRequest + | null + | undefined, + {} | null | undefined + > + ): void; + updateGoogleAdsLink( + request: protos.google.analytics.admin.v1alpha.IUpdateGoogleAdsLinkRequest, + callback: Callback< + protos.google.analytics.admin.v1alpha.IGoogleAdsLink, + | protos.google.analytics.admin.v1alpha.IUpdateGoogleAdsLinkRequest + | null + | undefined, + {} | null | undefined + > + ): void; + updateGoogleAdsLink( + request?: protos.google.analytics.admin.v1alpha.IUpdateGoogleAdsLinkRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.analytics.admin.v1alpha.IGoogleAdsLink, + | protos.google.analytics.admin.v1alpha.IUpdateGoogleAdsLinkRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.analytics.admin.v1alpha.IGoogleAdsLink, + | protos.google.analytics.admin.v1alpha.IUpdateGoogleAdsLinkRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.analytics.admin.v1alpha.IGoogleAdsLink, + ( + | protos.google.analytics.admin.v1alpha.IUpdateGoogleAdsLinkRequest + | 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({ + 'google_ads_link.name': request.googleAdsLink!.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.updateGoogleAdsLink(request, options, callback); + } + /** + * Deletes a GoogleAdsLink on a property + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Example format: properties/1234/googleAdsLinks/5678 + * @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 [Empty]{@link google.protobuf.Empty}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1alpha/analytics_admin_service.delete_google_ads_link.js + * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_DeleteGoogleAdsLink_async + */ + deleteGoogleAdsLink( + request?: protos.google.analytics.admin.v1alpha.IDeleteGoogleAdsLinkRequest, + options?: CallOptions + ): Promise< + [ + protos.google.protobuf.IEmpty, + ( + | protos.google.analytics.admin.v1alpha.IDeleteGoogleAdsLinkRequest + | undefined + ), + {} | undefined + ] + >; + deleteGoogleAdsLink( + request: protos.google.analytics.admin.v1alpha.IDeleteGoogleAdsLinkRequest, + options: CallOptions, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.analytics.admin.v1alpha.IDeleteGoogleAdsLinkRequest + | null + | undefined, + {} | null | undefined + > + ): void; + deleteGoogleAdsLink( + request: protos.google.analytics.admin.v1alpha.IDeleteGoogleAdsLinkRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.analytics.admin.v1alpha.IDeleteGoogleAdsLinkRequest + | null + | undefined, + {} | null | undefined + > + ): void; + deleteGoogleAdsLink( + request?: protos.google.analytics.admin.v1alpha.IDeleteGoogleAdsLinkRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.protobuf.IEmpty, + | protos.google.analytics.admin.v1alpha.IDeleteGoogleAdsLinkRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.IEmpty, + | protos.google.analytics.admin.v1alpha.IDeleteGoogleAdsLinkRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.protobuf.IEmpty, + ( + | protos.google.analytics.admin.v1alpha.IDeleteGoogleAdsLinkRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.deleteGoogleAdsLink(request, options, callback); + } + /** + * Get data sharing settings on an account. + * Data sharing settings are singletons. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the settings to lookup. + * Format: accounts/{account}/dataSharingSettings + * Example: "accounts/1000/dataSharingSettings" + * @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 [DataSharingSettings]{@link google.analytics.admin.v1alpha.DataSharingSettings}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1alpha/analytics_admin_service.get_data_sharing_settings.js + * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_GetDataSharingSettings_async + */ + getDataSharingSettings( + request?: protos.google.analytics.admin.v1alpha.IGetDataSharingSettingsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.analytics.admin.v1alpha.IDataSharingSettings, + ( + | protos.google.analytics.admin.v1alpha.IGetDataSharingSettingsRequest + | undefined + ), + {} | undefined + ] + >; + getDataSharingSettings( + request: protos.google.analytics.admin.v1alpha.IGetDataSharingSettingsRequest, + options: CallOptions, + callback: Callback< + protos.google.analytics.admin.v1alpha.IDataSharingSettings, + | protos.google.analytics.admin.v1alpha.IGetDataSharingSettingsRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getDataSharingSettings( + request: protos.google.analytics.admin.v1alpha.IGetDataSharingSettingsRequest, + callback: Callback< + protos.google.analytics.admin.v1alpha.IDataSharingSettings, + | protos.google.analytics.admin.v1alpha.IGetDataSharingSettingsRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getDataSharingSettings( + request?: protos.google.analytics.admin.v1alpha.IGetDataSharingSettingsRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.analytics.admin.v1alpha.IDataSharingSettings, + | protos.google.analytics.admin.v1alpha.IGetDataSharingSettingsRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.analytics.admin.v1alpha.IDataSharingSettings, + | protos.google.analytics.admin.v1alpha.IGetDataSharingSettingsRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.analytics.admin.v1alpha.IDataSharingSettings, + ( + | protos.google.analytics.admin.v1alpha.IGetDataSharingSettingsRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.getDataSharingSettings( + request, + options, + callback + ); + } + /** + * Lookup for a single "GA4" MeasurementProtocolSecret. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the measurement protocol secret to lookup. + * Format: + * properties/{property}/dataStreams/{dataStream}/measurementProtocolSecrets/{measurementProtocolSecret} + * @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 [MeasurementProtocolSecret]{@link google.analytics.admin.v1alpha.MeasurementProtocolSecret}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1alpha/analytics_admin_service.get_measurement_protocol_secret.js + * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_GetMeasurementProtocolSecret_async + */ + getMeasurementProtocolSecret( + request?: protos.google.analytics.admin.v1alpha.IGetMeasurementProtocolSecretRequest, + options?: CallOptions + ): Promise< + [ + protos.google.analytics.admin.v1alpha.IMeasurementProtocolSecret, + ( + | protos.google.analytics.admin.v1alpha.IGetMeasurementProtocolSecretRequest + | undefined + ), + {} | undefined + ] + >; + getMeasurementProtocolSecret( + request: protos.google.analytics.admin.v1alpha.IGetMeasurementProtocolSecretRequest, + options: CallOptions, + callback: Callback< + protos.google.analytics.admin.v1alpha.IMeasurementProtocolSecret, + | protos.google.analytics.admin.v1alpha.IGetMeasurementProtocolSecretRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getMeasurementProtocolSecret( + request: protos.google.analytics.admin.v1alpha.IGetMeasurementProtocolSecretRequest, + callback: Callback< + protos.google.analytics.admin.v1alpha.IMeasurementProtocolSecret, + | protos.google.analytics.admin.v1alpha.IGetMeasurementProtocolSecretRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getMeasurementProtocolSecret( + request?: protos.google.analytics.admin.v1alpha.IGetMeasurementProtocolSecretRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.analytics.admin.v1alpha.IMeasurementProtocolSecret, + | protos.google.analytics.admin.v1alpha.IGetMeasurementProtocolSecretRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.analytics.admin.v1alpha.IMeasurementProtocolSecret, + | protos.google.analytics.admin.v1alpha.IGetMeasurementProtocolSecretRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.analytics.admin.v1alpha.IMeasurementProtocolSecret, + ( + | protos.google.analytics.admin.v1alpha.IGetMeasurementProtocolSecretRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.getMeasurementProtocolSecret( + request, + options, + callback + ); + } + /** + * Creates a measurement protocol secret. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource where this secret will be created. + * Format: properties/{property}/dataStreams/{dataStream} + * @param {google.analytics.admin.v1alpha.MeasurementProtocolSecret} request.measurementProtocolSecret + * Required. The measurement protocol secret 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 [MeasurementProtocolSecret]{@link google.analytics.admin.v1alpha.MeasurementProtocolSecret}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1alpha/analytics_admin_service.create_measurement_protocol_secret.js + * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_CreateMeasurementProtocolSecret_async + */ + createMeasurementProtocolSecret( + request?: protos.google.analytics.admin.v1alpha.ICreateMeasurementProtocolSecretRequest, + options?: CallOptions + ): Promise< + [ + protos.google.analytics.admin.v1alpha.IMeasurementProtocolSecret, + ( + | protos.google.analytics.admin.v1alpha.ICreateMeasurementProtocolSecretRequest + | undefined + ), + {} | undefined + ] + >; + createMeasurementProtocolSecret( + request: protos.google.analytics.admin.v1alpha.ICreateMeasurementProtocolSecretRequest, + options: CallOptions, + callback: Callback< + protos.google.analytics.admin.v1alpha.IMeasurementProtocolSecret, + | protos.google.analytics.admin.v1alpha.ICreateMeasurementProtocolSecretRequest + | null + | undefined, + {} | null | undefined + > + ): void; + createMeasurementProtocolSecret( + request: protos.google.analytics.admin.v1alpha.ICreateMeasurementProtocolSecretRequest, + callback: Callback< + protos.google.analytics.admin.v1alpha.IMeasurementProtocolSecret, + | protos.google.analytics.admin.v1alpha.ICreateMeasurementProtocolSecretRequest + | null + | undefined, + {} | null | undefined + > + ): void; + createMeasurementProtocolSecret( + request?: protos.google.analytics.admin.v1alpha.ICreateMeasurementProtocolSecretRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.analytics.admin.v1alpha.IMeasurementProtocolSecret, + | protos.google.analytics.admin.v1alpha.ICreateMeasurementProtocolSecretRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.analytics.admin.v1alpha.IMeasurementProtocolSecret, + | protos.google.analytics.admin.v1alpha.ICreateMeasurementProtocolSecretRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.analytics.admin.v1alpha.IMeasurementProtocolSecret, + ( + | protos.google.analytics.admin.v1alpha.ICreateMeasurementProtocolSecretRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize(); + return this.innerApiCalls.createMeasurementProtocolSecret( + request, + options, + callback + ); + } + /** + * Deletes target MeasurementProtocolSecret. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the MeasurementProtocolSecret to delete. + * Format: + * properties/{property}/dataStreams/{dataStream}/measurementProtocolSecrets/{measurementProtocolSecret} + * @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 [Empty]{@link google.protobuf.Empty}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1alpha/analytics_admin_service.delete_measurement_protocol_secret.js + * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_DeleteMeasurementProtocolSecret_async + */ + deleteMeasurementProtocolSecret( + request?: protos.google.analytics.admin.v1alpha.IDeleteMeasurementProtocolSecretRequest, + options?: CallOptions + ): Promise< + [ + protos.google.protobuf.IEmpty, + ( + | protos.google.analytics.admin.v1alpha.IDeleteMeasurementProtocolSecretRequest + | undefined + ), + {} | undefined + ] + >; + deleteMeasurementProtocolSecret( + request: protos.google.analytics.admin.v1alpha.IDeleteMeasurementProtocolSecretRequest, + options: CallOptions, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.analytics.admin.v1alpha.IDeleteMeasurementProtocolSecretRequest + | null + | undefined, + {} | null | undefined + > + ): void; + deleteMeasurementProtocolSecret( + request: protos.google.analytics.admin.v1alpha.IDeleteMeasurementProtocolSecretRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.analytics.admin.v1alpha.IDeleteMeasurementProtocolSecretRequest + | null + | undefined, + {} | null | undefined + > + ): void; + deleteMeasurementProtocolSecret( + request?: protos.google.analytics.admin.v1alpha.IDeleteMeasurementProtocolSecretRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.protobuf.IEmpty, + | protos.google.analytics.admin.v1alpha.IDeleteMeasurementProtocolSecretRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.IEmpty, + | protos.google.analytics.admin.v1alpha.IDeleteMeasurementProtocolSecretRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.protobuf.IEmpty, + ( + | protos.google.analytics.admin.v1alpha.IDeleteMeasurementProtocolSecretRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.deleteMeasurementProtocolSecret( + request, + options, + callback + ); + } + /** + * Updates a measurement protocol secret. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.analytics.admin.v1alpha.MeasurementProtocolSecret} request.measurementProtocolSecret + * Required. The measurement protocol secret to update. + * @param {google.protobuf.FieldMask} request.updateMask + * The list of fields to be updated. Omitted fields will not be updated. + * @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 [MeasurementProtocolSecret]{@link google.analytics.admin.v1alpha.MeasurementProtocolSecret}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1alpha/analytics_admin_service.update_measurement_protocol_secret.js + * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_UpdateMeasurementProtocolSecret_async + */ + updateMeasurementProtocolSecret( + request?: protos.google.analytics.admin.v1alpha.IUpdateMeasurementProtocolSecretRequest, + options?: CallOptions + ): Promise< + [ + protos.google.analytics.admin.v1alpha.IMeasurementProtocolSecret, + ( + | protos.google.analytics.admin.v1alpha.IUpdateMeasurementProtocolSecretRequest + | undefined + ), + {} | undefined + ] + >; + updateMeasurementProtocolSecret( + request: protos.google.analytics.admin.v1alpha.IUpdateMeasurementProtocolSecretRequest, + options: CallOptions, + callback: Callback< + protos.google.analytics.admin.v1alpha.IMeasurementProtocolSecret, + | protos.google.analytics.admin.v1alpha.IUpdateMeasurementProtocolSecretRequest + | null + | undefined, + {} | null | undefined + > + ): void; + updateMeasurementProtocolSecret( + request: protos.google.analytics.admin.v1alpha.IUpdateMeasurementProtocolSecretRequest, + callback: Callback< + protos.google.analytics.admin.v1alpha.IMeasurementProtocolSecret, + | protos.google.analytics.admin.v1alpha.IUpdateMeasurementProtocolSecretRequest + | null + | undefined, + {} | null | undefined + > + ): void; + updateMeasurementProtocolSecret( + request?: protos.google.analytics.admin.v1alpha.IUpdateMeasurementProtocolSecretRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.analytics.admin.v1alpha.IMeasurementProtocolSecret, + | protos.google.analytics.admin.v1alpha.IUpdateMeasurementProtocolSecretRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.analytics.admin.v1alpha.IMeasurementProtocolSecret, + | protos.google.analytics.admin.v1alpha.IUpdateMeasurementProtocolSecretRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.analytics.admin.v1alpha.IMeasurementProtocolSecret, + ( + | protos.google.analytics.admin.v1alpha.IUpdateMeasurementProtocolSecretRequest + | 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({ + 'measurement_protocol_secret.name': + request.measurementProtocolSecret!.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.updateMeasurementProtocolSecret( + request, + options, + callback + ); + } + /** + * Acknowledges the terms of user data collection for the specified property. + * + * This acknowledgement must be completed (either in the Google Analytics UI + * or via this API) before MeasurementProtocolSecret resources may be created. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.property + * Required. The property for which to acknowledge user data collection. + * @param {string} request.acknowledgement + * Required. An acknowledgement that the caller of this method understands the terms + * of user data collection. + * + * This field must contain the exact value: + * "I acknowledge that I have the necessary privacy disclosures and rights + * from my end users for the collection and processing of their data, + * including the association of such data with the visitation information + * Google Analytics collects from my site and/or app property." + * @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 [AcknowledgeUserDataCollectionResponse]{@link google.analytics.admin.v1alpha.AcknowledgeUserDataCollectionResponse}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1alpha/analytics_admin_service.acknowledge_user_data_collection.js + * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_AcknowledgeUserDataCollection_async + */ + acknowledgeUserDataCollection( + request?: protos.google.analytics.admin.v1alpha.IAcknowledgeUserDataCollectionRequest, + options?: CallOptions + ): Promise< + [ + protos.google.analytics.admin.v1alpha.IAcknowledgeUserDataCollectionResponse, + ( + | protos.google.analytics.admin.v1alpha.IAcknowledgeUserDataCollectionRequest + | undefined + ), + {} | undefined + ] + >; + acknowledgeUserDataCollection( + request: protos.google.analytics.admin.v1alpha.IAcknowledgeUserDataCollectionRequest, + options: CallOptions, + callback: Callback< + protos.google.analytics.admin.v1alpha.IAcknowledgeUserDataCollectionResponse, + | protos.google.analytics.admin.v1alpha.IAcknowledgeUserDataCollectionRequest + | null + | undefined, + {} | null | undefined + > + ): void; + acknowledgeUserDataCollection( + request: protos.google.analytics.admin.v1alpha.IAcknowledgeUserDataCollectionRequest, + callback: Callback< + protos.google.analytics.admin.v1alpha.IAcknowledgeUserDataCollectionResponse, + | protos.google.analytics.admin.v1alpha.IAcknowledgeUserDataCollectionRequest + | null + | undefined, + {} | null | undefined + > + ): void; + acknowledgeUserDataCollection( + request?: protos.google.analytics.admin.v1alpha.IAcknowledgeUserDataCollectionRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.analytics.admin.v1alpha.IAcknowledgeUserDataCollectionResponse, + | protos.google.analytics.admin.v1alpha.IAcknowledgeUserDataCollectionRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.analytics.admin.v1alpha.IAcknowledgeUserDataCollectionResponse, + | protos.google.analytics.admin.v1alpha.IAcknowledgeUserDataCollectionRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.analytics.admin.v1alpha.IAcknowledgeUserDataCollectionResponse, + ( + | protos.google.analytics.admin.v1alpha.IAcknowledgeUserDataCollectionRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + property: request.property ?? '', + }); + this.initialize(); + return this.innerApiCalls.acknowledgeUserDataCollection( + request, + options, + callback + ); + } + /** + * Lookup for Google Signals settings for a property. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the google signals settings to retrieve. + * Format: properties/{property}/googleSignalsSettings + * @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 [GoogleSignalsSettings]{@link google.analytics.admin.v1alpha.GoogleSignalsSettings}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1alpha/analytics_admin_service.get_google_signals_settings.js + * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_GetGoogleSignalsSettings_async + */ + getGoogleSignalsSettings( + request?: protos.google.analytics.admin.v1alpha.IGetGoogleSignalsSettingsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.analytics.admin.v1alpha.IGoogleSignalsSettings, + ( + | protos.google.analytics.admin.v1alpha.IGetGoogleSignalsSettingsRequest + | undefined + ), + {} | undefined + ] + >; + getGoogleSignalsSettings( + request: protos.google.analytics.admin.v1alpha.IGetGoogleSignalsSettingsRequest, + options: CallOptions, + callback: Callback< + protos.google.analytics.admin.v1alpha.IGoogleSignalsSettings, + | protos.google.analytics.admin.v1alpha.IGetGoogleSignalsSettingsRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getGoogleSignalsSettings( + request: protos.google.analytics.admin.v1alpha.IGetGoogleSignalsSettingsRequest, + callback: Callback< + protos.google.analytics.admin.v1alpha.IGoogleSignalsSettings, + | protos.google.analytics.admin.v1alpha.IGetGoogleSignalsSettingsRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getGoogleSignalsSettings( + request?: protos.google.analytics.admin.v1alpha.IGetGoogleSignalsSettingsRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.analytics.admin.v1alpha.IGoogleSignalsSettings, + | protos.google.analytics.admin.v1alpha.IGetGoogleSignalsSettingsRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.analytics.admin.v1alpha.IGoogleSignalsSettings, + | protos.google.analytics.admin.v1alpha.IGetGoogleSignalsSettingsRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.analytics.admin.v1alpha.IGoogleSignalsSettings, + ( + | protos.google.analytics.admin.v1alpha.IGetGoogleSignalsSettingsRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.getGoogleSignalsSettings( + request, + options, + callback + ); + } + /** + * Updates Google Signals settings for a property. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.analytics.admin.v1alpha.GoogleSignalsSettings} request.googleSignalsSettings + * Required. The settings to update. + * The `name` field is used to identify the settings to be updated. + * @param {google.protobuf.FieldMask} request.updateMask + * Required. The list of fields to be updated. Field names must be in snake case + * (e.g., "field_to_update"). Omitted fields will not be updated. To replace + * the entire entity, use one path with the string "*" to match all fields. + * @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 [GoogleSignalsSettings]{@link google.analytics.admin.v1alpha.GoogleSignalsSettings}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1alpha/analytics_admin_service.update_google_signals_settings.js + * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_UpdateGoogleSignalsSettings_async + */ + updateGoogleSignalsSettings( + request?: protos.google.analytics.admin.v1alpha.IUpdateGoogleSignalsSettingsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.analytics.admin.v1alpha.IGoogleSignalsSettings, + ( + | protos.google.analytics.admin.v1alpha.IUpdateGoogleSignalsSettingsRequest + | undefined + ), + {} | undefined + ] + >; + updateGoogleSignalsSettings( + request: protos.google.analytics.admin.v1alpha.IUpdateGoogleSignalsSettingsRequest, + options: CallOptions, + callback: Callback< + protos.google.analytics.admin.v1alpha.IGoogleSignalsSettings, + | protos.google.analytics.admin.v1alpha.IUpdateGoogleSignalsSettingsRequest + | null + | undefined, + {} | null | undefined + > + ): void; + updateGoogleSignalsSettings( + request: protos.google.analytics.admin.v1alpha.IUpdateGoogleSignalsSettingsRequest, + callback: Callback< + protos.google.analytics.admin.v1alpha.IGoogleSignalsSettings, + | protos.google.analytics.admin.v1alpha.IUpdateGoogleSignalsSettingsRequest + | null + | undefined, + {} | null | undefined + > + ): void; + updateGoogleSignalsSettings( + request?: protos.google.analytics.admin.v1alpha.IUpdateGoogleSignalsSettingsRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.analytics.admin.v1alpha.IGoogleSignalsSettings, + | protos.google.analytics.admin.v1alpha.IUpdateGoogleSignalsSettingsRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.analytics.admin.v1alpha.IGoogleSignalsSettings, + | protos.google.analytics.admin.v1alpha.IUpdateGoogleSignalsSettingsRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.analytics.admin.v1alpha.IGoogleSignalsSettings, + ( + | protos.google.analytics.admin.v1alpha.IUpdateGoogleSignalsSettingsRequest + | 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({ + 'google_signals_settings.name': + request.googleSignalsSettings!.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.updateGoogleSignalsSettings( + request, + options, + callback + ); + } + /** + * Creates a conversion event with the specified attributes. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.analytics.admin.v1alpha.ConversionEvent} request.conversionEvent + * Required. The conversion event to create. + * @param {string} request.parent + * Required. The resource name of the parent property where this conversion event will + * be created. Format: properties/123 + * @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 [ConversionEvent]{@link google.analytics.admin.v1alpha.ConversionEvent}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1alpha/analytics_admin_service.create_conversion_event.js + * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_CreateConversionEvent_async + */ + createConversionEvent( + request?: protos.google.analytics.admin.v1alpha.ICreateConversionEventRequest, + options?: CallOptions + ): Promise< + [ + protos.google.analytics.admin.v1alpha.IConversionEvent, + ( + | protos.google.analytics.admin.v1alpha.ICreateConversionEventRequest + | undefined + ), + {} | undefined + ] + >; + createConversionEvent( + request: protos.google.analytics.admin.v1alpha.ICreateConversionEventRequest, + options: CallOptions, + callback: Callback< + protos.google.analytics.admin.v1alpha.IConversionEvent, + | protos.google.analytics.admin.v1alpha.ICreateConversionEventRequest + | null + | undefined, + {} | null | undefined + > + ): void; + createConversionEvent( + request: protos.google.analytics.admin.v1alpha.ICreateConversionEventRequest, + callback: Callback< + protos.google.analytics.admin.v1alpha.IConversionEvent, + | protos.google.analytics.admin.v1alpha.ICreateConversionEventRequest + | null + | undefined, + {} | null | undefined + > + ): void; + createConversionEvent( + request?: protos.google.analytics.admin.v1alpha.ICreateConversionEventRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.analytics.admin.v1alpha.IConversionEvent, + | protos.google.analytics.admin.v1alpha.ICreateConversionEventRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.analytics.admin.v1alpha.IConversionEvent, + | protos.google.analytics.admin.v1alpha.ICreateConversionEventRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.analytics.admin.v1alpha.IConversionEvent, + ( + | protos.google.analytics.admin.v1alpha.ICreateConversionEventRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize(); + return this.innerApiCalls.createConversionEvent(request, options, callback); + } + /** + * Retrieve a single conversion event. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the conversion event to retrieve. + * Format: properties/{property}/conversionEvents/{conversion_event} + * Example: "properties/123/conversionEvents/456" + * @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 [ConversionEvent]{@link google.analytics.admin.v1alpha.ConversionEvent}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1alpha/analytics_admin_service.get_conversion_event.js + * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_GetConversionEvent_async + */ + getConversionEvent( + request?: protos.google.analytics.admin.v1alpha.IGetConversionEventRequest, + options?: CallOptions + ): Promise< + [ + protos.google.analytics.admin.v1alpha.IConversionEvent, + ( + | protos.google.analytics.admin.v1alpha.IGetConversionEventRequest + | undefined + ), + {} | undefined + ] + >; + getConversionEvent( + request: protos.google.analytics.admin.v1alpha.IGetConversionEventRequest, + options: CallOptions, + callback: Callback< + protos.google.analytics.admin.v1alpha.IConversionEvent, + | protos.google.analytics.admin.v1alpha.IGetConversionEventRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getConversionEvent( + request: protos.google.analytics.admin.v1alpha.IGetConversionEventRequest, + callback: Callback< + protos.google.analytics.admin.v1alpha.IConversionEvent, + | protos.google.analytics.admin.v1alpha.IGetConversionEventRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getConversionEvent( + request?: protos.google.analytics.admin.v1alpha.IGetConversionEventRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.analytics.admin.v1alpha.IConversionEvent, + | protos.google.analytics.admin.v1alpha.IGetConversionEventRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.analytics.admin.v1alpha.IConversionEvent, + | protos.google.analytics.admin.v1alpha.IGetConversionEventRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.analytics.admin.v1alpha.IConversionEvent, + ( + | protos.google.analytics.admin.v1alpha.IGetConversionEventRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.getConversionEvent(request, options, callback); + } + /** + * Deletes a conversion event in a property. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the conversion event to delete. + * Format: properties/{property}/conversionEvents/{conversion_event} + * Example: "properties/123/conversionEvents/456" + * @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 [Empty]{@link google.protobuf.Empty}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1alpha/analytics_admin_service.delete_conversion_event.js + * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_DeleteConversionEvent_async + */ + deleteConversionEvent( + request?: protos.google.analytics.admin.v1alpha.IDeleteConversionEventRequest, + options?: CallOptions + ): Promise< + [ + protos.google.protobuf.IEmpty, + ( + | protos.google.analytics.admin.v1alpha.IDeleteConversionEventRequest + | undefined + ), + {} | undefined + ] + >; + deleteConversionEvent( + request: protos.google.analytics.admin.v1alpha.IDeleteConversionEventRequest, + options: CallOptions, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.analytics.admin.v1alpha.IDeleteConversionEventRequest + | null + | undefined, + {} | null | undefined + > + ): void; + deleteConversionEvent( + request: protos.google.analytics.admin.v1alpha.IDeleteConversionEventRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.analytics.admin.v1alpha.IDeleteConversionEventRequest + | null + | undefined, + {} | null | undefined + > + ): void; + deleteConversionEvent( + request?: protos.google.analytics.admin.v1alpha.IDeleteConversionEventRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.protobuf.IEmpty, + | protos.google.analytics.admin.v1alpha.IDeleteConversionEventRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.IEmpty, + | protos.google.analytics.admin.v1alpha.IDeleteConversionEventRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.protobuf.IEmpty, + ( + | protos.google.analytics.admin.v1alpha.IDeleteConversionEventRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.deleteConversionEvent(request, options, callback); + } + /** + * Look up a single DisplayVideo360AdvertiserLink + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the DisplayVideo360AdvertiserLink to get. + * Example format: properties/1234/displayVideo360AdvertiserLink/5678 + * @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 [DisplayVideo360AdvertiserLink]{@link google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1alpha/analytics_admin_service.get_display_video360_advertiser_link.js + * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_GetDisplayVideo360AdvertiserLink_async + */ + getDisplayVideo360AdvertiserLink( + request?: protos.google.analytics.admin.v1alpha.IGetDisplayVideo360AdvertiserLinkRequest, + options?: CallOptions + ): Promise< + [ + protos.google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLink, + ( + | protos.google.analytics.admin.v1alpha.IGetDisplayVideo360AdvertiserLinkRequest + | undefined + ), + {} | undefined + ] + >; + getDisplayVideo360AdvertiserLink( + request: protos.google.analytics.admin.v1alpha.IGetDisplayVideo360AdvertiserLinkRequest, + options: CallOptions, + callback: Callback< + protos.google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLink, + | protos.google.analytics.admin.v1alpha.IGetDisplayVideo360AdvertiserLinkRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getDisplayVideo360AdvertiserLink( + request: protos.google.analytics.admin.v1alpha.IGetDisplayVideo360AdvertiserLinkRequest, + callback: Callback< + protos.google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLink, + | protos.google.analytics.admin.v1alpha.IGetDisplayVideo360AdvertiserLinkRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getDisplayVideo360AdvertiserLink( + request?: protos.google.analytics.admin.v1alpha.IGetDisplayVideo360AdvertiserLinkRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLink, + | protos.google.analytics.admin.v1alpha.IGetDisplayVideo360AdvertiserLinkRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLink, + | protos.google.analytics.admin.v1alpha.IGetDisplayVideo360AdvertiserLinkRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLink, + ( + | protos.google.analytics.admin.v1alpha.IGetDisplayVideo360AdvertiserLinkRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.getDisplayVideo360AdvertiserLink( + request, + options, + callback + ); + } + /** + * Creates a DisplayVideo360AdvertiserLink. + * This can only be utilized by users who have proper authorization both on + * the Google Analytics property and on the Display & Video 360 advertiser. + * Users who do not have access to the Display & Video 360 advertiser should + * instead seek to create a DisplayVideo360LinkProposal. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Example format: properties/1234 + * @param {google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink} request.displayVideo_360AdvertiserLink + * Required. The DisplayVideo360AdvertiserLink 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 [DisplayVideo360AdvertiserLink]{@link google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1alpha/analytics_admin_service.create_display_video360_advertiser_link.js + * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_CreateDisplayVideo360AdvertiserLink_async + */ + createDisplayVideo360AdvertiserLink( + request?: protos.google.analytics.admin.v1alpha.ICreateDisplayVideo360AdvertiserLinkRequest, + options?: CallOptions + ): Promise< + [ + protos.google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLink, + ( + | protos.google.analytics.admin.v1alpha.ICreateDisplayVideo360AdvertiserLinkRequest + | undefined + ), + {} | undefined + ] + >; + createDisplayVideo360AdvertiserLink( + request: protos.google.analytics.admin.v1alpha.ICreateDisplayVideo360AdvertiserLinkRequest, + options: CallOptions, + callback: Callback< + protos.google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLink, + | protos.google.analytics.admin.v1alpha.ICreateDisplayVideo360AdvertiserLinkRequest + | null + | undefined, + {} | null | undefined + > + ): void; + createDisplayVideo360AdvertiserLink( + request: protos.google.analytics.admin.v1alpha.ICreateDisplayVideo360AdvertiserLinkRequest, + callback: Callback< + protos.google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLink, + | protos.google.analytics.admin.v1alpha.ICreateDisplayVideo360AdvertiserLinkRequest + | null + | undefined, + {} | null | undefined + > + ): void; + createDisplayVideo360AdvertiserLink( + request?: protos.google.analytics.admin.v1alpha.ICreateDisplayVideo360AdvertiserLinkRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLink, + | protos.google.analytics.admin.v1alpha.ICreateDisplayVideo360AdvertiserLinkRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLink, + | protos.google.analytics.admin.v1alpha.ICreateDisplayVideo360AdvertiserLinkRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLink, + ( + | protos.google.analytics.admin.v1alpha.ICreateDisplayVideo360AdvertiserLinkRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize(); + return this.innerApiCalls.createDisplayVideo360AdvertiserLink( + request, + options, + callback + ); + } + /** + * Deletes a DisplayVideo360AdvertiserLink on a property. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the DisplayVideo360AdvertiserLink to delete. + * Example format: properties/1234/displayVideo360AdvertiserLinks/5678 + * @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 [Empty]{@link google.protobuf.Empty}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1alpha/analytics_admin_service.delete_display_video360_advertiser_link.js + * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_DeleteDisplayVideo360AdvertiserLink_async + */ + deleteDisplayVideo360AdvertiserLink( + request?: protos.google.analytics.admin.v1alpha.IDeleteDisplayVideo360AdvertiserLinkRequest, + options?: CallOptions + ): Promise< + [ + protos.google.protobuf.IEmpty, + ( + | protos.google.analytics.admin.v1alpha.IDeleteDisplayVideo360AdvertiserLinkRequest + | undefined + ), + {} | undefined + ] + >; + deleteDisplayVideo360AdvertiserLink( + request: protos.google.analytics.admin.v1alpha.IDeleteDisplayVideo360AdvertiserLinkRequest, + options: CallOptions, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.analytics.admin.v1alpha.IDeleteDisplayVideo360AdvertiserLinkRequest + | null + | undefined, + {} | null | undefined + > + ): void; + deleteDisplayVideo360AdvertiserLink( + request: protos.google.analytics.admin.v1alpha.IDeleteDisplayVideo360AdvertiserLinkRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.analytics.admin.v1alpha.IDeleteDisplayVideo360AdvertiserLinkRequest + | null + | undefined, + {} | null | undefined + > + ): void; + deleteDisplayVideo360AdvertiserLink( + request?: protos.google.analytics.admin.v1alpha.IDeleteDisplayVideo360AdvertiserLinkRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.protobuf.IEmpty, + | protos.google.analytics.admin.v1alpha.IDeleteDisplayVideo360AdvertiserLinkRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.IEmpty, + | protos.google.analytics.admin.v1alpha.IDeleteDisplayVideo360AdvertiserLinkRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.protobuf.IEmpty, + ( + | protos.google.analytics.admin.v1alpha.IDeleteDisplayVideo360AdvertiserLinkRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.deleteDisplayVideo360AdvertiserLink( + request, + options, + callback + ); + } + /** + * Updates a DisplayVideo360AdvertiserLink on a property. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink} request.displayVideo_360AdvertiserLink + * The DisplayVideo360AdvertiserLink to update + * @param {google.protobuf.FieldMask} request.updateMask + * Required. The list of fields to be updated. Omitted fields will not be updated. + * To replace the entire entity, use one path with the string "*" to match + * all fields. + * @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 [DisplayVideo360AdvertiserLink]{@link google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1alpha/analytics_admin_service.update_display_video360_advertiser_link.js + * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_UpdateDisplayVideo360AdvertiserLink_async + */ + updateDisplayVideo360AdvertiserLink( + request?: protos.google.analytics.admin.v1alpha.IUpdateDisplayVideo360AdvertiserLinkRequest, + options?: CallOptions + ): Promise< + [ + protos.google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLink, + ( + | protos.google.analytics.admin.v1alpha.IUpdateDisplayVideo360AdvertiserLinkRequest + | undefined + ), + {} | undefined + ] + >; + updateDisplayVideo360AdvertiserLink( + request: protos.google.analytics.admin.v1alpha.IUpdateDisplayVideo360AdvertiserLinkRequest, + options: CallOptions, + callback: Callback< + protos.google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLink, + | protos.google.analytics.admin.v1alpha.IUpdateDisplayVideo360AdvertiserLinkRequest + | null + | undefined, + {} | null | undefined + > + ): void; + updateDisplayVideo360AdvertiserLink( + request: protos.google.analytics.admin.v1alpha.IUpdateDisplayVideo360AdvertiserLinkRequest, + callback: Callback< + protos.google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLink, + | protos.google.analytics.admin.v1alpha.IUpdateDisplayVideo360AdvertiserLinkRequest + | null + | undefined, + {} | null | undefined + > + ): void; + updateDisplayVideo360AdvertiserLink( + request?: protos.google.analytics.admin.v1alpha.IUpdateDisplayVideo360AdvertiserLinkRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLink, + | protos.google.analytics.admin.v1alpha.IUpdateDisplayVideo360AdvertiserLinkRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLink, + | protos.google.analytics.admin.v1alpha.IUpdateDisplayVideo360AdvertiserLinkRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLink, + ( + | protos.google.analytics.admin.v1alpha.IUpdateDisplayVideo360AdvertiserLinkRequest + | 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({ + 'display_video_360_advertiser_link.name': + request.displayVideo_360AdvertiserLink!.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.updateDisplayVideo360AdvertiserLink( + request, + options, + callback + ); + } + /** + * Lookup for a single DisplayVideo360AdvertiserLinkProposal. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the DisplayVideo360AdvertiserLinkProposal to get. + * Example format: properties/1234/displayVideo360AdvertiserLinkProposals/5678 + * @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 [DisplayVideo360AdvertiserLinkProposal]{@link google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1alpha/analytics_admin_service.get_display_video360_advertiser_link_proposal.js + * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_GetDisplayVideo360AdvertiserLinkProposal_async + */ + getDisplayVideo360AdvertiserLinkProposal( + request?: protos.google.analytics.admin.v1alpha.IGetDisplayVideo360AdvertiserLinkProposalRequest, + options?: CallOptions + ): Promise< + [ + protos.google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLinkProposal, + ( + | protos.google.analytics.admin.v1alpha.IGetDisplayVideo360AdvertiserLinkProposalRequest + | undefined + ), + {} | undefined + ] + >; + getDisplayVideo360AdvertiserLinkProposal( + request: protos.google.analytics.admin.v1alpha.IGetDisplayVideo360AdvertiserLinkProposalRequest, + options: CallOptions, + callback: Callback< + protos.google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLinkProposal, + | protos.google.analytics.admin.v1alpha.IGetDisplayVideo360AdvertiserLinkProposalRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getDisplayVideo360AdvertiserLinkProposal( + request: protos.google.analytics.admin.v1alpha.IGetDisplayVideo360AdvertiserLinkProposalRequest, + callback: Callback< + protos.google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLinkProposal, + | protos.google.analytics.admin.v1alpha.IGetDisplayVideo360AdvertiserLinkProposalRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getDisplayVideo360AdvertiserLinkProposal( + request?: protos.google.analytics.admin.v1alpha.IGetDisplayVideo360AdvertiserLinkProposalRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLinkProposal, + | protos.google.analytics.admin.v1alpha.IGetDisplayVideo360AdvertiserLinkProposalRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLinkProposal, + | protos.google.analytics.admin.v1alpha.IGetDisplayVideo360AdvertiserLinkProposalRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLinkProposal, + ( + | protos.google.analytics.admin.v1alpha.IGetDisplayVideo360AdvertiserLinkProposalRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.getDisplayVideo360AdvertiserLinkProposal( + request, + options, + callback + ); + } + /** + * Creates a DisplayVideo360AdvertiserLinkProposal. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Example format: properties/1234 + * @param {google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal} request.displayVideo_360AdvertiserLinkProposal + * Required. The DisplayVideo360AdvertiserLinkProposal 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 [DisplayVideo360AdvertiserLinkProposal]{@link google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1alpha/analytics_admin_service.create_display_video360_advertiser_link_proposal.js + * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_CreateDisplayVideo360AdvertiserLinkProposal_async + */ + createDisplayVideo360AdvertiserLinkProposal( + request?: protos.google.analytics.admin.v1alpha.ICreateDisplayVideo360AdvertiserLinkProposalRequest, + options?: CallOptions + ): Promise< + [ + protos.google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLinkProposal, + ( + | protos.google.analytics.admin.v1alpha.ICreateDisplayVideo360AdvertiserLinkProposalRequest + | undefined + ), + {} | undefined + ] + >; + createDisplayVideo360AdvertiserLinkProposal( + request: protos.google.analytics.admin.v1alpha.ICreateDisplayVideo360AdvertiserLinkProposalRequest, + options: CallOptions, + callback: Callback< + protos.google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLinkProposal, + | protos.google.analytics.admin.v1alpha.ICreateDisplayVideo360AdvertiserLinkProposalRequest + | null + | undefined, + {} | null | undefined + > + ): void; + createDisplayVideo360AdvertiserLinkProposal( + request: protos.google.analytics.admin.v1alpha.ICreateDisplayVideo360AdvertiserLinkProposalRequest, + callback: Callback< + protos.google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLinkProposal, + | protos.google.analytics.admin.v1alpha.ICreateDisplayVideo360AdvertiserLinkProposalRequest + | null + | undefined, + {} | null | undefined + > + ): void; + createDisplayVideo360AdvertiserLinkProposal( + request?: protos.google.analytics.admin.v1alpha.ICreateDisplayVideo360AdvertiserLinkProposalRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLinkProposal, + | protos.google.analytics.admin.v1alpha.ICreateDisplayVideo360AdvertiserLinkProposalRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLinkProposal, + | protos.google.analytics.admin.v1alpha.ICreateDisplayVideo360AdvertiserLinkProposalRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLinkProposal, + ( + | protos.google.analytics.admin.v1alpha.ICreateDisplayVideo360AdvertiserLinkProposalRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize(); + return this.innerApiCalls.createDisplayVideo360AdvertiserLinkProposal( + request, + options, + callback + ); + } + /** + * Deletes a DisplayVideo360AdvertiserLinkProposal on a property. + * This can only be used on cancelled proposals. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the DisplayVideo360AdvertiserLinkProposal to delete. + * Example format: properties/1234/displayVideo360AdvertiserLinkProposals/5678 + * @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 [Empty]{@link google.protobuf.Empty}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1alpha/analytics_admin_service.delete_display_video360_advertiser_link_proposal.js + * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_DeleteDisplayVideo360AdvertiserLinkProposal_async + */ + deleteDisplayVideo360AdvertiserLinkProposal( + request?: protos.google.analytics.admin.v1alpha.IDeleteDisplayVideo360AdvertiserLinkProposalRequest, + options?: CallOptions + ): Promise< + [ + protos.google.protobuf.IEmpty, + ( + | protos.google.analytics.admin.v1alpha.IDeleteDisplayVideo360AdvertiserLinkProposalRequest + | undefined + ), + {} | undefined + ] + >; + deleteDisplayVideo360AdvertiserLinkProposal( + request: protos.google.analytics.admin.v1alpha.IDeleteDisplayVideo360AdvertiserLinkProposalRequest, + options: CallOptions, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.analytics.admin.v1alpha.IDeleteDisplayVideo360AdvertiserLinkProposalRequest + | null + | undefined, + {} | null | undefined + > + ): void; + deleteDisplayVideo360AdvertiserLinkProposal( + request: protos.google.analytics.admin.v1alpha.IDeleteDisplayVideo360AdvertiserLinkProposalRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.analytics.admin.v1alpha.IDeleteDisplayVideo360AdvertiserLinkProposalRequest + | null + | undefined, + {} | null | undefined + > + ): void; + deleteDisplayVideo360AdvertiserLinkProposal( + request?: protos.google.analytics.admin.v1alpha.IDeleteDisplayVideo360AdvertiserLinkProposalRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.protobuf.IEmpty, + | protos.google.analytics.admin.v1alpha.IDeleteDisplayVideo360AdvertiserLinkProposalRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.IEmpty, + | protos.google.analytics.admin.v1alpha.IDeleteDisplayVideo360AdvertiserLinkProposalRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.protobuf.IEmpty, + ( + | protos.google.analytics.admin.v1alpha.IDeleteDisplayVideo360AdvertiserLinkProposalRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.deleteDisplayVideo360AdvertiserLinkProposal( + request, + options, + callback + ); + } + /** + * Approves a DisplayVideo360AdvertiserLinkProposal. + * The DisplayVideo360AdvertiserLinkProposal will be deleted and a new + * DisplayVideo360AdvertiserLink will be created. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the DisplayVideo360AdvertiserLinkProposal to approve. + * Example format: properties/1234/displayVideo360AdvertiserLinkProposals/5678 + * @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 [ApproveDisplayVideo360AdvertiserLinkProposalResponse]{@link google.analytics.admin.v1alpha.ApproveDisplayVideo360AdvertiserLinkProposalResponse}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1alpha/analytics_admin_service.approve_display_video360_advertiser_link_proposal.js + * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_ApproveDisplayVideo360AdvertiserLinkProposal_async + */ + approveDisplayVideo360AdvertiserLinkProposal( + request?: protos.google.analytics.admin.v1alpha.IApproveDisplayVideo360AdvertiserLinkProposalRequest, + options?: CallOptions + ): Promise< + [ + protos.google.analytics.admin.v1alpha.IApproveDisplayVideo360AdvertiserLinkProposalResponse, + ( + | protos.google.analytics.admin.v1alpha.IApproveDisplayVideo360AdvertiserLinkProposalRequest + | undefined + ), + {} | undefined + ] + >; + approveDisplayVideo360AdvertiserLinkProposal( + request: protos.google.analytics.admin.v1alpha.IApproveDisplayVideo360AdvertiserLinkProposalRequest, + options: CallOptions, + callback: Callback< + protos.google.analytics.admin.v1alpha.IApproveDisplayVideo360AdvertiserLinkProposalResponse, + | protos.google.analytics.admin.v1alpha.IApproveDisplayVideo360AdvertiserLinkProposalRequest + | null + | undefined, + {} | null | undefined + > + ): void; + approveDisplayVideo360AdvertiserLinkProposal( + request: protos.google.analytics.admin.v1alpha.IApproveDisplayVideo360AdvertiserLinkProposalRequest, + callback: Callback< + protos.google.analytics.admin.v1alpha.IApproveDisplayVideo360AdvertiserLinkProposalResponse, + | protos.google.analytics.admin.v1alpha.IApproveDisplayVideo360AdvertiserLinkProposalRequest + | null + | undefined, + {} | null | undefined + > + ): void; + approveDisplayVideo360AdvertiserLinkProposal( + request?: protos.google.analytics.admin.v1alpha.IApproveDisplayVideo360AdvertiserLinkProposalRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.analytics.admin.v1alpha.IApproveDisplayVideo360AdvertiserLinkProposalResponse, + | protos.google.analytics.admin.v1alpha.IApproveDisplayVideo360AdvertiserLinkProposalRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.analytics.admin.v1alpha.IApproveDisplayVideo360AdvertiserLinkProposalResponse, + | protos.google.analytics.admin.v1alpha.IApproveDisplayVideo360AdvertiserLinkProposalRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.analytics.admin.v1alpha.IApproveDisplayVideo360AdvertiserLinkProposalResponse, + ( + | protos.google.analytics.admin.v1alpha.IApproveDisplayVideo360AdvertiserLinkProposalRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.approveDisplayVideo360AdvertiserLinkProposal( + request, + options, + callback + ); + } + /** + * Cancels a DisplayVideo360AdvertiserLinkProposal. + * Cancelling can mean either: + * - Declining a proposal initiated from Display & Video 360 + * - Withdrawing a proposal initiated from Google Analytics + * After being cancelled, a proposal will eventually be deleted automatically. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the DisplayVideo360AdvertiserLinkProposal to cancel. + * Example format: properties/1234/displayVideo360AdvertiserLinkProposals/5678 + * @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 [DisplayVideo360AdvertiserLinkProposal]{@link google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1alpha/analytics_admin_service.cancel_display_video360_advertiser_link_proposal.js + * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_CancelDisplayVideo360AdvertiserLinkProposal_async + */ + cancelDisplayVideo360AdvertiserLinkProposal( + request?: protos.google.analytics.admin.v1alpha.ICancelDisplayVideo360AdvertiserLinkProposalRequest, + options?: CallOptions + ): Promise< + [ + protos.google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLinkProposal, + ( + | protos.google.analytics.admin.v1alpha.ICancelDisplayVideo360AdvertiserLinkProposalRequest + | undefined + ), + {} | undefined + ] + >; + cancelDisplayVideo360AdvertiserLinkProposal( + request: protos.google.analytics.admin.v1alpha.ICancelDisplayVideo360AdvertiserLinkProposalRequest, + options: CallOptions, + callback: Callback< + protos.google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLinkProposal, + | protos.google.analytics.admin.v1alpha.ICancelDisplayVideo360AdvertiserLinkProposalRequest + | null + | undefined, + {} | null | undefined + > + ): void; + cancelDisplayVideo360AdvertiserLinkProposal( + request: protos.google.analytics.admin.v1alpha.ICancelDisplayVideo360AdvertiserLinkProposalRequest, + callback: Callback< + protos.google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLinkProposal, + | protos.google.analytics.admin.v1alpha.ICancelDisplayVideo360AdvertiserLinkProposalRequest + | null + | undefined, + {} | null | undefined + > + ): void; + cancelDisplayVideo360AdvertiserLinkProposal( + request?: protos.google.analytics.admin.v1alpha.ICancelDisplayVideo360AdvertiserLinkProposalRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLinkProposal, + | protos.google.analytics.admin.v1alpha.ICancelDisplayVideo360AdvertiserLinkProposalRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLinkProposal, + | protos.google.analytics.admin.v1alpha.ICancelDisplayVideo360AdvertiserLinkProposalRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLinkProposal, + ( + | protos.google.analytics.admin.v1alpha.ICancelDisplayVideo360AdvertiserLinkProposalRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.cancelDisplayVideo360AdvertiserLinkProposal( + request, + options, + callback + ); + } + /** + * Creates a CustomDimension. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Example format: properties/1234 + * @param {google.analytics.admin.v1alpha.CustomDimension} request.customDimension + * Required. The CustomDimension 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 [CustomDimension]{@link google.analytics.admin.v1alpha.CustomDimension}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1alpha/analytics_admin_service.create_custom_dimension.js + * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_CreateCustomDimension_async + */ + createCustomDimension( + request?: protos.google.analytics.admin.v1alpha.ICreateCustomDimensionRequest, + options?: CallOptions + ): Promise< + [ + protos.google.analytics.admin.v1alpha.ICustomDimension, + ( + | protos.google.analytics.admin.v1alpha.ICreateCustomDimensionRequest + | undefined + ), + {} | undefined + ] + >; + createCustomDimension( + request: protos.google.analytics.admin.v1alpha.ICreateCustomDimensionRequest, + options: CallOptions, + callback: Callback< + protos.google.analytics.admin.v1alpha.ICustomDimension, + | protos.google.analytics.admin.v1alpha.ICreateCustomDimensionRequest + | null + | undefined, + {} | null | undefined + > + ): void; + createCustomDimension( + request: protos.google.analytics.admin.v1alpha.ICreateCustomDimensionRequest, + callback: Callback< + protos.google.analytics.admin.v1alpha.ICustomDimension, + | protos.google.analytics.admin.v1alpha.ICreateCustomDimensionRequest + | null + | undefined, + {} | null | undefined + > + ): void; + createCustomDimension( + request?: protos.google.analytics.admin.v1alpha.ICreateCustomDimensionRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.analytics.admin.v1alpha.ICustomDimension, + | protos.google.analytics.admin.v1alpha.ICreateCustomDimensionRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.analytics.admin.v1alpha.ICustomDimension, + | protos.google.analytics.admin.v1alpha.ICreateCustomDimensionRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.analytics.admin.v1alpha.ICustomDimension, + ( + | protos.google.analytics.admin.v1alpha.ICreateCustomDimensionRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize(); + return this.innerApiCalls.createCustomDimension(request, options, callback); + } + /** + * Updates a CustomDimension on a property. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.analytics.admin.v1alpha.CustomDimension} request.customDimension + * The CustomDimension to update + * @param {google.protobuf.FieldMask} request.updateMask + * Required. The list of fields to be updated. Omitted fields will not be updated. + * To replace the entire entity, use one path with the string "*" to match + * all fields. + * @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 [CustomDimension]{@link google.analytics.admin.v1alpha.CustomDimension}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1alpha/analytics_admin_service.update_custom_dimension.js + * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_UpdateCustomDimension_async + */ + updateCustomDimension( + request?: protos.google.analytics.admin.v1alpha.IUpdateCustomDimensionRequest, + options?: CallOptions + ): Promise< + [ + protos.google.analytics.admin.v1alpha.ICustomDimension, + ( + | protos.google.analytics.admin.v1alpha.IUpdateCustomDimensionRequest + | undefined + ), + {} | undefined + ] + >; + updateCustomDimension( + request: protos.google.analytics.admin.v1alpha.IUpdateCustomDimensionRequest, + options: CallOptions, + callback: Callback< + protos.google.analytics.admin.v1alpha.ICustomDimension, + | protos.google.analytics.admin.v1alpha.IUpdateCustomDimensionRequest + | null + | undefined, + {} | null | undefined + > + ): void; + updateCustomDimension( + request: protos.google.analytics.admin.v1alpha.IUpdateCustomDimensionRequest, + callback: Callback< + protos.google.analytics.admin.v1alpha.ICustomDimension, + | protos.google.analytics.admin.v1alpha.IUpdateCustomDimensionRequest + | null + | undefined, + {} | null | undefined + > + ): void; + updateCustomDimension( + request?: protos.google.analytics.admin.v1alpha.IUpdateCustomDimensionRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.analytics.admin.v1alpha.ICustomDimension, + | protos.google.analytics.admin.v1alpha.IUpdateCustomDimensionRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.analytics.admin.v1alpha.ICustomDimension, + | protos.google.analytics.admin.v1alpha.IUpdateCustomDimensionRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.analytics.admin.v1alpha.ICustomDimension, + ( + | protos.google.analytics.admin.v1alpha.IUpdateCustomDimensionRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + 'custom_dimension.name': request.customDimension!.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.updateCustomDimension(request, options, callback); + } + /** + * Archives a CustomDimension on a property. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the CustomDimension to archive. + * Example format: properties/1234/customDimensions/5678 + * @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 [Empty]{@link google.protobuf.Empty}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1alpha/analytics_admin_service.archive_custom_dimension.js + * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_ArchiveCustomDimension_async + */ + archiveCustomDimension( + request?: protos.google.analytics.admin.v1alpha.IArchiveCustomDimensionRequest, + options?: CallOptions + ): Promise< + [ + protos.google.protobuf.IEmpty, + ( + | protos.google.analytics.admin.v1alpha.IArchiveCustomDimensionRequest + | undefined + ), + {} | undefined + ] + >; + archiveCustomDimension( + request: protos.google.analytics.admin.v1alpha.IArchiveCustomDimensionRequest, + options: CallOptions, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.analytics.admin.v1alpha.IArchiveCustomDimensionRequest + | null + | undefined, + {} | null | undefined + > + ): void; + archiveCustomDimension( + request: protos.google.analytics.admin.v1alpha.IArchiveCustomDimensionRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.analytics.admin.v1alpha.IArchiveCustomDimensionRequest + | null + | undefined, + {} | null | undefined + > + ): void; + archiveCustomDimension( + request?: protos.google.analytics.admin.v1alpha.IArchiveCustomDimensionRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.protobuf.IEmpty, + | protos.google.analytics.admin.v1alpha.IArchiveCustomDimensionRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.IEmpty, + | protos.google.analytics.admin.v1alpha.IArchiveCustomDimensionRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.protobuf.IEmpty, + ( + | protos.google.analytics.admin.v1alpha.IArchiveCustomDimensionRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.archiveCustomDimension( + request, + options, + callback + ); + } + /** + * Lookup for a single CustomDimension. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the CustomDimension to get. + * Example format: properties/1234/customDimensions/5678 + * @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 [CustomDimension]{@link google.analytics.admin.v1alpha.CustomDimension}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1alpha/analytics_admin_service.get_custom_dimension.js + * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_GetCustomDimension_async + */ + getCustomDimension( + request?: protos.google.analytics.admin.v1alpha.IGetCustomDimensionRequest, + options?: CallOptions + ): Promise< + [ + protos.google.analytics.admin.v1alpha.ICustomDimension, + ( + | protos.google.analytics.admin.v1alpha.IGetCustomDimensionRequest + | undefined + ), + {} | undefined + ] + >; + getCustomDimension( + request: protos.google.analytics.admin.v1alpha.IGetCustomDimensionRequest, + options: CallOptions, + callback: Callback< + protos.google.analytics.admin.v1alpha.ICustomDimension, + | protos.google.analytics.admin.v1alpha.IGetCustomDimensionRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getCustomDimension( + request: protos.google.analytics.admin.v1alpha.IGetCustomDimensionRequest, + callback: Callback< + protos.google.analytics.admin.v1alpha.ICustomDimension, + | protos.google.analytics.admin.v1alpha.IGetCustomDimensionRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getCustomDimension( + request?: protos.google.analytics.admin.v1alpha.IGetCustomDimensionRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.analytics.admin.v1alpha.ICustomDimension, + | protos.google.analytics.admin.v1alpha.IGetCustomDimensionRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.analytics.admin.v1alpha.ICustomDimension, + | protos.google.analytics.admin.v1alpha.IGetCustomDimensionRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.analytics.admin.v1alpha.ICustomDimension, + ( + | protos.google.analytics.admin.v1alpha.IGetCustomDimensionRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.getCustomDimension(request, options, callback); + } + /** + * Creates a CustomMetric. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Example format: properties/1234 + * @param {google.analytics.admin.v1alpha.CustomMetric} request.customMetric + * Required. The CustomMetric 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 [CustomMetric]{@link google.analytics.admin.v1alpha.CustomMetric}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1alpha/analytics_admin_service.create_custom_metric.js + * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_CreateCustomMetric_async + */ + createCustomMetric( + request?: protos.google.analytics.admin.v1alpha.ICreateCustomMetricRequest, + options?: CallOptions + ): Promise< + [ + protos.google.analytics.admin.v1alpha.ICustomMetric, + ( + | protos.google.analytics.admin.v1alpha.ICreateCustomMetricRequest + | undefined + ), + {} | undefined + ] + >; + createCustomMetric( + request: protos.google.analytics.admin.v1alpha.ICreateCustomMetricRequest, + options: CallOptions, + callback: Callback< + protos.google.analytics.admin.v1alpha.ICustomMetric, + | protos.google.analytics.admin.v1alpha.ICreateCustomMetricRequest + | null + | undefined, + {} | null | undefined + > + ): void; + createCustomMetric( + request: protos.google.analytics.admin.v1alpha.ICreateCustomMetricRequest, + callback: Callback< + protos.google.analytics.admin.v1alpha.ICustomMetric, + | protos.google.analytics.admin.v1alpha.ICreateCustomMetricRequest + | null + | undefined, + {} | null | undefined + > + ): void; + createCustomMetric( + request?: protos.google.analytics.admin.v1alpha.ICreateCustomMetricRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.analytics.admin.v1alpha.ICustomMetric, + | protos.google.analytics.admin.v1alpha.ICreateCustomMetricRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.analytics.admin.v1alpha.ICustomMetric, + | protos.google.analytics.admin.v1alpha.ICreateCustomMetricRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.analytics.admin.v1alpha.ICustomMetric, + ( + | protos.google.analytics.admin.v1alpha.ICreateCustomMetricRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize(); + return this.innerApiCalls.createCustomMetric(request, options, callback); + } + /** + * Updates a CustomMetric on a property. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.analytics.admin.v1alpha.CustomMetric} request.customMetric + * The CustomMetric to update + * @param {google.protobuf.FieldMask} request.updateMask + * Required. The list of fields to be updated. Omitted fields will not be updated. + * To replace the entire entity, use one path with the string "*" to match + * all fields. + * @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 [CustomMetric]{@link google.analytics.admin.v1alpha.CustomMetric}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1alpha/analytics_admin_service.update_custom_metric.js + * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_UpdateCustomMetric_async + */ + updateCustomMetric( + request?: protos.google.analytics.admin.v1alpha.IUpdateCustomMetricRequest, + options?: CallOptions + ): Promise< + [ + protos.google.analytics.admin.v1alpha.ICustomMetric, + ( + | protos.google.analytics.admin.v1alpha.IUpdateCustomMetricRequest + | undefined + ), + {} | undefined + ] + >; + updateCustomMetric( + request: protos.google.analytics.admin.v1alpha.IUpdateCustomMetricRequest, + options: CallOptions, + callback: Callback< + protos.google.analytics.admin.v1alpha.ICustomMetric, + | protos.google.analytics.admin.v1alpha.IUpdateCustomMetricRequest + | null + | undefined, + {} | null | undefined + > + ): void; + updateCustomMetric( + request: protos.google.analytics.admin.v1alpha.IUpdateCustomMetricRequest, + callback: Callback< + protos.google.analytics.admin.v1alpha.ICustomMetric, + | protos.google.analytics.admin.v1alpha.IUpdateCustomMetricRequest + | null + | undefined, + {} | null | undefined + > + ): void; + updateCustomMetric( + request?: protos.google.analytics.admin.v1alpha.IUpdateCustomMetricRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.analytics.admin.v1alpha.ICustomMetric, + | protos.google.analytics.admin.v1alpha.IUpdateCustomMetricRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.analytics.admin.v1alpha.ICustomMetric, + | protos.google.analytics.admin.v1alpha.IUpdateCustomMetricRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.analytics.admin.v1alpha.ICustomMetric, + ( + | protos.google.analytics.admin.v1alpha.IUpdateCustomMetricRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + 'custom_metric.name': request.customMetric!.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.updateCustomMetric(request, options, callback); + } + /** + * Archives a CustomMetric on a property. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the CustomMetric to archive. + * Example format: properties/1234/customMetrics/5678 + * @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 [Empty]{@link google.protobuf.Empty}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1alpha/analytics_admin_service.archive_custom_metric.js + * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_ArchiveCustomMetric_async + */ + archiveCustomMetric( + request?: protos.google.analytics.admin.v1alpha.IArchiveCustomMetricRequest, + options?: CallOptions + ): Promise< + [ + protos.google.protobuf.IEmpty, + ( + | protos.google.analytics.admin.v1alpha.IArchiveCustomMetricRequest + | undefined + ), + {} | undefined + ] + >; + archiveCustomMetric( + request: protos.google.analytics.admin.v1alpha.IArchiveCustomMetricRequest, + options: CallOptions, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.analytics.admin.v1alpha.IArchiveCustomMetricRequest + | null + | undefined, + {} | null | undefined + > + ): void; + archiveCustomMetric( + request: protos.google.analytics.admin.v1alpha.IArchiveCustomMetricRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.analytics.admin.v1alpha.IArchiveCustomMetricRequest + | null + | undefined, + {} | null | undefined + > + ): void; + archiveCustomMetric( + request?: protos.google.analytics.admin.v1alpha.IArchiveCustomMetricRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.protobuf.IEmpty, + | protos.google.analytics.admin.v1alpha.IArchiveCustomMetricRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.IEmpty, + | protos.google.analytics.admin.v1alpha.IArchiveCustomMetricRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.protobuf.IEmpty, + ( + | protos.google.analytics.admin.v1alpha.IArchiveCustomMetricRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.archiveCustomMetric(request, options, callback); + } + /** + * Lookup for a single CustomMetric. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the CustomMetric to get. + * Example format: properties/1234/customMetrics/5678 + * @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 [CustomMetric]{@link google.analytics.admin.v1alpha.CustomMetric}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1alpha/analytics_admin_service.get_custom_metric.js + * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_GetCustomMetric_async + */ + getCustomMetric( + request?: protos.google.analytics.admin.v1alpha.IGetCustomMetricRequest, + options?: CallOptions + ): Promise< + [ + protos.google.analytics.admin.v1alpha.ICustomMetric, + protos.google.analytics.admin.v1alpha.IGetCustomMetricRequest | undefined, + {} | undefined + ] + >; + getCustomMetric( + request: protos.google.analytics.admin.v1alpha.IGetCustomMetricRequest, + options: CallOptions, + callback: Callback< + protos.google.analytics.admin.v1alpha.ICustomMetric, + | protos.google.analytics.admin.v1alpha.IGetCustomMetricRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getCustomMetric( + request: protos.google.analytics.admin.v1alpha.IGetCustomMetricRequest, + callback: Callback< + protos.google.analytics.admin.v1alpha.ICustomMetric, + | protos.google.analytics.admin.v1alpha.IGetCustomMetricRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getCustomMetric( + request?: protos.google.analytics.admin.v1alpha.IGetCustomMetricRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.analytics.admin.v1alpha.ICustomMetric, + | protos.google.analytics.admin.v1alpha.IGetCustomMetricRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.analytics.admin.v1alpha.ICustomMetric, + | protos.google.analytics.admin.v1alpha.IGetCustomMetricRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.analytics.admin.v1alpha.ICustomMetric, + protos.google.analytics.admin.v1alpha.IGetCustomMetricRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.getCustomMetric(request, options, callback); + } + /** + * Returns the singleton data retention settings for this property. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the settings to lookup. + * Format: + * properties/{property}/dataRetentionSettings + * Example: "properties/1000/dataRetentionSettings" + * @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 [DataRetentionSettings]{@link google.analytics.admin.v1alpha.DataRetentionSettings}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1alpha/analytics_admin_service.get_data_retention_settings.js + * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_GetDataRetentionSettings_async + */ + getDataRetentionSettings( + request?: protos.google.analytics.admin.v1alpha.IGetDataRetentionSettingsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.analytics.admin.v1alpha.IDataRetentionSettings, + ( + | protos.google.analytics.admin.v1alpha.IGetDataRetentionSettingsRequest + | undefined + ), + {} | undefined + ] + >; + getDataRetentionSettings( + request: protos.google.analytics.admin.v1alpha.IGetDataRetentionSettingsRequest, + options: CallOptions, + callback: Callback< + protos.google.analytics.admin.v1alpha.IDataRetentionSettings, + | protos.google.analytics.admin.v1alpha.IGetDataRetentionSettingsRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getDataRetentionSettings( + request: protos.google.analytics.admin.v1alpha.IGetDataRetentionSettingsRequest, + callback: Callback< + protos.google.analytics.admin.v1alpha.IDataRetentionSettings, + | protos.google.analytics.admin.v1alpha.IGetDataRetentionSettingsRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getDataRetentionSettings( + request?: protos.google.analytics.admin.v1alpha.IGetDataRetentionSettingsRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.analytics.admin.v1alpha.IDataRetentionSettings, + | protos.google.analytics.admin.v1alpha.IGetDataRetentionSettingsRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.analytics.admin.v1alpha.IDataRetentionSettings, + | protos.google.analytics.admin.v1alpha.IGetDataRetentionSettingsRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.analytics.admin.v1alpha.IDataRetentionSettings, + ( + | protos.google.analytics.admin.v1alpha.IGetDataRetentionSettingsRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.getDataRetentionSettings( + request, + options, + callback + ); + } + /** + * Updates the singleton data retention settings for this property. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.analytics.admin.v1alpha.DataRetentionSettings} request.dataRetentionSettings + * Required. The settings to update. + * The `name` field is used to identify the settings to be updated. + * @param {google.protobuf.FieldMask} request.updateMask + * Required. The list of fields to be updated. Field names must be in snake case + * (e.g., "field_to_update"). Omitted fields will not be updated. To replace + * the entire entity, use one path with the string "*" to match all fields. + * @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 [DataRetentionSettings]{@link google.analytics.admin.v1alpha.DataRetentionSettings}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1alpha/analytics_admin_service.update_data_retention_settings.js + * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_UpdateDataRetentionSettings_async + */ + updateDataRetentionSettings( + request?: protos.google.analytics.admin.v1alpha.IUpdateDataRetentionSettingsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.analytics.admin.v1alpha.IDataRetentionSettings, + ( + | protos.google.analytics.admin.v1alpha.IUpdateDataRetentionSettingsRequest + | undefined + ), + {} | undefined + ] + >; + updateDataRetentionSettings( + request: protos.google.analytics.admin.v1alpha.IUpdateDataRetentionSettingsRequest, + options: CallOptions, + callback: Callback< + protos.google.analytics.admin.v1alpha.IDataRetentionSettings, + | protos.google.analytics.admin.v1alpha.IUpdateDataRetentionSettingsRequest + | null + | undefined, + {} | null | undefined + > + ): void; + updateDataRetentionSettings( + request: protos.google.analytics.admin.v1alpha.IUpdateDataRetentionSettingsRequest, + callback: Callback< + protos.google.analytics.admin.v1alpha.IDataRetentionSettings, + | protos.google.analytics.admin.v1alpha.IUpdateDataRetentionSettingsRequest + | null + | undefined, + {} | null | undefined + > + ): void; + updateDataRetentionSettings( + request?: protos.google.analytics.admin.v1alpha.IUpdateDataRetentionSettingsRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.analytics.admin.v1alpha.IDataRetentionSettings, + | protos.google.analytics.admin.v1alpha.IUpdateDataRetentionSettingsRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.analytics.admin.v1alpha.IDataRetentionSettings, + | protos.google.analytics.admin.v1alpha.IUpdateDataRetentionSettingsRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.analytics.admin.v1alpha.IDataRetentionSettings, + ( + | protos.google.analytics.admin.v1alpha.IUpdateDataRetentionSettingsRequest + | 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({ + 'data_retention_settings.name': + request.dataRetentionSettings!.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.updateDataRetentionSettings( + request, + options, + callback + ); + } + /** + * Creates a DataStream. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Example format: properties/1234 + * @param {google.analytics.admin.v1alpha.DataStream} request.dataStream + * Required. The DataStream 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 [DataStream]{@link google.analytics.admin.v1alpha.DataStream}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1alpha/analytics_admin_service.create_data_stream.js + * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_CreateDataStream_async + */ + createDataStream( + request?: protos.google.analytics.admin.v1alpha.ICreateDataStreamRequest, + options?: CallOptions + ): Promise< + [ + protos.google.analytics.admin.v1alpha.IDataStream, + ( + | protos.google.analytics.admin.v1alpha.ICreateDataStreamRequest + | undefined + ), + {} | undefined + ] + >; + createDataStream( + request: protos.google.analytics.admin.v1alpha.ICreateDataStreamRequest, + options: CallOptions, + callback: Callback< + protos.google.analytics.admin.v1alpha.IDataStream, + | protos.google.analytics.admin.v1alpha.ICreateDataStreamRequest + | null + | undefined, + {} | null | undefined + > + ): void; + createDataStream( + request: protos.google.analytics.admin.v1alpha.ICreateDataStreamRequest, + callback: Callback< + protos.google.analytics.admin.v1alpha.IDataStream, + | protos.google.analytics.admin.v1alpha.ICreateDataStreamRequest + | null + | undefined, + {} | null | undefined + > + ): void; + createDataStream( + request?: protos.google.analytics.admin.v1alpha.ICreateDataStreamRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.analytics.admin.v1alpha.IDataStream, + | protos.google.analytics.admin.v1alpha.ICreateDataStreamRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.analytics.admin.v1alpha.IDataStream, + | protos.google.analytics.admin.v1alpha.ICreateDataStreamRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.analytics.admin.v1alpha.IDataStream, + ( + | protos.google.analytics.admin.v1alpha.ICreateDataStreamRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize(); + return this.innerApiCalls.createDataStream(request, options, callback); + } + /** + * Deletes a DataStream on a property. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the DataStream to delete. + * Example format: properties/1234/dataStreams/5678 + * @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 [Empty]{@link google.protobuf.Empty}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1alpha/analytics_admin_service.delete_data_stream.js + * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_DeleteDataStream_async + */ + deleteDataStream( + request?: protos.google.analytics.admin.v1alpha.IDeleteDataStreamRequest, + options?: CallOptions + ): Promise< + [ + protos.google.protobuf.IEmpty, + ( + | protos.google.analytics.admin.v1alpha.IDeleteDataStreamRequest + | undefined + ), + {} | undefined + ] + >; + deleteDataStream( + request: protos.google.analytics.admin.v1alpha.IDeleteDataStreamRequest, + options: CallOptions, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.analytics.admin.v1alpha.IDeleteDataStreamRequest + | null + | undefined, + {} | null | undefined + > + ): void; + deleteDataStream( + request: protos.google.analytics.admin.v1alpha.IDeleteDataStreamRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.analytics.admin.v1alpha.IDeleteDataStreamRequest + | null + | undefined, + {} | null | undefined + > + ): void; + deleteDataStream( + request?: protos.google.analytics.admin.v1alpha.IDeleteDataStreamRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.protobuf.IEmpty, + | protos.google.analytics.admin.v1alpha.IDeleteDataStreamRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.IEmpty, + | protos.google.analytics.admin.v1alpha.IDeleteDataStreamRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.protobuf.IEmpty, + ( + | protos.google.analytics.admin.v1alpha.IDeleteDataStreamRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.deleteDataStream(request, options, callback); + } + /** + * Updates a DataStream on a property. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.analytics.admin.v1alpha.DataStream} request.dataStream + * The DataStream to update + * @param {google.protobuf.FieldMask} request.updateMask + * Required. The list of fields to be updated. Omitted fields will not be updated. + * To replace the entire entity, use one path with the string "*" to match + * all fields. + * @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 [DataStream]{@link google.analytics.admin.v1alpha.DataStream}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1alpha/analytics_admin_service.update_data_stream.js + * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_UpdateDataStream_async + */ + updateDataStream( + request?: protos.google.analytics.admin.v1alpha.IUpdateDataStreamRequest, + options?: CallOptions + ): Promise< + [ + protos.google.analytics.admin.v1alpha.IDataStream, + ( + | protos.google.analytics.admin.v1alpha.IUpdateDataStreamRequest + | undefined + ), + {} | undefined + ] + >; + updateDataStream( + request: protos.google.analytics.admin.v1alpha.IUpdateDataStreamRequest, + options: CallOptions, + callback: Callback< + protos.google.analytics.admin.v1alpha.IDataStream, + | protos.google.analytics.admin.v1alpha.IUpdateDataStreamRequest + | null + | undefined, + {} | null | undefined + > + ): void; + updateDataStream( + request: protos.google.analytics.admin.v1alpha.IUpdateDataStreamRequest, + callback: Callback< + protos.google.analytics.admin.v1alpha.IDataStream, + | protos.google.analytics.admin.v1alpha.IUpdateDataStreamRequest + | null + | undefined, + {} | null | undefined + > + ): void; + updateDataStream( + request?: protos.google.analytics.admin.v1alpha.IUpdateDataStreamRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.analytics.admin.v1alpha.IDataStream, + | protos.google.analytics.admin.v1alpha.IUpdateDataStreamRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.analytics.admin.v1alpha.IDataStream, + | protos.google.analytics.admin.v1alpha.IUpdateDataStreamRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.analytics.admin.v1alpha.IDataStream, + ( + | protos.google.analytics.admin.v1alpha.IUpdateDataStreamRequest + | 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({ + 'data_stream.name': request.dataStream!.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.updateDataStream(request, options, callback); + } + /** + * Lookup for a single DataStream. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the DataStream to get. + * Example format: properties/1234/dataStreams/5678 + * @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 [DataStream]{@link google.analytics.admin.v1alpha.DataStream}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1alpha/analytics_admin_service.get_data_stream.js + * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_GetDataStream_async + */ + getDataStream( + request?: protos.google.analytics.admin.v1alpha.IGetDataStreamRequest, + options?: CallOptions + ): Promise< + [ + protos.google.analytics.admin.v1alpha.IDataStream, + protos.google.analytics.admin.v1alpha.IGetDataStreamRequest | undefined, + {} | undefined + ] + >; + getDataStream( + request: protos.google.analytics.admin.v1alpha.IGetDataStreamRequest, + options: CallOptions, + callback: Callback< + protos.google.analytics.admin.v1alpha.IDataStream, + | protos.google.analytics.admin.v1alpha.IGetDataStreamRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getDataStream( + request: protos.google.analytics.admin.v1alpha.IGetDataStreamRequest, + callback: Callback< + protos.google.analytics.admin.v1alpha.IDataStream, + | protos.google.analytics.admin.v1alpha.IGetDataStreamRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getDataStream( + request?: protos.google.analytics.admin.v1alpha.IGetDataStreamRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.analytics.admin.v1alpha.IDataStream, + | protos.google.analytics.admin.v1alpha.IGetDataStreamRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.analytics.admin.v1alpha.IDataStream, + | protos.google.analytics.admin.v1alpha.IGetDataStreamRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.analytics.admin.v1alpha.IDataStream, + protos.google.analytics.admin.v1alpha.IGetDataStreamRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.getDataStream(request, options, callback); + } + /** + * Lookup for a single Audience. + * Audiences created before 2020 may not be supported. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the Audience to get. + * Example format: properties/1234/audiences/5678 + * @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 [Audience]{@link google.analytics.admin.v1alpha.Audience}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1alpha/analytics_admin_service.get_audience.js + * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_GetAudience_async + */ + getAudience( + request?: protos.google.analytics.admin.v1alpha.IGetAudienceRequest, + options?: CallOptions + ): Promise< + [ + protos.google.analytics.admin.v1alpha.IAudience, + protos.google.analytics.admin.v1alpha.IGetAudienceRequest | undefined, + {} | undefined + ] + >; + getAudience( + request: protos.google.analytics.admin.v1alpha.IGetAudienceRequest, + options: CallOptions, + callback: Callback< + protos.google.analytics.admin.v1alpha.IAudience, + | protos.google.analytics.admin.v1alpha.IGetAudienceRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getAudience( + request: protos.google.analytics.admin.v1alpha.IGetAudienceRequest, + callback: Callback< + protos.google.analytics.admin.v1alpha.IAudience, + | protos.google.analytics.admin.v1alpha.IGetAudienceRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getAudience( + request?: protos.google.analytics.admin.v1alpha.IGetAudienceRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.analytics.admin.v1alpha.IAudience, + | protos.google.analytics.admin.v1alpha.IGetAudienceRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.analytics.admin.v1alpha.IAudience, + | protos.google.analytics.admin.v1alpha.IGetAudienceRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.analytics.admin.v1alpha.IAudience, + protos.google.analytics.admin.v1alpha.IGetAudienceRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.getAudience(request, options, callback); + } + /** + * Creates an Audience. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Example format: properties/1234 + * @param {google.analytics.admin.v1alpha.Audience} request.audience + * Required. The audience 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 [Audience]{@link google.analytics.admin.v1alpha.Audience}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1alpha/analytics_admin_service.create_audience.js + * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_CreateAudience_async + */ + createAudience( + request?: protos.google.analytics.admin.v1alpha.ICreateAudienceRequest, + options?: CallOptions + ): Promise< + [ + protos.google.analytics.admin.v1alpha.IAudience, + protos.google.analytics.admin.v1alpha.ICreateAudienceRequest | undefined, + {} | undefined + ] + >; + createAudience( + request: protos.google.analytics.admin.v1alpha.ICreateAudienceRequest, + options: CallOptions, + callback: Callback< + protos.google.analytics.admin.v1alpha.IAudience, + | protos.google.analytics.admin.v1alpha.ICreateAudienceRequest + | null + | undefined, + {} | null | undefined + > + ): void; + createAudience( + request: protos.google.analytics.admin.v1alpha.ICreateAudienceRequest, + callback: Callback< + protos.google.analytics.admin.v1alpha.IAudience, + | protos.google.analytics.admin.v1alpha.ICreateAudienceRequest + | null + | undefined, + {} | null | undefined + > + ): void; + createAudience( + request?: protos.google.analytics.admin.v1alpha.ICreateAudienceRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.analytics.admin.v1alpha.IAudience, + | protos.google.analytics.admin.v1alpha.ICreateAudienceRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.analytics.admin.v1alpha.IAudience, + | protos.google.analytics.admin.v1alpha.ICreateAudienceRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.analytics.admin.v1alpha.IAudience, + protos.google.analytics.admin.v1alpha.ICreateAudienceRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize(); + return this.innerApiCalls.createAudience(request, options, callback); + } + /** + * Updates an Audience on a property. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.analytics.admin.v1alpha.Audience} request.audience + * Required. The audience to update. + * The audience's `name` field is used to identify the audience to be updated. + * @param {google.protobuf.FieldMask} request.updateMask + * Required. The list of fields to be updated. Field names must be in snake case + * (e.g., "field_to_update"). Omitted fields will not be updated. To replace + * the entire entity, use one path with the string "*" to match all fields. + * @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 [Audience]{@link google.analytics.admin.v1alpha.Audience}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1alpha/analytics_admin_service.update_audience.js + * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_UpdateAudience_async + */ + updateAudience( + request?: protos.google.analytics.admin.v1alpha.IUpdateAudienceRequest, + options?: CallOptions + ): Promise< + [ + protos.google.analytics.admin.v1alpha.IAudience, + protos.google.analytics.admin.v1alpha.IUpdateAudienceRequest | undefined, + {} | undefined + ] + >; + updateAudience( + request: protos.google.analytics.admin.v1alpha.IUpdateAudienceRequest, + options: CallOptions, + callback: Callback< + protos.google.analytics.admin.v1alpha.IAudience, + | protos.google.analytics.admin.v1alpha.IUpdateAudienceRequest + | null + | undefined, + {} | null | undefined + > + ): void; + updateAudience( + request: protos.google.analytics.admin.v1alpha.IUpdateAudienceRequest, + callback: Callback< + protos.google.analytics.admin.v1alpha.IAudience, + | protos.google.analytics.admin.v1alpha.IUpdateAudienceRequest + | null + | undefined, + {} | null | undefined + > + ): void; + updateAudience( + request?: protos.google.analytics.admin.v1alpha.IUpdateAudienceRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.analytics.admin.v1alpha.IAudience, + | protos.google.analytics.admin.v1alpha.IUpdateAudienceRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.analytics.admin.v1alpha.IAudience, + | protos.google.analytics.admin.v1alpha.IUpdateAudienceRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.analytics.admin.v1alpha.IAudience, + protos.google.analytics.admin.v1alpha.IUpdateAudienceRequest | 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({ + 'audience.name': request.audience!.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.updateAudience(request, options, callback); + } + /** + * Archives an Audience on a property. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Example format: properties/1234/audiences/5678 + * @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 [Empty]{@link google.protobuf.Empty}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1alpha/analytics_admin_service.archive_audience.js + * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_ArchiveAudience_async + */ + archiveAudience( + request?: protos.google.analytics.admin.v1alpha.IArchiveAudienceRequest, + options?: CallOptions + ): Promise< + [ + protos.google.protobuf.IEmpty, + protos.google.analytics.admin.v1alpha.IArchiveAudienceRequest | undefined, + {} | undefined + ] + >; + archiveAudience( + request: protos.google.analytics.admin.v1alpha.IArchiveAudienceRequest, + options: CallOptions, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.analytics.admin.v1alpha.IArchiveAudienceRequest + | null + | undefined, + {} | null | undefined + > + ): void; + archiveAudience( + request: protos.google.analytics.admin.v1alpha.IArchiveAudienceRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.analytics.admin.v1alpha.IArchiveAudienceRequest + | null + | undefined, + {} | null | undefined + > + ): void; + archiveAudience( + request?: protos.google.analytics.admin.v1alpha.IArchiveAudienceRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.protobuf.IEmpty, + | protos.google.analytics.admin.v1alpha.IArchiveAudienceRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.IEmpty, + | protos.google.analytics.admin.v1alpha.IArchiveAudienceRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.protobuf.IEmpty, + protos.google.analytics.admin.v1alpha.IArchiveAudienceRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.archiveAudience(request, options, callback); + } + /** + * Lookup for a AttributionSettings singleton. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the attribution settings to retrieve. + * Format: properties/{property}/attributionSettings + * @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 [AttributionSettings]{@link google.analytics.admin.v1alpha.AttributionSettings}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1alpha/analytics_admin_service.get_attribution_settings.js + * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_GetAttributionSettings_async + */ + getAttributionSettings( + request?: protos.google.analytics.admin.v1alpha.IGetAttributionSettingsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.analytics.admin.v1alpha.IAttributionSettings, + ( + | protos.google.analytics.admin.v1alpha.IGetAttributionSettingsRequest + | undefined + ), + {} | undefined + ] + >; + getAttributionSettings( + request: protos.google.analytics.admin.v1alpha.IGetAttributionSettingsRequest, + options: CallOptions, + callback: Callback< + protos.google.analytics.admin.v1alpha.IAttributionSettings, + | protos.google.analytics.admin.v1alpha.IGetAttributionSettingsRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getAttributionSettings( + request: protos.google.analytics.admin.v1alpha.IGetAttributionSettingsRequest, + callback: Callback< + protos.google.analytics.admin.v1alpha.IAttributionSettings, + | protos.google.analytics.admin.v1alpha.IGetAttributionSettingsRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getAttributionSettings( + request?: protos.google.analytics.admin.v1alpha.IGetAttributionSettingsRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.analytics.admin.v1alpha.IAttributionSettings, + | protos.google.analytics.admin.v1alpha.IGetAttributionSettingsRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.analytics.admin.v1alpha.IAttributionSettings, + | protos.google.analytics.admin.v1alpha.IGetAttributionSettingsRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.analytics.admin.v1alpha.IAttributionSettings, + ( + | protos.google.analytics.admin.v1alpha.IGetAttributionSettingsRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.getAttributionSettings( + request, + options, + callback + ); + } + /** + * Updates attribution settings on a property. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.analytics.admin.v1alpha.AttributionSettings} request.attributionSettings + * Required. The attribution settings to update. + * The `name` field is used to identify the settings to be updated. + * @param {google.protobuf.FieldMask} request.updateMask + * Required. The list of fields to be updated. Field names must be in snake case + * (e.g., "field_to_update"). Omitted fields will not be updated. To replace + * the entire entity, use one path with the string "*" to match all fields. + * @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 [AttributionSettings]{@link google.analytics.admin.v1alpha.AttributionSettings}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1alpha/analytics_admin_service.update_attribution_settings.js + * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_UpdateAttributionSettings_async + */ + updateAttributionSettings( + request?: protos.google.analytics.admin.v1alpha.IUpdateAttributionSettingsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.analytics.admin.v1alpha.IAttributionSettings, + ( + | protos.google.analytics.admin.v1alpha.IUpdateAttributionSettingsRequest + | undefined + ), + {} | undefined + ] + >; + updateAttributionSettings( + request: protos.google.analytics.admin.v1alpha.IUpdateAttributionSettingsRequest, + options: CallOptions, + callback: Callback< + protos.google.analytics.admin.v1alpha.IAttributionSettings, + | protos.google.analytics.admin.v1alpha.IUpdateAttributionSettingsRequest + | null + | undefined, + {} | null | undefined + > + ): void; + updateAttributionSettings( + request: protos.google.analytics.admin.v1alpha.IUpdateAttributionSettingsRequest, + callback: Callback< + protos.google.analytics.admin.v1alpha.IAttributionSettings, + | protos.google.analytics.admin.v1alpha.IUpdateAttributionSettingsRequest + | null + | undefined, + {} | null | undefined + > + ): void; + updateAttributionSettings( + request?: protos.google.analytics.admin.v1alpha.IUpdateAttributionSettingsRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.analytics.admin.v1alpha.IAttributionSettings, + | protos.google.analytics.admin.v1alpha.IUpdateAttributionSettingsRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.analytics.admin.v1alpha.IAttributionSettings, + | protos.google.analytics.admin.v1alpha.IUpdateAttributionSettingsRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.analytics.admin.v1alpha.IAttributionSettings, + ( + | protos.google.analytics.admin.v1alpha.IUpdateAttributionSettingsRequest + | 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({ + 'attribution_settings.name': request.attributionSettings!.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.updateAttributionSettings( + request, + options, + callback + ); + } + /** + * Returns a customized report of data access records. The report provides + * records of each time a user reads Google Analytics reporting data. Access + * records are retained for up to 2 years. + * + * Data Access Reports can be requested for a property. The property must be + * in Google Analytics 360. This method is only available to Administrators. + * + * These data access records include GA4 UI Reporting, GA4 UI Explorations, + * GA4 Data API, and other products like Firebase & Admob that can retrieve + * data from Google Analytics through a linkage. These records don't include + * property configuration changes like adding a stream or changing a + * property's time zone. For configuration change history, see + * [searchChangeHistoryEvents](https://developers.google.com/analytics/devguides/config/admin/v1/rest/v1alpha/accounts/searchChangeHistoryEvents). + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.entity + * The Data Access Report is requested for this property. + * For example if "123" is your GA4 property ID, then entity should be + * "properties/123". + * @param {number[]} request.dimensions + * The dimensions requested and displayed in the response. Requests are + * allowed up to 9 dimensions. + * @param {number[]} request.metrics + * The metrics requested and displayed in the response. Requests are allowed + * up to 10 metrics. + * @param {number[]} request.dateRanges + * Date ranges of access records to read. If multiple date ranges are + * requested, each response row will contain a zero based date range index. If + * two date ranges overlap, the access records for the overlapping days is + * included in the response rows for both date ranges. Requests are allowed up + * to 2 date ranges. + * @param {google.analytics.admin.v1alpha.AccessFilterExpression} request.dimensionFilter + * Dimension filters allow you to restrict report response to specific + * dimension values which match the filter. For example, filtering on access + * records of a single user. To learn more, see [Fundamentals of Dimension + * Filters](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#dimension_filters) + * for examples. Metrics cannot be used in this filter. + * @param {google.analytics.admin.v1alpha.AccessFilterExpression} request.metricFilter + * Metric filters allow you to restrict report response to specific metric + * values which match the filter. Metric filters are applied after aggregating + * the report's rows, similar to SQL having-clause. Dimensions cannot be used + * in this filter. + * @param {number} request.offset + * The row count of the start row. The first row is counted as row 0. If + * offset is unspecified, it is treated as 0. If offset is zero, then this + * method will return the first page of results with `limit` entries. + * + * To learn more about this pagination parameter, see + * [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). + * @param {number} request.limit + * The number of rows to return. If unspecified, 10,000 rows are returned. The + * API returns a maximum of 100,000 rows per request, no matter how many you + * ask for. `limit` must be positive. + * + * The API may return fewer rows than the requested `limit`, if there aren't + * as many remaining rows as the `limit`. For instance, there are fewer than + * 300 possible values for the dimension `country`, so when reporting on only + * `country`, you can't get more than 300 rows, even if you set `limit` to a + * higher value. + * + * To learn more about this pagination parameter, see + * [Pagination](https://developers.google.com/analytics/devguides/reporting/data/v1/basics#pagination). + * @param {string} request.timeZone + * This request's time zone if specified. If unspecified, the property's time + * zone is used. The request's time zone is used to interpret the start & end + * dates of the report. + * + * Formatted as strings from the IANA Time Zone database + * (https://www.iana.org/time-zones); for example "America/New_York" or + * "Asia/Tokyo". + * @param {number[]} request.orderBys + * Specifies how rows are ordered in the response. + * @param {boolean} request.returnEntityQuota + * Toggles whether to return the current state of this Analytics Property's + * quota. Quota is returned in [AccessQuota](#AccessQuota). + * @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 [RunAccessReportResponse]{@link google.analytics.admin.v1alpha.RunAccessReportResponse}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1alpha/analytics_admin_service.run_access_report.js + * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_RunAccessReport_async + */ + runAccessReport( + request?: protos.google.analytics.admin.v1alpha.IRunAccessReportRequest, + options?: CallOptions + ): Promise< + [ + protos.google.analytics.admin.v1alpha.IRunAccessReportResponse, + protos.google.analytics.admin.v1alpha.IRunAccessReportRequest | undefined, + {} | undefined + ] + >; + runAccessReport( + request: protos.google.analytics.admin.v1alpha.IRunAccessReportRequest, + options: CallOptions, + callback: Callback< + protos.google.analytics.admin.v1alpha.IRunAccessReportResponse, + | protos.google.analytics.admin.v1alpha.IRunAccessReportRequest + | null + | undefined, + {} | null | undefined + > + ): void; + runAccessReport( + request: protos.google.analytics.admin.v1alpha.IRunAccessReportRequest, + callback: Callback< + protos.google.analytics.admin.v1alpha.IRunAccessReportResponse, + | protos.google.analytics.admin.v1alpha.IRunAccessReportRequest + | null + | undefined, + {} | null | undefined + > + ): void; + runAccessReport( + request?: protos.google.analytics.admin.v1alpha.IRunAccessReportRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.analytics.admin.v1alpha.IRunAccessReportResponse, + | protos.google.analytics.admin.v1alpha.IRunAccessReportRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.analytics.admin.v1alpha.IRunAccessReportResponse, + | protos.google.analytics.admin.v1alpha.IRunAccessReportRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.analytics.admin.v1alpha.IRunAccessReportResponse, + protos.google.analytics.admin.v1alpha.IRunAccessReportRequest | 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({ + entity: request.entity ?? '', + }); + this.initialize(); + return this.innerApiCalls.runAccessReport(request, options, callback); + } + + /** + * Returns all accounts accessible by the caller. + * + * Note that these accounts might not currently have GA4 properties. + * Soft-deleted (ie: "trashed") accounts are excluded by default. + * Returns an empty list if no relevant accounts are found. + * + * @param {Object} request + * The request object that will be sent. + * @param {number} request.pageSize + * The maximum number of resources to return. The service may return + * fewer than this value, even if there are additional pages. + * If unspecified, at most 50 resources will be returned. + * The maximum value is 200; (higher values will be coerced to the maximum) + * @param {string} request.pageToken + * A page token, received from a previous `ListAccounts` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListAccounts` must + * match the call that provided the page token. + * @param {boolean} request.showDeleted + * Whether to include soft-deleted (ie: "trashed") Accounts in the + * results. Accounts can be inspected to determine whether they are deleted or + * not. + * @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 [Account]{@link google.analytics.admin.v1alpha.Account}. + * 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 `listAccountsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listAccounts( + request?: protos.google.analytics.admin.v1alpha.IListAccountsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.analytics.admin.v1alpha.IAccount[], + protos.google.analytics.admin.v1alpha.IListAccountsRequest | null, + protos.google.analytics.admin.v1alpha.IListAccountsResponse + ] + >; + listAccounts( + request: protos.google.analytics.admin.v1alpha.IListAccountsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.analytics.admin.v1alpha.IListAccountsRequest, + | protos.google.analytics.admin.v1alpha.IListAccountsResponse + | null + | undefined, + protos.google.analytics.admin.v1alpha.IAccount + > + ): void; + listAccounts( + request: protos.google.analytics.admin.v1alpha.IListAccountsRequest, + callback: PaginationCallback< + protos.google.analytics.admin.v1alpha.IListAccountsRequest, + | protos.google.analytics.admin.v1alpha.IListAccountsResponse + | null + | undefined, + protos.google.analytics.admin.v1alpha.IAccount + > + ): void; + listAccounts( + request?: protos.google.analytics.admin.v1alpha.IListAccountsRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.analytics.admin.v1alpha.IListAccountsRequest, + | protos.google.analytics.admin.v1alpha.IListAccountsResponse + | null + | undefined, + protos.google.analytics.admin.v1alpha.IAccount + >, + callback?: PaginationCallback< + protos.google.analytics.admin.v1alpha.IListAccountsRequest, + | protos.google.analytics.admin.v1alpha.IListAccountsResponse + | null + | undefined, + protos.google.analytics.admin.v1alpha.IAccount + > + ): Promise< + [ + protos.google.analytics.admin.v1alpha.IAccount[], + protos.google.analytics.admin.v1alpha.IListAccountsRequest | null, + protos.google.analytics.admin.v1alpha.IListAccountsResponse + ] + > | 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(); + return this.innerApiCalls.listAccounts(request, options, callback); + } + + /** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {number} request.pageSize + * The maximum number of resources to return. The service may return + * fewer than this value, even if there are additional pages. + * If unspecified, at most 50 resources will be returned. + * The maximum value is 200; (higher values will be coerced to the maximum) + * @param {string} request.pageToken + * A page token, received from a previous `ListAccounts` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListAccounts` must + * match the call that provided the page token. + * @param {boolean} request.showDeleted + * Whether to include soft-deleted (ie: "trashed") Accounts in the + * results. Accounts can be inspected to determine whether they are deleted or + * not. + * @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 [Account]{@link google.analytics.admin.v1alpha.Account} 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 `listAccountsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listAccountsStream( + request?: protos.google.analytics.admin.v1alpha.IListAccountsRequest, + options?: CallOptions + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + const defaultCallSettings = this._defaults['listAccounts']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listAccounts.createStream( + this.innerApiCalls.listAccounts as GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listAccounts`, 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 {number} request.pageSize + * The maximum number of resources to return. The service may return + * fewer than this value, even if there are additional pages. + * If unspecified, at most 50 resources will be returned. + * The maximum value is 200; (higher values will be coerced to the maximum) + * @param {string} request.pageToken + * A page token, received from a previous `ListAccounts` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListAccounts` must + * match the call that provided the page token. + * @param {boolean} request.showDeleted + * Whether to include soft-deleted (ie: "trashed") Accounts in the + * results. Accounts can be inspected to determine whether they are deleted or + * not. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * [Account]{@link google.analytics.admin.v1alpha.Account}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + * @example include:samples/generated/v1alpha/analytics_admin_service.list_accounts.js + * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListAccounts_async + */ + listAccountsAsync( + request?: protos.google.analytics.admin.v1alpha.IListAccountsRequest, + options?: CallOptions + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + const defaultCallSettings = this._defaults['listAccounts']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listAccounts.asyncIterate( + this.innerApiCalls['listAccounts'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Returns summaries of all accounts accessible by the caller. + * + * @param {Object} request + * The request object that will be sent. + * @param {number} request.pageSize + * The maximum number of AccountSummary resources to return. The service may + * return fewer than this value, even if there are additional pages. + * If unspecified, at most 50 resources will be returned. + * The maximum value is 200; (higher values will be coerced to the maximum) + * @param {string} request.pageToken + * A page token, received from a previous `ListAccountSummaries` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListAccountSummaries` + * 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 [AccountSummary]{@link google.analytics.admin.v1alpha.AccountSummary}. + * 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 `listAccountSummariesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listAccountSummaries( + request?: protos.google.analytics.admin.v1alpha.IListAccountSummariesRequest, + options?: CallOptions + ): Promise< + [ + protos.google.analytics.admin.v1alpha.IAccountSummary[], + protos.google.analytics.admin.v1alpha.IListAccountSummariesRequest | null, + protos.google.analytics.admin.v1alpha.IListAccountSummariesResponse + ] + >; + listAccountSummaries( + request: protos.google.analytics.admin.v1alpha.IListAccountSummariesRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.analytics.admin.v1alpha.IListAccountSummariesRequest, + | protos.google.analytics.admin.v1alpha.IListAccountSummariesResponse + | null + | undefined, + protos.google.analytics.admin.v1alpha.IAccountSummary + > + ): void; + listAccountSummaries( + request: protos.google.analytics.admin.v1alpha.IListAccountSummariesRequest, + callback: PaginationCallback< + protos.google.analytics.admin.v1alpha.IListAccountSummariesRequest, + | protos.google.analytics.admin.v1alpha.IListAccountSummariesResponse + | null + | undefined, + protos.google.analytics.admin.v1alpha.IAccountSummary + > + ): void; + listAccountSummaries( + request?: protos.google.analytics.admin.v1alpha.IListAccountSummariesRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.analytics.admin.v1alpha.IListAccountSummariesRequest, + | protos.google.analytics.admin.v1alpha.IListAccountSummariesResponse + | null + | undefined, + protos.google.analytics.admin.v1alpha.IAccountSummary + >, + callback?: PaginationCallback< + protos.google.analytics.admin.v1alpha.IListAccountSummariesRequest, + | protos.google.analytics.admin.v1alpha.IListAccountSummariesResponse + | null + | undefined, + protos.google.analytics.admin.v1alpha.IAccountSummary + > + ): Promise< + [ + protos.google.analytics.admin.v1alpha.IAccountSummary[], + protos.google.analytics.admin.v1alpha.IListAccountSummariesRequest | null, + protos.google.analytics.admin.v1alpha.IListAccountSummariesResponse + ] + > | 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(); + return this.innerApiCalls.listAccountSummaries(request, options, callback); + } + + /** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {number} request.pageSize + * The maximum number of AccountSummary resources to return. The service may + * return fewer than this value, even if there are additional pages. + * If unspecified, at most 50 resources will be returned. + * The maximum value is 200; (higher values will be coerced to the maximum) + * @param {string} request.pageToken + * A page token, received from a previous `ListAccountSummaries` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListAccountSummaries` + * 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 [AccountSummary]{@link google.analytics.admin.v1alpha.AccountSummary} 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 `listAccountSummariesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listAccountSummariesStream( + request?: protos.google.analytics.admin.v1alpha.IListAccountSummariesRequest, + options?: CallOptions + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + const defaultCallSettings = this._defaults['listAccountSummaries']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listAccountSummaries.createStream( + this.innerApiCalls.listAccountSummaries as GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listAccountSummaries`, 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 {number} request.pageSize + * The maximum number of AccountSummary resources to return. The service may + * return fewer than this value, even if there are additional pages. + * If unspecified, at most 50 resources will be returned. + * The maximum value is 200; (higher values will be coerced to the maximum) + * @param {string} request.pageToken + * A page token, received from a previous `ListAccountSummaries` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListAccountSummaries` + * 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 [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * [AccountSummary]{@link google.analytics.admin.v1alpha.AccountSummary}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + * @example include:samples/generated/v1alpha/analytics_admin_service.list_account_summaries.js + * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListAccountSummaries_async + */ + listAccountSummariesAsync( + request?: protos.google.analytics.admin.v1alpha.IListAccountSummariesRequest, + options?: CallOptions + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + const defaultCallSettings = this._defaults['listAccountSummaries']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listAccountSummaries.asyncIterate( + this.innerApiCalls['listAccountSummaries'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Returns child Properties under the specified parent Account. + * + * Only "GA4" properties will be returned. + * Properties will be excluded if the caller does not have access. + * Soft-deleted (ie: "trashed") properties are excluded by default. + * Returns an empty list if no relevant properties are found. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.filter + * Required. An expression for filtering the results of the request. + * Fields eligible for filtering are: + * `parent:`(The resource name of the parent account/property) or + * `ancestor:`(The resource name of the parent account) or + * `firebase_project:`(The id or number of the linked firebase project). + * Some examples of filters: + * + * ``` + * | Filter | Description | + * |-----------------------------|-------------------------------------------| + * | parent:accounts/123 | The account with account id: 123. | + * | parent:properties/123 | The property with property id: 123. | + * | ancestor:accounts/123 | The account with account id: 123. | + * | firebase_project:project-id | The firebase project with id: project-id. | + * | firebase_project:123 | The firebase project with number: 123. | + * ``` + * @param {number} request.pageSize + * The maximum number of resources to return. The service may return + * fewer than this value, even if there are additional pages. + * If unspecified, at most 50 resources will be returned. + * The maximum value is 200; (higher values will be coerced to the maximum) + * @param {string} request.pageToken + * A page token, received from a previous `ListProperties` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListProperties` must + * match the call that provided the page token. + * @param {boolean} request.showDeleted + * Whether to include soft-deleted (ie: "trashed") Properties in the + * results. Properties can be inspected to determine whether they are deleted + * or not. + * @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 [Property]{@link google.analytics.admin.v1alpha.Property}. + * 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 `listPropertiesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listProperties( + request?: protos.google.analytics.admin.v1alpha.IListPropertiesRequest, + options?: CallOptions + ): Promise< + [ + protos.google.analytics.admin.v1alpha.IProperty[], + protos.google.analytics.admin.v1alpha.IListPropertiesRequest | null, + protos.google.analytics.admin.v1alpha.IListPropertiesResponse + ] + >; + listProperties( + request: protos.google.analytics.admin.v1alpha.IListPropertiesRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.analytics.admin.v1alpha.IListPropertiesRequest, + | protos.google.analytics.admin.v1alpha.IListPropertiesResponse + | null + | undefined, + protos.google.analytics.admin.v1alpha.IProperty + > + ): void; + listProperties( + request: protos.google.analytics.admin.v1alpha.IListPropertiesRequest, + callback: PaginationCallback< + protos.google.analytics.admin.v1alpha.IListPropertiesRequest, + | protos.google.analytics.admin.v1alpha.IListPropertiesResponse + | null + | undefined, + protos.google.analytics.admin.v1alpha.IProperty + > + ): void; + listProperties( + request?: protos.google.analytics.admin.v1alpha.IListPropertiesRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.analytics.admin.v1alpha.IListPropertiesRequest, + | protos.google.analytics.admin.v1alpha.IListPropertiesResponse + | null + | undefined, + protos.google.analytics.admin.v1alpha.IProperty + >, + callback?: PaginationCallback< + protos.google.analytics.admin.v1alpha.IListPropertiesRequest, + | protos.google.analytics.admin.v1alpha.IListPropertiesResponse + | null + | undefined, + protos.google.analytics.admin.v1alpha.IProperty + > + ): Promise< + [ + protos.google.analytics.admin.v1alpha.IProperty[], + protos.google.analytics.admin.v1alpha.IListPropertiesRequest | null, + protos.google.analytics.admin.v1alpha.IListPropertiesResponse + ] + > | 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(); + return this.innerApiCalls.listProperties(request, options, callback); + } + + /** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.filter + * Required. An expression for filtering the results of the request. + * Fields eligible for filtering are: + * `parent:`(The resource name of the parent account/property) or + * `ancestor:`(The resource name of the parent account) or + * `firebase_project:`(The id or number of the linked firebase project). + * Some examples of filters: + * + * ``` + * | Filter | Description | + * |-----------------------------|-------------------------------------------| + * | parent:accounts/123 | The account with account id: 123. | + * | parent:properties/123 | The property with property id: 123. | + * | ancestor:accounts/123 | The account with account id: 123. | + * | firebase_project:project-id | The firebase project with id: project-id. | + * | firebase_project:123 | The firebase project with number: 123. | + * ``` + * @param {number} request.pageSize + * The maximum number of resources to return. The service may return + * fewer than this value, even if there are additional pages. + * If unspecified, at most 50 resources will be returned. + * The maximum value is 200; (higher values will be coerced to the maximum) + * @param {string} request.pageToken + * A page token, received from a previous `ListProperties` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListProperties` must + * match the call that provided the page token. + * @param {boolean} request.showDeleted + * Whether to include soft-deleted (ie: "trashed") Properties in the + * results. Properties can be inspected to determine whether they are deleted + * or not. + * @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 [Property]{@link google.analytics.admin.v1alpha.Property} 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 `listPropertiesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listPropertiesStream( + request?: protos.google.analytics.admin.v1alpha.IListPropertiesRequest, + options?: CallOptions + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + const defaultCallSettings = this._defaults['listProperties']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listProperties.createStream( + this.innerApiCalls.listProperties as GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listProperties`, 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.filter + * Required. An expression for filtering the results of the request. + * Fields eligible for filtering are: + * `parent:`(The resource name of the parent account/property) or + * `ancestor:`(The resource name of the parent account) or + * `firebase_project:`(The id or number of the linked firebase project). + * Some examples of filters: + * + * ``` + * | Filter | Description | + * |-----------------------------|-------------------------------------------| + * | parent:accounts/123 | The account with account id: 123. | + * | parent:properties/123 | The property with property id: 123. | + * | ancestor:accounts/123 | The account with account id: 123. | + * | firebase_project:project-id | The firebase project with id: project-id. | + * | firebase_project:123 | The firebase project with number: 123. | + * ``` + * @param {number} request.pageSize + * The maximum number of resources to return. The service may return + * fewer than this value, even if there are additional pages. + * If unspecified, at most 50 resources will be returned. + * The maximum value is 200; (higher values will be coerced to the maximum) + * @param {string} request.pageToken + * A page token, received from a previous `ListProperties` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListProperties` must + * match the call that provided the page token. + * @param {boolean} request.showDeleted + * Whether to include soft-deleted (ie: "trashed") Properties in the + * results. Properties can be inspected to determine whether they are deleted + * or not. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * [Property]{@link google.analytics.admin.v1alpha.Property}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + * @example include:samples/generated/v1alpha/analytics_admin_service.list_properties.js + * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListProperties_async + */ + listPropertiesAsync( + request?: protos.google.analytics.admin.v1alpha.IListPropertiesRequest, + options?: CallOptions + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + const defaultCallSettings = this._defaults['listProperties']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listProperties.asyncIterate( + this.innerApiCalls['listProperties'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Lists all user links on an account or property. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Example format: accounts/1234 + * @param {number} request.pageSize + * The maximum number of user links to return. + * The service may return fewer than this value. + * If unspecified, at most 200 user links will be returned. + * The maximum value is 500; values above 500 will be coerced to 500. + * @param {string} request.pageToken + * A page token, received from a previous `ListUserLinks` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListUserLinks` 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 [UserLink]{@link google.analytics.admin.v1alpha.UserLink}. + * 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 `listUserLinksAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listUserLinks( + request?: protos.google.analytics.admin.v1alpha.IListUserLinksRequest, + options?: CallOptions + ): Promise< + [ + protos.google.analytics.admin.v1alpha.IUserLink[], + protos.google.analytics.admin.v1alpha.IListUserLinksRequest | null, + protos.google.analytics.admin.v1alpha.IListUserLinksResponse + ] + >; + listUserLinks( + request: protos.google.analytics.admin.v1alpha.IListUserLinksRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.analytics.admin.v1alpha.IListUserLinksRequest, + | protos.google.analytics.admin.v1alpha.IListUserLinksResponse + | null + | undefined, + protos.google.analytics.admin.v1alpha.IUserLink + > + ): void; + listUserLinks( + request: protos.google.analytics.admin.v1alpha.IListUserLinksRequest, + callback: PaginationCallback< + protos.google.analytics.admin.v1alpha.IListUserLinksRequest, + | protos.google.analytics.admin.v1alpha.IListUserLinksResponse + | null + | undefined, + protos.google.analytics.admin.v1alpha.IUserLink + > + ): void; + listUserLinks( + request?: protos.google.analytics.admin.v1alpha.IListUserLinksRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.analytics.admin.v1alpha.IListUserLinksRequest, + | protos.google.analytics.admin.v1alpha.IListUserLinksResponse + | null + | undefined, + protos.google.analytics.admin.v1alpha.IUserLink + >, + callback?: PaginationCallback< + protos.google.analytics.admin.v1alpha.IListUserLinksRequest, + | protos.google.analytics.admin.v1alpha.IListUserLinksResponse + | null + | undefined, + protos.google.analytics.admin.v1alpha.IUserLink + > + ): Promise< + [ + protos.google.analytics.admin.v1alpha.IUserLink[], + protos.google.analytics.admin.v1alpha.IListUserLinksRequest | null, + protos.google.analytics.admin.v1alpha.IListUserLinksResponse + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize(); + return this.innerApiCalls.listUserLinks(request, options, callback); + } + + /** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Example format: accounts/1234 + * @param {number} request.pageSize + * The maximum number of user links to return. + * The service may return fewer than this value. + * If unspecified, at most 200 user links will be returned. + * The maximum value is 500; values above 500 will be coerced to 500. + * @param {string} request.pageToken + * A page token, received from a previous `ListUserLinks` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListUserLinks` 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 [UserLink]{@link google.analytics.admin.v1alpha.UserLink} 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 `listUserLinksAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listUserLinksStream( + request?: protos.google.analytics.admin.v1alpha.IListUserLinksRequest, + 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['listUserLinks']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listUserLinks.createStream( + this.innerApiCalls.listUserLinks as GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listUserLinks`, 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. Example format: accounts/1234 + * @param {number} request.pageSize + * The maximum number of user links to return. + * The service may return fewer than this value. + * If unspecified, at most 200 user links will be returned. + * The maximum value is 500; values above 500 will be coerced to 500. + * @param {string} request.pageToken + * A page token, received from a previous `ListUserLinks` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListUserLinks` 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 [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * [UserLink]{@link google.analytics.admin.v1alpha.UserLink}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + * @example include:samples/generated/v1alpha/analytics_admin_service.list_user_links.js + * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListUserLinks_async + */ + listUserLinksAsync( + request?: protos.google.analytics.admin.v1alpha.IListUserLinksRequest, + 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['listUserLinks']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listUserLinks.asyncIterate( + this.innerApiCalls['listUserLinks'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Lists all user links on an account or property, including implicit ones + * that come from effective permissions granted by groups or organization + * admin roles. + * + * If a returned user link does not have direct permissions, they cannot + * be removed from the account or property directly with the DeleteUserLink + * command. They have to be removed from the group/etc that gives them + * permissions, which is currently only usable/discoverable in the GA or GMP + * UIs. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Example format: accounts/1234 + * @param {number} request.pageSize + * The maximum number of user links to return. + * The service may return fewer than this value. + * If unspecified, at most 1000 user links will be returned. + * The maximum value is 5000; values above 5000 will be coerced to 5000. + * @param {string} request.pageToken + * A page token, received from a previous `AuditUserLinks` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `AuditUserLinks` 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 [AuditUserLink]{@link google.analytics.admin.v1alpha.AuditUserLink}. + * 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 `auditUserLinksAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + auditUserLinks( + request?: protos.google.analytics.admin.v1alpha.IAuditUserLinksRequest, + options?: CallOptions + ): Promise< + [ + protos.google.analytics.admin.v1alpha.IAuditUserLink[], + protos.google.analytics.admin.v1alpha.IAuditUserLinksRequest | null, + protos.google.analytics.admin.v1alpha.IAuditUserLinksResponse + ] + >; + auditUserLinks( + request: protos.google.analytics.admin.v1alpha.IAuditUserLinksRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.analytics.admin.v1alpha.IAuditUserLinksRequest, + | protos.google.analytics.admin.v1alpha.IAuditUserLinksResponse + | null + | undefined, + protos.google.analytics.admin.v1alpha.IAuditUserLink + > + ): void; + auditUserLinks( + request: protos.google.analytics.admin.v1alpha.IAuditUserLinksRequest, + callback: PaginationCallback< + protos.google.analytics.admin.v1alpha.IAuditUserLinksRequest, + | protos.google.analytics.admin.v1alpha.IAuditUserLinksResponse + | null + | undefined, + protos.google.analytics.admin.v1alpha.IAuditUserLink + > + ): void; + auditUserLinks( + request?: protos.google.analytics.admin.v1alpha.IAuditUserLinksRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.analytics.admin.v1alpha.IAuditUserLinksRequest, + | protos.google.analytics.admin.v1alpha.IAuditUserLinksResponse + | null + | undefined, + protos.google.analytics.admin.v1alpha.IAuditUserLink + >, + callback?: PaginationCallback< + protos.google.analytics.admin.v1alpha.IAuditUserLinksRequest, + | protos.google.analytics.admin.v1alpha.IAuditUserLinksResponse + | null + | undefined, + protos.google.analytics.admin.v1alpha.IAuditUserLink + > + ): Promise< + [ + protos.google.analytics.admin.v1alpha.IAuditUserLink[], + protos.google.analytics.admin.v1alpha.IAuditUserLinksRequest | null, + protos.google.analytics.admin.v1alpha.IAuditUserLinksResponse + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize(); + return this.innerApiCalls.auditUserLinks(request, options, callback); + } + + /** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Example format: accounts/1234 + * @param {number} request.pageSize + * The maximum number of user links to return. + * The service may return fewer than this value. + * If unspecified, at most 1000 user links will be returned. + * The maximum value is 5000; values above 5000 will be coerced to 5000. + * @param {string} request.pageToken + * A page token, received from a previous `AuditUserLinks` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `AuditUserLinks` 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 [AuditUserLink]{@link google.analytics.admin.v1alpha.AuditUserLink} 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 `auditUserLinksAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + auditUserLinksStream( + request?: protos.google.analytics.admin.v1alpha.IAuditUserLinksRequest, + 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['auditUserLinks']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.auditUserLinks.createStream( + this.innerApiCalls.auditUserLinks as GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `auditUserLinks`, 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. Example format: accounts/1234 + * @param {number} request.pageSize + * The maximum number of user links to return. + * The service may return fewer than this value. + * If unspecified, at most 1000 user links will be returned. + * The maximum value is 5000; values above 5000 will be coerced to 5000. + * @param {string} request.pageToken + * A page token, received from a previous `AuditUserLinks` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `AuditUserLinks` 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 [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * [AuditUserLink]{@link google.analytics.admin.v1alpha.AuditUserLink}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + * @example include:samples/generated/v1alpha/analytics_admin_service.audit_user_links.js + * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_AuditUserLinks_async + */ + auditUserLinksAsync( + request?: protos.google.analytics.admin.v1alpha.IAuditUserLinksRequest, + 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['auditUserLinks']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.auditUserLinks.asyncIterate( + this.innerApiCalls['auditUserLinks'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Lists FirebaseLinks on a property. + * Properties can have at most one FirebaseLink. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Format: properties/{property_id} + * Example: properties/1234 + * @param {number} request.pageSize + * The maximum number of resources to return. The service may return + * fewer than this value, even if there are additional pages. + * If unspecified, at most 50 resources will be returned. + * The maximum value is 200; (higher values will be coerced to the maximum) + * @param {string} request.pageToken + * A page token, received from a previous `ListFirebaseLinks` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListProperties` 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 [FirebaseLink]{@link google.analytics.admin.v1alpha.FirebaseLink}. + * 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 `listFirebaseLinksAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listFirebaseLinks( + request?: protos.google.analytics.admin.v1alpha.IListFirebaseLinksRequest, + options?: CallOptions + ): Promise< + [ + protos.google.analytics.admin.v1alpha.IFirebaseLink[], + protos.google.analytics.admin.v1alpha.IListFirebaseLinksRequest | null, + protos.google.analytics.admin.v1alpha.IListFirebaseLinksResponse + ] + >; + listFirebaseLinks( + request: protos.google.analytics.admin.v1alpha.IListFirebaseLinksRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.analytics.admin.v1alpha.IListFirebaseLinksRequest, + | protos.google.analytics.admin.v1alpha.IListFirebaseLinksResponse + | null + | undefined, + protos.google.analytics.admin.v1alpha.IFirebaseLink + > + ): void; + listFirebaseLinks( + request: protos.google.analytics.admin.v1alpha.IListFirebaseLinksRequest, + callback: PaginationCallback< + protos.google.analytics.admin.v1alpha.IListFirebaseLinksRequest, + | protos.google.analytics.admin.v1alpha.IListFirebaseLinksResponse + | null + | undefined, + protos.google.analytics.admin.v1alpha.IFirebaseLink + > + ): void; + listFirebaseLinks( + request?: protos.google.analytics.admin.v1alpha.IListFirebaseLinksRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.analytics.admin.v1alpha.IListFirebaseLinksRequest, + | protos.google.analytics.admin.v1alpha.IListFirebaseLinksResponse + | null + | undefined, + protos.google.analytics.admin.v1alpha.IFirebaseLink + >, + callback?: PaginationCallback< + protos.google.analytics.admin.v1alpha.IListFirebaseLinksRequest, + | protos.google.analytics.admin.v1alpha.IListFirebaseLinksResponse + | null + | undefined, + protos.google.analytics.admin.v1alpha.IFirebaseLink + > + ): Promise< + [ + protos.google.analytics.admin.v1alpha.IFirebaseLink[], + protos.google.analytics.admin.v1alpha.IListFirebaseLinksRequest | null, + protos.google.analytics.admin.v1alpha.IListFirebaseLinksResponse + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize(); + return this.innerApiCalls.listFirebaseLinks(request, options, callback); + } + + /** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Format: properties/{property_id} + * Example: properties/1234 + * @param {number} request.pageSize + * The maximum number of resources to return. The service may return + * fewer than this value, even if there are additional pages. + * If unspecified, at most 50 resources will be returned. + * The maximum value is 200; (higher values will be coerced to the maximum) + * @param {string} request.pageToken + * A page token, received from a previous `ListFirebaseLinks` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListProperties` 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 [FirebaseLink]{@link google.analytics.admin.v1alpha.FirebaseLink} 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 `listFirebaseLinksAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listFirebaseLinksStream( + request?: protos.google.analytics.admin.v1alpha.IListFirebaseLinksRequest, + 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['listFirebaseLinks']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listFirebaseLinks.createStream( + this.innerApiCalls.listFirebaseLinks as GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listFirebaseLinks`, 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. Format: properties/{property_id} + * Example: properties/1234 + * @param {number} request.pageSize + * The maximum number of resources to return. The service may return + * fewer than this value, even if there are additional pages. + * If unspecified, at most 50 resources will be returned. + * The maximum value is 200; (higher values will be coerced to the maximum) + * @param {string} request.pageToken + * A page token, received from a previous `ListFirebaseLinks` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListProperties` 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 [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * [FirebaseLink]{@link google.analytics.admin.v1alpha.FirebaseLink}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + * @example include:samples/generated/v1alpha/analytics_admin_service.list_firebase_links.js + * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListFirebaseLinks_async + */ + listFirebaseLinksAsync( + request?: protos.google.analytics.admin.v1alpha.IListFirebaseLinksRequest, + 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['listFirebaseLinks']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listFirebaseLinks.asyncIterate( + this.innerApiCalls['listFirebaseLinks'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Lists GoogleAdsLinks on a property. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Example format: properties/1234 + * @param {number} request.pageSize + * The maximum number of resources to return. + * If unspecified, at most 50 resources will be returned. + * The maximum value is 200 (higher values will be coerced to the maximum). + * @param {string} request.pageToken + * A page token, received from a previous `ListGoogleAdsLinks` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListGoogleAdsLinks` 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 [GoogleAdsLink]{@link google.analytics.admin.v1alpha.GoogleAdsLink}. + * 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 `listGoogleAdsLinksAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listGoogleAdsLinks( + request?: protos.google.analytics.admin.v1alpha.IListGoogleAdsLinksRequest, + options?: CallOptions + ): Promise< + [ + protos.google.analytics.admin.v1alpha.IGoogleAdsLink[], + protos.google.analytics.admin.v1alpha.IListGoogleAdsLinksRequest | null, + protos.google.analytics.admin.v1alpha.IListGoogleAdsLinksResponse + ] + >; + listGoogleAdsLinks( + request: protos.google.analytics.admin.v1alpha.IListGoogleAdsLinksRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.analytics.admin.v1alpha.IListGoogleAdsLinksRequest, + | protos.google.analytics.admin.v1alpha.IListGoogleAdsLinksResponse + | null + | undefined, + protos.google.analytics.admin.v1alpha.IGoogleAdsLink + > + ): void; + listGoogleAdsLinks( + request: protos.google.analytics.admin.v1alpha.IListGoogleAdsLinksRequest, + callback: PaginationCallback< + protos.google.analytics.admin.v1alpha.IListGoogleAdsLinksRequest, + | protos.google.analytics.admin.v1alpha.IListGoogleAdsLinksResponse + | null + | undefined, + protos.google.analytics.admin.v1alpha.IGoogleAdsLink + > + ): void; + listGoogleAdsLinks( + request?: protos.google.analytics.admin.v1alpha.IListGoogleAdsLinksRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.analytics.admin.v1alpha.IListGoogleAdsLinksRequest, + | protos.google.analytics.admin.v1alpha.IListGoogleAdsLinksResponse + | null + | undefined, + protos.google.analytics.admin.v1alpha.IGoogleAdsLink + >, + callback?: PaginationCallback< + protos.google.analytics.admin.v1alpha.IListGoogleAdsLinksRequest, + | protos.google.analytics.admin.v1alpha.IListGoogleAdsLinksResponse + | null + | undefined, + protos.google.analytics.admin.v1alpha.IGoogleAdsLink + > + ): Promise< + [ + protos.google.analytics.admin.v1alpha.IGoogleAdsLink[], + protos.google.analytics.admin.v1alpha.IListGoogleAdsLinksRequest | null, + protos.google.analytics.admin.v1alpha.IListGoogleAdsLinksResponse + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize(); + return this.innerApiCalls.listGoogleAdsLinks(request, options, callback); + } + + /** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Example format: properties/1234 + * @param {number} request.pageSize + * The maximum number of resources to return. + * If unspecified, at most 50 resources will be returned. + * The maximum value is 200 (higher values will be coerced to the maximum). + * @param {string} request.pageToken + * A page token, received from a previous `ListGoogleAdsLinks` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListGoogleAdsLinks` 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 [GoogleAdsLink]{@link google.analytics.admin.v1alpha.GoogleAdsLink} 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 `listGoogleAdsLinksAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listGoogleAdsLinksStream( + request?: protos.google.analytics.admin.v1alpha.IListGoogleAdsLinksRequest, + 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['listGoogleAdsLinks']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listGoogleAdsLinks.createStream( + this.innerApiCalls.listGoogleAdsLinks as GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listGoogleAdsLinks`, 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. Example format: properties/1234 + * @param {number} request.pageSize + * The maximum number of resources to return. + * If unspecified, at most 50 resources will be returned. + * The maximum value is 200 (higher values will be coerced to the maximum). + * @param {string} request.pageToken + * A page token, received from a previous `ListGoogleAdsLinks` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListGoogleAdsLinks` 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 [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * [GoogleAdsLink]{@link google.analytics.admin.v1alpha.GoogleAdsLink}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + * @example include:samples/generated/v1alpha/analytics_admin_service.list_google_ads_links.js + * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListGoogleAdsLinks_async + */ + listGoogleAdsLinksAsync( + request?: protos.google.analytics.admin.v1alpha.IListGoogleAdsLinksRequest, + 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['listGoogleAdsLinks']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listGoogleAdsLinks.asyncIterate( + this.innerApiCalls['listGoogleAdsLinks'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Returns child MeasurementProtocolSecrets under the specified parent + * Property. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource name of the parent stream. + * Format: + * properties/{property}/dataStreams/{dataStream}/measurementProtocolSecrets + * @param {number} request.pageSize + * The maximum number of resources to return. + * If unspecified, at most 10 resources will be returned. + * The maximum value is 10. Higher values will be coerced to the maximum. + * @param {string} request.pageToken + * A page token, received from a previous `ListMeasurementProtocolSecrets` + * call. Provide this to retrieve the subsequent page. When paginating, all + * other parameters provided to `ListMeasurementProtocolSecrets` 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 [MeasurementProtocolSecret]{@link google.analytics.admin.v1alpha.MeasurementProtocolSecret}. + * 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 `listMeasurementProtocolSecretsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listMeasurementProtocolSecrets( + request?: protos.google.analytics.admin.v1alpha.IListMeasurementProtocolSecretsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.analytics.admin.v1alpha.IMeasurementProtocolSecret[], + protos.google.analytics.admin.v1alpha.IListMeasurementProtocolSecretsRequest | null, + protos.google.analytics.admin.v1alpha.IListMeasurementProtocolSecretsResponse + ] + >; + listMeasurementProtocolSecrets( + request: protos.google.analytics.admin.v1alpha.IListMeasurementProtocolSecretsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.analytics.admin.v1alpha.IListMeasurementProtocolSecretsRequest, + | protos.google.analytics.admin.v1alpha.IListMeasurementProtocolSecretsResponse + | null + | undefined, + protos.google.analytics.admin.v1alpha.IMeasurementProtocolSecret + > + ): void; + listMeasurementProtocolSecrets( + request: protos.google.analytics.admin.v1alpha.IListMeasurementProtocolSecretsRequest, + callback: PaginationCallback< + protos.google.analytics.admin.v1alpha.IListMeasurementProtocolSecretsRequest, + | protos.google.analytics.admin.v1alpha.IListMeasurementProtocolSecretsResponse + | null + | undefined, + protos.google.analytics.admin.v1alpha.IMeasurementProtocolSecret + > + ): void; + listMeasurementProtocolSecrets( + request?: protos.google.analytics.admin.v1alpha.IListMeasurementProtocolSecretsRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.analytics.admin.v1alpha.IListMeasurementProtocolSecretsRequest, + | protos.google.analytics.admin.v1alpha.IListMeasurementProtocolSecretsResponse + | null + | undefined, + protos.google.analytics.admin.v1alpha.IMeasurementProtocolSecret + >, + callback?: PaginationCallback< + protos.google.analytics.admin.v1alpha.IListMeasurementProtocolSecretsRequest, + | protos.google.analytics.admin.v1alpha.IListMeasurementProtocolSecretsResponse + | null + | undefined, + protos.google.analytics.admin.v1alpha.IMeasurementProtocolSecret + > + ): Promise< + [ + protos.google.analytics.admin.v1alpha.IMeasurementProtocolSecret[], + protos.google.analytics.admin.v1alpha.IListMeasurementProtocolSecretsRequest | null, + protos.google.analytics.admin.v1alpha.IListMeasurementProtocolSecretsResponse + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize(); + return this.innerApiCalls.listMeasurementProtocolSecrets( + request, + options, + callback + ); + } + + /** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource name of the parent stream. + * Format: + * properties/{property}/dataStreams/{dataStream}/measurementProtocolSecrets + * @param {number} request.pageSize + * The maximum number of resources to return. + * If unspecified, at most 10 resources will be returned. + * The maximum value is 10. Higher values will be coerced to the maximum. + * @param {string} request.pageToken + * A page token, received from a previous `ListMeasurementProtocolSecrets` + * call. Provide this to retrieve the subsequent page. When paginating, all + * other parameters provided to `ListMeasurementProtocolSecrets` 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 [MeasurementProtocolSecret]{@link google.analytics.admin.v1alpha.MeasurementProtocolSecret} 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 `listMeasurementProtocolSecretsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listMeasurementProtocolSecretsStream( + request?: protos.google.analytics.admin.v1alpha.IListMeasurementProtocolSecretsRequest, + 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['listMeasurementProtocolSecrets']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listMeasurementProtocolSecrets.createStream( + this.innerApiCalls.listMeasurementProtocolSecrets as GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listMeasurementProtocolSecrets`, 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 resource name of the parent stream. + * Format: + * properties/{property}/dataStreams/{dataStream}/measurementProtocolSecrets + * @param {number} request.pageSize + * The maximum number of resources to return. + * If unspecified, at most 10 resources will be returned. + * The maximum value is 10. Higher values will be coerced to the maximum. + * @param {string} request.pageToken + * A page token, received from a previous `ListMeasurementProtocolSecrets` + * call. Provide this to retrieve the subsequent page. When paginating, all + * other parameters provided to `ListMeasurementProtocolSecrets` 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 [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * [MeasurementProtocolSecret]{@link google.analytics.admin.v1alpha.MeasurementProtocolSecret}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + * @example include:samples/generated/v1alpha/analytics_admin_service.list_measurement_protocol_secrets.js + * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListMeasurementProtocolSecrets_async + */ + listMeasurementProtocolSecretsAsync( + request?: protos.google.analytics.admin.v1alpha.IListMeasurementProtocolSecretsRequest, + 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['listMeasurementProtocolSecrets']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listMeasurementProtocolSecrets.asyncIterate( + this.innerApiCalls['listMeasurementProtocolSecrets'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Searches through all changes to an account or its children given the + * specified set of filters. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.account + * Required. The account resource for which to return change history resources. + * @param {string} [request.property] + * Optional. Resource name for a child property. If set, only return changes + * made to this property or its child resources. + * @param {number[]} [request.resourceType] + * Optional. If set, only return changes if they are for a resource that matches at + * least one of these types. + * @param {number[]} [request.action] + * Optional. If set, only return changes that match one or more of these types of + * actions. + * @param {string[]} [request.actorEmail] + * Optional. If set, only return changes if they are made by a user in this list. + * @param {google.protobuf.Timestamp} [request.earliestChangeTime] + * Optional. If set, only return changes made after this time (inclusive). + * @param {google.protobuf.Timestamp} [request.latestChangeTime] + * Optional. If set, only return changes made before this time (inclusive). + * @param {number} [request.pageSize] + * Optional. The maximum number of ChangeHistoryEvent items to return. + * The service may return fewer than this value, even if there are additional + * pages. If unspecified, at most 50 items will be returned. + * The maximum value is 200 (higher values will be coerced to the maximum). + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `SearchChangeHistoryEvents` call. + * Provide this to retrieve the subsequent page. When paginating, all other + * parameters provided to `SearchChangeHistoryEvents` 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 [ChangeHistoryEvent]{@link google.analytics.admin.v1alpha.ChangeHistoryEvent}. + * 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 `searchChangeHistoryEventsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + searchChangeHistoryEvents( + request?: protos.google.analytics.admin.v1alpha.ISearchChangeHistoryEventsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.analytics.admin.v1alpha.IChangeHistoryEvent[], + protos.google.analytics.admin.v1alpha.ISearchChangeHistoryEventsRequest | null, + protos.google.analytics.admin.v1alpha.ISearchChangeHistoryEventsResponse + ] + >; + searchChangeHistoryEvents( + request: protos.google.analytics.admin.v1alpha.ISearchChangeHistoryEventsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.analytics.admin.v1alpha.ISearchChangeHistoryEventsRequest, + | protos.google.analytics.admin.v1alpha.ISearchChangeHistoryEventsResponse + | null + | undefined, + protos.google.analytics.admin.v1alpha.IChangeHistoryEvent + > + ): void; + searchChangeHistoryEvents( + request: protos.google.analytics.admin.v1alpha.ISearchChangeHistoryEventsRequest, + callback: PaginationCallback< + protos.google.analytics.admin.v1alpha.ISearchChangeHistoryEventsRequest, + | protos.google.analytics.admin.v1alpha.ISearchChangeHistoryEventsResponse + | null + | undefined, + protos.google.analytics.admin.v1alpha.IChangeHistoryEvent + > + ): void; + searchChangeHistoryEvents( + request?: protos.google.analytics.admin.v1alpha.ISearchChangeHistoryEventsRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.analytics.admin.v1alpha.ISearchChangeHistoryEventsRequest, + | protos.google.analytics.admin.v1alpha.ISearchChangeHistoryEventsResponse + | null + | undefined, + protos.google.analytics.admin.v1alpha.IChangeHistoryEvent + >, + callback?: PaginationCallback< + protos.google.analytics.admin.v1alpha.ISearchChangeHistoryEventsRequest, + | protos.google.analytics.admin.v1alpha.ISearchChangeHistoryEventsResponse + | null + | undefined, + protos.google.analytics.admin.v1alpha.IChangeHistoryEvent + > + ): Promise< + [ + protos.google.analytics.admin.v1alpha.IChangeHistoryEvent[], + protos.google.analytics.admin.v1alpha.ISearchChangeHistoryEventsRequest | null, + protos.google.analytics.admin.v1alpha.ISearchChangeHistoryEventsResponse + ] + > | 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({ + account: request.account ?? '', + }); + this.initialize(); + return this.innerApiCalls.searchChangeHistoryEvents( + request, + options, + callback + ); + } + + /** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.account + * Required. The account resource for which to return change history resources. + * @param {string} [request.property] + * Optional. Resource name for a child property. If set, only return changes + * made to this property or its child resources. + * @param {number[]} [request.resourceType] + * Optional. If set, only return changes if they are for a resource that matches at + * least one of these types. + * @param {number[]} [request.action] + * Optional. If set, only return changes that match one or more of these types of + * actions. + * @param {string[]} [request.actorEmail] + * Optional. If set, only return changes if they are made by a user in this list. + * @param {google.protobuf.Timestamp} [request.earliestChangeTime] + * Optional. If set, only return changes made after this time (inclusive). + * @param {google.protobuf.Timestamp} [request.latestChangeTime] + * Optional. If set, only return changes made before this time (inclusive). + * @param {number} [request.pageSize] + * Optional. The maximum number of ChangeHistoryEvent items to return. + * The service may return fewer than this value, even if there are additional + * pages. If unspecified, at most 50 items will be returned. + * The maximum value is 200 (higher values will be coerced to the maximum). + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `SearchChangeHistoryEvents` call. + * Provide this to retrieve the subsequent page. When paginating, all other + * parameters provided to `SearchChangeHistoryEvents` 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 [ChangeHistoryEvent]{@link google.analytics.admin.v1alpha.ChangeHistoryEvent} 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 `searchChangeHistoryEventsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + searchChangeHistoryEventsStream( + request?: protos.google.analytics.admin.v1alpha.ISearchChangeHistoryEventsRequest, + 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({ + account: request.account ?? '', + }); + const defaultCallSettings = this._defaults['searchChangeHistoryEvents']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.searchChangeHistoryEvents.createStream( + this.innerApiCalls.searchChangeHistoryEvents as GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `searchChangeHistoryEvents`, 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.account + * Required. The account resource for which to return change history resources. + * @param {string} [request.property] + * Optional. Resource name for a child property. If set, only return changes + * made to this property or its child resources. + * @param {number[]} [request.resourceType] + * Optional. If set, only return changes if they are for a resource that matches at + * least one of these types. + * @param {number[]} [request.action] + * Optional. If set, only return changes that match one or more of these types of + * actions. + * @param {string[]} [request.actorEmail] + * Optional. If set, only return changes if they are made by a user in this list. + * @param {google.protobuf.Timestamp} [request.earliestChangeTime] + * Optional. If set, only return changes made after this time (inclusive). + * @param {google.protobuf.Timestamp} [request.latestChangeTime] + * Optional. If set, only return changes made before this time (inclusive). + * @param {number} [request.pageSize] + * Optional. The maximum number of ChangeHistoryEvent items to return. + * The service may return fewer than this value, even if there are additional + * pages. If unspecified, at most 50 items will be returned. + * The maximum value is 200 (higher values will be coerced to the maximum). + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `SearchChangeHistoryEvents` call. + * Provide this to retrieve the subsequent page. When paginating, all other + * parameters provided to `SearchChangeHistoryEvents` 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 [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * [ChangeHistoryEvent]{@link google.analytics.admin.v1alpha.ChangeHistoryEvent}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + * @example include:samples/generated/v1alpha/analytics_admin_service.search_change_history_events.js + * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_SearchChangeHistoryEvents_async + */ + searchChangeHistoryEventsAsync( + request?: protos.google.analytics.admin.v1alpha.ISearchChangeHistoryEventsRequest, + 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({ + account: request.account ?? '', + }); + const defaultCallSettings = this._defaults['searchChangeHistoryEvents']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.searchChangeHistoryEvents.asyncIterate( + this.innerApiCalls['searchChangeHistoryEvents'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Returns a list of conversion events in the specified parent property. + * + * Returns an empty list if no conversion events are found. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource name of the parent property. + * Example: 'properties/123' + * @param {number} request.pageSize + * The maximum number of resources to return. + * If unspecified, at most 50 resources will be returned. + * The maximum value is 200; (higher values will be coerced to the maximum) + * @param {string} request.pageToken + * A page token, received from a previous `ListConversionEvents` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListConversionEvents` + * 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 [ConversionEvent]{@link google.analytics.admin.v1alpha.ConversionEvent}. + * 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 `listConversionEventsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listConversionEvents( + request?: protos.google.analytics.admin.v1alpha.IListConversionEventsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.analytics.admin.v1alpha.IConversionEvent[], + protos.google.analytics.admin.v1alpha.IListConversionEventsRequest | null, + protos.google.analytics.admin.v1alpha.IListConversionEventsResponse + ] + >; + listConversionEvents( + request: protos.google.analytics.admin.v1alpha.IListConversionEventsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.analytics.admin.v1alpha.IListConversionEventsRequest, + | protos.google.analytics.admin.v1alpha.IListConversionEventsResponse + | null + | undefined, + protos.google.analytics.admin.v1alpha.IConversionEvent + > + ): void; + listConversionEvents( + request: protos.google.analytics.admin.v1alpha.IListConversionEventsRequest, + callback: PaginationCallback< + protos.google.analytics.admin.v1alpha.IListConversionEventsRequest, + | protos.google.analytics.admin.v1alpha.IListConversionEventsResponse + | null + | undefined, + protos.google.analytics.admin.v1alpha.IConversionEvent + > + ): void; + listConversionEvents( + request?: protos.google.analytics.admin.v1alpha.IListConversionEventsRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.analytics.admin.v1alpha.IListConversionEventsRequest, + | protos.google.analytics.admin.v1alpha.IListConversionEventsResponse + | null + | undefined, + protos.google.analytics.admin.v1alpha.IConversionEvent + >, + callback?: PaginationCallback< + protos.google.analytics.admin.v1alpha.IListConversionEventsRequest, + | protos.google.analytics.admin.v1alpha.IListConversionEventsResponse + | null + | undefined, + protos.google.analytics.admin.v1alpha.IConversionEvent + > + ): Promise< + [ + protos.google.analytics.admin.v1alpha.IConversionEvent[], + protos.google.analytics.admin.v1alpha.IListConversionEventsRequest | null, + protos.google.analytics.admin.v1alpha.IListConversionEventsResponse + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize(); + return this.innerApiCalls.listConversionEvents(request, options, callback); + } + + /** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource name of the parent property. + * Example: 'properties/123' + * @param {number} request.pageSize + * The maximum number of resources to return. + * If unspecified, at most 50 resources will be returned. + * The maximum value is 200; (higher values will be coerced to the maximum) + * @param {string} request.pageToken + * A page token, received from a previous `ListConversionEvents` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListConversionEvents` + * 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 [ConversionEvent]{@link google.analytics.admin.v1alpha.ConversionEvent} 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 `listConversionEventsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listConversionEventsStream( + request?: protos.google.analytics.admin.v1alpha.IListConversionEventsRequest, + 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['listConversionEvents']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listConversionEvents.createStream( + this.innerApiCalls.listConversionEvents as GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listConversionEvents`, 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 resource name of the parent property. + * Example: 'properties/123' + * @param {number} request.pageSize + * The maximum number of resources to return. + * If unspecified, at most 50 resources will be returned. + * The maximum value is 200; (higher values will be coerced to the maximum) + * @param {string} request.pageToken + * A page token, received from a previous `ListConversionEvents` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListConversionEvents` + * 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 [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * [ConversionEvent]{@link google.analytics.admin.v1alpha.ConversionEvent}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + * @example include:samples/generated/v1alpha/analytics_admin_service.list_conversion_events.js + * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListConversionEvents_async + */ + listConversionEventsAsync( + request?: protos.google.analytics.admin.v1alpha.IListConversionEventsRequest, + 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['listConversionEvents']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listConversionEvents.asyncIterate( + this.innerApiCalls['listConversionEvents'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Lists all DisplayVideo360AdvertiserLinks on a property. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Example format: properties/1234 + * @param {number} request.pageSize + * The maximum number of resources to return. + * If unspecified, at most 50 resources will be returned. + * The maximum value is 200 (higher values will be coerced to the maximum). + * @param {string} request.pageToken + * A page token, received from a previous `ListDisplayVideo360AdvertiserLinks` + * call. Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to + * `ListDisplayVideo360AdvertiserLinks` 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 [DisplayVideo360AdvertiserLink]{@link google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink}. + * 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 `listDisplayVideo360AdvertiserLinksAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listDisplayVideo360AdvertiserLinks( + request?: protos.google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinksRequest, + options?: CallOptions + ): Promise< + [ + protos.google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLink[], + protos.google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinksRequest | null, + protos.google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinksResponse + ] + >; + listDisplayVideo360AdvertiserLinks( + request: protos.google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinksRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinksRequest, + | protos.google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinksResponse + | null + | undefined, + protos.google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLink + > + ): void; + listDisplayVideo360AdvertiserLinks( + request: protos.google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinksRequest, + callback: PaginationCallback< + protos.google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinksRequest, + | protos.google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinksResponse + | null + | undefined, + protos.google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLink + > + ): void; + listDisplayVideo360AdvertiserLinks( + request?: protos.google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinksRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinksRequest, + | protos.google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinksResponse + | null + | undefined, + protos.google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLink + >, + callback?: PaginationCallback< + protos.google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinksRequest, + | protos.google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinksResponse + | null + | undefined, + protos.google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLink + > + ): Promise< + [ + protos.google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLink[], + protos.google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinksRequest | null, + protos.google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinksResponse + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize(); + return this.innerApiCalls.listDisplayVideo360AdvertiserLinks( + request, + options, + callback + ); + } + + /** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Example format: properties/1234 + * @param {number} request.pageSize + * The maximum number of resources to return. + * If unspecified, at most 50 resources will be returned. + * The maximum value is 200 (higher values will be coerced to the maximum). + * @param {string} request.pageToken + * A page token, received from a previous `ListDisplayVideo360AdvertiserLinks` + * call. Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to + * `ListDisplayVideo360AdvertiserLinks` 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 [DisplayVideo360AdvertiserLink]{@link google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink} 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 `listDisplayVideo360AdvertiserLinksAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listDisplayVideo360AdvertiserLinksStream( + request?: protos.google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinksRequest, + 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['listDisplayVideo360AdvertiserLinks']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listDisplayVideo360AdvertiserLinks.createStream( + this.innerApiCalls.listDisplayVideo360AdvertiserLinks as GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listDisplayVideo360AdvertiserLinks`, 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. Example format: properties/1234 + * @param {number} request.pageSize + * The maximum number of resources to return. + * If unspecified, at most 50 resources will be returned. + * The maximum value is 200 (higher values will be coerced to the maximum). + * @param {string} request.pageToken + * A page token, received from a previous `ListDisplayVideo360AdvertiserLinks` + * call. Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to + * `ListDisplayVideo360AdvertiserLinks` 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 [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * [DisplayVideo360AdvertiserLink]{@link google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + * @example include:samples/generated/v1alpha/analytics_admin_service.list_display_video360_advertiser_links.js + * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListDisplayVideo360AdvertiserLinks_async + */ + listDisplayVideo360AdvertiserLinksAsync( + request?: protos.google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinksRequest, + 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['listDisplayVideo360AdvertiserLinks']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listDisplayVideo360AdvertiserLinks.asyncIterate( + this.innerApiCalls['listDisplayVideo360AdvertiserLinks'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Lists DisplayVideo360AdvertiserLinkProposals on a property. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Example format: properties/1234 + * @param {number} request.pageSize + * The maximum number of resources to return. + * If unspecified, at most 50 resources will be returned. + * The maximum value is 200 (higher values will be coerced to the maximum). + * @param {string} request.pageToken + * A page token, received from a previous + * `ListDisplayVideo360AdvertiserLinkProposals` call. Provide this to retrieve + * the subsequent page. + * + * When paginating, all other parameters provided to + * `ListDisplayVideo360AdvertiserLinkProposals` 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 [DisplayVideo360AdvertiserLinkProposal]{@link google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal}. + * 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 `listDisplayVideo360AdvertiserLinkProposalsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listDisplayVideo360AdvertiserLinkProposals( + request?: protos.google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinkProposalsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLinkProposal[], + protos.google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinkProposalsRequest | null, + protos.google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinkProposalsResponse + ] + >; + listDisplayVideo360AdvertiserLinkProposals( + request: protos.google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinkProposalsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinkProposalsRequest, + | protos.google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinkProposalsResponse + | null + | undefined, + protos.google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLinkProposal + > + ): void; + listDisplayVideo360AdvertiserLinkProposals( + request: protos.google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinkProposalsRequest, + callback: PaginationCallback< + protos.google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinkProposalsRequest, + | protos.google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinkProposalsResponse + | null + | undefined, + protos.google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLinkProposal + > + ): void; + listDisplayVideo360AdvertiserLinkProposals( + request?: protos.google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinkProposalsRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinkProposalsRequest, + | protos.google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinkProposalsResponse + | null + | undefined, + protos.google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLinkProposal + >, + callback?: PaginationCallback< + protos.google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinkProposalsRequest, + | protos.google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinkProposalsResponse + | null + | undefined, + protos.google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLinkProposal + > + ): Promise< + [ + protos.google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLinkProposal[], + protos.google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinkProposalsRequest | null, + protos.google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinkProposalsResponse + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize(); + return this.innerApiCalls.listDisplayVideo360AdvertiserLinkProposals( + request, + options, + callback + ); + } + + /** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Example format: properties/1234 + * @param {number} request.pageSize + * The maximum number of resources to return. + * If unspecified, at most 50 resources will be returned. + * The maximum value is 200 (higher values will be coerced to the maximum). + * @param {string} request.pageToken + * A page token, received from a previous + * `ListDisplayVideo360AdvertiserLinkProposals` call. Provide this to retrieve + * the subsequent page. + * + * When paginating, all other parameters provided to + * `ListDisplayVideo360AdvertiserLinkProposals` 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 [DisplayVideo360AdvertiserLinkProposal]{@link google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal} 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 `listDisplayVideo360AdvertiserLinkProposalsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listDisplayVideo360AdvertiserLinkProposalsStream( + request?: protos.google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinkProposalsRequest, + 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['listDisplayVideo360AdvertiserLinkProposals']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listDisplayVideo360AdvertiserLinkProposals.createStream( + this.innerApiCalls.listDisplayVideo360AdvertiserLinkProposals as GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listDisplayVideo360AdvertiserLinkProposals`, 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. Example format: properties/1234 + * @param {number} request.pageSize + * The maximum number of resources to return. + * If unspecified, at most 50 resources will be returned. + * The maximum value is 200 (higher values will be coerced to the maximum). + * @param {string} request.pageToken + * A page token, received from a previous + * `ListDisplayVideo360AdvertiserLinkProposals` call. Provide this to retrieve + * the subsequent page. + * + * When paginating, all other parameters provided to + * `ListDisplayVideo360AdvertiserLinkProposals` 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 [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * [DisplayVideo360AdvertiserLinkProposal]{@link google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + * @example include:samples/generated/v1alpha/analytics_admin_service.list_display_video360_advertiser_link_proposals.js + * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListDisplayVideo360AdvertiserLinkProposals_async + */ + listDisplayVideo360AdvertiserLinkProposalsAsync( + request?: protos.google.analytics.admin.v1alpha.IListDisplayVideo360AdvertiserLinkProposalsRequest, + 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['listDisplayVideo360AdvertiserLinkProposals']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listDisplayVideo360AdvertiserLinkProposals.asyncIterate( + this.innerApiCalls[ + 'listDisplayVideo360AdvertiserLinkProposals' + ] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Lists CustomDimensions on a property. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Example format: properties/1234 + * @param {number} request.pageSize + * The maximum number of resources to return. + * If unspecified, at most 50 resources will be returned. + * The maximum value is 200 (higher values will be coerced to the maximum). + * @param {string} request.pageToken + * A page token, received from a previous `ListCustomDimensions` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListCustomDimensions` + * 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 [CustomDimension]{@link google.analytics.admin.v1alpha.CustomDimension}. + * 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 `listCustomDimensionsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listCustomDimensions( + request?: protos.google.analytics.admin.v1alpha.IListCustomDimensionsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.analytics.admin.v1alpha.ICustomDimension[], + protos.google.analytics.admin.v1alpha.IListCustomDimensionsRequest | null, + protos.google.analytics.admin.v1alpha.IListCustomDimensionsResponse + ] + >; + listCustomDimensions( + request: protos.google.analytics.admin.v1alpha.IListCustomDimensionsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.analytics.admin.v1alpha.IListCustomDimensionsRequest, + | protos.google.analytics.admin.v1alpha.IListCustomDimensionsResponse + | null + | undefined, + protos.google.analytics.admin.v1alpha.ICustomDimension + > + ): void; + listCustomDimensions( + request: protos.google.analytics.admin.v1alpha.IListCustomDimensionsRequest, + callback: PaginationCallback< + protos.google.analytics.admin.v1alpha.IListCustomDimensionsRequest, + | protos.google.analytics.admin.v1alpha.IListCustomDimensionsResponse + | null + | undefined, + protos.google.analytics.admin.v1alpha.ICustomDimension + > + ): void; + listCustomDimensions( + request?: protos.google.analytics.admin.v1alpha.IListCustomDimensionsRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.analytics.admin.v1alpha.IListCustomDimensionsRequest, + | protos.google.analytics.admin.v1alpha.IListCustomDimensionsResponse + | null + | undefined, + protos.google.analytics.admin.v1alpha.ICustomDimension + >, + callback?: PaginationCallback< + protos.google.analytics.admin.v1alpha.IListCustomDimensionsRequest, + | protos.google.analytics.admin.v1alpha.IListCustomDimensionsResponse + | null + | undefined, + protos.google.analytics.admin.v1alpha.ICustomDimension + > + ): Promise< + [ + protos.google.analytics.admin.v1alpha.ICustomDimension[], + protos.google.analytics.admin.v1alpha.IListCustomDimensionsRequest | null, + protos.google.analytics.admin.v1alpha.IListCustomDimensionsResponse + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize(); + return this.innerApiCalls.listCustomDimensions(request, options, callback); + } + + /** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Example format: properties/1234 + * @param {number} request.pageSize + * The maximum number of resources to return. + * If unspecified, at most 50 resources will be returned. + * The maximum value is 200 (higher values will be coerced to the maximum). + * @param {string} request.pageToken + * A page token, received from a previous `ListCustomDimensions` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListCustomDimensions` + * 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 [CustomDimension]{@link google.analytics.admin.v1alpha.CustomDimension} 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 `listCustomDimensionsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listCustomDimensionsStream( + request?: protos.google.analytics.admin.v1alpha.IListCustomDimensionsRequest, + 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['listCustomDimensions']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listCustomDimensions.createStream( + this.innerApiCalls.listCustomDimensions as GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listCustomDimensions`, 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. Example format: properties/1234 + * @param {number} request.pageSize + * The maximum number of resources to return. + * If unspecified, at most 50 resources will be returned. + * The maximum value is 200 (higher values will be coerced to the maximum). + * @param {string} request.pageToken + * A page token, received from a previous `ListCustomDimensions` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListCustomDimensions` + * 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 [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * [CustomDimension]{@link google.analytics.admin.v1alpha.CustomDimension}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + * @example include:samples/generated/v1alpha/analytics_admin_service.list_custom_dimensions.js + * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListCustomDimensions_async + */ + listCustomDimensionsAsync( + request?: protos.google.analytics.admin.v1alpha.IListCustomDimensionsRequest, + 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['listCustomDimensions']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listCustomDimensions.asyncIterate( + this.innerApiCalls['listCustomDimensions'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Lists CustomMetrics on a property. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Example format: properties/1234 + * @param {number} request.pageSize + * The maximum number of resources to return. + * If unspecified, at most 50 resources will be returned. + * The maximum value is 200 (higher values will be coerced to the maximum). + * @param {string} request.pageToken + * A page token, received from a previous `ListCustomMetrics` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListCustomMetrics` 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 [CustomMetric]{@link google.analytics.admin.v1alpha.CustomMetric}. + * 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 `listCustomMetricsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listCustomMetrics( + request?: protos.google.analytics.admin.v1alpha.IListCustomMetricsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.analytics.admin.v1alpha.ICustomMetric[], + protos.google.analytics.admin.v1alpha.IListCustomMetricsRequest | null, + protos.google.analytics.admin.v1alpha.IListCustomMetricsResponse + ] + >; + listCustomMetrics( + request: protos.google.analytics.admin.v1alpha.IListCustomMetricsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.analytics.admin.v1alpha.IListCustomMetricsRequest, + | protos.google.analytics.admin.v1alpha.IListCustomMetricsResponse + | null + | undefined, + protos.google.analytics.admin.v1alpha.ICustomMetric + > + ): void; + listCustomMetrics( + request: protos.google.analytics.admin.v1alpha.IListCustomMetricsRequest, + callback: PaginationCallback< + protos.google.analytics.admin.v1alpha.IListCustomMetricsRequest, + | protos.google.analytics.admin.v1alpha.IListCustomMetricsResponse + | null + | undefined, + protos.google.analytics.admin.v1alpha.ICustomMetric + > + ): void; + listCustomMetrics( + request?: protos.google.analytics.admin.v1alpha.IListCustomMetricsRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.analytics.admin.v1alpha.IListCustomMetricsRequest, + | protos.google.analytics.admin.v1alpha.IListCustomMetricsResponse + | null + | undefined, + protos.google.analytics.admin.v1alpha.ICustomMetric + >, + callback?: PaginationCallback< + protos.google.analytics.admin.v1alpha.IListCustomMetricsRequest, + | protos.google.analytics.admin.v1alpha.IListCustomMetricsResponse + | null + | undefined, + protos.google.analytics.admin.v1alpha.ICustomMetric + > + ): Promise< + [ + protos.google.analytics.admin.v1alpha.ICustomMetric[], + protos.google.analytics.admin.v1alpha.IListCustomMetricsRequest | null, + protos.google.analytics.admin.v1alpha.IListCustomMetricsResponse + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize(); + return this.innerApiCalls.listCustomMetrics(request, options, callback); + } + + /** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Example format: properties/1234 + * @param {number} request.pageSize + * The maximum number of resources to return. + * If unspecified, at most 50 resources will be returned. + * The maximum value is 200 (higher values will be coerced to the maximum). + * @param {string} request.pageToken + * A page token, received from a previous `ListCustomMetrics` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListCustomMetrics` 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 [CustomMetric]{@link google.analytics.admin.v1alpha.CustomMetric} 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 `listCustomMetricsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listCustomMetricsStream( + request?: protos.google.analytics.admin.v1alpha.IListCustomMetricsRequest, + 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['listCustomMetrics']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listCustomMetrics.createStream( + this.innerApiCalls.listCustomMetrics as GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listCustomMetrics`, 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. Example format: properties/1234 + * @param {number} request.pageSize + * The maximum number of resources to return. + * If unspecified, at most 50 resources will be returned. + * The maximum value is 200 (higher values will be coerced to the maximum). + * @param {string} request.pageToken + * A page token, received from a previous `ListCustomMetrics` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListCustomMetrics` 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 [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * [CustomMetric]{@link google.analytics.admin.v1alpha.CustomMetric}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + * @example include:samples/generated/v1alpha/analytics_admin_service.list_custom_metrics.js + * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListCustomMetrics_async + */ + listCustomMetricsAsync( + request?: protos.google.analytics.admin.v1alpha.IListCustomMetricsRequest, + 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['listCustomMetrics']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listCustomMetrics.asyncIterate( + this.innerApiCalls['listCustomMetrics'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Lists DataStreams on a property. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Example format: properties/1234 + * @param {number} request.pageSize + * The maximum number of resources to return. + * If unspecified, at most 50 resources will be returned. + * The maximum value is 200 (higher values will be coerced to the maximum). + * @param {string} request.pageToken + * A page token, received from a previous `ListDataStreams` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListDataStreams` 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 [DataStream]{@link google.analytics.admin.v1alpha.DataStream}. + * 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 `listDataStreamsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listDataStreams( + request?: protos.google.analytics.admin.v1alpha.IListDataStreamsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.analytics.admin.v1alpha.IDataStream[], + protos.google.analytics.admin.v1alpha.IListDataStreamsRequest | null, + protos.google.analytics.admin.v1alpha.IListDataStreamsResponse + ] + >; + listDataStreams( + request: protos.google.analytics.admin.v1alpha.IListDataStreamsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.analytics.admin.v1alpha.IListDataStreamsRequest, + | protos.google.analytics.admin.v1alpha.IListDataStreamsResponse + | null + | undefined, + protos.google.analytics.admin.v1alpha.IDataStream + > + ): void; + listDataStreams( + request: protos.google.analytics.admin.v1alpha.IListDataStreamsRequest, + callback: PaginationCallback< + protos.google.analytics.admin.v1alpha.IListDataStreamsRequest, + | protos.google.analytics.admin.v1alpha.IListDataStreamsResponse + | null + | undefined, + protos.google.analytics.admin.v1alpha.IDataStream + > + ): void; + listDataStreams( + request?: protos.google.analytics.admin.v1alpha.IListDataStreamsRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.analytics.admin.v1alpha.IListDataStreamsRequest, + | protos.google.analytics.admin.v1alpha.IListDataStreamsResponse + | null + | undefined, + protos.google.analytics.admin.v1alpha.IDataStream + >, + callback?: PaginationCallback< + protos.google.analytics.admin.v1alpha.IListDataStreamsRequest, + | protos.google.analytics.admin.v1alpha.IListDataStreamsResponse + | null + | undefined, + protos.google.analytics.admin.v1alpha.IDataStream + > + ): Promise< + [ + protos.google.analytics.admin.v1alpha.IDataStream[], + protos.google.analytics.admin.v1alpha.IListDataStreamsRequest | null, + protos.google.analytics.admin.v1alpha.IListDataStreamsResponse + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize(); + return this.innerApiCalls.listDataStreams(request, options, callback); + } + + /** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Example format: properties/1234 + * @param {number} request.pageSize + * The maximum number of resources to return. + * If unspecified, at most 50 resources will be returned. + * The maximum value is 200 (higher values will be coerced to the maximum). + * @param {string} request.pageToken + * A page token, received from a previous `ListDataStreams` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListDataStreams` 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 [DataStream]{@link google.analytics.admin.v1alpha.DataStream} 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 `listDataStreamsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listDataStreamsStream( + request?: protos.google.analytics.admin.v1alpha.IListDataStreamsRequest, + 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['listDataStreams']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listDataStreams.createStream( + this.innerApiCalls.listDataStreams as GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listDataStreams`, 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. Example format: properties/1234 + * @param {number} request.pageSize + * The maximum number of resources to return. + * If unspecified, at most 50 resources will be returned. + * The maximum value is 200 (higher values will be coerced to the maximum). + * @param {string} request.pageToken + * A page token, received from a previous `ListDataStreams` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListDataStreams` 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 [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * [DataStream]{@link google.analytics.admin.v1alpha.DataStream}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + * @example include:samples/generated/v1alpha/analytics_admin_service.list_data_streams.js + * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListDataStreams_async + */ + listDataStreamsAsync( + request?: protos.google.analytics.admin.v1alpha.IListDataStreamsRequest, + 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['listDataStreams']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listDataStreams.asyncIterate( + this.innerApiCalls['listDataStreams'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Lists Audiences on a property. + * Audiences created before 2020 may not be supported. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Example format: properties/1234 + * @param {number} request.pageSize + * The maximum number of resources to return. + * If unspecified, at most 50 resources will be returned. + * The maximum value is 200 (higher values will be coerced to the maximum). + * @param {string} request.pageToken + * A page token, received from a previous `ListAudiences` call. Provide this + * to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListAudiences` 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 [Audience]{@link google.analytics.admin.v1alpha.Audience}. + * 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 `listAudiencesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listAudiences( + request?: protos.google.analytics.admin.v1alpha.IListAudiencesRequest, + options?: CallOptions + ): Promise< + [ + protos.google.analytics.admin.v1alpha.IAudience[], + protos.google.analytics.admin.v1alpha.IListAudiencesRequest | null, + protos.google.analytics.admin.v1alpha.IListAudiencesResponse + ] + >; + listAudiences( + request: protos.google.analytics.admin.v1alpha.IListAudiencesRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.analytics.admin.v1alpha.IListAudiencesRequest, + | protos.google.analytics.admin.v1alpha.IListAudiencesResponse + | null + | undefined, + protos.google.analytics.admin.v1alpha.IAudience + > + ): void; + listAudiences( + request: protos.google.analytics.admin.v1alpha.IListAudiencesRequest, + callback: PaginationCallback< + protos.google.analytics.admin.v1alpha.IListAudiencesRequest, + | protos.google.analytics.admin.v1alpha.IListAudiencesResponse + | null + | undefined, + protos.google.analytics.admin.v1alpha.IAudience + > + ): void; + listAudiences( + request?: protos.google.analytics.admin.v1alpha.IListAudiencesRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.analytics.admin.v1alpha.IListAudiencesRequest, + | protos.google.analytics.admin.v1alpha.IListAudiencesResponse + | null + | undefined, + protos.google.analytics.admin.v1alpha.IAudience + >, + callback?: PaginationCallback< + protos.google.analytics.admin.v1alpha.IListAudiencesRequest, + | protos.google.analytics.admin.v1alpha.IListAudiencesResponse + | null + | undefined, + protos.google.analytics.admin.v1alpha.IAudience + > + ): Promise< + [ + protos.google.analytics.admin.v1alpha.IAudience[], + protos.google.analytics.admin.v1alpha.IListAudiencesRequest | null, + protos.google.analytics.admin.v1alpha.IListAudiencesResponse + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize(); + return this.innerApiCalls.listAudiences(request, options, callback); + } + + /** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Example format: properties/1234 + * @param {number} request.pageSize + * The maximum number of resources to return. + * If unspecified, at most 50 resources will be returned. + * The maximum value is 200 (higher values will be coerced to the maximum). + * @param {string} request.pageToken + * A page token, received from a previous `ListAudiences` call. Provide this + * to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListAudiences` 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 [Audience]{@link google.analytics.admin.v1alpha.Audience} 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 `listAudiencesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listAudiencesStream( + request?: protos.google.analytics.admin.v1alpha.IListAudiencesRequest, + 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['listAudiences']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listAudiences.createStream( + this.innerApiCalls.listAudiences as GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listAudiences`, 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. Example format: properties/1234 + * @param {number} request.pageSize + * The maximum number of resources to return. + * If unspecified, at most 50 resources will be returned. + * The maximum value is 200 (higher values will be coerced to the maximum). + * @param {string} request.pageToken + * A page token, received from a previous `ListAudiences` call. Provide this + * to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListAudiences` 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 [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * [Audience]{@link google.analytics.admin.v1alpha.Audience}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + * @example include:samples/generated/v1alpha/analytics_admin_service.list_audiences.js + * region_tag:analyticsadmin_v1alpha_generated_AnalyticsAdminService_ListAudiences_async + */ + listAudiencesAsync( + request?: protos.google.analytics.admin.v1alpha.IListAudiencesRequest, + 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['listAudiences']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listAudiences.asyncIterate( + this.innerApiCalls['listAudiences'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + // -------------------- + // -- Path templates -- + // -------------------- + + /** + * Return a fully-qualified account resource name string. + * + * @param {string} account + * @returns {string} Resource name string. + */ + accountPath(account: string) { + return this.pathTemplates.accountPathTemplate.render({ + account: account, + }); + } + + /** + * 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 accountSummary resource name string. + * + * @param {string} account_summary + * @returns {string} Resource name string. + */ + accountSummaryPath(accountSummary: string) { + return this.pathTemplates.accountSummaryPathTemplate.render({ + account_summary: accountSummary, + }); + } + + /** + * Parse the account_summary from AccountSummary resource. + * + * @param {string} accountSummaryName + * A fully-qualified path representing AccountSummary resource. + * @returns {string} A string representing the account_summary. + */ + matchAccountSummaryFromAccountSummaryName(accountSummaryName: string) { + return this.pathTemplates.accountSummaryPathTemplate.match( + accountSummaryName + ).account_summary; + } + + /** + * Return a fully-qualified accountUserLink resource name string. + * + * @param {string} account + * @param {string} user_link + * @returns {string} Resource name string. + */ + accountUserLinkPath(account: string, userLink: string) { + return this.pathTemplates.accountUserLinkPathTemplate.render({ + account: account, + user_link: userLink, + }); + } + + /** + * Parse the account from AccountUserLink resource. + * + * @param {string} accountUserLinkName + * A fully-qualified path representing account_user_link resource. + * @returns {string} A string representing the account. + */ + matchAccountFromAccountUserLinkName(accountUserLinkName: string) { + return this.pathTemplates.accountUserLinkPathTemplate.match( + accountUserLinkName + ).account; + } + + /** + * Parse the user_link from AccountUserLink resource. + * + * @param {string} accountUserLinkName + * A fully-qualified path representing account_user_link resource. + * @returns {string} A string representing the user_link. + */ + matchUserLinkFromAccountUserLinkName(accountUserLinkName: string) { + return this.pathTemplates.accountUserLinkPathTemplate.match( + accountUserLinkName + ).user_link; + } + + /** + * Return a fully-qualified attributionSettings resource name string. + * + * @param {string} property + * @returns {string} Resource name string. + */ + attributionSettingsPath(property: string) { + return this.pathTemplates.attributionSettingsPathTemplate.render({ + property: property, + }); + } + + /** + * Parse the property from AttributionSettings resource. + * + * @param {string} attributionSettingsName + * A fully-qualified path representing AttributionSettings resource. + * @returns {string} A string representing the property. + */ + matchPropertyFromAttributionSettingsName(attributionSettingsName: string) { + return this.pathTemplates.attributionSettingsPathTemplate.match( + attributionSettingsName + ).property; + } + + /** + * Return a fully-qualified audience resource name string. + * + * @param {string} property + * @param {string} audience + * @returns {string} Resource name string. + */ + audiencePath(property: string, audience: string) { + return this.pathTemplates.audiencePathTemplate.render({ + property: property, + audience: audience, + }); + } + + /** + * Parse the property from Audience resource. + * + * @param {string} audienceName + * A fully-qualified path representing Audience resource. + * @returns {string} A string representing the property. + */ + matchPropertyFromAudienceName(audienceName: string) { + return this.pathTemplates.audiencePathTemplate.match(audienceName).property; + } + + /** + * Parse the audience from Audience resource. + * + * @param {string} audienceName + * A fully-qualified path representing Audience resource. + * @returns {string} A string representing the audience. + */ + matchAudienceFromAudienceName(audienceName: string) { + return this.pathTemplates.audiencePathTemplate.match(audienceName).audience; + } + + /** + * Return a fully-qualified conversionEvent resource name string. + * + * @param {string} property + * @param {string} conversion_event + * @returns {string} Resource name string. + */ + conversionEventPath(property: string, conversionEvent: string) { + return this.pathTemplates.conversionEventPathTemplate.render({ + property: property, + conversion_event: conversionEvent, + }); + } + + /** + * Parse the property from ConversionEvent resource. + * + * @param {string} conversionEventName + * A fully-qualified path representing ConversionEvent resource. + * @returns {string} A string representing the property. + */ + matchPropertyFromConversionEventName(conversionEventName: string) { + return this.pathTemplates.conversionEventPathTemplate.match( + conversionEventName + ).property; + } + + /** + * Parse the conversion_event from ConversionEvent resource. + * + * @param {string} conversionEventName + * A fully-qualified path representing ConversionEvent resource. + * @returns {string} A string representing the conversion_event. + */ + matchConversionEventFromConversionEventName(conversionEventName: string) { + return this.pathTemplates.conversionEventPathTemplate.match( + conversionEventName + ).conversion_event; + } + + /** + * Return a fully-qualified customDimension resource name string. + * + * @param {string} property + * @param {string} custom_dimension + * @returns {string} Resource name string. + */ + customDimensionPath(property: string, customDimension: string) { + return this.pathTemplates.customDimensionPathTemplate.render({ + property: property, + custom_dimension: customDimension, + }); + } + + /** + * Parse the property from CustomDimension resource. + * + * @param {string} customDimensionName + * A fully-qualified path representing CustomDimension resource. + * @returns {string} A string representing the property. + */ + matchPropertyFromCustomDimensionName(customDimensionName: string) { + return this.pathTemplates.customDimensionPathTemplate.match( + customDimensionName + ).property; + } + + /** + * Parse the custom_dimension from CustomDimension resource. + * + * @param {string} customDimensionName + * A fully-qualified path representing CustomDimension resource. + * @returns {string} A string representing the custom_dimension. + */ + matchCustomDimensionFromCustomDimensionName(customDimensionName: string) { + return this.pathTemplates.customDimensionPathTemplate.match( + customDimensionName + ).custom_dimension; + } + + /** + * Return a fully-qualified customMetric resource name string. + * + * @param {string} property + * @param {string} custom_metric + * @returns {string} Resource name string. + */ + customMetricPath(property: string, customMetric: string) { + return this.pathTemplates.customMetricPathTemplate.render({ + property: property, + custom_metric: customMetric, + }); + } + + /** + * Parse the property from CustomMetric resource. + * + * @param {string} customMetricName + * A fully-qualified path representing CustomMetric resource. + * @returns {string} A string representing the property. + */ + matchPropertyFromCustomMetricName(customMetricName: string) { + return this.pathTemplates.customMetricPathTemplate.match(customMetricName) + .property; + } + + /** + * Parse the custom_metric from CustomMetric resource. + * + * @param {string} customMetricName + * A fully-qualified path representing CustomMetric resource. + * @returns {string} A string representing the custom_metric. + */ + matchCustomMetricFromCustomMetricName(customMetricName: string) { + return this.pathTemplates.customMetricPathTemplate.match(customMetricName) + .custom_metric; + } + + /** + * Return a fully-qualified dataRetentionSettings resource name string. + * + * @param {string} property + * @returns {string} Resource name string. + */ + dataRetentionSettingsPath(property: string) { + return this.pathTemplates.dataRetentionSettingsPathTemplate.render({ + property: property, + }); + } + + /** + * Parse the property from DataRetentionSettings resource. + * + * @param {string} dataRetentionSettingsName + * A fully-qualified path representing DataRetentionSettings resource. + * @returns {string} A string representing the property. + */ + matchPropertyFromDataRetentionSettingsName( + dataRetentionSettingsName: string + ) { + return this.pathTemplates.dataRetentionSettingsPathTemplate.match( + dataRetentionSettingsName + ).property; + } + + /** + * Return a fully-qualified dataSharingSettings resource name string. + * + * @param {string} account + * @returns {string} Resource name string. + */ + dataSharingSettingsPath(account: string) { + return this.pathTemplates.dataSharingSettingsPathTemplate.render({ + account: account, + }); + } + + /** + * Parse the account from DataSharingSettings resource. + * + * @param {string} dataSharingSettingsName + * A fully-qualified path representing DataSharingSettings resource. + * @returns {string} A string representing the account. + */ + matchAccountFromDataSharingSettingsName(dataSharingSettingsName: string) { + return this.pathTemplates.dataSharingSettingsPathTemplate.match( + dataSharingSettingsName + ).account; + } + + /** + * Return a fully-qualified dataStream resource name string. + * + * @param {string} property + * @param {string} data_stream + * @returns {string} Resource name string. + */ + dataStreamPath(property: string, dataStream: string) { + return this.pathTemplates.dataStreamPathTemplate.render({ + property: property, + data_stream: dataStream, + }); + } + + /** + * Parse the property from DataStream resource. + * + * @param {string} dataStreamName + * A fully-qualified path representing DataStream resource. + * @returns {string} A string representing the property. + */ + matchPropertyFromDataStreamName(dataStreamName: string) { + return this.pathTemplates.dataStreamPathTemplate.match(dataStreamName) + .property; + } + + /** + * Parse the data_stream from DataStream resource. + * + * @param {string} dataStreamName + * A fully-qualified path representing DataStream resource. + * @returns {string} A string representing the data_stream. + */ + matchDataStreamFromDataStreamName(dataStreamName: string) { + return this.pathTemplates.dataStreamPathTemplate.match(dataStreamName) + .data_stream; + } + + /** + * Return a fully-qualified displayVideo360AdvertiserLink resource name string. + * + * @param {string} property + * @returns {string} Resource name string. + */ + displayVideo360AdvertiserLinkPath(property: string) { + return this.pathTemplates.displayVideo360AdvertiserLinkPathTemplate.render({ + property: property, + }); + } + + /** + * Parse the property from DisplayVideo360AdvertiserLink resource. + * + * @param {string} displayVideo360AdvertiserLinkName + * A fully-qualified path representing DisplayVideo360AdvertiserLink resource. + * @returns {string} A string representing the property. + */ + matchPropertyFromDisplayVideo360AdvertiserLinkName( + displayVideo360AdvertiserLinkName: string + ) { + return this.pathTemplates.displayVideo360AdvertiserLinkPathTemplate.match( + displayVideo360AdvertiserLinkName + ).property; + } + + /** + * Return a fully-qualified displayVideo360AdvertiserLinkProposal resource name string. + * + * @param {string} property + * @returns {string} Resource name string. + */ + displayVideo360AdvertiserLinkProposalPath(property: string) { + return this.pathTemplates.displayVideo360AdvertiserLinkProposalPathTemplate.render( + { + property: property, + } + ); + } + + /** + * Parse the property from DisplayVideo360AdvertiserLinkProposal resource. + * + * @param {string} displayVideo360AdvertiserLinkProposalName + * A fully-qualified path representing DisplayVideo360AdvertiserLinkProposal resource. + * @returns {string} A string representing the property. + */ + matchPropertyFromDisplayVideo360AdvertiserLinkProposalName( + displayVideo360AdvertiserLinkProposalName: string + ) { + return this.pathTemplates.displayVideo360AdvertiserLinkProposalPathTemplate.match( + displayVideo360AdvertiserLinkProposalName + ).property; + } + + /** + * Return a fully-qualified firebaseLink resource name string. + * + * @param {string} property + * @param {string} firebase_link + * @returns {string} Resource name string. + */ + firebaseLinkPath(property: string, firebaseLink: string) { + return this.pathTemplates.firebaseLinkPathTemplate.render({ + property: property, + firebase_link: firebaseLink, + }); + } + + /** + * Parse the property from FirebaseLink resource. + * + * @param {string} firebaseLinkName + * A fully-qualified path representing FirebaseLink resource. + * @returns {string} A string representing the property. + */ + matchPropertyFromFirebaseLinkName(firebaseLinkName: string) { + return this.pathTemplates.firebaseLinkPathTemplate.match(firebaseLinkName) + .property; + } + + /** + * Parse the firebase_link from FirebaseLink resource. + * + * @param {string} firebaseLinkName + * A fully-qualified path representing FirebaseLink resource. + * @returns {string} A string representing the firebase_link. + */ + matchFirebaseLinkFromFirebaseLinkName(firebaseLinkName: string) { + return this.pathTemplates.firebaseLinkPathTemplate.match(firebaseLinkName) + .firebase_link; + } + + /** + * Return a fully-qualified globalSiteTag resource name string. + * + * @param {string} property + * @param {string} data_stream + * @returns {string} Resource name string. + */ + globalSiteTagPath(property: string, dataStream: string) { + return this.pathTemplates.globalSiteTagPathTemplate.render({ + property: property, + data_stream: dataStream, + }); + } + + /** + * Parse the property from GlobalSiteTag resource. + * + * @param {string} globalSiteTagName + * A fully-qualified path representing GlobalSiteTag resource. + * @returns {string} A string representing the property. + */ + matchPropertyFromGlobalSiteTagName(globalSiteTagName: string) { + return this.pathTemplates.globalSiteTagPathTemplate.match(globalSiteTagName) + .property; + } + + /** + * Parse the data_stream from GlobalSiteTag resource. + * + * @param {string} globalSiteTagName + * A fully-qualified path representing GlobalSiteTag resource. + * @returns {string} A string representing the data_stream. + */ + matchDataStreamFromGlobalSiteTagName(globalSiteTagName: string) { + return this.pathTemplates.globalSiteTagPathTemplate.match(globalSiteTagName) + .data_stream; + } + + /** + * Return a fully-qualified googleAdsLink resource name string. + * + * @param {string} property + * @param {string} google_ads_link + * @returns {string} Resource name string. + */ + googleAdsLinkPath(property: string, googleAdsLink: string) { + return this.pathTemplates.googleAdsLinkPathTemplate.render({ + property: property, + google_ads_link: googleAdsLink, + }); + } + + /** + * Parse the property from GoogleAdsLink resource. + * + * @param {string} googleAdsLinkName + * A fully-qualified path representing GoogleAdsLink resource. + * @returns {string} A string representing the property. + */ + matchPropertyFromGoogleAdsLinkName(googleAdsLinkName: string) { + return this.pathTemplates.googleAdsLinkPathTemplate.match(googleAdsLinkName) + .property; + } + + /** + * Parse the google_ads_link from GoogleAdsLink resource. + * + * @param {string} googleAdsLinkName + * A fully-qualified path representing GoogleAdsLink resource. + * @returns {string} A string representing the google_ads_link. + */ + matchGoogleAdsLinkFromGoogleAdsLinkName(googleAdsLinkName: string) { + return this.pathTemplates.googleAdsLinkPathTemplate.match(googleAdsLinkName) + .google_ads_link; + } + + /** + * Return a fully-qualified googleSignalsSettings resource name string. + * + * @param {string} property + * @returns {string} Resource name string. + */ + googleSignalsSettingsPath(property: string) { + return this.pathTemplates.googleSignalsSettingsPathTemplate.render({ + property: property, + }); + } + + /** + * Parse the property from GoogleSignalsSettings resource. + * + * @param {string} googleSignalsSettingsName + * A fully-qualified path representing GoogleSignalsSettings resource. + * @returns {string} A string representing the property. + */ + matchPropertyFromGoogleSignalsSettingsName( + googleSignalsSettingsName: string + ) { + return this.pathTemplates.googleSignalsSettingsPathTemplate.match( + googleSignalsSettingsName + ).property; + } + + /** + * Return a fully-qualified measurementProtocolSecret resource name string. + * + * @param {string} property + * @param {string} data_stream + * @param {string} measurement_protocol_secret + * @returns {string} Resource name string. + */ + measurementProtocolSecretPath( + property: string, + dataStream: string, + measurementProtocolSecret: string + ) { + return this.pathTemplates.measurementProtocolSecretPathTemplate.render({ + property: property, + data_stream: dataStream, + measurement_protocol_secret: measurementProtocolSecret, + }); + } + + /** + * Parse the property from MeasurementProtocolSecret resource. + * + * @param {string} measurementProtocolSecretName + * A fully-qualified path representing MeasurementProtocolSecret resource. + * @returns {string} A string representing the property. + */ + matchPropertyFromMeasurementProtocolSecretName( + measurementProtocolSecretName: string + ) { + return this.pathTemplates.measurementProtocolSecretPathTemplate.match( + measurementProtocolSecretName + ).property; + } + + /** + * Parse the data_stream from MeasurementProtocolSecret resource. + * + * @param {string} measurementProtocolSecretName + * A fully-qualified path representing MeasurementProtocolSecret resource. + * @returns {string} A string representing the data_stream. + */ + matchDataStreamFromMeasurementProtocolSecretName( + measurementProtocolSecretName: string + ) { + return this.pathTemplates.measurementProtocolSecretPathTemplate.match( + measurementProtocolSecretName + ).data_stream; + } + + /** + * Parse the measurement_protocol_secret from MeasurementProtocolSecret resource. + * + * @param {string} measurementProtocolSecretName + * A fully-qualified path representing MeasurementProtocolSecret resource. + * @returns {string} A string representing the measurement_protocol_secret. + */ + matchMeasurementProtocolSecretFromMeasurementProtocolSecretName( + measurementProtocolSecretName: string + ) { + return this.pathTemplates.measurementProtocolSecretPathTemplate.match( + measurementProtocolSecretName + ).measurement_protocol_secret; + } + + /** + * Return a fully-qualified property resource name string. + * + * @param {string} property + * @returns {string} Resource name string. + */ + propertyPath(property: string) { + return this.pathTemplates.propertyPathTemplate.render({ + property: property, + }); + } + + /** + * Parse the property from Property resource. + * + * @param {string} propertyName + * A fully-qualified path representing Property resource. + * @returns {string} A string representing the property. + */ + matchPropertyFromPropertyName(propertyName: string) { + return this.pathTemplates.propertyPathTemplate.match(propertyName).property; + } + + /** + * Return a fully-qualified propertyUserLink resource name string. + * + * @param {string} property + * @param {string} user_link + * @returns {string} Resource name string. + */ + propertyUserLinkPath(property: string, userLink: string) { + return this.pathTemplates.propertyUserLinkPathTemplate.render({ + property: property, + user_link: userLink, + }); + } + + /** + * Parse the property from PropertyUserLink resource. + * + * @param {string} propertyUserLinkName + * A fully-qualified path representing property_user_link resource. + * @returns {string} A string representing the property. + */ + matchPropertyFromPropertyUserLinkName(propertyUserLinkName: string) { + return this.pathTemplates.propertyUserLinkPathTemplate.match( + propertyUserLinkName + ).property; + } + + /** + * Parse the user_link from PropertyUserLink resource. + * + * @param {string} propertyUserLinkName + * A fully-qualified path representing property_user_link resource. + * @returns {string} A string representing the user_link. + */ + matchUserLinkFromPropertyUserLinkName(propertyUserLinkName: string) { + return this.pathTemplates.propertyUserLinkPathTemplate.match( + propertyUserLinkName + ).user_link; + } + + /** + * 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.analyticsAdminServiceStub && !this._terminated) { + return this.analyticsAdminServiceStub.then(stub => { + this._terminated = true; + stub.close(); + }); + } + return Promise.resolve(); + } +} diff --git a/packages/google-analytics-admin/src/v1alpha/analytics_admin_service_client_config.json b/packages/google-analytics-admin/src/v1alpha/analytics_admin_service_client_config.json new file mode 100644 index 00000000000..2a59f9bc0db --- /dev/null +++ b/packages/google-analytics-admin/src/v1alpha/analytics_admin_service_client_config.json @@ -0,0 +1,434 @@ +{ + "interfaces": { + "google.analytics.admin.v1alpha.AnalyticsAdminService": { + "retry_codes": { + "non_idempotent": [], + "idempotent": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ], + "unknown_unavailable": [ + "UNKNOWN", + "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 + }, + "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c": { + "initial_retry_delay_millis": 1000, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 600000 + } + }, + "methods": { + "GetAccount": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "ListAccounts": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "DeleteAccount": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "UpdateAccount": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "ProvisionAccountTicket": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "ListAccountSummaries": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "GetProperty": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "ListProperties": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "CreateProperty": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "DeleteProperty": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "UpdateProperty": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "GetUserLink": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "BatchGetUserLinks": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "ListUserLinks": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "AuditUserLinks": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "CreateUserLink": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "BatchCreateUserLinks": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "UpdateUserLink": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "BatchUpdateUserLinks": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "DeleteUserLink": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "BatchDeleteUserLinks": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "CreateFirebaseLink": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "DeleteFirebaseLink": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "ListFirebaseLinks": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "GetGlobalSiteTag": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "CreateGoogleAdsLink": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "UpdateGoogleAdsLink": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "DeleteGoogleAdsLink": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "ListGoogleAdsLinks": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "GetDataSharingSettings": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "GetMeasurementProtocolSecret": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "ListMeasurementProtocolSecrets": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "CreateMeasurementProtocolSecret": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "DeleteMeasurementProtocolSecret": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "UpdateMeasurementProtocolSecret": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "AcknowledgeUserDataCollection": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "SearchChangeHistoryEvents": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "GetGoogleSignalsSettings": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "UpdateGoogleSignalsSettings": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "CreateConversionEvent": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "GetConversionEvent": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "DeleteConversionEvent": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "ListConversionEvents": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "GetDisplayVideo360AdvertiserLink": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "ListDisplayVideo360AdvertiserLinks": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "CreateDisplayVideo360AdvertiserLink": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "DeleteDisplayVideo360AdvertiserLink": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "UpdateDisplayVideo360AdvertiserLink": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "GetDisplayVideo360AdvertiserLinkProposal": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "ListDisplayVideo360AdvertiserLinkProposals": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "CreateDisplayVideo360AdvertiserLinkProposal": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "DeleteDisplayVideo360AdvertiserLinkProposal": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "ApproveDisplayVideo360AdvertiserLinkProposal": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "CancelDisplayVideo360AdvertiserLinkProposal": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "CreateCustomDimension": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "UpdateCustomDimension": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "ListCustomDimensions": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "ArchiveCustomDimension": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "GetCustomDimension": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "CreateCustomMetric": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "UpdateCustomMetric": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "ListCustomMetrics": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "ArchiveCustomMetric": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "GetCustomMetric": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "GetDataRetentionSettings": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "UpdateDataRetentionSettings": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "CreateDataStream": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "DeleteDataStream": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "UpdateDataStream": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "ListDataStreams": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "GetDataStream": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "GetAudience": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "ListAudiences": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "CreateAudience": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "UpdateAudience": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "ArchiveAudience": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "GetAttributionSettings": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "UpdateAttributionSettings": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "RunAccessReport": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + } + } + } + } +} diff --git a/packages/google-analytics-admin/src/v1alpha/analytics_admin_service_proto_list.json b/packages/google-analytics-admin/src/v1alpha/analytics_admin_service_proto_list.json new file mode 100644 index 00000000000..8c16da7275b --- /dev/null +++ b/packages/google-analytics-admin/src/v1alpha/analytics_admin_service_proto_list.json @@ -0,0 +1,6 @@ +[ + "../../protos/google/analytics/admin/v1alpha/access_report.proto", + "../../protos/google/analytics/admin/v1alpha/analytics_admin.proto", + "../../protos/google/analytics/admin/v1alpha/audience.proto", + "../../protos/google/analytics/admin/v1alpha/resources.proto" +] diff --git a/packages/google-analytics-admin/src/v1alpha/gapic_metadata.json b/packages/google-analytics-admin/src/v1alpha/gapic_metadata.json new file mode 100644 index 00000000000..22aae87a2a0 --- /dev/null +++ b/packages/google-analytics-admin/src/v1alpha/gapic_metadata.json @@ -0,0 +1,877 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "typescript", + "protoPackage": "google.analytics.admin.v1alpha", + "libraryPackage": "@google-analytics/admin", + "services": { + "AnalyticsAdminService": { + "clients": { + "grpc": { + "libraryClient": "AnalyticsAdminServiceClient", + "rpcs": { + "GetAccount": { + "methods": [ + "getAccount" + ] + }, + "DeleteAccount": { + "methods": [ + "deleteAccount" + ] + }, + "UpdateAccount": { + "methods": [ + "updateAccount" + ] + }, + "ProvisionAccountTicket": { + "methods": [ + "provisionAccountTicket" + ] + }, + "GetProperty": { + "methods": [ + "getProperty" + ] + }, + "CreateProperty": { + "methods": [ + "createProperty" + ] + }, + "DeleteProperty": { + "methods": [ + "deleteProperty" + ] + }, + "UpdateProperty": { + "methods": [ + "updateProperty" + ] + }, + "GetUserLink": { + "methods": [ + "getUserLink" + ] + }, + "BatchGetUserLinks": { + "methods": [ + "batchGetUserLinks" + ] + }, + "CreateUserLink": { + "methods": [ + "createUserLink" + ] + }, + "BatchCreateUserLinks": { + "methods": [ + "batchCreateUserLinks" + ] + }, + "UpdateUserLink": { + "methods": [ + "updateUserLink" + ] + }, + "BatchUpdateUserLinks": { + "methods": [ + "batchUpdateUserLinks" + ] + }, + "DeleteUserLink": { + "methods": [ + "deleteUserLink" + ] + }, + "BatchDeleteUserLinks": { + "methods": [ + "batchDeleteUserLinks" + ] + }, + "CreateFirebaseLink": { + "methods": [ + "createFirebaseLink" + ] + }, + "DeleteFirebaseLink": { + "methods": [ + "deleteFirebaseLink" + ] + }, + "GetGlobalSiteTag": { + "methods": [ + "getGlobalSiteTag" + ] + }, + "CreateGoogleAdsLink": { + "methods": [ + "createGoogleAdsLink" + ] + }, + "UpdateGoogleAdsLink": { + "methods": [ + "updateGoogleAdsLink" + ] + }, + "DeleteGoogleAdsLink": { + "methods": [ + "deleteGoogleAdsLink" + ] + }, + "GetDataSharingSettings": { + "methods": [ + "getDataSharingSettings" + ] + }, + "GetMeasurementProtocolSecret": { + "methods": [ + "getMeasurementProtocolSecret" + ] + }, + "CreateMeasurementProtocolSecret": { + "methods": [ + "createMeasurementProtocolSecret" + ] + }, + "DeleteMeasurementProtocolSecret": { + "methods": [ + "deleteMeasurementProtocolSecret" + ] + }, + "UpdateMeasurementProtocolSecret": { + "methods": [ + "updateMeasurementProtocolSecret" + ] + }, + "AcknowledgeUserDataCollection": { + "methods": [ + "acknowledgeUserDataCollection" + ] + }, + "GetGoogleSignalsSettings": { + "methods": [ + "getGoogleSignalsSettings" + ] + }, + "UpdateGoogleSignalsSettings": { + "methods": [ + "updateGoogleSignalsSettings" + ] + }, + "CreateConversionEvent": { + "methods": [ + "createConversionEvent" + ] + }, + "GetConversionEvent": { + "methods": [ + "getConversionEvent" + ] + }, + "DeleteConversionEvent": { + "methods": [ + "deleteConversionEvent" + ] + }, + "GetDisplayVideo360AdvertiserLink": { + "methods": [ + "getDisplayVideo360AdvertiserLink" + ] + }, + "CreateDisplayVideo360AdvertiserLink": { + "methods": [ + "createDisplayVideo360AdvertiserLink" + ] + }, + "DeleteDisplayVideo360AdvertiserLink": { + "methods": [ + "deleteDisplayVideo360AdvertiserLink" + ] + }, + "UpdateDisplayVideo360AdvertiserLink": { + "methods": [ + "updateDisplayVideo360AdvertiserLink" + ] + }, + "GetDisplayVideo360AdvertiserLinkProposal": { + "methods": [ + "getDisplayVideo360AdvertiserLinkProposal" + ] + }, + "CreateDisplayVideo360AdvertiserLinkProposal": { + "methods": [ + "createDisplayVideo360AdvertiserLinkProposal" + ] + }, + "DeleteDisplayVideo360AdvertiserLinkProposal": { + "methods": [ + "deleteDisplayVideo360AdvertiserLinkProposal" + ] + }, + "ApproveDisplayVideo360AdvertiserLinkProposal": { + "methods": [ + "approveDisplayVideo360AdvertiserLinkProposal" + ] + }, + "CancelDisplayVideo360AdvertiserLinkProposal": { + "methods": [ + "cancelDisplayVideo360AdvertiserLinkProposal" + ] + }, + "CreateCustomDimension": { + "methods": [ + "createCustomDimension" + ] + }, + "UpdateCustomDimension": { + "methods": [ + "updateCustomDimension" + ] + }, + "ArchiveCustomDimension": { + "methods": [ + "archiveCustomDimension" + ] + }, + "GetCustomDimension": { + "methods": [ + "getCustomDimension" + ] + }, + "CreateCustomMetric": { + "methods": [ + "createCustomMetric" + ] + }, + "UpdateCustomMetric": { + "methods": [ + "updateCustomMetric" + ] + }, + "ArchiveCustomMetric": { + "methods": [ + "archiveCustomMetric" + ] + }, + "GetCustomMetric": { + "methods": [ + "getCustomMetric" + ] + }, + "GetDataRetentionSettings": { + "methods": [ + "getDataRetentionSettings" + ] + }, + "UpdateDataRetentionSettings": { + "methods": [ + "updateDataRetentionSettings" + ] + }, + "CreateDataStream": { + "methods": [ + "createDataStream" + ] + }, + "DeleteDataStream": { + "methods": [ + "deleteDataStream" + ] + }, + "UpdateDataStream": { + "methods": [ + "updateDataStream" + ] + }, + "GetDataStream": { + "methods": [ + "getDataStream" + ] + }, + "GetAudience": { + "methods": [ + "getAudience" + ] + }, + "CreateAudience": { + "methods": [ + "createAudience" + ] + }, + "UpdateAudience": { + "methods": [ + "updateAudience" + ] + }, + "ArchiveAudience": { + "methods": [ + "archiveAudience" + ] + }, + "GetAttributionSettings": { + "methods": [ + "getAttributionSettings" + ] + }, + "UpdateAttributionSettings": { + "methods": [ + "updateAttributionSettings" + ] + }, + "RunAccessReport": { + "methods": [ + "runAccessReport" + ] + }, + "ListAccounts": { + "methods": [ + "listAccounts", + "listAccountsStream", + "listAccountsAsync" + ] + }, + "ListAccountSummaries": { + "methods": [ + "listAccountSummaries", + "listAccountSummariesStream", + "listAccountSummariesAsync" + ] + }, + "ListProperties": { + "methods": [ + "listProperties", + "listPropertiesStream", + "listPropertiesAsync" + ] + }, + "ListUserLinks": { + "methods": [ + "listUserLinks", + "listUserLinksStream", + "listUserLinksAsync" + ] + }, + "AuditUserLinks": { + "methods": [ + "auditUserLinks", + "auditUserLinksStream", + "auditUserLinksAsync" + ] + }, + "ListFirebaseLinks": { + "methods": [ + "listFirebaseLinks", + "listFirebaseLinksStream", + "listFirebaseLinksAsync" + ] + }, + "ListGoogleAdsLinks": { + "methods": [ + "listGoogleAdsLinks", + "listGoogleAdsLinksStream", + "listGoogleAdsLinksAsync" + ] + }, + "ListMeasurementProtocolSecrets": { + "methods": [ + "listMeasurementProtocolSecrets", + "listMeasurementProtocolSecretsStream", + "listMeasurementProtocolSecretsAsync" + ] + }, + "SearchChangeHistoryEvents": { + "methods": [ + "searchChangeHistoryEvents", + "searchChangeHistoryEventsStream", + "searchChangeHistoryEventsAsync" + ] + }, + "ListConversionEvents": { + "methods": [ + "listConversionEvents", + "listConversionEventsStream", + "listConversionEventsAsync" + ] + }, + "ListDisplayVideo360AdvertiserLinks": { + "methods": [ + "listDisplayVideo360AdvertiserLinks", + "listDisplayVideo360AdvertiserLinksStream", + "listDisplayVideo360AdvertiserLinksAsync" + ] + }, + "ListDisplayVideo360AdvertiserLinkProposals": { + "methods": [ + "listDisplayVideo360AdvertiserLinkProposals", + "listDisplayVideo360AdvertiserLinkProposalsStream", + "listDisplayVideo360AdvertiserLinkProposalsAsync" + ] + }, + "ListCustomDimensions": { + "methods": [ + "listCustomDimensions", + "listCustomDimensionsStream", + "listCustomDimensionsAsync" + ] + }, + "ListCustomMetrics": { + "methods": [ + "listCustomMetrics", + "listCustomMetricsStream", + "listCustomMetricsAsync" + ] + }, + "ListDataStreams": { + "methods": [ + "listDataStreams", + "listDataStreamsStream", + "listDataStreamsAsync" + ] + }, + "ListAudiences": { + "methods": [ + "listAudiences", + "listAudiencesStream", + "listAudiencesAsync" + ] + } + } + }, + "grpc-fallback": { + "libraryClient": "AnalyticsAdminServiceClient", + "rpcs": { + "GetAccount": { + "methods": [ + "getAccount" + ] + }, + "DeleteAccount": { + "methods": [ + "deleteAccount" + ] + }, + "UpdateAccount": { + "methods": [ + "updateAccount" + ] + }, + "ProvisionAccountTicket": { + "methods": [ + "provisionAccountTicket" + ] + }, + "GetProperty": { + "methods": [ + "getProperty" + ] + }, + "CreateProperty": { + "methods": [ + "createProperty" + ] + }, + "DeleteProperty": { + "methods": [ + "deleteProperty" + ] + }, + "UpdateProperty": { + "methods": [ + "updateProperty" + ] + }, + "GetUserLink": { + "methods": [ + "getUserLink" + ] + }, + "BatchGetUserLinks": { + "methods": [ + "batchGetUserLinks" + ] + }, + "CreateUserLink": { + "methods": [ + "createUserLink" + ] + }, + "BatchCreateUserLinks": { + "methods": [ + "batchCreateUserLinks" + ] + }, + "UpdateUserLink": { + "methods": [ + "updateUserLink" + ] + }, + "BatchUpdateUserLinks": { + "methods": [ + "batchUpdateUserLinks" + ] + }, + "DeleteUserLink": { + "methods": [ + "deleteUserLink" + ] + }, + "BatchDeleteUserLinks": { + "methods": [ + "batchDeleteUserLinks" + ] + }, + "CreateFirebaseLink": { + "methods": [ + "createFirebaseLink" + ] + }, + "DeleteFirebaseLink": { + "methods": [ + "deleteFirebaseLink" + ] + }, + "GetGlobalSiteTag": { + "methods": [ + "getGlobalSiteTag" + ] + }, + "CreateGoogleAdsLink": { + "methods": [ + "createGoogleAdsLink" + ] + }, + "UpdateGoogleAdsLink": { + "methods": [ + "updateGoogleAdsLink" + ] + }, + "DeleteGoogleAdsLink": { + "methods": [ + "deleteGoogleAdsLink" + ] + }, + "GetDataSharingSettings": { + "methods": [ + "getDataSharingSettings" + ] + }, + "GetMeasurementProtocolSecret": { + "methods": [ + "getMeasurementProtocolSecret" + ] + }, + "CreateMeasurementProtocolSecret": { + "methods": [ + "createMeasurementProtocolSecret" + ] + }, + "DeleteMeasurementProtocolSecret": { + "methods": [ + "deleteMeasurementProtocolSecret" + ] + }, + "UpdateMeasurementProtocolSecret": { + "methods": [ + "updateMeasurementProtocolSecret" + ] + }, + "AcknowledgeUserDataCollection": { + "methods": [ + "acknowledgeUserDataCollection" + ] + }, + "GetGoogleSignalsSettings": { + "methods": [ + "getGoogleSignalsSettings" + ] + }, + "UpdateGoogleSignalsSettings": { + "methods": [ + "updateGoogleSignalsSettings" + ] + }, + "CreateConversionEvent": { + "methods": [ + "createConversionEvent" + ] + }, + "GetConversionEvent": { + "methods": [ + "getConversionEvent" + ] + }, + "DeleteConversionEvent": { + "methods": [ + "deleteConversionEvent" + ] + }, + "GetDisplayVideo360AdvertiserLink": { + "methods": [ + "getDisplayVideo360AdvertiserLink" + ] + }, + "CreateDisplayVideo360AdvertiserLink": { + "methods": [ + "createDisplayVideo360AdvertiserLink" + ] + }, + "DeleteDisplayVideo360AdvertiserLink": { + "methods": [ + "deleteDisplayVideo360AdvertiserLink" + ] + }, + "UpdateDisplayVideo360AdvertiserLink": { + "methods": [ + "updateDisplayVideo360AdvertiserLink" + ] + }, + "GetDisplayVideo360AdvertiserLinkProposal": { + "methods": [ + "getDisplayVideo360AdvertiserLinkProposal" + ] + }, + "CreateDisplayVideo360AdvertiserLinkProposal": { + "methods": [ + "createDisplayVideo360AdvertiserLinkProposal" + ] + }, + "DeleteDisplayVideo360AdvertiserLinkProposal": { + "methods": [ + "deleteDisplayVideo360AdvertiserLinkProposal" + ] + }, + "ApproveDisplayVideo360AdvertiserLinkProposal": { + "methods": [ + "approveDisplayVideo360AdvertiserLinkProposal" + ] + }, + "CancelDisplayVideo360AdvertiserLinkProposal": { + "methods": [ + "cancelDisplayVideo360AdvertiserLinkProposal" + ] + }, + "CreateCustomDimension": { + "methods": [ + "createCustomDimension" + ] + }, + "UpdateCustomDimension": { + "methods": [ + "updateCustomDimension" + ] + }, + "ArchiveCustomDimension": { + "methods": [ + "archiveCustomDimension" + ] + }, + "GetCustomDimension": { + "methods": [ + "getCustomDimension" + ] + }, + "CreateCustomMetric": { + "methods": [ + "createCustomMetric" + ] + }, + "UpdateCustomMetric": { + "methods": [ + "updateCustomMetric" + ] + }, + "ArchiveCustomMetric": { + "methods": [ + "archiveCustomMetric" + ] + }, + "GetCustomMetric": { + "methods": [ + "getCustomMetric" + ] + }, + "GetDataRetentionSettings": { + "methods": [ + "getDataRetentionSettings" + ] + }, + "UpdateDataRetentionSettings": { + "methods": [ + "updateDataRetentionSettings" + ] + }, + "CreateDataStream": { + "methods": [ + "createDataStream" + ] + }, + "DeleteDataStream": { + "methods": [ + "deleteDataStream" + ] + }, + "UpdateDataStream": { + "methods": [ + "updateDataStream" + ] + }, + "GetDataStream": { + "methods": [ + "getDataStream" + ] + }, + "GetAudience": { + "methods": [ + "getAudience" + ] + }, + "CreateAudience": { + "methods": [ + "createAudience" + ] + }, + "UpdateAudience": { + "methods": [ + "updateAudience" + ] + }, + "ArchiveAudience": { + "methods": [ + "archiveAudience" + ] + }, + "GetAttributionSettings": { + "methods": [ + "getAttributionSettings" + ] + }, + "UpdateAttributionSettings": { + "methods": [ + "updateAttributionSettings" + ] + }, + "RunAccessReport": { + "methods": [ + "runAccessReport" + ] + }, + "ListAccounts": { + "methods": [ + "listAccounts", + "listAccountsStream", + "listAccountsAsync" + ] + }, + "ListAccountSummaries": { + "methods": [ + "listAccountSummaries", + "listAccountSummariesStream", + "listAccountSummariesAsync" + ] + }, + "ListProperties": { + "methods": [ + "listProperties", + "listPropertiesStream", + "listPropertiesAsync" + ] + }, + "ListUserLinks": { + "methods": [ + "listUserLinks", + "listUserLinksStream", + "listUserLinksAsync" + ] + }, + "AuditUserLinks": { + "methods": [ + "auditUserLinks", + "auditUserLinksStream", + "auditUserLinksAsync" + ] + }, + "ListFirebaseLinks": { + "methods": [ + "listFirebaseLinks", + "listFirebaseLinksStream", + "listFirebaseLinksAsync" + ] + }, + "ListGoogleAdsLinks": { + "methods": [ + "listGoogleAdsLinks", + "listGoogleAdsLinksStream", + "listGoogleAdsLinksAsync" + ] + }, + "ListMeasurementProtocolSecrets": { + "methods": [ + "listMeasurementProtocolSecrets", + "listMeasurementProtocolSecretsStream", + "listMeasurementProtocolSecretsAsync" + ] + }, + "SearchChangeHistoryEvents": { + "methods": [ + "searchChangeHistoryEvents", + "searchChangeHistoryEventsStream", + "searchChangeHistoryEventsAsync" + ] + }, + "ListConversionEvents": { + "methods": [ + "listConversionEvents", + "listConversionEventsStream", + "listConversionEventsAsync" + ] + }, + "ListDisplayVideo360AdvertiserLinks": { + "methods": [ + "listDisplayVideo360AdvertiserLinks", + "listDisplayVideo360AdvertiserLinksStream", + "listDisplayVideo360AdvertiserLinksAsync" + ] + }, + "ListDisplayVideo360AdvertiserLinkProposals": { + "methods": [ + "listDisplayVideo360AdvertiserLinkProposals", + "listDisplayVideo360AdvertiserLinkProposalsStream", + "listDisplayVideo360AdvertiserLinkProposalsAsync" + ] + }, + "ListCustomDimensions": { + "methods": [ + "listCustomDimensions", + "listCustomDimensionsStream", + "listCustomDimensionsAsync" + ] + }, + "ListCustomMetrics": { + "methods": [ + "listCustomMetrics", + "listCustomMetricsStream", + "listCustomMetricsAsync" + ] + }, + "ListDataStreams": { + "methods": [ + "listDataStreams", + "listDataStreamsStream", + "listDataStreamsAsync" + ] + }, + "ListAudiences": { + "methods": [ + "listAudiences", + "listAudiencesStream", + "listAudiencesAsync" + ] + } + } + } + } + } + } +} diff --git a/packages/google-analytics-admin/src/v1alpha/index.ts b/packages/google-analytics-admin/src/v1alpha/index.ts new file mode 100644 index 00000000000..6836b1c433a --- /dev/null +++ b/packages/google-analytics-admin/src/v1alpha/index.ts @@ -0,0 +1,19 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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 {AnalyticsAdminServiceClient} from './analytics_admin_service_client'; diff --git a/packages/google-analytics-admin/src/v1beta/analytics_admin_service_client.ts b/packages/google-analytics-admin/src/v1beta/analytics_admin_service_client.ts new file mode 100644 index 00000000000..8a53f70eebf --- /dev/null +++ b/packages/google-analytics-admin/src/v1beta/analytics_admin_service_client.ts @@ -0,0 +1,6847 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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'); +/** + * Client JSON configuration object, loaded from + * `src/v1beta/analytics_admin_service_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ +import * as gapicConfig from './analytics_admin_service_client_config.json'; +const version = require('../../../package.json').version; + +/** + * Service Interface for the Analytics Admin API (GA4). + * @class + * @memberof v1beta + */ +export class AnalyticsAdminServiceClient { + 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}; + 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}; + analyticsAdminServiceStub?: Promise<{[name: string]: Function}>; + + /** + * Construct an instance of AnalyticsAdminServiceClient. + * + * @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://developers.google.com/identity/protocols/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 | "rest"} [options.fallback] - Use HTTP fallback mode. + * Pass "rest" to use HTTP/1.1 REST API instead of gRPC. + * 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 AnalyticsAdminServiceClient({fallback: 'rest'}, gax); + * ``` + */ + constructor( + opts?: ClientOptions, + gaxInstance?: typeof gax | typeof gax.fallback + ) { + // Ensure that options include all the required fields. + const staticMembers = this + .constructor as typeof AnalyticsAdminServiceClient; + const servicePath = + opts?.servicePath || opts?.apiEndpoint || staticMembers.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); + + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. + if (servicePath !== staticMembers.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 = staticMembers.servicePath; + + // Set the default scopes in auth client if needed. + if (servicePath === staticMembers.servicePath) { + this.auth.defaultScopes = staticMembers.scopes; + } + + // Determine the client header string. + const clientHeader = [`gax/${this._gaxModule.version}`, `gapic/${version}`]; + if (typeof process !== 'undefined' && '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 if (opts.fallback === 'rest') { + 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( + 'accounts/{account}' + ), + accountSummaryPathTemplate: new this._gaxModule.PathTemplate( + 'accountSummaries/{account_summary}' + ), + conversionEventPathTemplate: new this._gaxModule.PathTemplate( + 'properties/{property}/conversionEvents/{conversion_event}' + ), + customDimensionPathTemplate: new this._gaxModule.PathTemplate( + 'properties/{property}/customDimensions/{custom_dimension}' + ), + customMetricPathTemplate: new this._gaxModule.PathTemplate( + 'properties/{property}/customMetrics/{custom_metric}' + ), + dataRetentionSettingsPathTemplate: new this._gaxModule.PathTemplate( + 'properties/{property}/dataRetentionSettings' + ), + dataSharingSettingsPathTemplate: new this._gaxModule.PathTemplate( + 'accounts/{account}/dataSharingSettings' + ), + dataStreamPathTemplate: new this._gaxModule.PathTemplate( + 'properties/{property}/dataStreams/{data_stream}' + ), + firebaseLinkPathTemplate: new this._gaxModule.PathTemplate( + 'properties/{property}/firebaseLinks/{firebase_link}' + ), + googleAdsLinkPathTemplate: new this._gaxModule.PathTemplate( + 'properties/{property}/googleAdsLinks/{google_ads_link}' + ), + measurementProtocolSecretPathTemplate: new this._gaxModule.PathTemplate( + 'properties/{property}/dataStreams/{data_stream}/measurementProtocolSecrets/{measurement_protocol_secret}' + ), + propertyPathTemplate: new this._gaxModule.PathTemplate( + 'properties/{property}' + ), + }; + + // Some of the methods on this service return "paged" results, + // (e.g. 50 results at a time, with tokens to get subsequent + // pages). Denote the keys used for pagination and results. + this.descriptors.page = { + listAccounts: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'accounts' + ), + listAccountSummaries: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'accountSummaries' + ), + listProperties: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'properties' + ), + listFirebaseLinks: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'firebaseLinks' + ), + listGoogleAdsLinks: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'googleAdsLinks' + ), + listMeasurementProtocolSecrets: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'measurementProtocolSecrets' + ), + searchChangeHistoryEvents: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'changeHistoryEvents' + ), + listConversionEvents: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'conversionEvents' + ), + listCustomDimensions: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'customDimensions' + ), + listCustomMetrics: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'customMetrics' + ), + listDataStreams: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'dataStreams' + ), + }; + + // Put together the default options sent with requests. + this._defaults = this._gaxGrpc.constructSettings( + 'google.analytics.admin.v1beta.AnalyticsAdminService', + 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.analyticsAdminServiceStub) { + return this.analyticsAdminServiceStub; + } + + // Put together the "service stub" for + // google.analytics.admin.v1beta.AnalyticsAdminService. + this.analyticsAdminServiceStub = this._gaxGrpc.createStub( + this._opts.fallback + ? (this._protos as protobuf.Root).lookupService( + 'google.analytics.admin.v1beta.AnalyticsAdminService' + ) + : // eslint-disable-next-line @typescript-eslint/no-explicit-any + (this._protos as any).google.analytics.admin.v1beta + .AnalyticsAdminService, + 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 analyticsAdminServiceStubMethods = [ + 'getAccount', + 'listAccounts', + 'deleteAccount', + 'updateAccount', + 'provisionAccountTicket', + 'listAccountSummaries', + 'getProperty', + 'listProperties', + 'createProperty', + 'deleteProperty', + 'updateProperty', + 'createFirebaseLink', + 'deleteFirebaseLink', + 'listFirebaseLinks', + 'createGoogleAdsLink', + 'updateGoogleAdsLink', + 'deleteGoogleAdsLink', + 'listGoogleAdsLinks', + 'getDataSharingSettings', + 'getMeasurementProtocolSecret', + 'listMeasurementProtocolSecrets', + 'createMeasurementProtocolSecret', + 'deleteMeasurementProtocolSecret', + 'updateMeasurementProtocolSecret', + 'acknowledgeUserDataCollection', + 'searchChangeHistoryEvents', + 'createConversionEvent', + 'getConversionEvent', + 'deleteConversionEvent', + 'listConversionEvents', + 'createCustomDimension', + 'updateCustomDimension', + 'listCustomDimensions', + 'archiveCustomDimension', + 'getCustomDimension', + 'createCustomMetric', + 'updateCustomMetric', + 'listCustomMetrics', + 'archiveCustomMetric', + 'getCustomMetric', + 'getDataRetentionSettings', + 'updateDataRetentionSettings', + 'createDataStream', + 'deleteDataStream', + 'updateDataStream', + 'listDataStreams', + 'getDataStream', + ]; + for (const methodName of analyticsAdminServiceStubMethods) { + const callPromise = this.analyticsAdminServiceStub.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.analyticsAdminServiceStub; + } + + /** + * The DNS address for this API service. + * @returns {string} The DNS address for this service. + */ + static get servicePath() { + return 'analyticsadmin.googleapis.com'; + } + + /** + * The DNS address for this API service - same as servicePath(), + * exists for compatibility reasons. + * @returns {string} The DNS address for this service. + */ + static get apiEndpoint() { + return 'analyticsadmin.googleapis.com'; + } + + /** + * The port for this API service. + * @returns {number} The default port for this service. + */ + static get port() { + return 443; + } + + /** + * The scopes needed to make gRPC calls for every method defined + * in this service. + * @returns {string[]} List of default scopes. + */ + static get scopes() { + return [ + 'https://www.googleapis.com/auth/analytics.edit', + 'https://www.googleapis.com/auth/analytics.readonly', + ]; + } + + getProjectId(): Promise; + getProjectId(callback: Callback): void; + /** + * Return the project ID used by this class. + * @returns {Promise} A promise that resolves to string containing the project ID. + */ + getProjectId( + callback?: Callback + ): Promise | void { + if (callback) { + this.auth.getProjectId(callback); + return; + } + return this.auth.getProjectId(); + } + + // ------------------- + // -- Service calls -- + // ------------------- + /** + * Lookup for a single Account. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the account to lookup. + * Format: accounts/{account} + * Example: "accounts/100" + * @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 [Account]{@link google.analytics.admin.v1beta.Account}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta/analytics_admin_service.get_account.js + * region_tag:analyticsadmin_v1beta_generated_AnalyticsAdminService_GetAccount_async + */ + getAccount( + request?: protos.google.analytics.admin.v1beta.IGetAccountRequest, + options?: CallOptions + ): Promise< + [ + protos.google.analytics.admin.v1beta.IAccount, + protos.google.analytics.admin.v1beta.IGetAccountRequest | undefined, + {} | undefined + ] + >; + getAccount( + request: protos.google.analytics.admin.v1beta.IGetAccountRequest, + options: CallOptions, + callback: Callback< + protos.google.analytics.admin.v1beta.IAccount, + | protos.google.analytics.admin.v1beta.IGetAccountRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getAccount( + request: protos.google.analytics.admin.v1beta.IGetAccountRequest, + callback: Callback< + protos.google.analytics.admin.v1beta.IAccount, + | protos.google.analytics.admin.v1beta.IGetAccountRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getAccount( + request?: protos.google.analytics.admin.v1beta.IGetAccountRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.analytics.admin.v1beta.IAccount, + | protos.google.analytics.admin.v1beta.IGetAccountRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.analytics.admin.v1beta.IAccount, + | protos.google.analytics.admin.v1beta.IGetAccountRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.analytics.admin.v1beta.IAccount, + protos.google.analytics.admin.v1beta.IGetAccountRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.getAccount(request, options, callback); + } + /** + * Marks target Account as soft-deleted (ie: "trashed") and returns it. + * + * This API does not have a method to restore soft-deleted accounts. + * However, they can be restored using the Trash Can UI. + * + * If the accounts are not restored before the expiration time, the account + * and all child resources (eg: Properties, GoogleAdsLinks, Streams, + * UserLinks) will be permanently purged. + * https://support.google.com/analytics/answer/6154772 + * + * Returns an error if the target is not found. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the Account to soft-delete. + * Format: accounts/{account} + * Example: "accounts/100" + * @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 [Empty]{@link google.protobuf.Empty}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta/analytics_admin_service.delete_account.js + * region_tag:analyticsadmin_v1beta_generated_AnalyticsAdminService_DeleteAccount_async + */ + deleteAccount( + request?: protos.google.analytics.admin.v1beta.IDeleteAccountRequest, + options?: CallOptions + ): Promise< + [ + protos.google.protobuf.IEmpty, + protos.google.analytics.admin.v1beta.IDeleteAccountRequest | undefined, + {} | undefined + ] + >; + deleteAccount( + request: protos.google.analytics.admin.v1beta.IDeleteAccountRequest, + options: CallOptions, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.analytics.admin.v1beta.IDeleteAccountRequest + | null + | undefined, + {} | null | undefined + > + ): void; + deleteAccount( + request: protos.google.analytics.admin.v1beta.IDeleteAccountRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.analytics.admin.v1beta.IDeleteAccountRequest + | null + | undefined, + {} | null | undefined + > + ): void; + deleteAccount( + request?: protos.google.analytics.admin.v1beta.IDeleteAccountRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.protobuf.IEmpty, + | protos.google.analytics.admin.v1beta.IDeleteAccountRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.IEmpty, + | protos.google.analytics.admin.v1beta.IDeleteAccountRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.protobuf.IEmpty, + protos.google.analytics.admin.v1beta.IDeleteAccountRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.deleteAccount(request, options, callback); + } + /** + * Updates an account. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.analytics.admin.v1beta.Account} request.account + * Required. The account to update. + * The account's `name` field is used to identify the account. + * @param {google.protobuf.FieldMask} request.updateMask + * Required. The list of fields to be updated. Field names must be in snake case + * (e.g., "field_to_update"). Omitted fields will not be updated. To replace + * the entire entity, use one path with the string "*" to match all fields. + * @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 [Account]{@link google.analytics.admin.v1beta.Account}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta/analytics_admin_service.update_account.js + * region_tag:analyticsadmin_v1beta_generated_AnalyticsAdminService_UpdateAccount_async + */ + updateAccount( + request?: protos.google.analytics.admin.v1beta.IUpdateAccountRequest, + options?: CallOptions + ): Promise< + [ + protos.google.analytics.admin.v1beta.IAccount, + protos.google.analytics.admin.v1beta.IUpdateAccountRequest | undefined, + {} | undefined + ] + >; + updateAccount( + request: protos.google.analytics.admin.v1beta.IUpdateAccountRequest, + options: CallOptions, + callback: Callback< + protos.google.analytics.admin.v1beta.IAccount, + | protos.google.analytics.admin.v1beta.IUpdateAccountRequest + | null + | undefined, + {} | null | undefined + > + ): void; + updateAccount( + request: protos.google.analytics.admin.v1beta.IUpdateAccountRequest, + callback: Callback< + protos.google.analytics.admin.v1beta.IAccount, + | protos.google.analytics.admin.v1beta.IUpdateAccountRequest + | null + | undefined, + {} | null | undefined + > + ): void; + updateAccount( + request?: protos.google.analytics.admin.v1beta.IUpdateAccountRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.analytics.admin.v1beta.IAccount, + | protos.google.analytics.admin.v1beta.IUpdateAccountRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.analytics.admin.v1beta.IAccount, + | protos.google.analytics.admin.v1beta.IUpdateAccountRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.analytics.admin.v1beta.IAccount, + protos.google.analytics.admin.v1beta.IUpdateAccountRequest | 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({ + 'account.name': request.account!.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.updateAccount(request, options, callback); + } + /** + * Requests a ticket for creating an account. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.analytics.admin.v1beta.Account} request.account + * The account to create. + * @param {string} request.redirectUri + * Redirect URI where the user will be sent after accepting Terms of Service. + * Must be configured in Developers Console as a Redirect URI + * @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 [ProvisionAccountTicketResponse]{@link google.analytics.admin.v1beta.ProvisionAccountTicketResponse}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta/analytics_admin_service.provision_account_ticket.js + * region_tag:analyticsadmin_v1beta_generated_AnalyticsAdminService_ProvisionAccountTicket_async + */ + provisionAccountTicket( + request?: protos.google.analytics.admin.v1beta.IProvisionAccountTicketRequest, + options?: CallOptions + ): Promise< + [ + protos.google.analytics.admin.v1beta.IProvisionAccountTicketResponse, + ( + | protos.google.analytics.admin.v1beta.IProvisionAccountTicketRequest + | undefined + ), + {} | undefined + ] + >; + provisionAccountTicket( + request: protos.google.analytics.admin.v1beta.IProvisionAccountTicketRequest, + options: CallOptions, + callback: Callback< + protos.google.analytics.admin.v1beta.IProvisionAccountTicketResponse, + | protos.google.analytics.admin.v1beta.IProvisionAccountTicketRequest + | null + | undefined, + {} | null | undefined + > + ): void; + provisionAccountTicket( + request: protos.google.analytics.admin.v1beta.IProvisionAccountTicketRequest, + callback: Callback< + protos.google.analytics.admin.v1beta.IProvisionAccountTicketResponse, + | protos.google.analytics.admin.v1beta.IProvisionAccountTicketRequest + | null + | undefined, + {} | null | undefined + > + ): void; + provisionAccountTicket( + request?: protos.google.analytics.admin.v1beta.IProvisionAccountTicketRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.analytics.admin.v1beta.IProvisionAccountTicketResponse, + | protos.google.analytics.admin.v1beta.IProvisionAccountTicketRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.analytics.admin.v1beta.IProvisionAccountTicketResponse, + | protos.google.analytics.admin.v1beta.IProvisionAccountTicketRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.analytics.admin.v1beta.IProvisionAccountTicketResponse, + ( + | protos.google.analytics.admin.v1beta.IProvisionAccountTicketRequest + | 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(); + return this.innerApiCalls.provisionAccountTicket( + request, + options, + callback + ); + } + /** + * Lookup for a single "GA4" Property. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the property to lookup. + * Format: properties/{property_id} + * Example: "properties/1000" + * @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 [Property]{@link google.analytics.admin.v1beta.Property}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta/analytics_admin_service.get_property.js + * region_tag:analyticsadmin_v1beta_generated_AnalyticsAdminService_GetProperty_async + */ + getProperty( + request?: protos.google.analytics.admin.v1beta.IGetPropertyRequest, + options?: CallOptions + ): Promise< + [ + protos.google.analytics.admin.v1beta.IProperty, + protos.google.analytics.admin.v1beta.IGetPropertyRequest | undefined, + {} | undefined + ] + >; + getProperty( + request: protos.google.analytics.admin.v1beta.IGetPropertyRequest, + options: CallOptions, + callback: Callback< + protos.google.analytics.admin.v1beta.IProperty, + | protos.google.analytics.admin.v1beta.IGetPropertyRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getProperty( + request: protos.google.analytics.admin.v1beta.IGetPropertyRequest, + callback: Callback< + protos.google.analytics.admin.v1beta.IProperty, + | protos.google.analytics.admin.v1beta.IGetPropertyRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getProperty( + request?: protos.google.analytics.admin.v1beta.IGetPropertyRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.analytics.admin.v1beta.IProperty, + | protos.google.analytics.admin.v1beta.IGetPropertyRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.analytics.admin.v1beta.IProperty, + | protos.google.analytics.admin.v1beta.IGetPropertyRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.analytics.admin.v1beta.IProperty, + protos.google.analytics.admin.v1beta.IGetPropertyRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.getProperty(request, options, callback); + } + /** + * Creates an "GA4" property with the specified location and attributes. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.analytics.admin.v1beta.Property} request.property + * Required. The property to create. + * Note: the supplied property must specify its parent. + * @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 [Property]{@link google.analytics.admin.v1beta.Property}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta/analytics_admin_service.create_property.js + * region_tag:analyticsadmin_v1beta_generated_AnalyticsAdminService_CreateProperty_async + */ + createProperty( + request?: protos.google.analytics.admin.v1beta.ICreatePropertyRequest, + options?: CallOptions + ): Promise< + [ + protos.google.analytics.admin.v1beta.IProperty, + protos.google.analytics.admin.v1beta.ICreatePropertyRequest | undefined, + {} | undefined + ] + >; + createProperty( + request: protos.google.analytics.admin.v1beta.ICreatePropertyRequest, + options: CallOptions, + callback: Callback< + protos.google.analytics.admin.v1beta.IProperty, + | protos.google.analytics.admin.v1beta.ICreatePropertyRequest + | null + | undefined, + {} | null | undefined + > + ): void; + createProperty( + request: protos.google.analytics.admin.v1beta.ICreatePropertyRequest, + callback: Callback< + protos.google.analytics.admin.v1beta.IProperty, + | protos.google.analytics.admin.v1beta.ICreatePropertyRequest + | null + | undefined, + {} | null | undefined + > + ): void; + createProperty( + request?: protos.google.analytics.admin.v1beta.ICreatePropertyRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.analytics.admin.v1beta.IProperty, + | protos.google.analytics.admin.v1beta.ICreatePropertyRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.analytics.admin.v1beta.IProperty, + | protos.google.analytics.admin.v1beta.ICreatePropertyRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.analytics.admin.v1beta.IProperty, + protos.google.analytics.admin.v1beta.ICreatePropertyRequest | 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(); + return this.innerApiCalls.createProperty(request, options, callback); + } + /** + * Marks target Property as soft-deleted (ie: "trashed") and returns it. + * + * This API does not have a method to restore soft-deleted properties. + * However, they can be restored using the Trash Can UI. + * + * If the properties are not restored before the expiration time, the Property + * and all child resources (eg: GoogleAdsLinks, Streams, UserLinks) + * will be permanently purged. + * https://support.google.com/analytics/answer/6154772 + * + * Returns an error if the target is not found, or is not an GA4 Property. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the Property to soft-delete. + * Format: properties/{property_id} + * Example: "properties/1000" + * @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 [Property]{@link google.analytics.admin.v1beta.Property}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta/analytics_admin_service.delete_property.js + * region_tag:analyticsadmin_v1beta_generated_AnalyticsAdminService_DeleteProperty_async + */ + deleteProperty( + request?: protos.google.analytics.admin.v1beta.IDeletePropertyRequest, + options?: CallOptions + ): Promise< + [ + protos.google.analytics.admin.v1beta.IProperty, + protos.google.analytics.admin.v1beta.IDeletePropertyRequest | undefined, + {} | undefined + ] + >; + deleteProperty( + request: protos.google.analytics.admin.v1beta.IDeletePropertyRequest, + options: CallOptions, + callback: Callback< + protos.google.analytics.admin.v1beta.IProperty, + | protos.google.analytics.admin.v1beta.IDeletePropertyRequest + | null + | undefined, + {} | null | undefined + > + ): void; + deleteProperty( + request: protos.google.analytics.admin.v1beta.IDeletePropertyRequest, + callback: Callback< + protos.google.analytics.admin.v1beta.IProperty, + | protos.google.analytics.admin.v1beta.IDeletePropertyRequest + | null + | undefined, + {} | null | undefined + > + ): void; + deleteProperty( + request?: protos.google.analytics.admin.v1beta.IDeletePropertyRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.analytics.admin.v1beta.IProperty, + | protos.google.analytics.admin.v1beta.IDeletePropertyRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.analytics.admin.v1beta.IProperty, + | protos.google.analytics.admin.v1beta.IDeletePropertyRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.analytics.admin.v1beta.IProperty, + protos.google.analytics.admin.v1beta.IDeletePropertyRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.deleteProperty(request, options, callback); + } + /** + * Updates a property. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.analytics.admin.v1beta.Property} request.property + * Required. The property to update. + * The property's `name` field is used to identify the property to be + * updated. + * @param {google.protobuf.FieldMask} request.updateMask + * Required. The list of fields to be updated. Field names must be in snake case + * (e.g., "field_to_update"). Omitted fields will not be updated. To replace + * the entire entity, use one path with the string "*" to match all fields. + * @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 [Property]{@link google.analytics.admin.v1beta.Property}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta/analytics_admin_service.update_property.js + * region_tag:analyticsadmin_v1beta_generated_AnalyticsAdminService_UpdateProperty_async + */ + updateProperty( + request?: protos.google.analytics.admin.v1beta.IUpdatePropertyRequest, + options?: CallOptions + ): Promise< + [ + protos.google.analytics.admin.v1beta.IProperty, + protos.google.analytics.admin.v1beta.IUpdatePropertyRequest | undefined, + {} | undefined + ] + >; + updateProperty( + request: protos.google.analytics.admin.v1beta.IUpdatePropertyRequest, + options: CallOptions, + callback: Callback< + protos.google.analytics.admin.v1beta.IProperty, + | protos.google.analytics.admin.v1beta.IUpdatePropertyRequest + | null + | undefined, + {} | null | undefined + > + ): void; + updateProperty( + request: protos.google.analytics.admin.v1beta.IUpdatePropertyRequest, + callback: Callback< + protos.google.analytics.admin.v1beta.IProperty, + | protos.google.analytics.admin.v1beta.IUpdatePropertyRequest + | null + | undefined, + {} | null | undefined + > + ): void; + updateProperty( + request?: protos.google.analytics.admin.v1beta.IUpdatePropertyRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.analytics.admin.v1beta.IProperty, + | protos.google.analytics.admin.v1beta.IUpdatePropertyRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.analytics.admin.v1beta.IProperty, + | protos.google.analytics.admin.v1beta.IUpdatePropertyRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.analytics.admin.v1beta.IProperty, + protos.google.analytics.admin.v1beta.IUpdatePropertyRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + 'property.name': request.property!.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.updateProperty(request, options, callback); + } + /** + * Creates a FirebaseLink. + * + * Properties can have at most one FirebaseLink. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Format: properties/{property_id} + * Example: properties/1234 + * @param {google.analytics.admin.v1beta.FirebaseLink} request.firebaseLink + * Required. The Firebase 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 [FirebaseLink]{@link google.analytics.admin.v1beta.FirebaseLink}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta/analytics_admin_service.create_firebase_link.js + * region_tag:analyticsadmin_v1beta_generated_AnalyticsAdminService_CreateFirebaseLink_async + */ + createFirebaseLink( + request?: protos.google.analytics.admin.v1beta.ICreateFirebaseLinkRequest, + options?: CallOptions + ): Promise< + [ + protos.google.analytics.admin.v1beta.IFirebaseLink, + ( + | protos.google.analytics.admin.v1beta.ICreateFirebaseLinkRequest + | undefined + ), + {} | undefined + ] + >; + createFirebaseLink( + request: protos.google.analytics.admin.v1beta.ICreateFirebaseLinkRequest, + options: CallOptions, + callback: Callback< + protos.google.analytics.admin.v1beta.IFirebaseLink, + | protos.google.analytics.admin.v1beta.ICreateFirebaseLinkRequest + | null + | undefined, + {} | null | undefined + > + ): void; + createFirebaseLink( + request: protos.google.analytics.admin.v1beta.ICreateFirebaseLinkRequest, + callback: Callback< + protos.google.analytics.admin.v1beta.IFirebaseLink, + | protos.google.analytics.admin.v1beta.ICreateFirebaseLinkRequest + | null + | undefined, + {} | null | undefined + > + ): void; + createFirebaseLink( + request?: protos.google.analytics.admin.v1beta.ICreateFirebaseLinkRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.analytics.admin.v1beta.IFirebaseLink, + | protos.google.analytics.admin.v1beta.ICreateFirebaseLinkRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.analytics.admin.v1beta.IFirebaseLink, + | protos.google.analytics.admin.v1beta.ICreateFirebaseLinkRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.analytics.admin.v1beta.IFirebaseLink, + ( + | protos.google.analytics.admin.v1beta.ICreateFirebaseLinkRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize(); + return this.innerApiCalls.createFirebaseLink(request, options, callback); + } + /** + * Deletes a FirebaseLink on a property + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Format: properties/{property_id}/firebaseLinks/{firebase_link_id} + * Example: properties/1234/firebaseLinks/5678 + * @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 [Empty]{@link google.protobuf.Empty}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta/analytics_admin_service.delete_firebase_link.js + * region_tag:analyticsadmin_v1beta_generated_AnalyticsAdminService_DeleteFirebaseLink_async + */ + deleteFirebaseLink( + request?: protos.google.analytics.admin.v1beta.IDeleteFirebaseLinkRequest, + options?: CallOptions + ): Promise< + [ + protos.google.protobuf.IEmpty, + ( + | protos.google.analytics.admin.v1beta.IDeleteFirebaseLinkRequest + | undefined + ), + {} | undefined + ] + >; + deleteFirebaseLink( + request: protos.google.analytics.admin.v1beta.IDeleteFirebaseLinkRequest, + options: CallOptions, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.analytics.admin.v1beta.IDeleteFirebaseLinkRequest + | null + | undefined, + {} | null | undefined + > + ): void; + deleteFirebaseLink( + request: protos.google.analytics.admin.v1beta.IDeleteFirebaseLinkRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.analytics.admin.v1beta.IDeleteFirebaseLinkRequest + | null + | undefined, + {} | null | undefined + > + ): void; + deleteFirebaseLink( + request?: protos.google.analytics.admin.v1beta.IDeleteFirebaseLinkRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.protobuf.IEmpty, + | protos.google.analytics.admin.v1beta.IDeleteFirebaseLinkRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.IEmpty, + | protos.google.analytics.admin.v1beta.IDeleteFirebaseLinkRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.protobuf.IEmpty, + ( + | protos.google.analytics.admin.v1beta.IDeleteFirebaseLinkRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.deleteFirebaseLink(request, options, callback); + } + /** + * Creates a GoogleAdsLink. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Example format: properties/1234 + * @param {google.analytics.admin.v1beta.GoogleAdsLink} request.googleAdsLink + * Required. The GoogleAdsLink 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 [GoogleAdsLink]{@link google.analytics.admin.v1beta.GoogleAdsLink}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta/analytics_admin_service.create_google_ads_link.js + * region_tag:analyticsadmin_v1beta_generated_AnalyticsAdminService_CreateGoogleAdsLink_async + */ + createGoogleAdsLink( + request?: protos.google.analytics.admin.v1beta.ICreateGoogleAdsLinkRequest, + options?: CallOptions + ): Promise< + [ + protos.google.analytics.admin.v1beta.IGoogleAdsLink, + ( + | protos.google.analytics.admin.v1beta.ICreateGoogleAdsLinkRequest + | undefined + ), + {} | undefined + ] + >; + createGoogleAdsLink( + request: protos.google.analytics.admin.v1beta.ICreateGoogleAdsLinkRequest, + options: CallOptions, + callback: Callback< + protos.google.analytics.admin.v1beta.IGoogleAdsLink, + | protos.google.analytics.admin.v1beta.ICreateGoogleAdsLinkRequest + | null + | undefined, + {} | null | undefined + > + ): void; + createGoogleAdsLink( + request: protos.google.analytics.admin.v1beta.ICreateGoogleAdsLinkRequest, + callback: Callback< + protos.google.analytics.admin.v1beta.IGoogleAdsLink, + | protos.google.analytics.admin.v1beta.ICreateGoogleAdsLinkRequest + | null + | undefined, + {} | null | undefined + > + ): void; + createGoogleAdsLink( + request?: protos.google.analytics.admin.v1beta.ICreateGoogleAdsLinkRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.analytics.admin.v1beta.IGoogleAdsLink, + | protos.google.analytics.admin.v1beta.ICreateGoogleAdsLinkRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.analytics.admin.v1beta.IGoogleAdsLink, + | protos.google.analytics.admin.v1beta.ICreateGoogleAdsLinkRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.analytics.admin.v1beta.IGoogleAdsLink, + ( + | protos.google.analytics.admin.v1beta.ICreateGoogleAdsLinkRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize(); + return this.innerApiCalls.createGoogleAdsLink(request, options, callback); + } + /** + * Updates a GoogleAdsLink on a property + * + * @param {Object} request + * The request object that will be sent. + * @param {google.analytics.admin.v1beta.GoogleAdsLink} request.googleAdsLink + * The GoogleAdsLink to update + * @param {google.protobuf.FieldMask} request.updateMask + * Required. The list of fields to be updated. Field names must be in snake case + * (e.g., "field_to_update"). Omitted fields will not be updated. To replace + * the entire entity, use one path with the string "*" to match all fields. + * @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 [GoogleAdsLink]{@link google.analytics.admin.v1beta.GoogleAdsLink}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta/analytics_admin_service.update_google_ads_link.js + * region_tag:analyticsadmin_v1beta_generated_AnalyticsAdminService_UpdateGoogleAdsLink_async + */ + updateGoogleAdsLink( + request?: protos.google.analytics.admin.v1beta.IUpdateGoogleAdsLinkRequest, + options?: CallOptions + ): Promise< + [ + protos.google.analytics.admin.v1beta.IGoogleAdsLink, + ( + | protos.google.analytics.admin.v1beta.IUpdateGoogleAdsLinkRequest + | undefined + ), + {} | undefined + ] + >; + updateGoogleAdsLink( + request: protos.google.analytics.admin.v1beta.IUpdateGoogleAdsLinkRequest, + options: CallOptions, + callback: Callback< + protos.google.analytics.admin.v1beta.IGoogleAdsLink, + | protos.google.analytics.admin.v1beta.IUpdateGoogleAdsLinkRequest + | null + | undefined, + {} | null | undefined + > + ): void; + updateGoogleAdsLink( + request: protos.google.analytics.admin.v1beta.IUpdateGoogleAdsLinkRequest, + callback: Callback< + protos.google.analytics.admin.v1beta.IGoogleAdsLink, + | protos.google.analytics.admin.v1beta.IUpdateGoogleAdsLinkRequest + | null + | undefined, + {} | null | undefined + > + ): void; + updateGoogleAdsLink( + request?: protos.google.analytics.admin.v1beta.IUpdateGoogleAdsLinkRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.analytics.admin.v1beta.IGoogleAdsLink, + | protos.google.analytics.admin.v1beta.IUpdateGoogleAdsLinkRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.analytics.admin.v1beta.IGoogleAdsLink, + | protos.google.analytics.admin.v1beta.IUpdateGoogleAdsLinkRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.analytics.admin.v1beta.IGoogleAdsLink, + ( + | protos.google.analytics.admin.v1beta.IUpdateGoogleAdsLinkRequest + | 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({ + 'google_ads_link.name': request.googleAdsLink!.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.updateGoogleAdsLink(request, options, callback); + } + /** + * Deletes a GoogleAdsLink on a property + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Example format: properties/1234/googleAdsLinks/5678 + * @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 [Empty]{@link google.protobuf.Empty}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta/analytics_admin_service.delete_google_ads_link.js + * region_tag:analyticsadmin_v1beta_generated_AnalyticsAdminService_DeleteGoogleAdsLink_async + */ + deleteGoogleAdsLink( + request?: protos.google.analytics.admin.v1beta.IDeleteGoogleAdsLinkRequest, + options?: CallOptions + ): Promise< + [ + protos.google.protobuf.IEmpty, + ( + | protos.google.analytics.admin.v1beta.IDeleteGoogleAdsLinkRequest + | undefined + ), + {} | undefined + ] + >; + deleteGoogleAdsLink( + request: protos.google.analytics.admin.v1beta.IDeleteGoogleAdsLinkRequest, + options: CallOptions, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.analytics.admin.v1beta.IDeleteGoogleAdsLinkRequest + | null + | undefined, + {} | null | undefined + > + ): void; + deleteGoogleAdsLink( + request: protos.google.analytics.admin.v1beta.IDeleteGoogleAdsLinkRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.analytics.admin.v1beta.IDeleteGoogleAdsLinkRequest + | null + | undefined, + {} | null | undefined + > + ): void; + deleteGoogleAdsLink( + request?: protos.google.analytics.admin.v1beta.IDeleteGoogleAdsLinkRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.protobuf.IEmpty, + | protos.google.analytics.admin.v1beta.IDeleteGoogleAdsLinkRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.IEmpty, + | protos.google.analytics.admin.v1beta.IDeleteGoogleAdsLinkRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.protobuf.IEmpty, + ( + | protos.google.analytics.admin.v1beta.IDeleteGoogleAdsLinkRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.deleteGoogleAdsLink(request, options, callback); + } + /** + * Get data sharing settings on an account. + * Data sharing settings are singletons. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the settings to lookup. + * Format: accounts/{account}/dataSharingSettings + * Example: "accounts/1000/dataSharingSettings" + * @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 [DataSharingSettings]{@link google.analytics.admin.v1beta.DataSharingSettings}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta/analytics_admin_service.get_data_sharing_settings.js + * region_tag:analyticsadmin_v1beta_generated_AnalyticsAdminService_GetDataSharingSettings_async + */ + getDataSharingSettings( + request?: protos.google.analytics.admin.v1beta.IGetDataSharingSettingsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.analytics.admin.v1beta.IDataSharingSettings, + ( + | protos.google.analytics.admin.v1beta.IGetDataSharingSettingsRequest + | undefined + ), + {} | undefined + ] + >; + getDataSharingSettings( + request: protos.google.analytics.admin.v1beta.IGetDataSharingSettingsRequest, + options: CallOptions, + callback: Callback< + protos.google.analytics.admin.v1beta.IDataSharingSettings, + | protos.google.analytics.admin.v1beta.IGetDataSharingSettingsRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getDataSharingSettings( + request: protos.google.analytics.admin.v1beta.IGetDataSharingSettingsRequest, + callback: Callback< + protos.google.analytics.admin.v1beta.IDataSharingSettings, + | protos.google.analytics.admin.v1beta.IGetDataSharingSettingsRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getDataSharingSettings( + request?: protos.google.analytics.admin.v1beta.IGetDataSharingSettingsRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.analytics.admin.v1beta.IDataSharingSettings, + | protos.google.analytics.admin.v1beta.IGetDataSharingSettingsRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.analytics.admin.v1beta.IDataSharingSettings, + | protos.google.analytics.admin.v1beta.IGetDataSharingSettingsRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.analytics.admin.v1beta.IDataSharingSettings, + ( + | protos.google.analytics.admin.v1beta.IGetDataSharingSettingsRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.getDataSharingSettings( + request, + options, + callback + ); + } + /** + * Lookup for a single "GA4" MeasurementProtocolSecret. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the measurement protocol secret to lookup. + * Format: + * properties/{property}/dataStreams/{dataStream}/measurementProtocolSecrets/{measurementProtocolSecret} + * @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 [MeasurementProtocolSecret]{@link google.analytics.admin.v1beta.MeasurementProtocolSecret}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta/analytics_admin_service.get_measurement_protocol_secret.js + * region_tag:analyticsadmin_v1beta_generated_AnalyticsAdminService_GetMeasurementProtocolSecret_async + */ + getMeasurementProtocolSecret( + request?: protos.google.analytics.admin.v1beta.IGetMeasurementProtocolSecretRequest, + options?: CallOptions + ): Promise< + [ + protos.google.analytics.admin.v1beta.IMeasurementProtocolSecret, + ( + | protos.google.analytics.admin.v1beta.IGetMeasurementProtocolSecretRequest + | undefined + ), + {} | undefined + ] + >; + getMeasurementProtocolSecret( + request: protos.google.analytics.admin.v1beta.IGetMeasurementProtocolSecretRequest, + options: CallOptions, + callback: Callback< + protos.google.analytics.admin.v1beta.IMeasurementProtocolSecret, + | protos.google.analytics.admin.v1beta.IGetMeasurementProtocolSecretRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getMeasurementProtocolSecret( + request: protos.google.analytics.admin.v1beta.IGetMeasurementProtocolSecretRequest, + callback: Callback< + protos.google.analytics.admin.v1beta.IMeasurementProtocolSecret, + | protos.google.analytics.admin.v1beta.IGetMeasurementProtocolSecretRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getMeasurementProtocolSecret( + request?: protos.google.analytics.admin.v1beta.IGetMeasurementProtocolSecretRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.analytics.admin.v1beta.IMeasurementProtocolSecret, + | protos.google.analytics.admin.v1beta.IGetMeasurementProtocolSecretRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.analytics.admin.v1beta.IMeasurementProtocolSecret, + | protos.google.analytics.admin.v1beta.IGetMeasurementProtocolSecretRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.analytics.admin.v1beta.IMeasurementProtocolSecret, + ( + | protos.google.analytics.admin.v1beta.IGetMeasurementProtocolSecretRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.getMeasurementProtocolSecret( + request, + options, + callback + ); + } + /** + * Creates a measurement protocol secret. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource where this secret will be created. + * Format: properties/{property}/dataStreams/{dataStream} + * @param {google.analytics.admin.v1beta.MeasurementProtocolSecret} request.measurementProtocolSecret + * Required. The measurement protocol secret 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 [MeasurementProtocolSecret]{@link google.analytics.admin.v1beta.MeasurementProtocolSecret}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta/analytics_admin_service.create_measurement_protocol_secret.js + * region_tag:analyticsadmin_v1beta_generated_AnalyticsAdminService_CreateMeasurementProtocolSecret_async + */ + createMeasurementProtocolSecret( + request?: protos.google.analytics.admin.v1beta.ICreateMeasurementProtocolSecretRequest, + options?: CallOptions + ): Promise< + [ + protos.google.analytics.admin.v1beta.IMeasurementProtocolSecret, + ( + | protos.google.analytics.admin.v1beta.ICreateMeasurementProtocolSecretRequest + | undefined + ), + {} | undefined + ] + >; + createMeasurementProtocolSecret( + request: protos.google.analytics.admin.v1beta.ICreateMeasurementProtocolSecretRequest, + options: CallOptions, + callback: Callback< + protos.google.analytics.admin.v1beta.IMeasurementProtocolSecret, + | protos.google.analytics.admin.v1beta.ICreateMeasurementProtocolSecretRequest + | null + | undefined, + {} | null | undefined + > + ): void; + createMeasurementProtocolSecret( + request: protos.google.analytics.admin.v1beta.ICreateMeasurementProtocolSecretRequest, + callback: Callback< + protos.google.analytics.admin.v1beta.IMeasurementProtocolSecret, + | protos.google.analytics.admin.v1beta.ICreateMeasurementProtocolSecretRequest + | null + | undefined, + {} | null | undefined + > + ): void; + createMeasurementProtocolSecret( + request?: protos.google.analytics.admin.v1beta.ICreateMeasurementProtocolSecretRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.analytics.admin.v1beta.IMeasurementProtocolSecret, + | protos.google.analytics.admin.v1beta.ICreateMeasurementProtocolSecretRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.analytics.admin.v1beta.IMeasurementProtocolSecret, + | protos.google.analytics.admin.v1beta.ICreateMeasurementProtocolSecretRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.analytics.admin.v1beta.IMeasurementProtocolSecret, + ( + | protos.google.analytics.admin.v1beta.ICreateMeasurementProtocolSecretRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize(); + return this.innerApiCalls.createMeasurementProtocolSecret( + request, + options, + callback + ); + } + /** + * Deletes target MeasurementProtocolSecret. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the MeasurementProtocolSecret to delete. + * Format: + * properties/{property}/dataStreams/{dataStream}/measurementProtocolSecrets/{measurementProtocolSecret} + * @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 [Empty]{@link google.protobuf.Empty}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta/analytics_admin_service.delete_measurement_protocol_secret.js + * region_tag:analyticsadmin_v1beta_generated_AnalyticsAdminService_DeleteMeasurementProtocolSecret_async + */ + deleteMeasurementProtocolSecret( + request?: protos.google.analytics.admin.v1beta.IDeleteMeasurementProtocolSecretRequest, + options?: CallOptions + ): Promise< + [ + protos.google.protobuf.IEmpty, + ( + | protos.google.analytics.admin.v1beta.IDeleteMeasurementProtocolSecretRequest + | undefined + ), + {} | undefined + ] + >; + deleteMeasurementProtocolSecret( + request: protos.google.analytics.admin.v1beta.IDeleteMeasurementProtocolSecretRequest, + options: CallOptions, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.analytics.admin.v1beta.IDeleteMeasurementProtocolSecretRequest + | null + | undefined, + {} | null | undefined + > + ): void; + deleteMeasurementProtocolSecret( + request: protos.google.analytics.admin.v1beta.IDeleteMeasurementProtocolSecretRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.analytics.admin.v1beta.IDeleteMeasurementProtocolSecretRequest + | null + | undefined, + {} | null | undefined + > + ): void; + deleteMeasurementProtocolSecret( + request?: protos.google.analytics.admin.v1beta.IDeleteMeasurementProtocolSecretRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.protobuf.IEmpty, + | protos.google.analytics.admin.v1beta.IDeleteMeasurementProtocolSecretRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.IEmpty, + | protos.google.analytics.admin.v1beta.IDeleteMeasurementProtocolSecretRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.protobuf.IEmpty, + ( + | protos.google.analytics.admin.v1beta.IDeleteMeasurementProtocolSecretRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.deleteMeasurementProtocolSecret( + request, + options, + callback + ); + } + /** + * Updates a measurement protocol secret. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.analytics.admin.v1beta.MeasurementProtocolSecret} request.measurementProtocolSecret + * Required. The measurement protocol secret to update. + * @param {google.protobuf.FieldMask} request.updateMask + * The list of fields to be updated. Omitted fields will not be updated. + * @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 [MeasurementProtocolSecret]{@link google.analytics.admin.v1beta.MeasurementProtocolSecret}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta/analytics_admin_service.update_measurement_protocol_secret.js + * region_tag:analyticsadmin_v1beta_generated_AnalyticsAdminService_UpdateMeasurementProtocolSecret_async + */ + updateMeasurementProtocolSecret( + request?: protos.google.analytics.admin.v1beta.IUpdateMeasurementProtocolSecretRequest, + options?: CallOptions + ): Promise< + [ + protos.google.analytics.admin.v1beta.IMeasurementProtocolSecret, + ( + | protos.google.analytics.admin.v1beta.IUpdateMeasurementProtocolSecretRequest + | undefined + ), + {} | undefined + ] + >; + updateMeasurementProtocolSecret( + request: protos.google.analytics.admin.v1beta.IUpdateMeasurementProtocolSecretRequest, + options: CallOptions, + callback: Callback< + protos.google.analytics.admin.v1beta.IMeasurementProtocolSecret, + | protos.google.analytics.admin.v1beta.IUpdateMeasurementProtocolSecretRequest + | null + | undefined, + {} | null | undefined + > + ): void; + updateMeasurementProtocolSecret( + request: protos.google.analytics.admin.v1beta.IUpdateMeasurementProtocolSecretRequest, + callback: Callback< + protos.google.analytics.admin.v1beta.IMeasurementProtocolSecret, + | protos.google.analytics.admin.v1beta.IUpdateMeasurementProtocolSecretRequest + | null + | undefined, + {} | null | undefined + > + ): void; + updateMeasurementProtocolSecret( + request?: protos.google.analytics.admin.v1beta.IUpdateMeasurementProtocolSecretRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.analytics.admin.v1beta.IMeasurementProtocolSecret, + | protos.google.analytics.admin.v1beta.IUpdateMeasurementProtocolSecretRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.analytics.admin.v1beta.IMeasurementProtocolSecret, + | protos.google.analytics.admin.v1beta.IUpdateMeasurementProtocolSecretRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.analytics.admin.v1beta.IMeasurementProtocolSecret, + ( + | protos.google.analytics.admin.v1beta.IUpdateMeasurementProtocolSecretRequest + | 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({ + 'measurement_protocol_secret.name': + request.measurementProtocolSecret!.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.updateMeasurementProtocolSecret( + request, + options, + callback + ); + } + /** + * Acknowledges the terms of user data collection for the specified property. + * + * This acknowledgement must be completed (either in the Google Analytics UI + * or via this API) before MeasurementProtocolSecret resources may be created. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.property + * Required. The property for which to acknowledge user data collection. + * @param {string} request.acknowledgement + * Required. An acknowledgement that the caller of this method understands the terms + * of user data collection. + * + * This field must contain the exact value: + * "I acknowledge that I have the necessary privacy disclosures and rights + * from my end users for the collection and processing of their data, + * including the association of such data with the visitation information + * Google Analytics collects from my site and/or app property." + * @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 [AcknowledgeUserDataCollectionResponse]{@link google.analytics.admin.v1beta.AcknowledgeUserDataCollectionResponse}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta/analytics_admin_service.acknowledge_user_data_collection.js + * region_tag:analyticsadmin_v1beta_generated_AnalyticsAdminService_AcknowledgeUserDataCollection_async + */ + acknowledgeUserDataCollection( + request?: protos.google.analytics.admin.v1beta.IAcknowledgeUserDataCollectionRequest, + options?: CallOptions + ): Promise< + [ + protos.google.analytics.admin.v1beta.IAcknowledgeUserDataCollectionResponse, + ( + | protos.google.analytics.admin.v1beta.IAcknowledgeUserDataCollectionRequest + | undefined + ), + {} | undefined + ] + >; + acknowledgeUserDataCollection( + request: protos.google.analytics.admin.v1beta.IAcknowledgeUserDataCollectionRequest, + options: CallOptions, + callback: Callback< + protos.google.analytics.admin.v1beta.IAcknowledgeUserDataCollectionResponse, + | protos.google.analytics.admin.v1beta.IAcknowledgeUserDataCollectionRequest + | null + | undefined, + {} | null | undefined + > + ): void; + acknowledgeUserDataCollection( + request: protos.google.analytics.admin.v1beta.IAcknowledgeUserDataCollectionRequest, + callback: Callback< + protos.google.analytics.admin.v1beta.IAcknowledgeUserDataCollectionResponse, + | protos.google.analytics.admin.v1beta.IAcknowledgeUserDataCollectionRequest + | null + | undefined, + {} | null | undefined + > + ): void; + acknowledgeUserDataCollection( + request?: protos.google.analytics.admin.v1beta.IAcknowledgeUserDataCollectionRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.analytics.admin.v1beta.IAcknowledgeUserDataCollectionResponse, + | protos.google.analytics.admin.v1beta.IAcknowledgeUserDataCollectionRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.analytics.admin.v1beta.IAcknowledgeUserDataCollectionResponse, + | protos.google.analytics.admin.v1beta.IAcknowledgeUserDataCollectionRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.analytics.admin.v1beta.IAcknowledgeUserDataCollectionResponse, + ( + | protos.google.analytics.admin.v1beta.IAcknowledgeUserDataCollectionRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + property: request.property ?? '', + }); + this.initialize(); + return this.innerApiCalls.acknowledgeUserDataCollection( + request, + options, + callback + ); + } + /** + * Creates a conversion event with the specified attributes. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.analytics.admin.v1beta.ConversionEvent} request.conversionEvent + * Required. The conversion event to create. + * @param {string} request.parent + * Required. The resource name of the parent property where this conversion event will + * be created. Format: properties/123 + * @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 [ConversionEvent]{@link google.analytics.admin.v1beta.ConversionEvent}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta/analytics_admin_service.create_conversion_event.js + * region_tag:analyticsadmin_v1beta_generated_AnalyticsAdminService_CreateConversionEvent_async + */ + createConversionEvent( + request?: protos.google.analytics.admin.v1beta.ICreateConversionEventRequest, + options?: CallOptions + ): Promise< + [ + protos.google.analytics.admin.v1beta.IConversionEvent, + ( + | protos.google.analytics.admin.v1beta.ICreateConversionEventRequest + | undefined + ), + {} | undefined + ] + >; + createConversionEvent( + request: protos.google.analytics.admin.v1beta.ICreateConversionEventRequest, + options: CallOptions, + callback: Callback< + protos.google.analytics.admin.v1beta.IConversionEvent, + | protos.google.analytics.admin.v1beta.ICreateConversionEventRequest + | null + | undefined, + {} | null | undefined + > + ): void; + createConversionEvent( + request: protos.google.analytics.admin.v1beta.ICreateConversionEventRequest, + callback: Callback< + protos.google.analytics.admin.v1beta.IConversionEvent, + | protos.google.analytics.admin.v1beta.ICreateConversionEventRequest + | null + | undefined, + {} | null | undefined + > + ): void; + createConversionEvent( + request?: protos.google.analytics.admin.v1beta.ICreateConversionEventRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.analytics.admin.v1beta.IConversionEvent, + | protos.google.analytics.admin.v1beta.ICreateConversionEventRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.analytics.admin.v1beta.IConversionEvent, + | protos.google.analytics.admin.v1beta.ICreateConversionEventRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.analytics.admin.v1beta.IConversionEvent, + ( + | protos.google.analytics.admin.v1beta.ICreateConversionEventRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize(); + return this.innerApiCalls.createConversionEvent(request, options, callback); + } + /** + * Retrieve a single conversion event. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the conversion event to retrieve. + * Format: properties/{property}/conversionEvents/{conversion_event} + * Example: "properties/123/conversionEvents/456" + * @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 [ConversionEvent]{@link google.analytics.admin.v1beta.ConversionEvent}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta/analytics_admin_service.get_conversion_event.js + * region_tag:analyticsadmin_v1beta_generated_AnalyticsAdminService_GetConversionEvent_async + */ + getConversionEvent( + request?: protos.google.analytics.admin.v1beta.IGetConversionEventRequest, + options?: CallOptions + ): Promise< + [ + protos.google.analytics.admin.v1beta.IConversionEvent, + ( + | protos.google.analytics.admin.v1beta.IGetConversionEventRequest + | undefined + ), + {} | undefined + ] + >; + getConversionEvent( + request: protos.google.analytics.admin.v1beta.IGetConversionEventRequest, + options: CallOptions, + callback: Callback< + protos.google.analytics.admin.v1beta.IConversionEvent, + | protos.google.analytics.admin.v1beta.IGetConversionEventRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getConversionEvent( + request: protos.google.analytics.admin.v1beta.IGetConversionEventRequest, + callback: Callback< + protos.google.analytics.admin.v1beta.IConversionEvent, + | protos.google.analytics.admin.v1beta.IGetConversionEventRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getConversionEvent( + request?: protos.google.analytics.admin.v1beta.IGetConversionEventRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.analytics.admin.v1beta.IConversionEvent, + | protos.google.analytics.admin.v1beta.IGetConversionEventRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.analytics.admin.v1beta.IConversionEvent, + | protos.google.analytics.admin.v1beta.IGetConversionEventRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.analytics.admin.v1beta.IConversionEvent, + ( + | protos.google.analytics.admin.v1beta.IGetConversionEventRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.getConversionEvent(request, options, callback); + } + /** + * Deletes a conversion event in a property. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the conversion event to delete. + * Format: properties/{property}/conversionEvents/{conversion_event} + * Example: "properties/123/conversionEvents/456" + * @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 [Empty]{@link google.protobuf.Empty}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta/analytics_admin_service.delete_conversion_event.js + * region_tag:analyticsadmin_v1beta_generated_AnalyticsAdminService_DeleteConversionEvent_async + */ + deleteConversionEvent( + request?: protos.google.analytics.admin.v1beta.IDeleteConversionEventRequest, + options?: CallOptions + ): Promise< + [ + protos.google.protobuf.IEmpty, + ( + | protos.google.analytics.admin.v1beta.IDeleteConversionEventRequest + | undefined + ), + {} | undefined + ] + >; + deleteConversionEvent( + request: protos.google.analytics.admin.v1beta.IDeleteConversionEventRequest, + options: CallOptions, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.analytics.admin.v1beta.IDeleteConversionEventRequest + | null + | undefined, + {} | null | undefined + > + ): void; + deleteConversionEvent( + request: protos.google.analytics.admin.v1beta.IDeleteConversionEventRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.analytics.admin.v1beta.IDeleteConversionEventRequest + | null + | undefined, + {} | null | undefined + > + ): void; + deleteConversionEvent( + request?: protos.google.analytics.admin.v1beta.IDeleteConversionEventRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.protobuf.IEmpty, + | protos.google.analytics.admin.v1beta.IDeleteConversionEventRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.IEmpty, + | protos.google.analytics.admin.v1beta.IDeleteConversionEventRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.protobuf.IEmpty, + ( + | protos.google.analytics.admin.v1beta.IDeleteConversionEventRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.deleteConversionEvent(request, options, callback); + } + /** + * Creates a CustomDimension. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Example format: properties/1234 + * @param {google.analytics.admin.v1beta.CustomDimension} request.customDimension + * Required. The CustomDimension 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 [CustomDimension]{@link google.analytics.admin.v1beta.CustomDimension}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta/analytics_admin_service.create_custom_dimension.js + * region_tag:analyticsadmin_v1beta_generated_AnalyticsAdminService_CreateCustomDimension_async + */ + createCustomDimension( + request?: protos.google.analytics.admin.v1beta.ICreateCustomDimensionRequest, + options?: CallOptions + ): Promise< + [ + protos.google.analytics.admin.v1beta.ICustomDimension, + ( + | protos.google.analytics.admin.v1beta.ICreateCustomDimensionRequest + | undefined + ), + {} | undefined + ] + >; + createCustomDimension( + request: protos.google.analytics.admin.v1beta.ICreateCustomDimensionRequest, + options: CallOptions, + callback: Callback< + protos.google.analytics.admin.v1beta.ICustomDimension, + | protos.google.analytics.admin.v1beta.ICreateCustomDimensionRequest + | null + | undefined, + {} | null | undefined + > + ): void; + createCustomDimension( + request: protos.google.analytics.admin.v1beta.ICreateCustomDimensionRequest, + callback: Callback< + protos.google.analytics.admin.v1beta.ICustomDimension, + | protos.google.analytics.admin.v1beta.ICreateCustomDimensionRequest + | null + | undefined, + {} | null | undefined + > + ): void; + createCustomDimension( + request?: protos.google.analytics.admin.v1beta.ICreateCustomDimensionRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.analytics.admin.v1beta.ICustomDimension, + | protos.google.analytics.admin.v1beta.ICreateCustomDimensionRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.analytics.admin.v1beta.ICustomDimension, + | protos.google.analytics.admin.v1beta.ICreateCustomDimensionRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.analytics.admin.v1beta.ICustomDimension, + ( + | protos.google.analytics.admin.v1beta.ICreateCustomDimensionRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize(); + return this.innerApiCalls.createCustomDimension(request, options, callback); + } + /** + * Updates a CustomDimension on a property. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.analytics.admin.v1beta.CustomDimension} request.customDimension + * The CustomDimension to update + * @param {google.protobuf.FieldMask} request.updateMask + * Required. The list of fields to be updated. Omitted fields will not be updated. + * To replace the entire entity, use one path with the string "*" to match + * all fields. + * @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 [CustomDimension]{@link google.analytics.admin.v1beta.CustomDimension}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta/analytics_admin_service.update_custom_dimension.js + * region_tag:analyticsadmin_v1beta_generated_AnalyticsAdminService_UpdateCustomDimension_async + */ + updateCustomDimension( + request?: protos.google.analytics.admin.v1beta.IUpdateCustomDimensionRequest, + options?: CallOptions + ): Promise< + [ + protos.google.analytics.admin.v1beta.ICustomDimension, + ( + | protos.google.analytics.admin.v1beta.IUpdateCustomDimensionRequest + | undefined + ), + {} | undefined + ] + >; + updateCustomDimension( + request: protos.google.analytics.admin.v1beta.IUpdateCustomDimensionRequest, + options: CallOptions, + callback: Callback< + protos.google.analytics.admin.v1beta.ICustomDimension, + | protos.google.analytics.admin.v1beta.IUpdateCustomDimensionRequest + | null + | undefined, + {} | null | undefined + > + ): void; + updateCustomDimension( + request: protos.google.analytics.admin.v1beta.IUpdateCustomDimensionRequest, + callback: Callback< + protos.google.analytics.admin.v1beta.ICustomDimension, + | protos.google.analytics.admin.v1beta.IUpdateCustomDimensionRequest + | null + | undefined, + {} | null | undefined + > + ): void; + updateCustomDimension( + request?: protos.google.analytics.admin.v1beta.IUpdateCustomDimensionRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.analytics.admin.v1beta.ICustomDimension, + | protos.google.analytics.admin.v1beta.IUpdateCustomDimensionRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.analytics.admin.v1beta.ICustomDimension, + | protos.google.analytics.admin.v1beta.IUpdateCustomDimensionRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.analytics.admin.v1beta.ICustomDimension, + ( + | protos.google.analytics.admin.v1beta.IUpdateCustomDimensionRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + 'custom_dimension.name': request.customDimension!.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.updateCustomDimension(request, options, callback); + } + /** + * Archives a CustomDimension on a property. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the CustomDimension to archive. + * Example format: properties/1234/customDimensions/5678 + * @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 [Empty]{@link google.protobuf.Empty}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta/analytics_admin_service.archive_custom_dimension.js + * region_tag:analyticsadmin_v1beta_generated_AnalyticsAdminService_ArchiveCustomDimension_async + */ + archiveCustomDimension( + request?: protos.google.analytics.admin.v1beta.IArchiveCustomDimensionRequest, + options?: CallOptions + ): Promise< + [ + protos.google.protobuf.IEmpty, + ( + | protos.google.analytics.admin.v1beta.IArchiveCustomDimensionRequest + | undefined + ), + {} | undefined + ] + >; + archiveCustomDimension( + request: protos.google.analytics.admin.v1beta.IArchiveCustomDimensionRequest, + options: CallOptions, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.analytics.admin.v1beta.IArchiveCustomDimensionRequest + | null + | undefined, + {} | null | undefined + > + ): void; + archiveCustomDimension( + request: protos.google.analytics.admin.v1beta.IArchiveCustomDimensionRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.analytics.admin.v1beta.IArchiveCustomDimensionRequest + | null + | undefined, + {} | null | undefined + > + ): void; + archiveCustomDimension( + request?: protos.google.analytics.admin.v1beta.IArchiveCustomDimensionRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.protobuf.IEmpty, + | protos.google.analytics.admin.v1beta.IArchiveCustomDimensionRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.IEmpty, + | protos.google.analytics.admin.v1beta.IArchiveCustomDimensionRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.protobuf.IEmpty, + ( + | protos.google.analytics.admin.v1beta.IArchiveCustomDimensionRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.archiveCustomDimension( + request, + options, + callback + ); + } + /** + * Lookup for a single CustomDimension. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the CustomDimension to get. + * Example format: properties/1234/customDimensions/5678 + * @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 [CustomDimension]{@link google.analytics.admin.v1beta.CustomDimension}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta/analytics_admin_service.get_custom_dimension.js + * region_tag:analyticsadmin_v1beta_generated_AnalyticsAdminService_GetCustomDimension_async + */ + getCustomDimension( + request?: protos.google.analytics.admin.v1beta.IGetCustomDimensionRequest, + options?: CallOptions + ): Promise< + [ + protos.google.analytics.admin.v1beta.ICustomDimension, + ( + | protos.google.analytics.admin.v1beta.IGetCustomDimensionRequest + | undefined + ), + {} | undefined + ] + >; + getCustomDimension( + request: protos.google.analytics.admin.v1beta.IGetCustomDimensionRequest, + options: CallOptions, + callback: Callback< + protos.google.analytics.admin.v1beta.ICustomDimension, + | protos.google.analytics.admin.v1beta.IGetCustomDimensionRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getCustomDimension( + request: protos.google.analytics.admin.v1beta.IGetCustomDimensionRequest, + callback: Callback< + protos.google.analytics.admin.v1beta.ICustomDimension, + | protos.google.analytics.admin.v1beta.IGetCustomDimensionRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getCustomDimension( + request?: protos.google.analytics.admin.v1beta.IGetCustomDimensionRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.analytics.admin.v1beta.ICustomDimension, + | protos.google.analytics.admin.v1beta.IGetCustomDimensionRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.analytics.admin.v1beta.ICustomDimension, + | protos.google.analytics.admin.v1beta.IGetCustomDimensionRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.analytics.admin.v1beta.ICustomDimension, + ( + | protos.google.analytics.admin.v1beta.IGetCustomDimensionRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.getCustomDimension(request, options, callback); + } + /** + * Creates a CustomMetric. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Example format: properties/1234 + * @param {google.analytics.admin.v1beta.CustomMetric} request.customMetric + * Required. The CustomMetric 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 [CustomMetric]{@link google.analytics.admin.v1beta.CustomMetric}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta/analytics_admin_service.create_custom_metric.js + * region_tag:analyticsadmin_v1beta_generated_AnalyticsAdminService_CreateCustomMetric_async + */ + createCustomMetric( + request?: protos.google.analytics.admin.v1beta.ICreateCustomMetricRequest, + options?: CallOptions + ): Promise< + [ + protos.google.analytics.admin.v1beta.ICustomMetric, + ( + | protos.google.analytics.admin.v1beta.ICreateCustomMetricRequest + | undefined + ), + {} | undefined + ] + >; + createCustomMetric( + request: protos.google.analytics.admin.v1beta.ICreateCustomMetricRequest, + options: CallOptions, + callback: Callback< + protos.google.analytics.admin.v1beta.ICustomMetric, + | protos.google.analytics.admin.v1beta.ICreateCustomMetricRequest + | null + | undefined, + {} | null | undefined + > + ): void; + createCustomMetric( + request: protos.google.analytics.admin.v1beta.ICreateCustomMetricRequest, + callback: Callback< + protos.google.analytics.admin.v1beta.ICustomMetric, + | protos.google.analytics.admin.v1beta.ICreateCustomMetricRequest + | null + | undefined, + {} | null | undefined + > + ): void; + createCustomMetric( + request?: protos.google.analytics.admin.v1beta.ICreateCustomMetricRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.analytics.admin.v1beta.ICustomMetric, + | protos.google.analytics.admin.v1beta.ICreateCustomMetricRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.analytics.admin.v1beta.ICustomMetric, + | protos.google.analytics.admin.v1beta.ICreateCustomMetricRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.analytics.admin.v1beta.ICustomMetric, + ( + | protos.google.analytics.admin.v1beta.ICreateCustomMetricRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize(); + return this.innerApiCalls.createCustomMetric(request, options, callback); + } + /** + * Updates a CustomMetric on a property. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.analytics.admin.v1beta.CustomMetric} request.customMetric + * The CustomMetric to update + * @param {google.protobuf.FieldMask} request.updateMask + * Required. The list of fields to be updated. Omitted fields will not be updated. + * To replace the entire entity, use one path with the string "*" to match + * all fields. + * @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 [CustomMetric]{@link google.analytics.admin.v1beta.CustomMetric}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta/analytics_admin_service.update_custom_metric.js + * region_tag:analyticsadmin_v1beta_generated_AnalyticsAdminService_UpdateCustomMetric_async + */ + updateCustomMetric( + request?: protos.google.analytics.admin.v1beta.IUpdateCustomMetricRequest, + options?: CallOptions + ): Promise< + [ + protos.google.analytics.admin.v1beta.ICustomMetric, + ( + | protos.google.analytics.admin.v1beta.IUpdateCustomMetricRequest + | undefined + ), + {} | undefined + ] + >; + updateCustomMetric( + request: protos.google.analytics.admin.v1beta.IUpdateCustomMetricRequest, + options: CallOptions, + callback: Callback< + protos.google.analytics.admin.v1beta.ICustomMetric, + | protos.google.analytics.admin.v1beta.IUpdateCustomMetricRequest + | null + | undefined, + {} | null | undefined + > + ): void; + updateCustomMetric( + request: protos.google.analytics.admin.v1beta.IUpdateCustomMetricRequest, + callback: Callback< + protos.google.analytics.admin.v1beta.ICustomMetric, + | protos.google.analytics.admin.v1beta.IUpdateCustomMetricRequest + | null + | undefined, + {} | null | undefined + > + ): void; + updateCustomMetric( + request?: protos.google.analytics.admin.v1beta.IUpdateCustomMetricRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.analytics.admin.v1beta.ICustomMetric, + | protos.google.analytics.admin.v1beta.IUpdateCustomMetricRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.analytics.admin.v1beta.ICustomMetric, + | protos.google.analytics.admin.v1beta.IUpdateCustomMetricRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.analytics.admin.v1beta.ICustomMetric, + ( + | protos.google.analytics.admin.v1beta.IUpdateCustomMetricRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + 'custom_metric.name': request.customMetric!.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.updateCustomMetric(request, options, callback); + } + /** + * Archives a CustomMetric on a property. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the CustomMetric to archive. + * Example format: properties/1234/customMetrics/5678 + * @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 [Empty]{@link google.protobuf.Empty}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta/analytics_admin_service.archive_custom_metric.js + * region_tag:analyticsadmin_v1beta_generated_AnalyticsAdminService_ArchiveCustomMetric_async + */ + archiveCustomMetric( + request?: protos.google.analytics.admin.v1beta.IArchiveCustomMetricRequest, + options?: CallOptions + ): Promise< + [ + protos.google.protobuf.IEmpty, + ( + | protos.google.analytics.admin.v1beta.IArchiveCustomMetricRequest + | undefined + ), + {} | undefined + ] + >; + archiveCustomMetric( + request: protos.google.analytics.admin.v1beta.IArchiveCustomMetricRequest, + options: CallOptions, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.analytics.admin.v1beta.IArchiveCustomMetricRequest + | null + | undefined, + {} | null | undefined + > + ): void; + archiveCustomMetric( + request: protos.google.analytics.admin.v1beta.IArchiveCustomMetricRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.analytics.admin.v1beta.IArchiveCustomMetricRequest + | null + | undefined, + {} | null | undefined + > + ): void; + archiveCustomMetric( + request?: protos.google.analytics.admin.v1beta.IArchiveCustomMetricRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.protobuf.IEmpty, + | protos.google.analytics.admin.v1beta.IArchiveCustomMetricRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.IEmpty, + | protos.google.analytics.admin.v1beta.IArchiveCustomMetricRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.protobuf.IEmpty, + ( + | protos.google.analytics.admin.v1beta.IArchiveCustomMetricRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.archiveCustomMetric(request, options, callback); + } + /** + * Lookup for a single CustomMetric. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the CustomMetric to get. + * Example format: properties/1234/customMetrics/5678 + * @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 [CustomMetric]{@link google.analytics.admin.v1beta.CustomMetric}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta/analytics_admin_service.get_custom_metric.js + * region_tag:analyticsadmin_v1beta_generated_AnalyticsAdminService_GetCustomMetric_async + */ + getCustomMetric( + request?: protos.google.analytics.admin.v1beta.IGetCustomMetricRequest, + options?: CallOptions + ): Promise< + [ + protos.google.analytics.admin.v1beta.ICustomMetric, + protos.google.analytics.admin.v1beta.IGetCustomMetricRequest | undefined, + {} | undefined + ] + >; + getCustomMetric( + request: protos.google.analytics.admin.v1beta.IGetCustomMetricRequest, + options: CallOptions, + callback: Callback< + protos.google.analytics.admin.v1beta.ICustomMetric, + | protos.google.analytics.admin.v1beta.IGetCustomMetricRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getCustomMetric( + request: protos.google.analytics.admin.v1beta.IGetCustomMetricRequest, + callback: Callback< + protos.google.analytics.admin.v1beta.ICustomMetric, + | protos.google.analytics.admin.v1beta.IGetCustomMetricRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getCustomMetric( + request?: protos.google.analytics.admin.v1beta.IGetCustomMetricRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.analytics.admin.v1beta.ICustomMetric, + | protos.google.analytics.admin.v1beta.IGetCustomMetricRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.analytics.admin.v1beta.ICustomMetric, + | protos.google.analytics.admin.v1beta.IGetCustomMetricRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.analytics.admin.v1beta.ICustomMetric, + protos.google.analytics.admin.v1beta.IGetCustomMetricRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.getCustomMetric(request, options, callback); + } + /** + * Returns the singleton data retention settings for this property. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the settings to lookup. + * Format: + * properties/{property}/dataRetentionSettings + * Example: "properties/1000/dataRetentionSettings" + * @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 [DataRetentionSettings]{@link google.analytics.admin.v1beta.DataRetentionSettings}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta/analytics_admin_service.get_data_retention_settings.js + * region_tag:analyticsadmin_v1beta_generated_AnalyticsAdminService_GetDataRetentionSettings_async + */ + getDataRetentionSettings( + request?: protos.google.analytics.admin.v1beta.IGetDataRetentionSettingsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.analytics.admin.v1beta.IDataRetentionSettings, + ( + | protos.google.analytics.admin.v1beta.IGetDataRetentionSettingsRequest + | undefined + ), + {} | undefined + ] + >; + getDataRetentionSettings( + request: protos.google.analytics.admin.v1beta.IGetDataRetentionSettingsRequest, + options: CallOptions, + callback: Callback< + protos.google.analytics.admin.v1beta.IDataRetentionSettings, + | protos.google.analytics.admin.v1beta.IGetDataRetentionSettingsRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getDataRetentionSettings( + request: protos.google.analytics.admin.v1beta.IGetDataRetentionSettingsRequest, + callback: Callback< + protos.google.analytics.admin.v1beta.IDataRetentionSettings, + | protos.google.analytics.admin.v1beta.IGetDataRetentionSettingsRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getDataRetentionSettings( + request?: protos.google.analytics.admin.v1beta.IGetDataRetentionSettingsRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.analytics.admin.v1beta.IDataRetentionSettings, + | protos.google.analytics.admin.v1beta.IGetDataRetentionSettingsRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.analytics.admin.v1beta.IDataRetentionSettings, + | protos.google.analytics.admin.v1beta.IGetDataRetentionSettingsRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.analytics.admin.v1beta.IDataRetentionSettings, + ( + | protos.google.analytics.admin.v1beta.IGetDataRetentionSettingsRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.getDataRetentionSettings( + request, + options, + callback + ); + } + /** + * Updates the singleton data retention settings for this property. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.analytics.admin.v1beta.DataRetentionSettings} request.dataRetentionSettings + * Required. The settings to update. + * The `name` field is used to identify the settings to be updated. + * @param {google.protobuf.FieldMask} request.updateMask + * Required. The list of fields to be updated. Field names must be in snake case + * (e.g., "field_to_update"). Omitted fields will not be updated. To replace + * the entire entity, use one path with the string "*" to match all fields. + * @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 [DataRetentionSettings]{@link google.analytics.admin.v1beta.DataRetentionSettings}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta/analytics_admin_service.update_data_retention_settings.js + * region_tag:analyticsadmin_v1beta_generated_AnalyticsAdminService_UpdateDataRetentionSettings_async + */ + updateDataRetentionSettings( + request?: protos.google.analytics.admin.v1beta.IUpdateDataRetentionSettingsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.analytics.admin.v1beta.IDataRetentionSettings, + ( + | protos.google.analytics.admin.v1beta.IUpdateDataRetentionSettingsRequest + | undefined + ), + {} | undefined + ] + >; + updateDataRetentionSettings( + request: protos.google.analytics.admin.v1beta.IUpdateDataRetentionSettingsRequest, + options: CallOptions, + callback: Callback< + protos.google.analytics.admin.v1beta.IDataRetentionSettings, + | protos.google.analytics.admin.v1beta.IUpdateDataRetentionSettingsRequest + | null + | undefined, + {} | null | undefined + > + ): void; + updateDataRetentionSettings( + request: protos.google.analytics.admin.v1beta.IUpdateDataRetentionSettingsRequest, + callback: Callback< + protos.google.analytics.admin.v1beta.IDataRetentionSettings, + | protos.google.analytics.admin.v1beta.IUpdateDataRetentionSettingsRequest + | null + | undefined, + {} | null | undefined + > + ): void; + updateDataRetentionSettings( + request?: protos.google.analytics.admin.v1beta.IUpdateDataRetentionSettingsRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.analytics.admin.v1beta.IDataRetentionSettings, + | protos.google.analytics.admin.v1beta.IUpdateDataRetentionSettingsRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.analytics.admin.v1beta.IDataRetentionSettings, + | protos.google.analytics.admin.v1beta.IUpdateDataRetentionSettingsRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.analytics.admin.v1beta.IDataRetentionSettings, + ( + | protos.google.analytics.admin.v1beta.IUpdateDataRetentionSettingsRequest + | 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({ + 'data_retention_settings.name': + request.dataRetentionSettings!.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.updateDataRetentionSettings( + request, + options, + callback + ); + } + /** + * Creates a DataStream. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Example format: properties/1234 + * @param {google.analytics.admin.v1beta.DataStream} request.dataStream + * Required. The DataStream 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 [DataStream]{@link google.analytics.admin.v1beta.DataStream}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta/analytics_admin_service.create_data_stream.js + * region_tag:analyticsadmin_v1beta_generated_AnalyticsAdminService_CreateDataStream_async + */ + createDataStream( + request?: protos.google.analytics.admin.v1beta.ICreateDataStreamRequest, + options?: CallOptions + ): Promise< + [ + protos.google.analytics.admin.v1beta.IDataStream, + protos.google.analytics.admin.v1beta.ICreateDataStreamRequest | undefined, + {} | undefined + ] + >; + createDataStream( + request: protos.google.analytics.admin.v1beta.ICreateDataStreamRequest, + options: CallOptions, + callback: Callback< + protos.google.analytics.admin.v1beta.IDataStream, + | protos.google.analytics.admin.v1beta.ICreateDataStreamRequest + | null + | undefined, + {} | null | undefined + > + ): void; + createDataStream( + request: protos.google.analytics.admin.v1beta.ICreateDataStreamRequest, + callback: Callback< + protos.google.analytics.admin.v1beta.IDataStream, + | protos.google.analytics.admin.v1beta.ICreateDataStreamRequest + | null + | undefined, + {} | null | undefined + > + ): void; + createDataStream( + request?: protos.google.analytics.admin.v1beta.ICreateDataStreamRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.analytics.admin.v1beta.IDataStream, + | protos.google.analytics.admin.v1beta.ICreateDataStreamRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.analytics.admin.v1beta.IDataStream, + | protos.google.analytics.admin.v1beta.ICreateDataStreamRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.analytics.admin.v1beta.IDataStream, + protos.google.analytics.admin.v1beta.ICreateDataStreamRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize(); + return this.innerApiCalls.createDataStream(request, options, callback); + } + /** + * Deletes a DataStream on a property. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the DataStream to delete. + * Example format: properties/1234/dataStreams/5678 + * @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 [Empty]{@link google.protobuf.Empty}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta/analytics_admin_service.delete_data_stream.js + * region_tag:analyticsadmin_v1beta_generated_AnalyticsAdminService_DeleteDataStream_async + */ + deleteDataStream( + request?: protos.google.analytics.admin.v1beta.IDeleteDataStreamRequest, + options?: CallOptions + ): Promise< + [ + protos.google.protobuf.IEmpty, + protos.google.analytics.admin.v1beta.IDeleteDataStreamRequest | undefined, + {} | undefined + ] + >; + deleteDataStream( + request: protos.google.analytics.admin.v1beta.IDeleteDataStreamRequest, + options: CallOptions, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.analytics.admin.v1beta.IDeleteDataStreamRequest + | null + | undefined, + {} | null | undefined + > + ): void; + deleteDataStream( + request: protos.google.analytics.admin.v1beta.IDeleteDataStreamRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.analytics.admin.v1beta.IDeleteDataStreamRequest + | null + | undefined, + {} | null | undefined + > + ): void; + deleteDataStream( + request?: protos.google.analytics.admin.v1beta.IDeleteDataStreamRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.protobuf.IEmpty, + | protos.google.analytics.admin.v1beta.IDeleteDataStreamRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.IEmpty, + | protos.google.analytics.admin.v1beta.IDeleteDataStreamRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.protobuf.IEmpty, + protos.google.analytics.admin.v1beta.IDeleteDataStreamRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.deleteDataStream(request, options, callback); + } + /** + * Updates a DataStream on a property. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.analytics.admin.v1beta.DataStream} request.dataStream + * The DataStream to update + * @param {google.protobuf.FieldMask} request.updateMask + * Required. The list of fields to be updated. Omitted fields will not be updated. + * To replace the entire entity, use one path with the string "*" to match + * all fields. + * @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 [DataStream]{@link google.analytics.admin.v1beta.DataStream}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta/analytics_admin_service.update_data_stream.js + * region_tag:analyticsadmin_v1beta_generated_AnalyticsAdminService_UpdateDataStream_async + */ + updateDataStream( + request?: protos.google.analytics.admin.v1beta.IUpdateDataStreamRequest, + options?: CallOptions + ): Promise< + [ + protos.google.analytics.admin.v1beta.IDataStream, + protos.google.analytics.admin.v1beta.IUpdateDataStreamRequest | undefined, + {} | undefined + ] + >; + updateDataStream( + request: protos.google.analytics.admin.v1beta.IUpdateDataStreamRequest, + options: CallOptions, + callback: Callback< + protos.google.analytics.admin.v1beta.IDataStream, + | protos.google.analytics.admin.v1beta.IUpdateDataStreamRequest + | null + | undefined, + {} | null | undefined + > + ): void; + updateDataStream( + request: protos.google.analytics.admin.v1beta.IUpdateDataStreamRequest, + callback: Callback< + protos.google.analytics.admin.v1beta.IDataStream, + | protos.google.analytics.admin.v1beta.IUpdateDataStreamRequest + | null + | undefined, + {} | null | undefined + > + ): void; + updateDataStream( + request?: protos.google.analytics.admin.v1beta.IUpdateDataStreamRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.analytics.admin.v1beta.IDataStream, + | protos.google.analytics.admin.v1beta.IUpdateDataStreamRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.analytics.admin.v1beta.IDataStream, + | protos.google.analytics.admin.v1beta.IUpdateDataStreamRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.analytics.admin.v1beta.IDataStream, + protos.google.analytics.admin.v1beta.IUpdateDataStreamRequest | 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({ + 'data_stream.name': request.dataStream!.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.updateDataStream(request, options, callback); + } + /** + * Lookup for a single DataStream. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the DataStream to get. + * Example format: properties/1234/dataStreams/5678 + * @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 [DataStream]{@link google.analytics.admin.v1beta.DataStream}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1beta/analytics_admin_service.get_data_stream.js + * region_tag:analyticsadmin_v1beta_generated_AnalyticsAdminService_GetDataStream_async + */ + getDataStream( + request?: protos.google.analytics.admin.v1beta.IGetDataStreamRequest, + options?: CallOptions + ): Promise< + [ + protos.google.analytics.admin.v1beta.IDataStream, + protos.google.analytics.admin.v1beta.IGetDataStreamRequest | undefined, + {} | undefined + ] + >; + getDataStream( + request: protos.google.analytics.admin.v1beta.IGetDataStreamRequest, + options: CallOptions, + callback: Callback< + protos.google.analytics.admin.v1beta.IDataStream, + | protos.google.analytics.admin.v1beta.IGetDataStreamRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getDataStream( + request: protos.google.analytics.admin.v1beta.IGetDataStreamRequest, + callback: Callback< + protos.google.analytics.admin.v1beta.IDataStream, + | protos.google.analytics.admin.v1beta.IGetDataStreamRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getDataStream( + request?: protos.google.analytics.admin.v1beta.IGetDataStreamRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.analytics.admin.v1beta.IDataStream, + | protos.google.analytics.admin.v1beta.IGetDataStreamRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.analytics.admin.v1beta.IDataStream, + | protos.google.analytics.admin.v1beta.IGetDataStreamRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.analytics.admin.v1beta.IDataStream, + protos.google.analytics.admin.v1beta.IGetDataStreamRequest | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.getDataStream(request, options, callback); + } + + /** + * Returns all accounts accessible by the caller. + * + * Note that these accounts might not currently have GA4 properties. + * Soft-deleted (ie: "trashed") accounts are excluded by default. + * Returns an empty list if no relevant accounts are found. + * + * @param {Object} request + * The request object that will be sent. + * @param {number} request.pageSize + * The maximum number of resources to return. The service may return + * fewer than this value, even if there are additional pages. + * If unspecified, at most 50 resources will be returned. + * The maximum value is 200; (higher values will be coerced to the maximum) + * @param {string} request.pageToken + * A page token, received from a previous `ListAccounts` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListAccounts` must + * match the call that provided the page token. + * @param {boolean} request.showDeleted + * Whether to include soft-deleted (ie: "trashed") Accounts in the + * results. Accounts can be inspected to determine whether they are deleted or + * not. + * @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 [Account]{@link google.analytics.admin.v1beta.Account}. + * 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 `listAccountsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listAccounts( + request?: protos.google.analytics.admin.v1beta.IListAccountsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.analytics.admin.v1beta.IAccount[], + protos.google.analytics.admin.v1beta.IListAccountsRequest | null, + protos.google.analytics.admin.v1beta.IListAccountsResponse + ] + >; + listAccounts( + request: protos.google.analytics.admin.v1beta.IListAccountsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.analytics.admin.v1beta.IListAccountsRequest, + | protos.google.analytics.admin.v1beta.IListAccountsResponse + | null + | undefined, + protos.google.analytics.admin.v1beta.IAccount + > + ): void; + listAccounts( + request: protos.google.analytics.admin.v1beta.IListAccountsRequest, + callback: PaginationCallback< + protos.google.analytics.admin.v1beta.IListAccountsRequest, + | protos.google.analytics.admin.v1beta.IListAccountsResponse + | null + | undefined, + protos.google.analytics.admin.v1beta.IAccount + > + ): void; + listAccounts( + request?: protos.google.analytics.admin.v1beta.IListAccountsRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.analytics.admin.v1beta.IListAccountsRequest, + | protos.google.analytics.admin.v1beta.IListAccountsResponse + | null + | undefined, + protos.google.analytics.admin.v1beta.IAccount + >, + callback?: PaginationCallback< + protos.google.analytics.admin.v1beta.IListAccountsRequest, + | protos.google.analytics.admin.v1beta.IListAccountsResponse + | null + | undefined, + protos.google.analytics.admin.v1beta.IAccount + > + ): Promise< + [ + protos.google.analytics.admin.v1beta.IAccount[], + protos.google.analytics.admin.v1beta.IListAccountsRequest | null, + protos.google.analytics.admin.v1beta.IListAccountsResponse + ] + > | 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(); + return this.innerApiCalls.listAccounts(request, options, callback); + } + + /** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {number} request.pageSize + * The maximum number of resources to return. The service may return + * fewer than this value, even if there are additional pages. + * If unspecified, at most 50 resources will be returned. + * The maximum value is 200; (higher values will be coerced to the maximum) + * @param {string} request.pageToken + * A page token, received from a previous `ListAccounts` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListAccounts` must + * match the call that provided the page token. + * @param {boolean} request.showDeleted + * Whether to include soft-deleted (ie: "trashed") Accounts in the + * results. Accounts can be inspected to determine whether they are deleted or + * not. + * @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 [Account]{@link google.analytics.admin.v1beta.Account} 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 `listAccountsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listAccountsStream( + request?: protos.google.analytics.admin.v1beta.IListAccountsRequest, + options?: CallOptions + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + const defaultCallSettings = this._defaults['listAccounts']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listAccounts.createStream( + this.innerApiCalls.listAccounts as GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listAccounts`, 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 {number} request.pageSize + * The maximum number of resources to return. The service may return + * fewer than this value, even if there are additional pages. + * If unspecified, at most 50 resources will be returned. + * The maximum value is 200; (higher values will be coerced to the maximum) + * @param {string} request.pageToken + * A page token, received from a previous `ListAccounts` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListAccounts` must + * match the call that provided the page token. + * @param {boolean} request.showDeleted + * Whether to include soft-deleted (ie: "trashed") Accounts in the + * results. Accounts can be inspected to determine whether they are deleted or + * not. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * [Account]{@link google.analytics.admin.v1beta.Account}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + * @example include:samples/generated/v1beta/analytics_admin_service.list_accounts.js + * region_tag:analyticsadmin_v1beta_generated_AnalyticsAdminService_ListAccounts_async + */ + listAccountsAsync( + request?: protos.google.analytics.admin.v1beta.IListAccountsRequest, + options?: CallOptions + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + const defaultCallSettings = this._defaults['listAccounts']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listAccounts.asyncIterate( + this.innerApiCalls['listAccounts'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Returns summaries of all accounts accessible by the caller. + * + * @param {Object} request + * The request object that will be sent. + * @param {number} request.pageSize + * The maximum number of AccountSummary resources to return. The service may + * return fewer than this value, even if there are additional pages. + * If unspecified, at most 50 resources will be returned. + * The maximum value is 200; (higher values will be coerced to the maximum) + * @param {string} request.pageToken + * A page token, received from a previous `ListAccountSummaries` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListAccountSummaries` + * 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 [AccountSummary]{@link google.analytics.admin.v1beta.AccountSummary}. + * 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 `listAccountSummariesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listAccountSummaries( + request?: protos.google.analytics.admin.v1beta.IListAccountSummariesRequest, + options?: CallOptions + ): Promise< + [ + protos.google.analytics.admin.v1beta.IAccountSummary[], + protos.google.analytics.admin.v1beta.IListAccountSummariesRequest | null, + protos.google.analytics.admin.v1beta.IListAccountSummariesResponse + ] + >; + listAccountSummaries( + request: protos.google.analytics.admin.v1beta.IListAccountSummariesRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.analytics.admin.v1beta.IListAccountSummariesRequest, + | protos.google.analytics.admin.v1beta.IListAccountSummariesResponse + | null + | undefined, + protos.google.analytics.admin.v1beta.IAccountSummary + > + ): void; + listAccountSummaries( + request: protos.google.analytics.admin.v1beta.IListAccountSummariesRequest, + callback: PaginationCallback< + protos.google.analytics.admin.v1beta.IListAccountSummariesRequest, + | protos.google.analytics.admin.v1beta.IListAccountSummariesResponse + | null + | undefined, + protos.google.analytics.admin.v1beta.IAccountSummary + > + ): void; + listAccountSummaries( + request?: protos.google.analytics.admin.v1beta.IListAccountSummariesRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.analytics.admin.v1beta.IListAccountSummariesRequest, + | protos.google.analytics.admin.v1beta.IListAccountSummariesResponse + | null + | undefined, + protos.google.analytics.admin.v1beta.IAccountSummary + >, + callback?: PaginationCallback< + protos.google.analytics.admin.v1beta.IListAccountSummariesRequest, + | protos.google.analytics.admin.v1beta.IListAccountSummariesResponse + | null + | undefined, + protos.google.analytics.admin.v1beta.IAccountSummary + > + ): Promise< + [ + protos.google.analytics.admin.v1beta.IAccountSummary[], + protos.google.analytics.admin.v1beta.IListAccountSummariesRequest | null, + protos.google.analytics.admin.v1beta.IListAccountSummariesResponse + ] + > | 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(); + return this.innerApiCalls.listAccountSummaries(request, options, callback); + } + + /** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {number} request.pageSize + * The maximum number of AccountSummary resources to return. The service may + * return fewer than this value, even if there are additional pages. + * If unspecified, at most 50 resources will be returned. + * The maximum value is 200; (higher values will be coerced to the maximum) + * @param {string} request.pageToken + * A page token, received from a previous `ListAccountSummaries` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListAccountSummaries` + * 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 [AccountSummary]{@link google.analytics.admin.v1beta.AccountSummary} 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 `listAccountSummariesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listAccountSummariesStream( + request?: protos.google.analytics.admin.v1beta.IListAccountSummariesRequest, + options?: CallOptions + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + const defaultCallSettings = this._defaults['listAccountSummaries']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listAccountSummaries.createStream( + this.innerApiCalls.listAccountSummaries as GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listAccountSummaries`, 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 {number} request.pageSize + * The maximum number of AccountSummary resources to return. The service may + * return fewer than this value, even if there are additional pages. + * If unspecified, at most 50 resources will be returned. + * The maximum value is 200; (higher values will be coerced to the maximum) + * @param {string} request.pageToken + * A page token, received from a previous `ListAccountSummaries` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListAccountSummaries` + * 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 [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * [AccountSummary]{@link google.analytics.admin.v1beta.AccountSummary}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + * @example include:samples/generated/v1beta/analytics_admin_service.list_account_summaries.js + * region_tag:analyticsadmin_v1beta_generated_AnalyticsAdminService_ListAccountSummaries_async + */ + listAccountSummariesAsync( + request?: protos.google.analytics.admin.v1beta.IListAccountSummariesRequest, + options?: CallOptions + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + const defaultCallSettings = this._defaults['listAccountSummaries']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listAccountSummaries.asyncIterate( + this.innerApiCalls['listAccountSummaries'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Returns child Properties under the specified parent Account. + * + * Only "GA4" properties will be returned. + * Properties will be excluded if the caller does not have access. + * Soft-deleted (ie: "trashed") properties are excluded by default. + * Returns an empty list if no relevant properties are found. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.filter + * Required. An expression for filtering the results of the request. + * Fields eligible for filtering are: + * `parent:`(The resource name of the parent account/property) or + * `ancestor:`(The resource name of the parent account) or + * `firebase_project:`(The id or number of the linked firebase project). + * Some examples of filters: + * + * ``` + * | Filter | Description | + * |-----------------------------|-------------------------------------------| + * | parent:accounts/123 | The account with account id: 123. | + * | parent:properties/123 | The property with property id: 123. | + * | ancestor:accounts/123 | The account with account id: 123. | + * | firebase_project:project-id | The firebase project with id: project-id. | + * | firebase_project:123 | The firebase project with number: 123. | + * ``` + * @param {number} request.pageSize + * The maximum number of resources to return. The service may return + * fewer than this value, even if there are additional pages. + * If unspecified, at most 50 resources will be returned. + * The maximum value is 200; (higher values will be coerced to the maximum) + * @param {string} request.pageToken + * A page token, received from a previous `ListProperties` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListProperties` must + * match the call that provided the page token. + * @param {boolean} request.showDeleted + * Whether to include soft-deleted (ie: "trashed") Properties in the + * results. Properties can be inspected to determine whether they are deleted + * or not. + * @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 [Property]{@link google.analytics.admin.v1beta.Property}. + * 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 `listPropertiesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listProperties( + request?: protos.google.analytics.admin.v1beta.IListPropertiesRequest, + options?: CallOptions + ): Promise< + [ + protos.google.analytics.admin.v1beta.IProperty[], + protos.google.analytics.admin.v1beta.IListPropertiesRequest | null, + protos.google.analytics.admin.v1beta.IListPropertiesResponse + ] + >; + listProperties( + request: protos.google.analytics.admin.v1beta.IListPropertiesRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.analytics.admin.v1beta.IListPropertiesRequest, + | protos.google.analytics.admin.v1beta.IListPropertiesResponse + | null + | undefined, + protos.google.analytics.admin.v1beta.IProperty + > + ): void; + listProperties( + request: protos.google.analytics.admin.v1beta.IListPropertiesRequest, + callback: PaginationCallback< + protos.google.analytics.admin.v1beta.IListPropertiesRequest, + | protos.google.analytics.admin.v1beta.IListPropertiesResponse + | null + | undefined, + protos.google.analytics.admin.v1beta.IProperty + > + ): void; + listProperties( + request?: protos.google.analytics.admin.v1beta.IListPropertiesRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.analytics.admin.v1beta.IListPropertiesRequest, + | protos.google.analytics.admin.v1beta.IListPropertiesResponse + | null + | undefined, + protos.google.analytics.admin.v1beta.IProperty + >, + callback?: PaginationCallback< + protos.google.analytics.admin.v1beta.IListPropertiesRequest, + | protos.google.analytics.admin.v1beta.IListPropertiesResponse + | null + | undefined, + protos.google.analytics.admin.v1beta.IProperty + > + ): Promise< + [ + protos.google.analytics.admin.v1beta.IProperty[], + protos.google.analytics.admin.v1beta.IListPropertiesRequest | null, + protos.google.analytics.admin.v1beta.IListPropertiesResponse + ] + > | 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(); + return this.innerApiCalls.listProperties(request, options, callback); + } + + /** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.filter + * Required. An expression for filtering the results of the request. + * Fields eligible for filtering are: + * `parent:`(The resource name of the parent account/property) or + * `ancestor:`(The resource name of the parent account) or + * `firebase_project:`(The id or number of the linked firebase project). + * Some examples of filters: + * + * ``` + * | Filter | Description | + * |-----------------------------|-------------------------------------------| + * | parent:accounts/123 | The account with account id: 123. | + * | parent:properties/123 | The property with property id: 123. | + * | ancestor:accounts/123 | The account with account id: 123. | + * | firebase_project:project-id | The firebase project with id: project-id. | + * | firebase_project:123 | The firebase project with number: 123. | + * ``` + * @param {number} request.pageSize + * The maximum number of resources to return. The service may return + * fewer than this value, even if there are additional pages. + * If unspecified, at most 50 resources will be returned. + * The maximum value is 200; (higher values will be coerced to the maximum) + * @param {string} request.pageToken + * A page token, received from a previous `ListProperties` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListProperties` must + * match the call that provided the page token. + * @param {boolean} request.showDeleted + * Whether to include soft-deleted (ie: "trashed") Properties in the + * results. Properties can be inspected to determine whether they are deleted + * or not. + * @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 [Property]{@link google.analytics.admin.v1beta.Property} 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 `listPropertiesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listPropertiesStream( + request?: protos.google.analytics.admin.v1beta.IListPropertiesRequest, + options?: CallOptions + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + const defaultCallSettings = this._defaults['listProperties']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listProperties.createStream( + this.innerApiCalls.listProperties as GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listProperties`, 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.filter + * Required. An expression for filtering the results of the request. + * Fields eligible for filtering are: + * `parent:`(The resource name of the parent account/property) or + * `ancestor:`(The resource name of the parent account) or + * `firebase_project:`(The id or number of the linked firebase project). + * Some examples of filters: + * + * ``` + * | Filter | Description | + * |-----------------------------|-------------------------------------------| + * | parent:accounts/123 | The account with account id: 123. | + * | parent:properties/123 | The property with property id: 123. | + * | ancestor:accounts/123 | The account with account id: 123. | + * | firebase_project:project-id | The firebase project with id: project-id. | + * | firebase_project:123 | The firebase project with number: 123. | + * ``` + * @param {number} request.pageSize + * The maximum number of resources to return. The service may return + * fewer than this value, even if there are additional pages. + * If unspecified, at most 50 resources will be returned. + * The maximum value is 200; (higher values will be coerced to the maximum) + * @param {string} request.pageToken + * A page token, received from a previous `ListProperties` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListProperties` must + * match the call that provided the page token. + * @param {boolean} request.showDeleted + * Whether to include soft-deleted (ie: "trashed") Properties in the + * results. Properties can be inspected to determine whether they are deleted + * or not. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * [Property]{@link google.analytics.admin.v1beta.Property}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + * @example include:samples/generated/v1beta/analytics_admin_service.list_properties.js + * region_tag:analyticsadmin_v1beta_generated_AnalyticsAdminService_ListProperties_async + */ + listPropertiesAsync( + request?: protos.google.analytics.admin.v1beta.IListPropertiesRequest, + options?: CallOptions + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + const defaultCallSettings = this._defaults['listProperties']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listProperties.asyncIterate( + this.innerApiCalls['listProperties'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Lists FirebaseLinks on a property. + * Properties can have at most one FirebaseLink. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Format: properties/{property_id} + * Example: properties/1234 + * @param {number} request.pageSize + * The maximum number of resources to return. The service may return + * fewer than this value, even if there are additional pages. + * If unspecified, at most 50 resources will be returned. + * The maximum value is 200; (higher values will be coerced to the maximum) + * @param {string} request.pageToken + * A page token, received from a previous `ListFirebaseLinks` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListProperties` 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 [FirebaseLink]{@link google.analytics.admin.v1beta.FirebaseLink}. + * 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 `listFirebaseLinksAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listFirebaseLinks( + request?: protos.google.analytics.admin.v1beta.IListFirebaseLinksRequest, + options?: CallOptions + ): Promise< + [ + protos.google.analytics.admin.v1beta.IFirebaseLink[], + protos.google.analytics.admin.v1beta.IListFirebaseLinksRequest | null, + protos.google.analytics.admin.v1beta.IListFirebaseLinksResponse + ] + >; + listFirebaseLinks( + request: protos.google.analytics.admin.v1beta.IListFirebaseLinksRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.analytics.admin.v1beta.IListFirebaseLinksRequest, + | protos.google.analytics.admin.v1beta.IListFirebaseLinksResponse + | null + | undefined, + protos.google.analytics.admin.v1beta.IFirebaseLink + > + ): void; + listFirebaseLinks( + request: protos.google.analytics.admin.v1beta.IListFirebaseLinksRequest, + callback: PaginationCallback< + protos.google.analytics.admin.v1beta.IListFirebaseLinksRequest, + | protos.google.analytics.admin.v1beta.IListFirebaseLinksResponse + | null + | undefined, + protos.google.analytics.admin.v1beta.IFirebaseLink + > + ): void; + listFirebaseLinks( + request?: protos.google.analytics.admin.v1beta.IListFirebaseLinksRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.analytics.admin.v1beta.IListFirebaseLinksRequest, + | protos.google.analytics.admin.v1beta.IListFirebaseLinksResponse + | null + | undefined, + protos.google.analytics.admin.v1beta.IFirebaseLink + >, + callback?: PaginationCallback< + protos.google.analytics.admin.v1beta.IListFirebaseLinksRequest, + | protos.google.analytics.admin.v1beta.IListFirebaseLinksResponse + | null + | undefined, + protos.google.analytics.admin.v1beta.IFirebaseLink + > + ): Promise< + [ + protos.google.analytics.admin.v1beta.IFirebaseLink[], + protos.google.analytics.admin.v1beta.IListFirebaseLinksRequest | null, + protos.google.analytics.admin.v1beta.IListFirebaseLinksResponse + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize(); + return this.innerApiCalls.listFirebaseLinks(request, options, callback); + } + + /** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Format: properties/{property_id} + * Example: properties/1234 + * @param {number} request.pageSize + * The maximum number of resources to return. The service may return + * fewer than this value, even if there are additional pages. + * If unspecified, at most 50 resources will be returned. + * The maximum value is 200; (higher values will be coerced to the maximum) + * @param {string} request.pageToken + * A page token, received from a previous `ListFirebaseLinks` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListProperties` 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 [FirebaseLink]{@link google.analytics.admin.v1beta.FirebaseLink} 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 `listFirebaseLinksAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listFirebaseLinksStream( + request?: protos.google.analytics.admin.v1beta.IListFirebaseLinksRequest, + 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['listFirebaseLinks']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listFirebaseLinks.createStream( + this.innerApiCalls.listFirebaseLinks as GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listFirebaseLinks`, 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. Format: properties/{property_id} + * Example: properties/1234 + * @param {number} request.pageSize + * The maximum number of resources to return. The service may return + * fewer than this value, even if there are additional pages. + * If unspecified, at most 50 resources will be returned. + * The maximum value is 200; (higher values will be coerced to the maximum) + * @param {string} request.pageToken + * A page token, received from a previous `ListFirebaseLinks` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListProperties` 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 [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * [FirebaseLink]{@link google.analytics.admin.v1beta.FirebaseLink}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + * @example include:samples/generated/v1beta/analytics_admin_service.list_firebase_links.js + * region_tag:analyticsadmin_v1beta_generated_AnalyticsAdminService_ListFirebaseLinks_async + */ + listFirebaseLinksAsync( + request?: protos.google.analytics.admin.v1beta.IListFirebaseLinksRequest, + 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['listFirebaseLinks']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listFirebaseLinks.asyncIterate( + this.innerApiCalls['listFirebaseLinks'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Lists GoogleAdsLinks on a property. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Example format: properties/1234 + * @param {number} request.pageSize + * The maximum number of resources to return. + * If unspecified, at most 50 resources will be returned. + * The maximum value is 200 (higher values will be coerced to the maximum). + * @param {string} request.pageToken + * A page token, received from a previous `ListGoogleAdsLinks` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListGoogleAdsLinks` 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 [GoogleAdsLink]{@link google.analytics.admin.v1beta.GoogleAdsLink}. + * 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 `listGoogleAdsLinksAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listGoogleAdsLinks( + request?: protos.google.analytics.admin.v1beta.IListGoogleAdsLinksRequest, + options?: CallOptions + ): Promise< + [ + protos.google.analytics.admin.v1beta.IGoogleAdsLink[], + protos.google.analytics.admin.v1beta.IListGoogleAdsLinksRequest | null, + protos.google.analytics.admin.v1beta.IListGoogleAdsLinksResponse + ] + >; + listGoogleAdsLinks( + request: protos.google.analytics.admin.v1beta.IListGoogleAdsLinksRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.analytics.admin.v1beta.IListGoogleAdsLinksRequest, + | protos.google.analytics.admin.v1beta.IListGoogleAdsLinksResponse + | null + | undefined, + protos.google.analytics.admin.v1beta.IGoogleAdsLink + > + ): void; + listGoogleAdsLinks( + request: protos.google.analytics.admin.v1beta.IListGoogleAdsLinksRequest, + callback: PaginationCallback< + protos.google.analytics.admin.v1beta.IListGoogleAdsLinksRequest, + | protos.google.analytics.admin.v1beta.IListGoogleAdsLinksResponse + | null + | undefined, + protos.google.analytics.admin.v1beta.IGoogleAdsLink + > + ): void; + listGoogleAdsLinks( + request?: protos.google.analytics.admin.v1beta.IListGoogleAdsLinksRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.analytics.admin.v1beta.IListGoogleAdsLinksRequest, + | protos.google.analytics.admin.v1beta.IListGoogleAdsLinksResponse + | null + | undefined, + protos.google.analytics.admin.v1beta.IGoogleAdsLink + >, + callback?: PaginationCallback< + protos.google.analytics.admin.v1beta.IListGoogleAdsLinksRequest, + | protos.google.analytics.admin.v1beta.IListGoogleAdsLinksResponse + | null + | undefined, + protos.google.analytics.admin.v1beta.IGoogleAdsLink + > + ): Promise< + [ + protos.google.analytics.admin.v1beta.IGoogleAdsLink[], + protos.google.analytics.admin.v1beta.IListGoogleAdsLinksRequest | null, + protos.google.analytics.admin.v1beta.IListGoogleAdsLinksResponse + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize(); + return this.innerApiCalls.listGoogleAdsLinks(request, options, callback); + } + + /** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Example format: properties/1234 + * @param {number} request.pageSize + * The maximum number of resources to return. + * If unspecified, at most 50 resources will be returned. + * The maximum value is 200 (higher values will be coerced to the maximum). + * @param {string} request.pageToken + * A page token, received from a previous `ListGoogleAdsLinks` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListGoogleAdsLinks` 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 [GoogleAdsLink]{@link google.analytics.admin.v1beta.GoogleAdsLink} 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 `listGoogleAdsLinksAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listGoogleAdsLinksStream( + request?: protos.google.analytics.admin.v1beta.IListGoogleAdsLinksRequest, + 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['listGoogleAdsLinks']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listGoogleAdsLinks.createStream( + this.innerApiCalls.listGoogleAdsLinks as GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listGoogleAdsLinks`, 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. Example format: properties/1234 + * @param {number} request.pageSize + * The maximum number of resources to return. + * If unspecified, at most 50 resources will be returned. + * The maximum value is 200 (higher values will be coerced to the maximum). + * @param {string} request.pageToken + * A page token, received from a previous `ListGoogleAdsLinks` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListGoogleAdsLinks` 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 [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * [GoogleAdsLink]{@link google.analytics.admin.v1beta.GoogleAdsLink}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + * @example include:samples/generated/v1beta/analytics_admin_service.list_google_ads_links.js + * region_tag:analyticsadmin_v1beta_generated_AnalyticsAdminService_ListGoogleAdsLinks_async + */ + listGoogleAdsLinksAsync( + request?: protos.google.analytics.admin.v1beta.IListGoogleAdsLinksRequest, + 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['listGoogleAdsLinks']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listGoogleAdsLinks.asyncIterate( + this.innerApiCalls['listGoogleAdsLinks'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Returns child MeasurementProtocolSecrets under the specified parent + * Property. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource name of the parent stream. + * Format: + * properties/{property}/dataStreams/{dataStream}/measurementProtocolSecrets + * @param {number} request.pageSize + * The maximum number of resources to return. + * If unspecified, at most 10 resources will be returned. + * The maximum value is 10. Higher values will be coerced to the maximum. + * @param {string} request.pageToken + * A page token, received from a previous `ListMeasurementProtocolSecrets` + * call. Provide this to retrieve the subsequent page. When paginating, all + * other parameters provided to `ListMeasurementProtocolSecrets` 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 [MeasurementProtocolSecret]{@link google.analytics.admin.v1beta.MeasurementProtocolSecret}. + * 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 `listMeasurementProtocolSecretsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listMeasurementProtocolSecrets( + request?: protos.google.analytics.admin.v1beta.IListMeasurementProtocolSecretsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.analytics.admin.v1beta.IMeasurementProtocolSecret[], + protos.google.analytics.admin.v1beta.IListMeasurementProtocolSecretsRequest | null, + protos.google.analytics.admin.v1beta.IListMeasurementProtocolSecretsResponse + ] + >; + listMeasurementProtocolSecrets( + request: protos.google.analytics.admin.v1beta.IListMeasurementProtocolSecretsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.analytics.admin.v1beta.IListMeasurementProtocolSecretsRequest, + | protos.google.analytics.admin.v1beta.IListMeasurementProtocolSecretsResponse + | null + | undefined, + protos.google.analytics.admin.v1beta.IMeasurementProtocolSecret + > + ): void; + listMeasurementProtocolSecrets( + request: protos.google.analytics.admin.v1beta.IListMeasurementProtocolSecretsRequest, + callback: PaginationCallback< + protos.google.analytics.admin.v1beta.IListMeasurementProtocolSecretsRequest, + | protos.google.analytics.admin.v1beta.IListMeasurementProtocolSecretsResponse + | null + | undefined, + protos.google.analytics.admin.v1beta.IMeasurementProtocolSecret + > + ): void; + listMeasurementProtocolSecrets( + request?: protos.google.analytics.admin.v1beta.IListMeasurementProtocolSecretsRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.analytics.admin.v1beta.IListMeasurementProtocolSecretsRequest, + | protos.google.analytics.admin.v1beta.IListMeasurementProtocolSecretsResponse + | null + | undefined, + protos.google.analytics.admin.v1beta.IMeasurementProtocolSecret + >, + callback?: PaginationCallback< + protos.google.analytics.admin.v1beta.IListMeasurementProtocolSecretsRequest, + | protos.google.analytics.admin.v1beta.IListMeasurementProtocolSecretsResponse + | null + | undefined, + protos.google.analytics.admin.v1beta.IMeasurementProtocolSecret + > + ): Promise< + [ + protos.google.analytics.admin.v1beta.IMeasurementProtocolSecret[], + protos.google.analytics.admin.v1beta.IListMeasurementProtocolSecretsRequest | null, + protos.google.analytics.admin.v1beta.IListMeasurementProtocolSecretsResponse + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize(); + return this.innerApiCalls.listMeasurementProtocolSecrets( + request, + options, + callback + ); + } + + /** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource name of the parent stream. + * Format: + * properties/{property}/dataStreams/{dataStream}/measurementProtocolSecrets + * @param {number} request.pageSize + * The maximum number of resources to return. + * If unspecified, at most 10 resources will be returned. + * The maximum value is 10. Higher values will be coerced to the maximum. + * @param {string} request.pageToken + * A page token, received from a previous `ListMeasurementProtocolSecrets` + * call. Provide this to retrieve the subsequent page. When paginating, all + * other parameters provided to `ListMeasurementProtocolSecrets` 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 [MeasurementProtocolSecret]{@link google.analytics.admin.v1beta.MeasurementProtocolSecret} 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 `listMeasurementProtocolSecretsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listMeasurementProtocolSecretsStream( + request?: protos.google.analytics.admin.v1beta.IListMeasurementProtocolSecretsRequest, + 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['listMeasurementProtocolSecrets']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listMeasurementProtocolSecrets.createStream( + this.innerApiCalls.listMeasurementProtocolSecrets as GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listMeasurementProtocolSecrets`, 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 resource name of the parent stream. + * Format: + * properties/{property}/dataStreams/{dataStream}/measurementProtocolSecrets + * @param {number} request.pageSize + * The maximum number of resources to return. + * If unspecified, at most 10 resources will be returned. + * The maximum value is 10. Higher values will be coerced to the maximum. + * @param {string} request.pageToken + * A page token, received from a previous `ListMeasurementProtocolSecrets` + * call. Provide this to retrieve the subsequent page. When paginating, all + * other parameters provided to `ListMeasurementProtocolSecrets` 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 [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * [MeasurementProtocolSecret]{@link google.analytics.admin.v1beta.MeasurementProtocolSecret}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + * @example include:samples/generated/v1beta/analytics_admin_service.list_measurement_protocol_secrets.js + * region_tag:analyticsadmin_v1beta_generated_AnalyticsAdminService_ListMeasurementProtocolSecrets_async + */ + listMeasurementProtocolSecretsAsync( + request?: protos.google.analytics.admin.v1beta.IListMeasurementProtocolSecretsRequest, + 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['listMeasurementProtocolSecrets']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listMeasurementProtocolSecrets.asyncIterate( + this.innerApiCalls['listMeasurementProtocolSecrets'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Searches through all changes to an account or its children given the + * specified set of filters. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.account + * Required. The account resource for which to return change history resources. + * @param {string} [request.property] + * Optional. Resource name for a child property. If set, only return changes + * made to this property or its child resources. + * @param {number[]} [request.resourceType] + * Optional. If set, only return changes if they are for a resource that matches at + * least one of these types. + * @param {number[]} [request.action] + * Optional. If set, only return changes that match one or more of these types of + * actions. + * @param {string[]} [request.actorEmail] + * Optional. If set, only return changes if they are made by a user in this list. + * @param {google.protobuf.Timestamp} [request.earliestChangeTime] + * Optional. If set, only return changes made after this time (inclusive). + * @param {google.protobuf.Timestamp} [request.latestChangeTime] + * Optional. If set, only return changes made before this time (inclusive). + * @param {number} [request.pageSize] + * Optional. The maximum number of ChangeHistoryEvent items to return. + * The service may return fewer than this value, even if there are additional + * pages. If unspecified, at most 50 items will be returned. + * The maximum value is 200 (higher values will be coerced to the maximum). + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `SearchChangeHistoryEvents` call. + * Provide this to retrieve the subsequent page. When paginating, all other + * parameters provided to `SearchChangeHistoryEvents` 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 [ChangeHistoryEvent]{@link google.analytics.admin.v1beta.ChangeHistoryEvent}. + * 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 `searchChangeHistoryEventsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + searchChangeHistoryEvents( + request?: protos.google.analytics.admin.v1beta.ISearchChangeHistoryEventsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.analytics.admin.v1beta.IChangeHistoryEvent[], + protos.google.analytics.admin.v1beta.ISearchChangeHistoryEventsRequest | null, + protos.google.analytics.admin.v1beta.ISearchChangeHistoryEventsResponse + ] + >; + searchChangeHistoryEvents( + request: protos.google.analytics.admin.v1beta.ISearchChangeHistoryEventsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.analytics.admin.v1beta.ISearchChangeHistoryEventsRequest, + | protos.google.analytics.admin.v1beta.ISearchChangeHistoryEventsResponse + | null + | undefined, + protos.google.analytics.admin.v1beta.IChangeHistoryEvent + > + ): void; + searchChangeHistoryEvents( + request: protos.google.analytics.admin.v1beta.ISearchChangeHistoryEventsRequest, + callback: PaginationCallback< + protos.google.analytics.admin.v1beta.ISearchChangeHistoryEventsRequest, + | protos.google.analytics.admin.v1beta.ISearchChangeHistoryEventsResponse + | null + | undefined, + protos.google.analytics.admin.v1beta.IChangeHistoryEvent + > + ): void; + searchChangeHistoryEvents( + request?: protos.google.analytics.admin.v1beta.ISearchChangeHistoryEventsRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.analytics.admin.v1beta.ISearchChangeHistoryEventsRequest, + | protos.google.analytics.admin.v1beta.ISearchChangeHistoryEventsResponse + | null + | undefined, + protos.google.analytics.admin.v1beta.IChangeHistoryEvent + >, + callback?: PaginationCallback< + protos.google.analytics.admin.v1beta.ISearchChangeHistoryEventsRequest, + | protos.google.analytics.admin.v1beta.ISearchChangeHistoryEventsResponse + | null + | undefined, + protos.google.analytics.admin.v1beta.IChangeHistoryEvent + > + ): Promise< + [ + protos.google.analytics.admin.v1beta.IChangeHistoryEvent[], + protos.google.analytics.admin.v1beta.ISearchChangeHistoryEventsRequest | null, + protos.google.analytics.admin.v1beta.ISearchChangeHistoryEventsResponse + ] + > | 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({ + account: request.account ?? '', + }); + this.initialize(); + return this.innerApiCalls.searchChangeHistoryEvents( + request, + options, + callback + ); + } + + /** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.account + * Required. The account resource for which to return change history resources. + * @param {string} [request.property] + * Optional. Resource name for a child property. If set, only return changes + * made to this property or its child resources. + * @param {number[]} [request.resourceType] + * Optional. If set, only return changes if they are for a resource that matches at + * least one of these types. + * @param {number[]} [request.action] + * Optional. If set, only return changes that match one or more of these types of + * actions. + * @param {string[]} [request.actorEmail] + * Optional. If set, only return changes if they are made by a user in this list. + * @param {google.protobuf.Timestamp} [request.earliestChangeTime] + * Optional. If set, only return changes made after this time (inclusive). + * @param {google.protobuf.Timestamp} [request.latestChangeTime] + * Optional. If set, only return changes made before this time (inclusive). + * @param {number} [request.pageSize] + * Optional. The maximum number of ChangeHistoryEvent items to return. + * The service may return fewer than this value, even if there are additional + * pages. If unspecified, at most 50 items will be returned. + * The maximum value is 200 (higher values will be coerced to the maximum). + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `SearchChangeHistoryEvents` call. + * Provide this to retrieve the subsequent page. When paginating, all other + * parameters provided to `SearchChangeHistoryEvents` 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 [ChangeHistoryEvent]{@link google.analytics.admin.v1beta.ChangeHistoryEvent} 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 `searchChangeHistoryEventsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + searchChangeHistoryEventsStream( + request?: protos.google.analytics.admin.v1beta.ISearchChangeHistoryEventsRequest, + 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({ + account: request.account ?? '', + }); + const defaultCallSettings = this._defaults['searchChangeHistoryEvents']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.searchChangeHistoryEvents.createStream( + this.innerApiCalls.searchChangeHistoryEvents as GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `searchChangeHistoryEvents`, 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.account + * Required. The account resource for which to return change history resources. + * @param {string} [request.property] + * Optional. Resource name for a child property. If set, only return changes + * made to this property or its child resources. + * @param {number[]} [request.resourceType] + * Optional. If set, only return changes if they are for a resource that matches at + * least one of these types. + * @param {number[]} [request.action] + * Optional. If set, only return changes that match one or more of these types of + * actions. + * @param {string[]} [request.actorEmail] + * Optional. If set, only return changes if they are made by a user in this list. + * @param {google.protobuf.Timestamp} [request.earliestChangeTime] + * Optional. If set, only return changes made after this time (inclusive). + * @param {google.protobuf.Timestamp} [request.latestChangeTime] + * Optional. If set, only return changes made before this time (inclusive). + * @param {number} [request.pageSize] + * Optional. The maximum number of ChangeHistoryEvent items to return. + * The service may return fewer than this value, even if there are additional + * pages. If unspecified, at most 50 items will be returned. + * The maximum value is 200 (higher values will be coerced to the maximum). + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `SearchChangeHistoryEvents` call. + * Provide this to retrieve the subsequent page. When paginating, all other + * parameters provided to `SearchChangeHistoryEvents` 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 [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * [ChangeHistoryEvent]{@link google.analytics.admin.v1beta.ChangeHistoryEvent}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + * @example include:samples/generated/v1beta/analytics_admin_service.search_change_history_events.js + * region_tag:analyticsadmin_v1beta_generated_AnalyticsAdminService_SearchChangeHistoryEvents_async + */ + searchChangeHistoryEventsAsync( + request?: protos.google.analytics.admin.v1beta.ISearchChangeHistoryEventsRequest, + 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({ + account: request.account ?? '', + }); + const defaultCallSettings = this._defaults['searchChangeHistoryEvents']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.searchChangeHistoryEvents.asyncIterate( + this.innerApiCalls['searchChangeHistoryEvents'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Returns a list of conversion events in the specified parent property. + * + * Returns an empty list if no conversion events are found. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource name of the parent property. + * Example: 'properties/123' + * @param {number} request.pageSize + * The maximum number of resources to return. + * If unspecified, at most 50 resources will be returned. + * The maximum value is 200; (higher values will be coerced to the maximum) + * @param {string} request.pageToken + * A page token, received from a previous `ListConversionEvents` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListConversionEvents` + * 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 [ConversionEvent]{@link google.analytics.admin.v1beta.ConversionEvent}. + * 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 `listConversionEventsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listConversionEvents( + request?: protos.google.analytics.admin.v1beta.IListConversionEventsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.analytics.admin.v1beta.IConversionEvent[], + protos.google.analytics.admin.v1beta.IListConversionEventsRequest | null, + protos.google.analytics.admin.v1beta.IListConversionEventsResponse + ] + >; + listConversionEvents( + request: protos.google.analytics.admin.v1beta.IListConversionEventsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.analytics.admin.v1beta.IListConversionEventsRequest, + | protos.google.analytics.admin.v1beta.IListConversionEventsResponse + | null + | undefined, + protos.google.analytics.admin.v1beta.IConversionEvent + > + ): void; + listConversionEvents( + request: protos.google.analytics.admin.v1beta.IListConversionEventsRequest, + callback: PaginationCallback< + protos.google.analytics.admin.v1beta.IListConversionEventsRequest, + | protos.google.analytics.admin.v1beta.IListConversionEventsResponse + | null + | undefined, + protos.google.analytics.admin.v1beta.IConversionEvent + > + ): void; + listConversionEvents( + request?: protos.google.analytics.admin.v1beta.IListConversionEventsRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.analytics.admin.v1beta.IListConversionEventsRequest, + | protos.google.analytics.admin.v1beta.IListConversionEventsResponse + | null + | undefined, + protos.google.analytics.admin.v1beta.IConversionEvent + >, + callback?: PaginationCallback< + protos.google.analytics.admin.v1beta.IListConversionEventsRequest, + | protos.google.analytics.admin.v1beta.IListConversionEventsResponse + | null + | undefined, + protos.google.analytics.admin.v1beta.IConversionEvent + > + ): Promise< + [ + protos.google.analytics.admin.v1beta.IConversionEvent[], + protos.google.analytics.admin.v1beta.IListConversionEventsRequest | null, + protos.google.analytics.admin.v1beta.IListConversionEventsResponse + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize(); + return this.innerApiCalls.listConversionEvents(request, options, callback); + } + + /** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The resource name of the parent property. + * Example: 'properties/123' + * @param {number} request.pageSize + * The maximum number of resources to return. + * If unspecified, at most 50 resources will be returned. + * The maximum value is 200; (higher values will be coerced to the maximum) + * @param {string} request.pageToken + * A page token, received from a previous `ListConversionEvents` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListConversionEvents` + * 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 [ConversionEvent]{@link google.analytics.admin.v1beta.ConversionEvent} 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 `listConversionEventsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listConversionEventsStream( + request?: protos.google.analytics.admin.v1beta.IListConversionEventsRequest, + 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['listConversionEvents']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listConversionEvents.createStream( + this.innerApiCalls.listConversionEvents as GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listConversionEvents`, 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 resource name of the parent property. + * Example: 'properties/123' + * @param {number} request.pageSize + * The maximum number of resources to return. + * If unspecified, at most 50 resources will be returned. + * The maximum value is 200; (higher values will be coerced to the maximum) + * @param {string} request.pageToken + * A page token, received from a previous `ListConversionEvents` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListConversionEvents` + * 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 [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * [ConversionEvent]{@link google.analytics.admin.v1beta.ConversionEvent}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + * @example include:samples/generated/v1beta/analytics_admin_service.list_conversion_events.js + * region_tag:analyticsadmin_v1beta_generated_AnalyticsAdminService_ListConversionEvents_async + */ + listConversionEventsAsync( + request?: protos.google.analytics.admin.v1beta.IListConversionEventsRequest, + 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['listConversionEvents']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listConversionEvents.asyncIterate( + this.innerApiCalls['listConversionEvents'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Lists CustomDimensions on a property. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Example format: properties/1234 + * @param {number} request.pageSize + * The maximum number of resources to return. + * If unspecified, at most 50 resources will be returned. + * The maximum value is 200 (higher values will be coerced to the maximum). + * @param {string} request.pageToken + * A page token, received from a previous `ListCustomDimensions` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListCustomDimensions` + * 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 [CustomDimension]{@link google.analytics.admin.v1beta.CustomDimension}. + * 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 `listCustomDimensionsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listCustomDimensions( + request?: protos.google.analytics.admin.v1beta.IListCustomDimensionsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.analytics.admin.v1beta.ICustomDimension[], + protos.google.analytics.admin.v1beta.IListCustomDimensionsRequest | null, + protos.google.analytics.admin.v1beta.IListCustomDimensionsResponse + ] + >; + listCustomDimensions( + request: protos.google.analytics.admin.v1beta.IListCustomDimensionsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.analytics.admin.v1beta.IListCustomDimensionsRequest, + | protos.google.analytics.admin.v1beta.IListCustomDimensionsResponse + | null + | undefined, + protos.google.analytics.admin.v1beta.ICustomDimension + > + ): void; + listCustomDimensions( + request: protos.google.analytics.admin.v1beta.IListCustomDimensionsRequest, + callback: PaginationCallback< + protos.google.analytics.admin.v1beta.IListCustomDimensionsRequest, + | protos.google.analytics.admin.v1beta.IListCustomDimensionsResponse + | null + | undefined, + protos.google.analytics.admin.v1beta.ICustomDimension + > + ): void; + listCustomDimensions( + request?: protos.google.analytics.admin.v1beta.IListCustomDimensionsRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.analytics.admin.v1beta.IListCustomDimensionsRequest, + | protos.google.analytics.admin.v1beta.IListCustomDimensionsResponse + | null + | undefined, + protos.google.analytics.admin.v1beta.ICustomDimension + >, + callback?: PaginationCallback< + protos.google.analytics.admin.v1beta.IListCustomDimensionsRequest, + | protos.google.analytics.admin.v1beta.IListCustomDimensionsResponse + | null + | undefined, + protos.google.analytics.admin.v1beta.ICustomDimension + > + ): Promise< + [ + protos.google.analytics.admin.v1beta.ICustomDimension[], + protos.google.analytics.admin.v1beta.IListCustomDimensionsRequest | null, + protos.google.analytics.admin.v1beta.IListCustomDimensionsResponse + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize(); + return this.innerApiCalls.listCustomDimensions(request, options, callback); + } + + /** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Example format: properties/1234 + * @param {number} request.pageSize + * The maximum number of resources to return. + * If unspecified, at most 50 resources will be returned. + * The maximum value is 200 (higher values will be coerced to the maximum). + * @param {string} request.pageToken + * A page token, received from a previous `ListCustomDimensions` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListCustomDimensions` + * 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 [CustomDimension]{@link google.analytics.admin.v1beta.CustomDimension} 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 `listCustomDimensionsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listCustomDimensionsStream( + request?: protos.google.analytics.admin.v1beta.IListCustomDimensionsRequest, + 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['listCustomDimensions']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listCustomDimensions.createStream( + this.innerApiCalls.listCustomDimensions as GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listCustomDimensions`, 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. Example format: properties/1234 + * @param {number} request.pageSize + * The maximum number of resources to return. + * If unspecified, at most 50 resources will be returned. + * The maximum value is 200 (higher values will be coerced to the maximum). + * @param {string} request.pageToken + * A page token, received from a previous `ListCustomDimensions` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListCustomDimensions` + * 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 [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * [CustomDimension]{@link google.analytics.admin.v1beta.CustomDimension}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + * @example include:samples/generated/v1beta/analytics_admin_service.list_custom_dimensions.js + * region_tag:analyticsadmin_v1beta_generated_AnalyticsAdminService_ListCustomDimensions_async + */ + listCustomDimensionsAsync( + request?: protos.google.analytics.admin.v1beta.IListCustomDimensionsRequest, + 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['listCustomDimensions']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listCustomDimensions.asyncIterate( + this.innerApiCalls['listCustomDimensions'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Lists CustomMetrics on a property. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Example format: properties/1234 + * @param {number} request.pageSize + * The maximum number of resources to return. + * If unspecified, at most 50 resources will be returned. + * The maximum value is 200 (higher values will be coerced to the maximum). + * @param {string} request.pageToken + * A page token, received from a previous `ListCustomMetrics` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListCustomMetrics` 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 [CustomMetric]{@link google.analytics.admin.v1beta.CustomMetric}. + * 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 `listCustomMetricsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listCustomMetrics( + request?: protos.google.analytics.admin.v1beta.IListCustomMetricsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.analytics.admin.v1beta.ICustomMetric[], + protos.google.analytics.admin.v1beta.IListCustomMetricsRequest | null, + protos.google.analytics.admin.v1beta.IListCustomMetricsResponse + ] + >; + listCustomMetrics( + request: protos.google.analytics.admin.v1beta.IListCustomMetricsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.analytics.admin.v1beta.IListCustomMetricsRequest, + | protos.google.analytics.admin.v1beta.IListCustomMetricsResponse + | null + | undefined, + protos.google.analytics.admin.v1beta.ICustomMetric + > + ): void; + listCustomMetrics( + request: protos.google.analytics.admin.v1beta.IListCustomMetricsRequest, + callback: PaginationCallback< + protos.google.analytics.admin.v1beta.IListCustomMetricsRequest, + | protos.google.analytics.admin.v1beta.IListCustomMetricsResponse + | null + | undefined, + protos.google.analytics.admin.v1beta.ICustomMetric + > + ): void; + listCustomMetrics( + request?: protos.google.analytics.admin.v1beta.IListCustomMetricsRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.analytics.admin.v1beta.IListCustomMetricsRequest, + | protos.google.analytics.admin.v1beta.IListCustomMetricsResponse + | null + | undefined, + protos.google.analytics.admin.v1beta.ICustomMetric + >, + callback?: PaginationCallback< + protos.google.analytics.admin.v1beta.IListCustomMetricsRequest, + | protos.google.analytics.admin.v1beta.IListCustomMetricsResponse + | null + | undefined, + protos.google.analytics.admin.v1beta.ICustomMetric + > + ): Promise< + [ + protos.google.analytics.admin.v1beta.ICustomMetric[], + protos.google.analytics.admin.v1beta.IListCustomMetricsRequest | null, + protos.google.analytics.admin.v1beta.IListCustomMetricsResponse + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize(); + return this.innerApiCalls.listCustomMetrics(request, options, callback); + } + + /** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Example format: properties/1234 + * @param {number} request.pageSize + * The maximum number of resources to return. + * If unspecified, at most 50 resources will be returned. + * The maximum value is 200 (higher values will be coerced to the maximum). + * @param {string} request.pageToken + * A page token, received from a previous `ListCustomMetrics` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListCustomMetrics` 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 [CustomMetric]{@link google.analytics.admin.v1beta.CustomMetric} 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 `listCustomMetricsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listCustomMetricsStream( + request?: protos.google.analytics.admin.v1beta.IListCustomMetricsRequest, + 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['listCustomMetrics']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listCustomMetrics.createStream( + this.innerApiCalls.listCustomMetrics as GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listCustomMetrics`, 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. Example format: properties/1234 + * @param {number} request.pageSize + * The maximum number of resources to return. + * If unspecified, at most 50 resources will be returned. + * The maximum value is 200 (higher values will be coerced to the maximum). + * @param {string} request.pageToken + * A page token, received from a previous `ListCustomMetrics` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListCustomMetrics` 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 [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * [CustomMetric]{@link google.analytics.admin.v1beta.CustomMetric}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + * @example include:samples/generated/v1beta/analytics_admin_service.list_custom_metrics.js + * region_tag:analyticsadmin_v1beta_generated_AnalyticsAdminService_ListCustomMetrics_async + */ + listCustomMetricsAsync( + request?: protos.google.analytics.admin.v1beta.IListCustomMetricsRequest, + 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['listCustomMetrics']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listCustomMetrics.asyncIterate( + this.innerApiCalls['listCustomMetrics'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Lists DataStreams on a property. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Example format: properties/1234 + * @param {number} request.pageSize + * The maximum number of resources to return. + * If unspecified, at most 50 resources will be returned. + * The maximum value is 200 (higher values will be coerced to the maximum). + * @param {string} request.pageToken + * A page token, received from a previous `ListDataStreams` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListDataStreams` 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 [DataStream]{@link google.analytics.admin.v1beta.DataStream}. + * 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 `listDataStreamsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listDataStreams( + request?: protos.google.analytics.admin.v1beta.IListDataStreamsRequest, + options?: CallOptions + ): Promise< + [ + protos.google.analytics.admin.v1beta.IDataStream[], + protos.google.analytics.admin.v1beta.IListDataStreamsRequest | null, + protos.google.analytics.admin.v1beta.IListDataStreamsResponse + ] + >; + listDataStreams( + request: protos.google.analytics.admin.v1beta.IListDataStreamsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.analytics.admin.v1beta.IListDataStreamsRequest, + | protos.google.analytics.admin.v1beta.IListDataStreamsResponse + | null + | undefined, + protos.google.analytics.admin.v1beta.IDataStream + > + ): void; + listDataStreams( + request: protos.google.analytics.admin.v1beta.IListDataStreamsRequest, + callback: PaginationCallback< + protos.google.analytics.admin.v1beta.IListDataStreamsRequest, + | protos.google.analytics.admin.v1beta.IListDataStreamsResponse + | null + | undefined, + protos.google.analytics.admin.v1beta.IDataStream + > + ): void; + listDataStreams( + request?: protos.google.analytics.admin.v1beta.IListDataStreamsRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.analytics.admin.v1beta.IListDataStreamsRequest, + | protos.google.analytics.admin.v1beta.IListDataStreamsResponse + | null + | undefined, + protos.google.analytics.admin.v1beta.IDataStream + >, + callback?: PaginationCallback< + protos.google.analytics.admin.v1beta.IListDataStreamsRequest, + | protos.google.analytics.admin.v1beta.IListDataStreamsResponse + | null + | undefined, + protos.google.analytics.admin.v1beta.IDataStream + > + ): Promise< + [ + protos.google.analytics.admin.v1beta.IDataStream[], + protos.google.analytics.admin.v1beta.IListDataStreamsRequest | null, + protos.google.analytics.admin.v1beta.IListDataStreamsResponse + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize(); + return this.innerApiCalls.listDataStreams(request, options, callback); + } + + /** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Example format: properties/1234 + * @param {number} request.pageSize + * The maximum number of resources to return. + * If unspecified, at most 50 resources will be returned. + * The maximum value is 200 (higher values will be coerced to the maximum). + * @param {string} request.pageToken + * A page token, received from a previous `ListDataStreams` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListDataStreams` 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 [DataStream]{@link google.analytics.admin.v1beta.DataStream} 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 `listDataStreamsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + */ + listDataStreamsStream( + request?: protos.google.analytics.admin.v1beta.IListDataStreamsRequest, + 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['listDataStreams']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listDataStreams.createStream( + this.innerApiCalls.listDataStreams as GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listDataStreams`, 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. Example format: properties/1234 + * @param {number} request.pageSize + * The maximum number of resources to return. + * If unspecified, at most 50 resources will be returned. + * The maximum value is 200 (higher values will be coerced to the maximum). + * @param {string} request.pageToken + * A page token, received from a previous `ListDataStreams` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListDataStreams` 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 [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). + * When you iterate the returned iterable, each element will be an object representing + * [DataStream]{@link google.analytics.admin.v1beta.DataStream}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) + * for more details and examples. + * @example include:samples/generated/v1beta/analytics_admin_service.list_data_streams.js + * region_tag:analyticsadmin_v1beta_generated_AnalyticsAdminService_ListDataStreams_async + */ + listDataStreamsAsync( + request?: protos.google.analytics.admin.v1beta.IListDataStreamsRequest, + 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['listDataStreams']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listDataStreams.asyncIterate( + this.innerApiCalls['listDataStreams'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + // -------------------- + // -- Path templates -- + // -------------------- + + /** + * Return a fully-qualified account resource name string. + * + * @param {string} account + * @returns {string} Resource name string. + */ + accountPath(account: string) { + return this.pathTemplates.accountPathTemplate.render({ + account: account, + }); + } + + /** + * 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 accountSummary resource name string. + * + * @param {string} account_summary + * @returns {string} Resource name string. + */ + accountSummaryPath(accountSummary: string) { + return this.pathTemplates.accountSummaryPathTemplate.render({ + account_summary: accountSummary, + }); + } + + /** + * Parse the account_summary from AccountSummary resource. + * + * @param {string} accountSummaryName + * A fully-qualified path representing AccountSummary resource. + * @returns {string} A string representing the account_summary. + */ + matchAccountSummaryFromAccountSummaryName(accountSummaryName: string) { + return this.pathTemplates.accountSummaryPathTemplate.match( + accountSummaryName + ).account_summary; + } + + /** + * Return a fully-qualified conversionEvent resource name string. + * + * @param {string} property + * @param {string} conversion_event + * @returns {string} Resource name string. + */ + conversionEventPath(property: string, conversionEvent: string) { + return this.pathTemplates.conversionEventPathTemplate.render({ + property: property, + conversion_event: conversionEvent, + }); + } + + /** + * Parse the property from ConversionEvent resource. + * + * @param {string} conversionEventName + * A fully-qualified path representing ConversionEvent resource. + * @returns {string} A string representing the property. + */ + matchPropertyFromConversionEventName(conversionEventName: string) { + return this.pathTemplates.conversionEventPathTemplate.match( + conversionEventName + ).property; + } + + /** + * Parse the conversion_event from ConversionEvent resource. + * + * @param {string} conversionEventName + * A fully-qualified path representing ConversionEvent resource. + * @returns {string} A string representing the conversion_event. + */ + matchConversionEventFromConversionEventName(conversionEventName: string) { + return this.pathTemplates.conversionEventPathTemplate.match( + conversionEventName + ).conversion_event; + } + + /** + * Return a fully-qualified customDimension resource name string. + * + * @param {string} property + * @param {string} custom_dimension + * @returns {string} Resource name string. + */ + customDimensionPath(property: string, customDimension: string) { + return this.pathTemplates.customDimensionPathTemplate.render({ + property: property, + custom_dimension: customDimension, + }); + } + + /** + * Parse the property from CustomDimension resource. + * + * @param {string} customDimensionName + * A fully-qualified path representing CustomDimension resource. + * @returns {string} A string representing the property. + */ + matchPropertyFromCustomDimensionName(customDimensionName: string) { + return this.pathTemplates.customDimensionPathTemplate.match( + customDimensionName + ).property; + } + + /** + * Parse the custom_dimension from CustomDimension resource. + * + * @param {string} customDimensionName + * A fully-qualified path representing CustomDimension resource. + * @returns {string} A string representing the custom_dimension. + */ + matchCustomDimensionFromCustomDimensionName(customDimensionName: string) { + return this.pathTemplates.customDimensionPathTemplate.match( + customDimensionName + ).custom_dimension; + } + + /** + * Return a fully-qualified customMetric resource name string. + * + * @param {string} property + * @param {string} custom_metric + * @returns {string} Resource name string. + */ + customMetricPath(property: string, customMetric: string) { + return this.pathTemplates.customMetricPathTemplate.render({ + property: property, + custom_metric: customMetric, + }); + } + + /** + * Parse the property from CustomMetric resource. + * + * @param {string} customMetricName + * A fully-qualified path representing CustomMetric resource. + * @returns {string} A string representing the property. + */ + matchPropertyFromCustomMetricName(customMetricName: string) { + return this.pathTemplates.customMetricPathTemplate.match(customMetricName) + .property; + } + + /** + * Parse the custom_metric from CustomMetric resource. + * + * @param {string} customMetricName + * A fully-qualified path representing CustomMetric resource. + * @returns {string} A string representing the custom_metric. + */ + matchCustomMetricFromCustomMetricName(customMetricName: string) { + return this.pathTemplates.customMetricPathTemplate.match(customMetricName) + .custom_metric; + } + + /** + * Return a fully-qualified dataRetentionSettings resource name string. + * + * @param {string} property + * @returns {string} Resource name string. + */ + dataRetentionSettingsPath(property: string) { + return this.pathTemplates.dataRetentionSettingsPathTemplate.render({ + property: property, + }); + } + + /** + * Parse the property from DataRetentionSettings resource. + * + * @param {string} dataRetentionSettingsName + * A fully-qualified path representing DataRetentionSettings resource. + * @returns {string} A string representing the property. + */ + matchPropertyFromDataRetentionSettingsName( + dataRetentionSettingsName: string + ) { + return this.pathTemplates.dataRetentionSettingsPathTemplate.match( + dataRetentionSettingsName + ).property; + } + + /** + * Return a fully-qualified dataSharingSettings resource name string. + * + * @param {string} account + * @returns {string} Resource name string. + */ + dataSharingSettingsPath(account: string) { + return this.pathTemplates.dataSharingSettingsPathTemplate.render({ + account: account, + }); + } + + /** + * Parse the account from DataSharingSettings resource. + * + * @param {string} dataSharingSettingsName + * A fully-qualified path representing DataSharingSettings resource. + * @returns {string} A string representing the account. + */ + matchAccountFromDataSharingSettingsName(dataSharingSettingsName: string) { + return this.pathTemplates.dataSharingSettingsPathTemplate.match( + dataSharingSettingsName + ).account; + } + + /** + * Return a fully-qualified dataStream resource name string. + * + * @param {string} property + * @param {string} data_stream + * @returns {string} Resource name string. + */ + dataStreamPath(property: string, dataStream: string) { + return this.pathTemplates.dataStreamPathTemplate.render({ + property: property, + data_stream: dataStream, + }); + } + + /** + * Parse the property from DataStream resource. + * + * @param {string} dataStreamName + * A fully-qualified path representing DataStream resource. + * @returns {string} A string representing the property. + */ + matchPropertyFromDataStreamName(dataStreamName: string) { + return this.pathTemplates.dataStreamPathTemplate.match(dataStreamName) + .property; + } + + /** + * Parse the data_stream from DataStream resource. + * + * @param {string} dataStreamName + * A fully-qualified path representing DataStream resource. + * @returns {string} A string representing the data_stream. + */ + matchDataStreamFromDataStreamName(dataStreamName: string) { + return this.pathTemplates.dataStreamPathTemplate.match(dataStreamName) + .data_stream; + } + + /** + * Return a fully-qualified firebaseLink resource name string. + * + * @param {string} property + * @param {string} firebase_link + * @returns {string} Resource name string. + */ + firebaseLinkPath(property: string, firebaseLink: string) { + return this.pathTemplates.firebaseLinkPathTemplate.render({ + property: property, + firebase_link: firebaseLink, + }); + } + + /** + * Parse the property from FirebaseLink resource. + * + * @param {string} firebaseLinkName + * A fully-qualified path representing FirebaseLink resource. + * @returns {string} A string representing the property. + */ + matchPropertyFromFirebaseLinkName(firebaseLinkName: string) { + return this.pathTemplates.firebaseLinkPathTemplate.match(firebaseLinkName) + .property; + } + + /** + * Parse the firebase_link from FirebaseLink resource. + * + * @param {string} firebaseLinkName + * A fully-qualified path representing FirebaseLink resource. + * @returns {string} A string representing the firebase_link. + */ + matchFirebaseLinkFromFirebaseLinkName(firebaseLinkName: string) { + return this.pathTemplates.firebaseLinkPathTemplate.match(firebaseLinkName) + .firebase_link; + } + + /** + * Return a fully-qualified googleAdsLink resource name string. + * + * @param {string} property + * @param {string} google_ads_link + * @returns {string} Resource name string. + */ + googleAdsLinkPath(property: string, googleAdsLink: string) { + return this.pathTemplates.googleAdsLinkPathTemplate.render({ + property: property, + google_ads_link: googleAdsLink, + }); + } + + /** + * Parse the property from GoogleAdsLink resource. + * + * @param {string} googleAdsLinkName + * A fully-qualified path representing GoogleAdsLink resource. + * @returns {string} A string representing the property. + */ + matchPropertyFromGoogleAdsLinkName(googleAdsLinkName: string) { + return this.pathTemplates.googleAdsLinkPathTemplate.match(googleAdsLinkName) + .property; + } + + /** + * Parse the google_ads_link from GoogleAdsLink resource. + * + * @param {string} googleAdsLinkName + * A fully-qualified path representing GoogleAdsLink resource. + * @returns {string} A string representing the google_ads_link. + */ + matchGoogleAdsLinkFromGoogleAdsLinkName(googleAdsLinkName: string) { + return this.pathTemplates.googleAdsLinkPathTemplate.match(googleAdsLinkName) + .google_ads_link; + } + + /** + * Return a fully-qualified measurementProtocolSecret resource name string. + * + * @param {string} property + * @param {string} data_stream + * @param {string} measurement_protocol_secret + * @returns {string} Resource name string. + */ + measurementProtocolSecretPath( + property: string, + dataStream: string, + measurementProtocolSecret: string + ) { + return this.pathTemplates.measurementProtocolSecretPathTemplate.render({ + property: property, + data_stream: dataStream, + measurement_protocol_secret: measurementProtocolSecret, + }); + } + + /** + * Parse the property from MeasurementProtocolSecret resource. + * + * @param {string} measurementProtocolSecretName + * A fully-qualified path representing MeasurementProtocolSecret resource. + * @returns {string} A string representing the property. + */ + matchPropertyFromMeasurementProtocolSecretName( + measurementProtocolSecretName: string + ) { + return this.pathTemplates.measurementProtocolSecretPathTemplate.match( + measurementProtocolSecretName + ).property; + } + + /** + * Parse the data_stream from MeasurementProtocolSecret resource. + * + * @param {string} measurementProtocolSecretName + * A fully-qualified path representing MeasurementProtocolSecret resource. + * @returns {string} A string representing the data_stream. + */ + matchDataStreamFromMeasurementProtocolSecretName( + measurementProtocolSecretName: string + ) { + return this.pathTemplates.measurementProtocolSecretPathTemplate.match( + measurementProtocolSecretName + ).data_stream; + } + + /** + * Parse the measurement_protocol_secret from MeasurementProtocolSecret resource. + * + * @param {string} measurementProtocolSecretName + * A fully-qualified path representing MeasurementProtocolSecret resource. + * @returns {string} A string representing the measurement_protocol_secret. + */ + matchMeasurementProtocolSecretFromMeasurementProtocolSecretName( + measurementProtocolSecretName: string + ) { + return this.pathTemplates.measurementProtocolSecretPathTemplate.match( + measurementProtocolSecretName + ).measurement_protocol_secret; + } + + /** + * Return a fully-qualified property resource name string. + * + * @param {string} property + * @returns {string} Resource name string. + */ + propertyPath(property: string) { + return this.pathTemplates.propertyPathTemplate.render({ + property: property, + }); + } + + /** + * Parse the property from Property resource. + * + * @param {string} propertyName + * A fully-qualified path representing Property resource. + * @returns {string} A string representing the property. + */ + matchPropertyFromPropertyName(propertyName: string) { + return this.pathTemplates.propertyPathTemplate.match(propertyName).property; + } + + /** + * Terminate the gRPC channel and close the client. + * + * The client will no longer be usable and all future behavior is undefined. + * @returns {Promise} A promise that resolves when the client is closed. + */ + close(): Promise { + if (this.analyticsAdminServiceStub && !this._terminated) { + return this.analyticsAdminServiceStub.then(stub => { + this._terminated = true; + stub.close(); + }); + } + return Promise.resolve(); + } +} diff --git a/packages/google-analytics-admin/src/v1beta/analytics_admin_service_client_config.json b/packages/google-analytics-admin/src/v1beta/analytics_admin_service_client_config.json new file mode 100644 index 00000000000..e1e3f9017e4 --- /dev/null +++ b/packages/google-analytics-admin/src/v1beta/analytics_admin_service_client_config.json @@ -0,0 +1,274 @@ +{ + "interfaces": { + "google.analytics.admin.v1beta.AnalyticsAdminService": { + "retry_codes": { + "non_idempotent": [], + "idempotent": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ], + "unknown_unavailable": [ + "UNKNOWN", + "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 + }, + "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c": { + "initial_retry_delay_millis": 1000, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 600000 + } + }, + "methods": { + "GetAccount": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListAccounts": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteAccount": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "UpdateAccount": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ProvisionAccountTicket": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListAccountSummaries": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "GetProperty": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListProperties": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "CreateProperty": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteProperty": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "UpdateProperty": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "CreateFirebaseLink": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteFirebaseLink": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListFirebaseLinks": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "CreateGoogleAdsLink": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "UpdateGoogleAdsLink": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteGoogleAdsLink": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListGoogleAdsLinks": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetDataSharingSettings": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "GetMeasurementProtocolSecret": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "ListMeasurementProtocolSecrets": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "CreateMeasurementProtocolSecret": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "DeleteMeasurementProtocolSecret": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "UpdateMeasurementProtocolSecret": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "AcknowledgeUserDataCollection": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "SearchChangeHistoryEvents": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "CreateConversionEvent": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "GetConversionEvent": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "DeleteConversionEvent": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "ListConversionEvents": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "CreateCustomDimension": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "UpdateCustomDimension": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "ListCustomDimensions": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "ArchiveCustomDimension": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "GetCustomDimension": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "CreateCustomMetric": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "UpdateCustomMetric": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "ListCustomMetrics": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "ArchiveCustomMetric": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "GetCustomMetric": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "GetDataRetentionSettings": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "UpdateDataRetentionSettings": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "CreateDataStream": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "DeleteDataStream": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "UpdateDataStream": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "ListDataStreams": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "GetDataStream": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + } + } + } + } +} diff --git a/packages/google-analytics-admin/src/v1beta/analytics_admin_service_proto_list.json b/packages/google-analytics-admin/src/v1beta/analytics_admin_service_proto_list.json new file mode 100644 index 00000000000..fb30c5ecfee --- /dev/null +++ b/packages/google-analytics-admin/src/v1beta/analytics_admin_service_proto_list.json @@ -0,0 +1,4 @@ +[ + "../../protos/google/analytics/admin/v1beta/analytics_admin.proto", + "../../protos/google/analytics/admin/v1beta/resources.proto" +] diff --git a/packages/google-analytics-admin/src/v1beta/gapic_metadata.json b/packages/google-analytics-admin/src/v1beta/gapic_metadata.json new file mode 100644 index 00000000000..6293235f50d --- /dev/null +++ b/packages/google-analytics-admin/src/v1beta/gapic_metadata.json @@ -0,0 +1,537 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "typescript", + "protoPackage": "google.analytics.admin.v1beta", + "libraryPackage": "@google-cloud/admin", + "services": { + "AnalyticsAdminService": { + "clients": { + "grpc": { + "libraryClient": "AnalyticsAdminServiceClient", + "rpcs": { + "GetAccount": { + "methods": [ + "getAccount" + ] + }, + "DeleteAccount": { + "methods": [ + "deleteAccount" + ] + }, + "UpdateAccount": { + "methods": [ + "updateAccount" + ] + }, + "ProvisionAccountTicket": { + "methods": [ + "provisionAccountTicket" + ] + }, + "GetProperty": { + "methods": [ + "getProperty" + ] + }, + "CreateProperty": { + "methods": [ + "createProperty" + ] + }, + "DeleteProperty": { + "methods": [ + "deleteProperty" + ] + }, + "UpdateProperty": { + "methods": [ + "updateProperty" + ] + }, + "CreateFirebaseLink": { + "methods": [ + "createFirebaseLink" + ] + }, + "DeleteFirebaseLink": { + "methods": [ + "deleteFirebaseLink" + ] + }, + "CreateGoogleAdsLink": { + "methods": [ + "createGoogleAdsLink" + ] + }, + "UpdateGoogleAdsLink": { + "methods": [ + "updateGoogleAdsLink" + ] + }, + "DeleteGoogleAdsLink": { + "methods": [ + "deleteGoogleAdsLink" + ] + }, + "GetDataSharingSettings": { + "methods": [ + "getDataSharingSettings" + ] + }, + "GetMeasurementProtocolSecret": { + "methods": [ + "getMeasurementProtocolSecret" + ] + }, + "CreateMeasurementProtocolSecret": { + "methods": [ + "createMeasurementProtocolSecret" + ] + }, + "DeleteMeasurementProtocolSecret": { + "methods": [ + "deleteMeasurementProtocolSecret" + ] + }, + "UpdateMeasurementProtocolSecret": { + "methods": [ + "updateMeasurementProtocolSecret" + ] + }, + "AcknowledgeUserDataCollection": { + "methods": [ + "acknowledgeUserDataCollection" + ] + }, + "CreateConversionEvent": { + "methods": [ + "createConversionEvent" + ] + }, + "GetConversionEvent": { + "methods": [ + "getConversionEvent" + ] + }, + "DeleteConversionEvent": { + "methods": [ + "deleteConversionEvent" + ] + }, + "CreateCustomDimension": { + "methods": [ + "createCustomDimension" + ] + }, + "UpdateCustomDimension": { + "methods": [ + "updateCustomDimension" + ] + }, + "ArchiveCustomDimension": { + "methods": [ + "archiveCustomDimension" + ] + }, + "GetCustomDimension": { + "methods": [ + "getCustomDimension" + ] + }, + "CreateCustomMetric": { + "methods": [ + "createCustomMetric" + ] + }, + "UpdateCustomMetric": { + "methods": [ + "updateCustomMetric" + ] + }, + "ArchiveCustomMetric": { + "methods": [ + "archiveCustomMetric" + ] + }, + "GetCustomMetric": { + "methods": [ + "getCustomMetric" + ] + }, + "GetDataRetentionSettings": { + "methods": [ + "getDataRetentionSettings" + ] + }, + "UpdateDataRetentionSettings": { + "methods": [ + "updateDataRetentionSettings" + ] + }, + "CreateDataStream": { + "methods": [ + "createDataStream" + ] + }, + "DeleteDataStream": { + "methods": [ + "deleteDataStream" + ] + }, + "UpdateDataStream": { + "methods": [ + "updateDataStream" + ] + }, + "GetDataStream": { + "methods": [ + "getDataStream" + ] + }, + "ListAccounts": { + "methods": [ + "listAccounts", + "listAccountsStream", + "listAccountsAsync" + ] + }, + "ListAccountSummaries": { + "methods": [ + "listAccountSummaries", + "listAccountSummariesStream", + "listAccountSummariesAsync" + ] + }, + "ListProperties": { + "methods": [ + "listProperties", + "listPropertiesStream", + "listPropertiesAsync" + ] + }, + "ListFirebaseLinks": { + "methods": [ + "listFirebaseLinks", + "listFirebaseLinksStream", + "listFirebaseLinksAsync" + ] + }, + "ListGoogleAdsLinks": { + "methods": [ + "listGoogleAdsLinks", + "listGoogleAdsLinksStream", + "listGoogleAdsLinksAsync" + ] + }, + "ListMeasurementProtocolSecrets": { + "methods": [ + "listMeasurementProtocolSecrets", + "listMeasurementProtocolSecretsStream", + "listMeasurementProtocolSecretsAsync" + ] + }, + "SearchChangeHistoryEvents": { + "methods": [ + "searchChangeHistoryEvents", + "searchChangeHistoryEventsStream", + "searchChangeHistoryEventsAsync" + ] + }, + "ListConversionEvents": { + "methods": [ + "listConversionEvents", + "listConversionEventsStream", + "listConversionEventsAsync" + ] + }, + "ListCustomDimensions": { + "methods": [ + "listCustomDimensions", + "listCustomDimensionsStream", + "listCustomDimensionsAsync" + ] + }, + "ListCustomMetrics": { + "methods": [ + "listCustomMetrics", + "listCustomMetricsStream", + "listCustomMetricsAsync" + ] + }, + "ListDataStreams": { + "methods": [ + "listDataStreams", + "listDataStreamsStream", + "listDataStreamsAsync" + ] + } + } + }, + "grpc-fallback": { + "libraryClient": "AnalyticsAdminServiceClient", + "rpcs": { + "GetAccount": { + "methods": [ + "getAccount" + ] + }, + "DeleteAccount": { + "methods": [ + "deleteAccount" + ] + }, + "UpdateAccount": { + "methods": [ + "updateAccount" + ] + }, + "ProvisionAccountTicket": { + "methods": [ + "provisionAccountTicket" + ] + }, + "GetProperty": { + "methods": [ + "getProperty" + ] + }, + "CreateProperty": { + "methods": [ + "createProperty" + ] + }, + "DeleteProperty": { + "methods": [ + "deleteProperty" + ] + }, + "UpdateProperty": { + "methods": [ + "updateProperty" + ] + }, + "CreateFirebaseLink": { + "methods": [ + "createFirebaseLink" + ] + }, + "DeleteFirebaseLink": { + "methods": [ + "deleteFirebaseLink" + ] + }, + "CreateGoogleAdsLink": { + "methods": [ + "createGoogleAdsLink" + ] + }, + "UpdateGoogleAdsLink": { + "methods": [ + "updateGoogleAdsLink" + ] + }, + "DeleteGoogleAdsLink": { + "methods": [ + "deleteGoogleAdsLink" + ] + }, + "GetDataSharingSettings": { + "methods": [ + "getDataSharingSettings" + ] + }, + "GetMeasurementProtocolSecret": { + "methods": [ + "getMeasurementProtocolSecret" + ] + }, + "CreateMeasurementProtocolSecret": { + "methods": [ + "createMeasurementProtocolSecret" + ] + }, + "DeleteMeasurementProtocolSecret": { + "methods": [ + "deleteMeasurementProtocolSecret" + ] + }, + "UpdateMeasurementProtocolSecret": { + "methods": [ + "updateMeasurementProtocolSecret" + ] + }, + "AcknowledgeUserDataCollection": { + "methods": [ + "acknowledgeUserDataCollection" + ] + }, + "CreateConversionEvent": { + "methods": [ + "createConversionEvent" + ] + }, + "GetConversionEvent": { + "methods": [ + "getConversionEvent" + ] + }, + "DeleteConversionEvent": { + "methods": [ + "deleteConversionEvent" + ] + }, + "CreateCustomDimension": { + "methods": [ + "createCustomDimension" + ] + }, + "UpdateCustomDimension": { + "methods": [ + "updateCustomDimension" + ] + }, + "ArchiveCustomDimension": { + "methods": [ + "archiveCustomDimension" + ] + }, + "GetCustomDimension": { + "methods": [ + "getCustomDimension" + ] + }, + "CreateCustomMetric": { + "methods": [ + "createCustomMetric" + ] + }, + "UpdateCustomMetric": { + "methods": [ + "updateCustomMetric" + ] + }, + "ArchiveCustomMetric": { + "methods": [ + "archiveCustomMetric" + ] + }, + "GetCustomMetric": { + "methods": [ + "getCustomMetric" + ] + }, + "GetDataRetentionSettings": { + "methods": [ + "getDataRetentionSettings" + ] + }, + "UpdateDataRetentionSettings": { + "methods": [ + "updateDataRetentionSettings" + ] + }, + "CreateDataStream": { + "methods": [ + "createDataStream" + ] + }, + "DeleteDataStream": { + "methods": [ + "deleteDataStream" + ] + }, + "UpdateDataStream": { + "methods": [ + "updateDataStream" + ] + }, + "GetDataStream": { + "methods": [ + "getDataStream" + ] + }, + "ListAccounts": { + "methods": [ + "listAccounts", + "listAccountsStream", + "listAccountsAsync" + ] + }, + "ListAccountSummaries": { + "methods": [ + "listAccountSummaries", + "listAccountSummariesStream", + "listAccountSummariesAsync" + ] + }, + "ListProperties": { + "methods": [ + "listProperties", + "listPropertiesStream", + "listPropertiesAsync" + ] + }, + "ListFirebaseLinks": { + "methods": [ + "listFirebaseLinks", + "listFirebaseLinksStream", + "listFirebaseLinksAsync" + ] + }, + "ListGoogleAdsLinks": { + "methods": [ + "listGoogleAdsLinks", + "listGoogleAdsLinksStream", + "listGoogleAdsLinksAsync" + ] + }, + "ListMeasurementProtocolSecrets": { + "methods": [ + "listMeasurementProtocolSecrets", + "listMeasurementProtocolSecretsStream", + "listMeasurementProtocolSecretsAsync" + ] + }, + "SearchChangeHistoryEvents": { + "methods": [ + "searchChangeHistoryEvents", + "searchChangeHistoryEventsStream", + "searchChangeHistoryEventsAsync" + ] + }, + "ListConversionEvents": { + "methods": [ + "listConversionEvents", + "listConversionEventsStream", + "listConversionEventsAsync" + ] + }, + "ListCustomDimensions": { + "methods": [ + "listCustomDimensions", + "listCustomDimensionsStream", + "listCustomDimensionsAsync" + ] + }, + "ListCustomMetrics": { + "methods": [ + "listCustomMetrics", + "listCustomMetricsStream", + "listCustomMetricsAsync" + ] + }, + "ListDataStreams": { + "methods": [ + "listDataStreams", + "listDataStreamsStream", + "listDataStreamsAsync" + ] + } + } + } + } + } + } +} diff --git a/packages/google-analytics-admin/src/v1beta/index.ts b/packages/google-analytics-admin/src/v1beta/index.ts new file mode 100644 index 00000000000..6836b1c433a --- /dev/null +++ b/packages/google-analytics-admin/src/v1beta/index.ts @@ -0,0 +1,19 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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 {AnalyticsAdminServiceClient} from './analytics_admin_service_client'; diff --git a/packages/google-analytics-admin/system-test/fixtures/sample/src/index.js b/packages/google-analytics-admin/system-test/fixtures/sample/src/index.js new file mode 100644 index 00000000000..bb5568ded04 --- /dev/null +++ b/packages/google-analytics-admin/system-test/fixtures/sample/src/index.js @@ -0,0 +1,26 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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 admin = require('@google-analytics/admin'); + +function main() { + const analyticsAdminServiceClient = new admin.AnalyticsAdminServiceClient(); +} + +main(); diff --git a/packages/google-analytics-admin/system-test/fixtures/sample/src/index.ts b/packages/google-analytics-admin/system-test/fixtures/sample/src/index.ts new file mode 100644 index 00000000000..d231ad52e18 --- /dev/null +++ b/packages/google-analytics-admin/system-test/fixtures/sample/src/index.ts @@ -0,0 +1,34 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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 {AnalyticsAdminServiceClient} from '@google-analytics/admin'; + +// check that the client class type name can be used +function doStuffWithAnalyticsAdminServiceClient( + client: AnalyticsAdminServiceClient +) { + client.close(); +} + +function main() { + // check that the client instance can be created + const analyticsAdminServiceClient = new AnalyticsAdminServiceClient(); + doStuffWithAnalyticsAdminServiceClient(analyticsAdminServiceClient); +} + +main(); diff --git a/packages/google-analytics-admin/system-test/install.ts b/packages/google-analytics-admin/system-test/install.ts new file mode 100644 index 00000000000..6dd1eaadafa --- /dev/null +++ b/packages/google-analytics-admin/system-test/install.ts @@ -0,0 +1,51 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +import {packNTest} from 'pack-n-play'; +import {readFileSync} from 'fs'; +import {describe, it} from 'mocha'; + +describe('📦 pack-n-play test', () => { + it('TypeScript code', async function () { + this.timeout(300000); + const options = { + packageDir: process.cwd(), + sample: { + description: 'TypeScript user can use the type definitions', + ts: readFileSync( + './system-test/fixtures/sample/src/index.ts' + ).toString(), + }, + }; + await packNTest(options); + }); + + it('JavaScript code', async function () { + this.timeout(300000); + const options = { + packageDir: process.cwd(), + sample: { + description: 'JavaScript user can use the library', + ts: readFileSync( + './system-test/fixtures/sample/src/index.js' + ).toString(), + }, + }; + await packNTest(options); + }); +}); diff --git a/packages/google-analytics-admin/test/gapic_analytics_admin_service_v1alpha.ts b/packages/google-analytics-admin/test/gapic_analytics_admin_service_v1alpha.ts new file mode 100644 index 00000000000..7ee036ea8b6 --- /dev/null +++ b/packages/google-analytics-admin/test/gapic_analytics_admin_service_v1alpha.ts @@ -0,0 +1,15130 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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 analyticsadminserviceModule 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('v1alpha.AnalyticsAdminServiceClient', () => { + describe('Common methods', () => { + it('has servicePath', () => { + const servicePath = + analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient + .servicePath; + assert(servicePath); + }); + + it('has apiEndpoint', () => { + const apiEndpoint = + analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient + .apiEndpoint; + assert(apiEndpoint); + }); + + it('has port', () => { + const port = + analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no option', () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient(); + assert(client); + }); + + it('should create a client with gRPC fallback', () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + fallback: true, + }); + assert(client); + }); + + it('has initialize method and supports deferred initialization', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.analyticsAdminServiceStub, undefined); + await client.initialize(); + assert(client.analyticsAdminServiceStub); + }); + + it('has close method for the initialized client', done => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + assert(client.analyticsAdminServiceStub); + client.close().then(() => { + done(); + }); + }); + + it('has close method for the non-initialized client', done => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.analyticsAdminServiceStub, undefined); + client.close().then(() => { + done(); + }); + }); + + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + 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 analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + 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('getAccount', () => { + it('invokes getAccount without error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.GetAccountRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.GetAccountRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.Account() + ); + client.innerApiCalls.getAccount = stubSimpleCall(expectedResponse); + const [response] = await client.getAccount(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getAccount as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getAccount as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getAccount without error using callback', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.GetAccountRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.GetAccountRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.Account() + ); + client.innerApiCalls.getAccount = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getAccount( + request, + ( + err?: Error | null, + result?: protos.google.analytics.admin.v1alpha.IAccount | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getAccount as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getAccount as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getAccount with error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.GetAccountRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.GetAccountRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getAccount = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.getAccount(request), expectedError); + const actualRequest = ( + client.innerApiCalls.getAccount as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getAccount as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getAccount with closed client', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.GetAccountRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.GetAccountRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getAccount(request), expectedError); + }); + }); + + describe('deleteAccount', () => { + it('invokes deleteAccount without error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.DeleteAccountRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.DeleteAccountRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteAccount = stubSimpleCall(expectedResponse); + const [response] = await client.deleteAccount(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteAccount as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteAccount as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteAccount without error using callback', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.DeleteAccountRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.DeleteAccountRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteAccount = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteAccount( + 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.deleteAccount as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteAccount as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteAccount with error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.DeleteAccountRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.DeleteAccountRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteAccount = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.deleteAccount(request), expectedError); + const actualRequest = ( + client.innerApiCalls.deleteAccount as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteAccount as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteAccount with closed client', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.DeleteAccountRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.DeleteAccountRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.deleteAccount(request), expectedError); + }); + }); + + describe('updateAccount', () => { + it('invokes updateAccount without error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.UpdateAccountRequest() + ); + request.account ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.UpdateAccountRequest', + ['account', 'name'] + ); + request.account.name = defaultValue1; + const expectedHeaderRequestParams = `account.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.Account() + ); + client.innerApiCalls.updateAccount = stubSimpleCall(expectedResponse); + const [response] = await client.updateAccount(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateAccount as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateAccount as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateAccount without error using callback', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.UpdateAccountRequest() + ); + request.account ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.UpdateAccountRequest', + ['account', 'name'] + ); + request.account.name = defaultValue1; + const expectedHeaderRequestParams = `account.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.Account() + ); + client.innerApiCalls.updateAccount = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateAccount( + request, + ( + err?: Error | null, + result?: protos.google.analytics.admin.v1alpha.IAccount | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateAccount as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateAccount as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateAccount with error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.UpdateAccountRequest() + ); + request.account ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.UpdateAccountRequest', + ['account', 'name'] + ); + request.account.name = defaultValue1; + const expectedHeaderRequestParams = `account.name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateAccount = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.updateAccount(request), expectedError); + const actualRequest = ( + client.innerApiCalls.updateAccount as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateAccount as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateAccount with closed client', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.UpdateAccountRequest() + ); + request.account ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.UpdateAccountRequest', + ['account', 'name'] + ); + request.account.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.updateAccount(request), expectedError); + }); + }); + + describe('provisionAccountTicket', () => { + it('invokes provisionAccountTicket without error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ProvisionAccountTicketRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ProvisionAccountTicketResponse() + ); + client.innerApiCalls.provisionAccountTicket = + stubSimpleCall(expectedResponse); + const [response] = await client.provisionAccountTicket(request); + assert.deepStrictEqual(response, expectedResponse); + }); + + it('invokes provisionAccountTicket without error using callback', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ProvisionAccountTicketRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ProvisionAccountTicketResponse() + ); + client.innerApiCalls.provisionAccountTicket = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.provisionAccountTicket( + request, + ( + err?: Error | null, + result?: protos.google.analytics.admin.v1alpha.IProvisionAccountTicketResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + }); + + it('invokes provisionAccountTicket with error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ProvisionAccountTicketRequest() + ); + const expectedError = new Error('expected'); + client.innerApiCalls.provisionAccountTicket = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.provisionAccountTicket(request), + expectedError + ); + }); + + it('invokes provisionAccountTicket with closed client', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ProvisionAccountTicketRequest() + ); + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects( + client.provisionAccountTicket(request), + expectedError + ); + }); + }); + + describe('getProperty', () => { + it('invokes getProperty without error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.GetPropertyRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.GetPropertyRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.Property() + ); + client.innerApiCalls.getProperty = stubSimpleCall(expectedResponse); + const [response] = await client.getProperty(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getProperty as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getProperty as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getProperty without error using callback', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.GetPropertyRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.GetPropertyRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.Property() + ); + client.innerApiCalls.getProperty = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getProperty( + request, + ( + err?: Error | null, + result?: protos.google.analytics.admin.v1alpha.IProperty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getProperty as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getProperty as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getProperty with error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.GetPropertyRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.GetPropertyRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getProperty = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.getProperty(request), expectedError); + const actualRequest = ( + client.innerApiCalls.getProperty as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getProperty as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getProperty with closed client', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.GetPropertyRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.GetPropertyRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getProperty(request), expectedError); + }); + }); + + describe('createProperty', () => { + it('invokes createProperty without error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.CreatePropertyRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.Property() + ); + client.innerApiCalls.createProperty = stubSimpleCall(expectedResponse); + const [response] = await client.createProperty(request); + assert.deepStrictEqual(response, expectedResponse); + }); + + it('invokes createProperty without error using callback', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.CreatePropertyRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.Property() + ); + client.innerApiCalls.createProperty = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createProperty( + request, + ( + err?: Error | null, + result?: protos.google.analytics.admin.v1alpha.IProperty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + }); + + it('invokes createProperty with error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.CreatePropertyRequest() + ); + const expectedError = new Error('expected'); + client.innerApiCalls.createProperty = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.createProperty(request), expectedError); + }); + + it('invokes createProperty with closed client', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.CreatePropertyRequest() + ); + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.createProperty(request), expectedError); + }); + }); + + describe('deleteProperty', () => { + it('invokes deleteProperty without error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.DeletePropertyRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.DeletePropertyRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.Property() + ); + client.innerApiCalls.deleteProperty = stubSimpleCall(expectedResponse); + const [response] = await client.deleteProperty(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteProperty as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteProperty as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteProperty without error using callback', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.DeletePropertyRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.DeletePropertyRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.Property() + ); + client.innerApiCalls.deleteProperty = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteProperty( + request, + ( + err?: Error | null, + result?: protos.google.analytics.admin.v1alpha.IProperty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteProperty as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteProperty as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteProperty with error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.DeletePropertyRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.DeletePropertyRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteProperty = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.deleteProperty(request), expectedError); + const actualRequest = ( + client.innerApiCalls.deleteProperty as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteProperty as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteProperty with closed client', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.DeletePropertyRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.DeletePropertyRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.deleteProperty(request), expectedError); + }); + }); + + describe('updateProperty', () => { + it('invokes updateProperty without error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.UpdatePropertyRequest() + ); + request.property ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.UpdatePropertyRequest', + ['property', 'name'] + ); + request.property.name = defaultValue1; + const expectedHeaderRequestParams = `property.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.Property() + ); + client.innerApiCalls.updateProperty = stubSimpleCall(expectedResponse); + const [response] = await client.updateProperty(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateProperty as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateProperty as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateProperty without error using callback', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.UpdatePropertyRequest() + ); + request.property ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.UpdatePropertyRequest', + ['property', 'name'] + ); + request.property.name = defaultValue1; + const expectedHeaderRequestParams = `property.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.Property() + ); + client.innerApiCalls.updateProperty = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateProperty( + request, + ( + err?: Error | null, + result?: protos.google.analytics.admin.v1alpha.IProperty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateProperty as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateProperty as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateProperty with error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.UpdatePropertyRequest() + ); + request.property ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.UpdatePropertyRequest', + ['property', 'name'] + ); + request.property.name = defaultValue1; + const expectedHeaderRequestParams = `property.name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateProperty = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.updateProperty(request), expectedError); + const actualRequest = ( + client.innerApiCalls.updateProperty as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateProperty as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateProperty with closed client', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.UpdatePropertyRequest() + ); + request.property ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.UpdatePropertyRequest', + ['property', 'name'] + ); + request.property.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.updateProperty(request), expectedError); + }); + }); + + describe('getUserLink', () => { + it('invokes getUserLink without error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.GetUserLinkRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.GetUserLinkRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.UserLink() + ); + client.innerApiCalls.getUserLink = stubSimpleCall(expectedResponse); + const [response] = await client.getUserLink(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getUserLink as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getUserLink as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getUserLink without error using callback', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.GetUserLinkRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.GetUserLinkRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.UserLink() + ); + client.innerApiCalls.getUserLink = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getUserLink( + request, + ( + err?: Error | null, + result?: protos.google.analytics.admin.v1alpha.IUserLink | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getUserLink as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getUserLink as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getUserLink with error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.GetUserLinkRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.GetUserLinkRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getUserLink = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.getUserLink(request), expectedError); + const actualRequest = ( + client.innerApiCalls.getUserLink as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getUserLink as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getUserLink with closed client', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.GetUserLinkRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.GetUserLinkRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getUserLink(request), expectedError); + }); + }); + + describe('batchGetUserLinks', () => { + it('invokes batchGetUserLinks without error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.BatchGetUserLinksRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.BatchGetUserLinksRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.BatchGetUserLinksResponse() + ); + client.innerApiCalls.batchGetUserLinks = stubSimpleCall(expectedResponse); + const [response] = await client.batchGetUserLinks(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.batchGetUserLinks as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.batchGetUserLinks as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes batchGetUserLinks without error using callback', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.BatchGetUserLinksRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.BatchGetUserLinksRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.BatchGetUserLinksResponse() + ); + client.innerApiCalls.batchGetUserLinks = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.batchGetUserLinks( + request, + ( + err?: Error | null, + result?: protos.google.analytics.admin.v1alpha.IBatchGetUserLinksResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.batchGetUserLinks as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.batchGetUserLinks as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes batchGetUserLinks with error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.BatchGetUserLinksRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.BatchGetUserLinksRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.batchGetUserLinks = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.batchGetUserLinks(request), expectedError); + const actualRequest = ( + client.innerApiCalls.batchGetUserLinks as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.batchGetUserLinks as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes batchGetUserLinks with closed client', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.BatchGetUserLinksRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.BatchGetUserLinksRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.batchGetUserLinks(request), expectedError); + }); + }); + + describe('createUserLink', () => { + it('invokes createUserLink without error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.CreateUserLinkRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.CreateUserLinkRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.UserLink() + ); + client.innerApiCalls.createUserLink = stubSimpleCall(expectedResponse); + const [response] = await client.createUserLink(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createUserLink as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createUserLink as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createUserLink without error using callback', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.CreateUserLinkRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.CreateUserLinkRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.UserLink() + ); + client.innerApiCalls.createUserLink = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createUserLink( + request, + ( + err?: Error | null, + result?: protos.google.analytics.admin.v1alpha.IUserLink | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createUserLink as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createUserLink as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createUserLink with error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.CreateUserLinkRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.CreateUserLinkRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createUserLink = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.createUserLink(request), expectedError); + const actualRequest = ( + client.innerApiCalls.createUserLink as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createUserLink as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createUserLink with closed client', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.CreateUserLinkRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.CreateUserLinkRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.createUserLink(request), expectedError); + }); + }); + + describe('batchCreateUserLinks', () => { + it('invokes batchCreateUserLinks without error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.BatchCreateUserLinksRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.BatchCreateUserLinksRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.BatchCreateUserLinksResponse() + ); + client.innerApiCalls.batchCreateUserLinks = + stubSimpleCall(expectedResponse); + const [response] = await client.batchCreateUserLinks(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.batchCreateUserLinks as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.batchCreateUserLinks as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes batchCreateUserLinks without error using callback', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.BatchCreateUserLinksRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.BatchCreateUserLinksRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.BatchCreateUserLinksResponse() + ); + client.innerApiCalls.batchCreateUserLinks = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.batchCreateUserLinks( + request, + ( + err?: Error | null, + result?: protos.google.analytics.admin.v1alpha.IBatchCreateUserLinksResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.batchCreateUserLinks as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.batchCreateUserLinks as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes batchCreateUserLinks with error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.BatchCreateUserLinksRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.BatchCreateUserLinksRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.batchCreateUserLinks = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.batchCreateUserLinks(request), expectedError); + const actualRequest = ( + client.innerApiCalls.batchCreateUserLinks as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.batchCreateUserLinks as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes batchCreateUserLinks with closed client', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.BatchCreateUserLinksRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.BatchCreateUserLinksRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.batchCreateUserLinks(request), expectedError); + }); + }); + + describe('updateUserLink', () => { + it('invokes updateUserLink without error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.UpdateUserLinkRequest() + ); + request.userLink ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.UpdateUserLinkRequest', + ['userLink', 'name'] + ); + request.userLink.name = defaultValue1; + const expectedHeaderRequestParams = `user_link.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.UserLink() + ); + client.innerApiCalls.updateUserLink = stubSimpleCall(expectedResponse); + const [response] = await client.updateUserLink(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateUserLink as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateUserLink as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateUserLink without error using callback', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.UpdateUserLinkRequest() + ); + request.userLink ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.UpdateUserLinkRequest', + ['userLink', 'name'] + ); + request.userLink.name = defaultValue1; + const expectedHeaderRequestParams = `user_link.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.UserLink() + ); + client.innerApiCalls.updateUserLink = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateUserLink( + request, + ( + err?: Error | null, + result?: protos.google.analytics.admin.v1alpha.IUserLink | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateUserLink as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateUserLink as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateUserLink with error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.UpdateUserLinkRequest() + ); + request.userLink ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.UpdateUserLinkRequest', + ['userLink', 'name'] + ); + request.userLink.name = defaultValue1; + const expectedHeaderRequestParams = `user_link.name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateUserLink = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.updateUserLink(request), expectedError); + const actualRequest = ( + client.innerApiCalls.updateUserLink as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateUserLink as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateUserLink with closed client', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.UpdateUserLinkRequest() + ); + request.userLink ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.UpdateUserLinkRequest', + ['userLink', 'name'] + ); + request.userLink.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.updateUserLink(request), expectedError); + }); + }); + + describe('batchUpdateUserLinks', () => { + it('invokes batchUpdateUserLinks without error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.BatchUpdateUserLinksRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.BatchUpdateUserLinksRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.BatchUpdateUserLinksResponse() + ); + client.innerApiCalls.batchUpdateUserLinks = + stubSimpleCall(expectedResponse); + const [response] = await client.batchUpdateUserLinks(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.batchUpdateUserLinks as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.batchUpdateUserLinks as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes batchUpdateUserLinks without error using callback', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.BatchUpdateUserLinksRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.BatchUpdateUserLinksRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.BatchUpdateUserLinksResponse() + ); + client.innerApiCalls.batchUpdateUserLinks = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.batchUpdateUserLinks( + request, + ( + err?: Error | null, + result?: protos.google.analytics.admin.v1alpha.IBatchUpdateUserLinksResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.batchUpdateUserLinks as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.batchUpdateUserLinks as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes batchUpdateUserLinks with error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.BatchUpdateUserLinksRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.BatchUpdateUserLinksRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.batchUpdateUserLinks = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.batchUpdateUserLinks(request), expectedError); + const actualRequest = ( + client.innerApiCalls.batchUpdateUserLinks as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.batchUpdateUserLinks as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes batchUpdateUserLinks with closed client', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.BatchUpdateUserLinksRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.BatchUpdateUserLinksRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.batchUpdateUserLinks(request), expectedError); + }); + }); + + describe('deleteUserLink', () => { + it('invokes deleteUserLink without error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.DeleteUserLinkRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.DeleteUserLinkRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteUserLink = stubSimpleCall(expectedResponse); + const [response] = await client.deleteUserLink(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteUserLink as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteUserLink as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteUserLink without error using callback', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.DeleteUserLinkRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.DeleteUserLinkRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteUserLink = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteUserLink( + 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.deleteUserLink as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteUserLink as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteUserLink with error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.DeleteUserLinkRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.DeleteUserLinkRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteUserLink = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.deleteUserLink(request), expectedError); + const actualRequest = ( + client.innerApiCalls.deleteUserLink as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteUserLink as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteUserLink with closed client', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.DeleteUserLinkRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.DeleteUserLinkRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.deleteUserLink(request), expectedError); + }); + }); + + describe('batchDeleteUserLinks', () => { + it('invokes batchDeleteUserLinks without error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.BatchDeleteUserLinksRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.BatchDeleteUserLinksRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.batchDeleteUserLinks = + stubSimpleCall(expectedResponse); + const [response] = await client.batchDeleteUserLinks(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.batchDeleteUserLinks as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.batchDeleteUserLinks as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes batchDeleteUserLinks without error using callback', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.BatchDeleteUserLinksRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.BatchDeleteUserLinksRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.batchDeleteUserLinks = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.batchDeleteUserLinks( + 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.batchDeleteUserLinks as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.batchDeleteUserLinks as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes batchDeleteUserLinks with error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.BatchDeleteUserLinksRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.BatchDeleteUserLinksRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.batchDeleteUserLinks = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.batchDeleteUserLinks(request), expectedError); + const actualRequest = ( + client.innerApiCalls.batchDeleteUserLinks as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.batchDeleteUserLinks as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes batchDeleteUserLinks with closed client', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.BatchDeleteUserLinksRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.BatchDeleteUserLinksRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.batchDeleteUserLinks(request), expectedError); + }); + }); + + describe('createFirebaseLink', () => { + it('invokes createFirebaseLink without error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.CreateFirebaseLinkRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.CreateFirebaseLinkRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.FirebaseLink() + ); + client.innerApiCalls.createFirebaseLink = + stubSimpleCall(expectedResponse); + const [response] = await client.createFirebaseLink(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createFirebaseLink as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createFirebaseLink as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createFirebaseLink without error using callback', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.CreateFirebaseLinkRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.CreateFirebaseLinkRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.FirebaseLink() + ); + client.innerApiCalls.createFirebaseLink = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createFirebaseLink( + request, + ( + err?: Error | null, + result?: protos.google.analytics.admin.v1alpha.IFirebaseLink | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createFirebaseLink as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createFirebaseLink as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createFirebaseLink with error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.CreateFirebaseLinkRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.CreateFirebaseLinkRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createFirebaseLink = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.createFirebaseLink(request), expectedError); + const actualRequest = ( + client.innerApiCalls.createFirebaseLink as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createFirebaseLink as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createFirebaseLink with closed client', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.CreateFirebaseLinkRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.CreateFirebaseLinkRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.createFirebaseLink(request), expectedError); + }); + }); + + describe('deleteFirebaseLink', () => { + it('invokes deleteFirebaseLink without error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.DeleteFirebaseLinkRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.DeleteFirebaseLinkRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteFirebaseLink = + stubSimpleCall(expectedResponse); + const [response] = await client.deleteFirebaseLink(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteFirebaseLink as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteFirebaseLink as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteFirebaseLink without error using callback', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.DeleteFirebaseLinkRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.DeleteFirebaseLinkRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteFirebaseLink = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteFirebaseLink( + 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.deleteFirebaseLink as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteFirebaseLink as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteFirebaseLink with error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.DeleteFirebaseLinkRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.DeleteFirebaseLinkRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteFirebaseLink = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.deleteFirebaseLink(request), expectedError); + const actualRequest = ( + client.innerApiCalls.deleteFirebaseLink as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteFirebaseLink as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteFirebaseLink with closed client', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.DeleteFirebaseLinkRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.DeleteFirebaseLinkRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.deleteFirebaseLink(request), expectedError); + }); + }); + + describe('getGlobalSiteTag', () => { + it('invokes getGlobalSiteTag without error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.GetGlobalSiteTagRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.GetGlobalSiteTagRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.GlobalSiteTag() + ); + client.innerApiCalls.getGlobalSiteTag = stubSimpleCall(expectedResponse); + const [response] = await client.getGlobalSiteTag(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getGlobalSiteTag as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getGlobalSiteTag as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getGlobalSiteTag without error using callback', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.GetGlobalSiteTagRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.GetGlobalSiteTagRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.GlobalSiteTag() + ); + client.innerApiCalls.getGlobalSiteTag = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getGlobalSiteTag( + request, + ( + err?: Error | null, + result?: protos.google.analytics.admin.v1alpha.IGlobalSiteTag | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getGlobalSiteTag as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getGlobalSiteTag as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getGlobalSiteTag with error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.GetGlobalSiteTagRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.GetGlobalSiteTagRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getGlobalSiteTag = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.getGlobalSiteTag(request), expectedError); + const actualRequest = ( + client.innerApiCalls.getGlobalSiteTag as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getGlobalSiteTag as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getGlobalSiteTag with closed client', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.GetGlobalSiteTagRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.GetGlobalSiteTagRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getGlobalSiteTag(request), expectedError); + }); + }); + + describe('createGoogleAdsLink', () => { + it('invokes createGoogleAdsLink without error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.CreateGoogleAdsLinkRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.CreateGoogleAdsLinkRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.GoogleAdsLink() + ); + client.innerApiCalls.createGoogleAdsLink = + stubSimpleCall(expectedResponse); + const [response] = await client.createGoogleAdsLink(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createGoogleAdsLink as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createGoogleAdsLink as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createGoogleAdsLink without error using callback', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.CreateGoogleAdsLinkRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.CreateGoogleAdsLinkRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.GoogleAdsLink() + ); + client.innerApiCalls.createGoogleAdsLink = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createGoogleAdsLink( + request, + ( + err?: Error | null, + result?: protos.google.analytics.admin.v1alpha.IGoogleAdsLink | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createGoogleAdsLink as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createGoogleAdsLink as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createGoogleAdsLink with error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.CreateGoogleAdsLinkRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.CreateGoogleAdsLinkRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createGoogleAdsLink = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.createGoogleAdsLink(request), expectedError); + const actualRequest = ( + client.innerApiCalls.createGoogleAdsLink as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createGoogleAdsLink as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createGoogleAdsLink with closed client', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.CreateGoogleAdsLinkRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.CreateGoogleAdsLinkRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.createGoogleAdsLink(request), expectedError); + }); + }); + + describe('updateGoogleAdsLink', () => { + it('invokes updateGoogleAdsLink without error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.UpdateGoogleAdsLinkRequest() + ); + request.googleAdsLink ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.UpdateGoogleAdsLinkRequest', + ['googleAdsLink', 'name'] + ); + request.googleAdsLink.name = defaultValue1; + const expectedHeaderRequestParams = `google_ads_link.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.GoogleAdsLink() + ); + client.innerApiCalls.updateGoogleAdsLink = + stubSimpleCall(expectedResponse); + const [response] = await client.updateGoogleAdsLink(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateGoogleAdsLink as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateGoogleAdsLink as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateGoogleAdsLink without error using callback', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.UpdateGoogleAdsLinkRequest() + ); + request.googleAdsLink ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.UpdateGoogleAdsLinkRequest', + ['googleAdsLink', 'name'] + ); + request.googleAdsLink.name = defaultValue1; + const expectedHeaderRequestParams = `google_ads_link.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.GoogleAdsLink() + ); + client.innerApiCalls.updateGoogleAdsLink = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateGoogleAdsLink( + request, + ( + err?: Error | null, + result?: protos.google.analytics.admin.v1alpha.IGoogleAdsLink | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateGoogleAdsLink as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateGoogleAdsLink as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateGoogleAdsLink with error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.UpdateGoogleAdsLinkRequest() + ); + request.googleAdsLink ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.UpdateGoogleAdsLinkRequest', + ['googleAdsLink', 'name'] + ); + request.googleAdsLink.name = defaultValue1; + const expectedHeaderRequestParams = `google_ads_link.name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateGoogleAdsLink = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.updateGoogleAdsLink(request), expectedError); + const actualRequest = ( + client.innerApiCalls.updateGoogleAdsLink as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateGoogleAdsLink as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateGoogleAdsLink with closed client', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.UpdateGoogleAdsLinkRequest() + ); + request.googleAdsLink ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.UpdateGoogleAdsLinkRequest', + ['googleAdsLink', 'name'] + ); + request.googleAdsLink.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.updateGoogleAdsLink(request), expectedError); + }); + }); + + describe('deleteGoogleAdsLink', () => { + it('invokes deleteGoogleAdsLink without error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.DeleteGoogleAdsLinkRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.DeleteGoogleAdsLinkRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteGoogleAdsLink = + stubSimpleCall(expectedResponse); + const [response] = await client.deleteGoogleAdsLink(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteGoogleAdsLink as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteGoogleAdsLink as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteGoogleAdsLink without error using callback', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.DeleteGoogleAdsLinkRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.DeleteGoogleAdsLinkRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteGoogleAdsLink = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteGoogleAdsLink( + 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.deleteGoogleAdsLink as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteGoogleAdsLink as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteGoogleAdsLink with error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.DeleteGoogleAdsLinkRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.DeleteGoogleAdsLinkRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteGoogleAdsLink = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.deleteGoogleAdsLink(request), expectedError); + const actualRequest = ( + client.innerApiCalls.deleteGoogleAdsLink as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteGoogleAdsLink as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteGoogleAdsLink with closed client', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.DeleteGoogleAdsLinkRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.DeleteGoogleAdsLinkRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.deleteGoogleAdsLink(request), expectedError); + }); + }); + + describe('getDataSharingSettings', () => { + it('invokes getDataSharingSettings without error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.GetDataSharingSettingsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.GetDataSharingSettingsRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.DataSharingSettings() + ); + client.innerApiCalls.getDataSharingSettings = + stubSimpleCall(expectedResponse); + const [response] = await client.getDataSharingSettings(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getDataSharingSettings as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getDataSharingSettings as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getDataSharingSettings without error using callback', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.GetDataSharingSettingsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.GetDataSharingSettingsRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.DataSharingSettings() + ); + client.innerApiCalls.getDataSharingSettings = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getDataSharingSettings( + request, + ( + err?: Error | null, + result?: protos.google.analytics.admin.v1alpha.IDataSharingSettings | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getDataSharingSettings as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getDataSharingSettings as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getDataSharingSettings with error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.GetDataSharingSettingsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.GetDataSharingSettingsRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getDataSharingSettings = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.getDataSharingSettings(request), + expectedError + ); + const actualRequest = ( + client.innerApiCalls.getDataSharingSettings as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getDataSharingSettings as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getDataSharingSettings with closed client', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.GetDataSharingSettingsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.GetDataSharingSettingsRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects( + client.getDataSharingSettings(request), + expectedError + ); + }); + }); + + describe('getMeasurementProtocolSecret', () => { + it('invokes getMeasurementProtocolSecret without error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.GetMeasurementProtocolSecretRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.GetMeasurementProtocolSecretRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.MeasurementProtocolSecret() + ); + client.innerApiCalls.getMeasurementProtocolSecret = + stubSimpleCall(expectedResponse); + const [response] = await client.getMeasurementProtocolSecret(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getMeasurementProtocolSecret as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getMeasurementProtocolSecret as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getMeasurementProtocolSecret without error using callback', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.GetMeasurementProtocolSecretRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.GetMeasurementProtocolSecretRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.MeasurementProtocolSecret() + ); + client.innerApiCalls.getMeasurementProtocolSecret = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getMeasurementProtocolSecret( + request, + ( + err?: Error | null, + result?: protos.google.analytics.admin.v1alpha.IMeasurementProtocolSecret | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getMeasurementProtocolSecret as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getMeasurementProtocolSecret as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getMeasurementProtocolSecret with error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.GetMeasurementProtocolSecretRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.GetMeasurementProtocolSecretRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getMeasurementProtocolSecret = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.getMeasurementProtocolSecret(request), + expectedError + ); + const actualRequest = ( + client.innerApiCalls.getMeasurementProtocolSecret as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getMeasurementProtocolSecret as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getMeasurementProtocolSecret with closed client', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.GetMeasurementProtocolSecretRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.GetMeasurementProtocolSecretRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects( + client.getMeasurementProtocolSecret(request), + expectedError + ); + }); + }); + + describe('createMeasurementProtocolSecret', () => { + it('invokes createMeasurementProtocolSecret without error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.CreateMeasurementProtocolSecretRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.CreateMeasurementProtocolSecretRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.MeasurementProtocolSecret() + ); + client.innerApiCalls.createMeasurementProtocolSecret = + stubSimpleCall(expectedResponse); + const [response] = await client.createMeasurementProtocolSecret(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createMeasurementProtocolSecret as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createMeasurementProtocolSecret as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createMeasurementProtocolSecret without error using callback', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.CreateMeasurementProtocolSecretRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.CreateMeasurementProtocolSecretRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.MeasurementProtocolSecret() + ); + client.innerApiCalls.createMeasurementProtocolSecret = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createMeasurementProtocolSecret( + request, + ( + err?: Error | null, + result?: protos.google.analytics.admin.v1alpha.IMeasurementProtocolSecret | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createMeasurementProtocolSecret as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createMeasurementProtocolSecret as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createMeasurementProtocolSecret with error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.CreateMeasurementProtocolSecretRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.CreateMeasurementProtocolSecretRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createMeasurementProtocolSecret = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.createMeasurementProtocolSecret(request), + expectedError + ); + const actualRequest = ( + client.innerApiCalls.createMeasurementProtocolSecret as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createMeasurementProtocolSecret as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createMeasurementProtocolSecret with closed client', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.CreateMeasurementProtocolSecretRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.CreateMeasurementProtocolSecretRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects( + client.createMeasurementProtocolSecret(request), + expectedError + ); + }); + }); + + describe('deleteMeasurementProtocolSecret', () => { + it('invokes deleteMeasurementProtocolSecret without error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.DeleteMeasurementProtocolSecretRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.DeleteMeasurementProtocolSecretRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteMeasurementProtocolSecret = + stubSimpleCall(expectedResponse); + const [response] = await client.deleteMeasurementProtocolSecret(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteMeasurementProtocolSecret as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteMeasurementProtocolSecret as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteMeasurementProtocolSecret without error using callback', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.DeleteMeasurementProtocolSecretRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.DeleteMeasurementProtocolSecretRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteMeasurementProtocolSecret = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteMeasurementProtocolSecret( + 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.deleteMeasurementProtocolSecret as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteMeasurementProtocolSecret as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteMeasurementProtocolSecret with error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.DeleteMeasurementProtocolSecretRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.DeleteMeasurementProtocolSecretRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteMeasurementProtocolSecret = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.deleteMeasurementProtocolSecret(request), + expectedError + ); + const actualRequest = ( + client.innerApiCalls.deleteMeasurementProtocolSecret as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteMeasurementProtocolSecret as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteMeasurementProtocolSecret with closed client', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.DeleteMeasurementProtocolSecretRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.DeleteMeasurementProtocolSecretRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects( + client.deleteMeasurementProtocolSecret(request), + expectedError + ); + }); + }); + + describe('updateMeasurementProtocolSecret', () => { + it('invokes updateMeasurementProtocolSecret without error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.UpdateMeasurementProtocolSecretRequest() + ); + request.measurementProtocolSecret ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.UpdateMeasurementProtocolSecretRequest', + ['measurementProtocolSecret', 'name'] + ); + request.measurementProtocolSecret.name = defaultValue1; + const expectedHeaderRequestParams = `measurement_protocol_secret.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.MeasurementProtocolSecret() + ); + client.innerApiCalls.updateMeasurementProtocolSecret = + stubSimpleCall(expectedResponse); + const [response] = await client.updateMeasurementProtocolSecret(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateMeasurementProtocolSecret as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateMeasurementProtocolSecret as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateMeasurementProtocolSecret without error using callback', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.UpdateMeasurementProtocolSecretRequest() + ); + request.measurementProtocolSecret ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.UpdateMeasurementProtocolSecretRequest', + ['measurementProtocolSecret', 'name'] + ); + request.measurementProtocolSecret.name = defaultValue1; + const expectedHeaderRequestParams = `measurement_protocol_secret.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.MeasurementProtocolSecret() + ); + client.innerApiCalls.updateMeasurementProtocolSecret = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateMeasurementProtocolSecret( + request, + ( + err?: Error | null, + result?: protos.google.analytics.admin.v1alpha.IMeasurementProtocolSecret | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateMeasurementProtocolSecret as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateMeasurementProtocolSecret as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateMeasurementProtocolSecret with error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.UpdateMeasurementProtocolSecretRequest() + ); + request.measurementProtocolSecret ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.UpdateMeasurementProtocolSecretRequest', + ['measurementProtocolSecret', 'name'] + ); + request.measurementProtocolSecret.name = defaultValue1; + const expectedHeaderRequestParams = `measurement_protocol_secret.name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateMeasurementProtocolSecret = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.updateMeasurementProtocolSecret(request), + expectedError + ); + const actualRequest = ( + client.innerApiCalls.updateMeasurementProtocolSecret as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateMeasurementProtocolSecret as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateMeasurementProtocolSecret with closed client', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.UpdateMeasurementProtocolSecretRequest() + ); + request.measurementProtocolSecret ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.UpdateMeasurementProtocolSecretRequest', + ['measurementProtocolSecret', 'name'] + ); + request.measurementProtocolSecret.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects( + client.updateMeasurementProtocolSecret(request), + expectedError + ); + }); + }); + + describe('acknowledgeUserDataCollection', () => { + it('invokes acknowledgeUserDataCollection without error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.AcknowledgeUserDataCollectionRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.AcknowledgeUserDataCollectionRequest', + ['property'] + ); + request.property = defaultValue1; + const expectedHeaderRequestParams = `property=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.AcknowledgeUserDataCollectionResponse() + ); + client.innerApiCalls.acknowledgeUserDataCollection = + stubSimpleCall(expectedResponse); + const [response] = await client.acknowledgeUserDataCollection(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.acknowledgeUserDataCollection as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.acknowledgeUserDataCollection as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes acknowledgeUserDataCollection without error using callback', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.AcknowledgeUserDataCollectionRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.AcknowledgeUserDataCollectionRequest', + ['property'] + ); + request.property = defaultValue1; + const expectedHeaderRequestParams = `property=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.AcknowledgeUserDataCollectionResponse() + ); + client.innerApiCalls.acknowledgeUserDataCollection = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.acknowledgeUserDataCollection( + request, + ( + err?: Error | null, + result?: protos.google.analytics.admin.v1alpha.IAcknowledgeUserDataCollectionResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.acknowledgeUserDataCollection as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.acknowledgeUserDataCollection as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes acknowledgeUserDataCollection with error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.AcknowledgeUserDataCollectionRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.AcknowledgeUserDataCollectionRequest', + ['property'] + ); + request.property = defaultValue1; + const expectedHeaderRequestParams = `property=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.acknowledgeUserDataCollection = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.acknowledgeUserDataCollection(request), + expectedError + ); + const actualRequest = ( + client.innerApiCalls.acknowledgeUserDataCollection as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.acknowledgeUserDataCollection as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes acknowledgeUserDataCollection with closed client', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.AcknowledgeUserDataCollectionRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.AcknowledgeUserDataCollectionRequest', + ['property'] + ); + request.property = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects( + client.acknowledgeUserDataCollection(request), + expectedError + ); + }); + }); + + describe('getGoogleSignalsSettings', () => { + it('invokes getGoogleSignalsSettings without error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.GetGoogleSignalsSettingsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.GetGoogleSignalsSettingsRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.GoogleSignalsSettings() + ); + client.innerApiCalls.getGoogleSignalsSettings = + stubSimpleCall(expectedResponse); + const [response] = await client.getGoogleSignalsSettings(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getGoogleSignalsSettings as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getGoogleSignalsSettings as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getGoogleSignalsSettings without error using callback', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.GetGoogleSignalsSettingsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.GetGoogleSignalsSettingsRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.GoogleSignalsSettings() + ); + client.innerApiCalls.getGoogleSignalsSettings = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getGoogleSignalsSettings( + request, + ( + err?: Error | null, + result?: protos.google.analytics.admin.v1alpha.IGoogleSignalsSettings | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getGoogleSignalsSettings as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getGoogleSignalsSettings as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getGoogleSignalsSettings with error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.GetGoogleSignalsSettingsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.GetGoogleSignalsSettingsRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getGoogleSignalsSettings = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.getGoogleSignalsSettings(request), + expectedError + ); + const actualRequest = ( + client.innerApiCalls.getGoogleSignalsSettings as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getGoogleSignalsSettings as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getGoogleSignalsSettings with closed client', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.GetGoogleSignalsSettingsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.GetGoogleSignalsSettingsRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects( + client.getGoogleSignalsSettings(request), + expectedError + ); + }); + }); + + describe('updateGoogleSignalsSettings', () => { + it('invokes updateGoogleSignalsSettings without error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.UpdateGoogleSignalsSettingsRequest() + ); + request.googleSignalsSettings ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.UpdateGoogleSignalsSettingsRequest', + ['googleSignalsSettings', 'name'] + ); + request.googleSignalsSettings.name = defaultValue1; + const expectedHeaderRequestParams = `google_signals_settings.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.GoogleSignalsSettings() + ); + client.innerApiCalls.updateGoogleSignalsSettings = + stubSimpleCall(expectedResponse); + const [response] = await client.updateGoogleSignalsSettings(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateGoogleSignalsSettings as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateGoogleSignalsSettings as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateGoogleSignalsSettings without error using callback', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.UpdateGoogleSignalsSettingsRequest() + ); + request.googleSignalsSettings ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.UpdateGoogleSignalsSettingsRequest', + ['googleSignalsSettings', 'name'] + ); + request.googleSignalsSettings.name = defaultValue1; + const expectedHeaderRequestParams = `google_signals_settings.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.GoogleSignalsSettings() + ); + client.innerApiCalls.updateGoogleSignalsSettings = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateGoogleSignalsSettings( + request, + ( + err?: Error | null, + result?: protos.google.analytics.admin.v1alpha.IGoogleSignalsSettings | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateGoogleSignalsSettings as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateGoogleSignalsSettings as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateGoogleSignalsSettings with error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.UpdateGoogleSignalsSettingsRequest() + ); + request.googleSignalsSettings ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.UpdateGoogleSignalsSettingsRequest', + ['googleSignalsSettings', 'name'] + ); + request.googleSignalsSettings.name = defaultValue1; + const expectedHeaderRequestParams = `google_signals_settings.name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateGoogleSignalsSettings = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.updateGoogleSignalsSettings(request), + expectedError + ); + const actualRequest = ( + client.innerApiCalls.updateGoogleSignalsSettings as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateGoogleSignalsSettings as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateGoogleSignalsSettings with closed client', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.UpdateGoogleSignalsSettingsRequest() + ); + request.googleSignalsSettings ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.UpdateGoogleSignalsSettingsRequest', + ['googleSignalsSettings', 'name'] + ); + request.googleSignalsSettings.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects( + client.updateGoogleSignalsSettings(request), + expectedError + ); + }); + }); + + describe('createConversionEvent', () => { + it('invokes createConversionEvent without error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.CreateConversionEventRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.CreateConversionEventRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ConversionEvent() + ); + client.innerApiCalls.createConversionEvent = + stubSimpleCall(expectedResponse); + const [response] = await client.createConversionEvent(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createConversionEvent as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createConversionEvent as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createConversionEvent without error using callback', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.CreateConversionEventRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.CreateConversionEventRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ConversionEvent() + ); + client.innerApiCalls.createConversionEvent = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createConversionEvent( + request, + ( + err?: Error | null, + result?: protos.google.analytics.admin.v1alpha.IConversionEvent | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createConversionEvent as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createConversionEvent as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createConversionEvent with error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.CreateConversionEventRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.CreateConversionEventRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createConversionEvent = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.createConversionEvent(request), + expectedError + ); + const actualRequest = ( + client.innerApiCalls.createConversionEvent as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createConversionEvent as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createConversionEvent with closed client', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.CreateConversionEventRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.CreateConversionEventRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects( + client.createConversionEvent(request), + expectedError + ); + }); + }); + + describe('getConversionEvent', () => { + it('invokes getConversionEvent without error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.GetConversionEventRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.GetConversionEventRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ConversionEvent() + ); + client.innerApiCalls.getConversionEvent = + stubSimpleCall(expectedResponse); + const [response] = await client.getConversionEvent(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getConversionEvent as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getConversionEvent as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getConversionEvent without error using callback', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.GetConversionEventRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.GetConversionEventRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ConversionEvent() + ); + client.innerApiCalls.getConversionEvent = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getConversionEvent( + request, + ( + err?: Error | null, + result?: protos.google.analytics.admin.v1alpha.IConversionEvent | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getConversionEvent as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getConversionEvent as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getConversionEvent with error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.GetConversionEventRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.GetConversionEventRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getConversionEvent = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.getConversionEvent(request), expectedError); + const actualRequest = ( + client.innerApiCalls.getConversionEvent as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getConversionEvent as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getConversionEvent with closed client', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.GetConversionEventRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.GetConversionEventRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getConversionEvent(request), expectedError); + }); + }); + + describe('deleteConversionEvent', () => { + it('invokes deleteConversionEvent without error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.DeleteConversionEventRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.DeleteConversionEventRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteConversionEvent = + stubSimpleCall(expectedResponse); + const [response] = await client.deleteConversionEvent(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteConversionEvent as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteConversionEvent as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteConversionEvent without error using callback', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.DeleteConversionEventRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.DeleteConversionEventRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteConversionEvent = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteConversionEvent( + 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.deleteConversionEvent as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteConversionEvent as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteConversionEvent with error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.DeleteConversionEventRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.DeleteConversionEventRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteConversionEvent = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.deleteConversionEvent(request), + expectedError + ); + const actualRequest = ( + client.innerApiCalls.deleteConversionEvent as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteConversionEvent as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteConversionEvent with closed client', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.DeleteConversionEventRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.DeleteConversionEventRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects( + client.deleteConversionEvent(request), + expectedError + ); + }); + }); + + describe('getDisplayVideo360AdvertiserLink', () => { + it('invokes getDisplayVideo360AdvertiserLink without error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.GetDisplayVideo360AdvertiserLinkRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.GetDisplayVideo360AdvertiserLinkRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink() + ); + client.innerApiCalls.getDisplayVideo360AdvertiserLink = + stubSimpleCall(expectedResponse); + const [response] = await client.getDisplayVideo360AdvertiserLink(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getDisplayVideo360AdvertiserLink as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getDisplayVideo360AdvertiserLink as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getDisplayVideo360AdvertiserLink without error using callback', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.GetDisplayVideo360AdvertiserLinkRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.GetDisplayVideo360AdvertiserLinkRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink() + ); + client.innerApiCalls.getDisplayVideo360AdvertiserLink = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getDisplayVideo360AdvertiserLink( + request, + ( + err?: Error | null, + result?: protos.google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLink | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getDisplayVideo360AdvertiserLink as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getDisplayVideo360AdvertiserLink as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getDisplayVideo360AdvertiserLink with error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.GetDisplayVideo360AdvertiserLinkRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.GetDisplayVideo360AdvertiserLinkRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getDisplayVideo360AdvertiserLink = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.getDisplayVideo360AdvertiserLink(request), + expectedError + ); + const actualRequest = ( + client.innerApiCalls.getDisplayVideo360AdvertiserLink as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getDisplayVideo360AdvertiserLink as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getDisplayVideo360AdvertiserLink with closed client', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.GetDisplayVideo360AdvertiserLinkRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.GetDisplayVideo360AdvertiserLinkRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects( + client.getDisplayVideo360AdvertiserLink(request), + expectedError + ); + }); + }); + + describe('createDisplayVideo360AdvertiserLink', () => { + it('invokes createDisplayVideo360AdvertiserLink without error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.CreateDisplayVideo360AdvertiserLinkRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.CreateDisplayVideo360AdvertiserLinkRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink() + ); + client.innerApiCalls.createDisplayVideo360AdvertiserLink = + stubSimpleCall(expectedResponse); + const [response] = await client.createDisplayVideo360AdvertiserLink( + request + ); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createDisplayVideo360AdvertiserLink as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createDisplayVideo360AdvertiserLink as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createDisplayVideo360AdvertiserLink without error using callback', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.CreateDisplayVideo360AdvertiserLinkRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.CreateDisplayVideo360AdvertiserLinkRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink() + ); + client.innerApiCalls.createDisplayVideo360AdvertiserLink = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createDisplayVideo360AdvertiserLink( + request, + ( + err?: Error | null, + result?: protos.google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLink | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createDisplayVideo360AdvertiserLink as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createDisplayVideo360AdvertiserLink as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createDisplayVideo360AdvertiserLink with error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.CreateDisplayVideo360AdvertiserLinkRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.CreateDisplayVideo360AdvertiserLinkRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createDisplayVideo360AdvertiserLink = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.createDisplayVideo360AdvertiserLink(request), + expectedError + ); + const actualRequest = ( + client.innerApiCalls.createDisplayVideo360AdvertiserLink as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createDisplayVideo360AdvertiserLink as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createDisplayVideo360AdvertiserLink with closed client', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.CreateDisplayVideo360AdvertiserLinkRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.CreateDisplayVideo360AdvertiserLinkRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects( + client.createDisplayVideo360AdvertiserLink(request), + expectedError + ); + }); + }); + + describe('deleteDisplayVideo360AdvertiserLink', () => { + it('invokes deleteDisplayVideo360AdvertiserLink without error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.DeleteDisplayVideo360AdvertiserLinkRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.DeleteDisplayVideo360AdvertiserLinkRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteDisplayVideo360AdvertiserLink = + stubSimpleCall(expectedResponse); + const [response] = await client.deleteDisplayVideo360AdvertiserLink( + request + ); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteDisplayVideo360AdvertiserLink as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteDisplayVideo360AdvertiserLink as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteDisplayVideo360AdvertiserLink without error using callback', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.DeleteDisplayVideo360AdvertiserLinkRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.DeleteDisplayVideo360AdvertiserLinkRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteDisplayVideo360AdvertiserLink = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteDisplayVideo360AdvertiserLink( + 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.deleteDisplayVideo360AdvertiserLink as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteDisplayVideo360AdvertiserLink as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteDisplayVideo360AdvertiserLink with error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.DeleteDisplayVideo360AdvertiserLinkRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.DeleteDisplayVideo360AdvertiserLinkRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteDisplayVideo360AdvertiserLink = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.deleteDisplayVideo360AdvertiserLink(request), + expectedError + ); + const actualRequest = ( + client.innerApiCalls.deleteDisplayVideo360AdvertiserLink as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteDisplayVideo360AdvertiserLink as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteDisplayVideo360AdvertiserLink with closed client', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.DeleteDisplayVideo360AdvertiserLinkRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.DeleteDisplayVideo360AdvertiserLinkRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects( + client.deleteDisplayVideo360AdvertiserLink(request), + expectedError + ); + }); + }); + + describe('updateDisplayVideo360AdvertiserLink', () => { + it('invokes updateDisplayVideo360AdvertiserLink without error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.UpdateDisplayVideo360AdvertiserLinkRequest() + ); + request.displayVideo_360AdvertiserLink ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.UpdateDisplayVideo360AdvertiserLinkRequest', + ['displayVideo_360AdvertiserLink', 'name'] + ); + request.displayVideo_360AdvertiserLink.name = defaultValue1; + const expectedHeaderRequestParams = `display_video_360_advertiser_link.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink() + ); + client.innerApiCalls.updateDisplayVideo360AdvertiserLink = + stubSimpleCall(expectedResponse); + const [response] = await client.updateDisplayVideo360AdvertiserLink( + request + ); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateDisplayVideo360AdvertiserLink as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateDisplayVideo360AdvertiserLink as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateDisplayVideo360AdvertiserLink without error using callback', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.UpdateDisplayVideo360AdvertiserLinkRequest() + ); + request.displayVideo_360AdvertiserLink ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.UpdateDisplayVideo360AdvertiserLinkRequest', + ['displayVideo_360AdvertiserLink', 'name'] + ); + request.displayVideo_360AdvertiserLink.name = defaultValue1; + const expectedHeaderRequestParams = `display_video_360_advertiser_link.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink() + ); + client.innerApiCalls.updateDisplayVideo360AdvertiserLink = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateDisplayVideo360AdvertiserLink( + request, + ( + err?: Error | null, + result?: protos.google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLink | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateDisplayVideo360AdvertiserLink as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateDisplayVideo360AdvertiserLink as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateDisplayVideo360AdvertiserLink with error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.UpdateDisplayVideo360AdvertiserLinkRequest() + ); + request.displayVideo_360AdvertiserLink ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.UpdateDisplayVideo360AdvertiserLinkRequest', + ['displayVideo_360AdvertiserLink', 'name'] + ); + request.displayVideo_360AdvertiserLink.name = defaultValue1; + const expectedHeaderRequestParams = `display_video_360_advertiser_link.name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateDisplayVideo360AdvertiserLink = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.updateDisplayVideo360AdvertiserLink(request), + expectedError + ); + const actualRequest = ( + client.innerApiCalls.updateDisplayVideo360AdvertiserLink as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateDisplayVideo360AdvertiserLink as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateDisplayVideo360AdvertiserLink with closed client', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.UpdateDisplayVideo360AdvertiserLinkRequest() + ); + request.displayVideo_360AdvertiserLink ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.UpdateDisplayVideo360AdvertiserLinkRequest', + ['displayVideo_360AdvertiserLink', 'name'] + ); + request.displayVideo_360AdvertiserLink.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects( + client.updateDisplayVideo360AdvertiserLink(request), + expectedError + ); + }); + }); + + describe('getDisplayVideo360AdvertiserLinkProposal', () => { + it('invokes getDisplayVideo360AdvertiserLinkProposal without error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.GetDisplayVideo360AdvertiserLinkProposalRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.GetDisplayVideo360AdvertiserLinkProposalRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal() + ); + client.innerApiCalls.getDisplayVideo360AdvertiserLinkProposal = + stubSimpleCall(expectedResponse); + const [response] = await client.getDisplayVideo360AdvertiserLinkProposal( + request + ); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls + .getDisplayVideo360AdvertiserLinkProposal as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls + .getDisplayVideo360AdvertiserLinkProposal as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getDisplayVideo360AdvertiserLinkProposal without error using callback', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.GetDisplayVideo360AdvertiserLinkProposalRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.GetDisplayVideo360AdvertiserLinkProposalRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal() + ); + client.innerApiCalls.getDisplayVideo360AdvertiserLinkProposal = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getDisplayVideo360AdvertiserLinkProposal( + request, + ( + err?: Error | null, + result?: protos.google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLinkProposal | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls + .getDisplayVideo360AdvertiserLinkProposal as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls + .getDisplayVideo360AdvertiserLinkProposal as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getDisplayVideo360AdvertiserLinkProposal with error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.GetDisplayVideo360AdvertiserLinkProposalRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.GetDisplayVideo360AdvertiserLinkProposalRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getDisplayVideo360AdvertiserLinkProposal = + stubSimpleCall(undefined, expectedError); + await assert.rejects( + client.getDisplayVideo360AdvertiserLinkProposal(request), + expectedError + ); + const actualRequest = ( + client.innerApiCalls + .getDisplayVideo360AdvertiserLinkProposal as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls + .getDisplayVideo360AdvertiserLinkProposal as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getDisplayVideo360AdvertiserLinkProposal with closed client', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.GetDisplayVideo360AdvertiserLinkProposalRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.GetDisplayVideo360AdvertiserLinkProposalRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects( + client.getDisplayVideo360AdvertiserLinkProposal(request), + expectedError + ); + }); + }); + + describe('createDisplayVideo360AdvertiserLinkProposal', () => { + it('invokes createDisplayVideo360AdvertiserLinkProposal without error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.CreateDisplayVideo360AdvertiserLinkProposalRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.CreateDisplayVideo360AdvertiserLinkProposalRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal() + ); + client.innerApiCalls.createDisplayVideo360AdvertiserLinkProposal = + stubSimpleCall(expectedResponse); + const [response] = + await client.createDisplayVideo360AdvertiserLinkProposal(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls + .createDisplayVideo360AdvertiserLinkProposal as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls + .createDisplayVideo360AdvertiserLinkProposal as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createDisplayVideo360AdvertiserLinkProposal without error using callback', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.CreateDisplayVideo360AdvertiserLinkProposalRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.CreateDisplayVideo360AdvertiserLinkProposalRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal() + ); + client.innerApiCalls.createDisplayVideo360AdvertiserLinkProposal = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createDisplayVideo360AdvertiserLinkProposal( + request, + ( + err?: Error | null, + result?: protos.google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLinkProposal | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls + .createDisplayVideo360AdvertiserLinkProposal as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls + .createDisplayVideo360AdvertiserLinkProposal as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createDisplayVideo360AdvertiserLinkProposal with error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.CreateDisplayVideo360AdvertiserLinkProposalRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.CreateDisplayVideo360AdvertiserLinkProposalRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createDisplayVideo360AdvertiserLinkProposal = + stubSimpleCall(undefined, expectedError); + await assert.rejects( + client.createDisplayVideo360AdvertiserLinkProposal(request), + expectedError + ); + const actualRequest = ( + client.innerApiCalls + .createDisplayVideo360AdvertiserLinkProposal as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls + .createDisplayVideo360AdvertiserLinkProposal as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createDisplayVideo360AdvertiserLinkProposal with closed client', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.CreateDisplayVideo360AdvertiserLinkProposalRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.CreateDisplayVideo360AdvertiserLinkProposalRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects( + client.createDisplayVideo360AdvertiserLinkProposal(request), + expectedError + ); + }); + }); + + describe('deleteDisplayVideo360AdvertiserLinkProposal', () => { + it('invokes deleteDisplayVideo360AdvertiserLinkProposal without error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.DeleteDisplayVideo360AdvertiserLinkProposalRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.DeleteDisplayVideo360AdvertiserLinkProposalRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteDisplayVideo360AdvertiserLinkProposal = + stubSimpleCall(expectedResponse); + const [response] = + await client.deleteDisplayVideo360AdvertiserLinkProposal(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls + .deleteDisplayVideo360AdvertiserLinkProposal as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls + .deleteDisplayVideo360AdvertiserLinkProposal as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteDisplayVideo360AdvertiserLinkProposal without error using callback', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.DeleteDisplayVideo360AdvertiserLinkProposalRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.DeleteDisplayVideo360AdvertiserLinkProposalRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteDisplayVideo360AdvertiserLinkProposal = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteDisplayVideo360AdvertiserLinkProposal( + 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 + .deleteDisplayVideo360AdvertiserLinkProposal as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls + .deleteDisplayVideo360AdvertiserLinkProposal as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteDisplayVideo360AdvertiserLinkProposal with error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.DeleteDisplayVideo360AdvertiserLinkProposalRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.DeleteDisplayVideo360AdvertiserLinkProposalRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteDisplayVideo360AdvertiserLinkProposal = + stubSimpleCall(undefined, expectedError); + await assert.rejects( + client.deleteDisplayVideo360AdvertiserLinkProposal(request), + expectedError + ); + const actualRequest = ( + client.innerApiCalls + .deleteDisplayVideo360AdvertiserLinkProposal as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls + .deleteDisplayVideo360AdvertiserLinkProposal as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteDisplayVideo360AdvertiserLinkProposal with closed client', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.DeleteDisplayVideo360AdvertiserLinkProposalRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.DeleteDisplayVideo360AdvertiserLinkProposalRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects( + client.deleteDisplayVideo360AdvertiserLinkProposal(request), + expectedError + ); + }); + }); + + describe('approveDisplayVideo360AdvertiserLinkProposal', () => { + it('invokes approveDisplayVideo360AdvertiserLinkProposal without error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ApproveDisplayVideo360AdvertiserLinkProposalRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.ApproveDisplayVideo360AdvertiserLinkProposalRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ApproveDisplayVideo360AdvertiserLinkProposalResponse() + ); + client.innerApiCalls.approveDisplayVideo360AdvertiserLinkProposal = + stubSimpleCall(expectedResponse); + const [response] = + await client.approveDisplayVideo360AdvertiserLinkProposal(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls + .approveDisplayVideo360AdvertiserLinkProposal as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls + .approveDisplayVideo360AdvertiserLinkProposal as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes approveDisplayVideo360AdvertiserLinkProposal without error using callback', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ApproveDisplayVideo360AdvertiserLinkProposalRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.ApproveDisplayVideo360AdvertiserLinkProposalRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ApproveDisplayVideo360AdvertiserLinkProposalResponse() + ); + client.innerApiCalls.approveDisplayVideo360AdvertiserLinkProposal = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.approveDisplayVideo360AdvertiserLinkProposal( + request, + ( + err?: Error | null, + result?: protos.google.analytics.admin.v1alpha.IApproveDisplayVideo360AdvertiserLinkProposalResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls + .approveDisplayVideo360AdvertiserLinkProposal as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls + .approveDisplayVideo360AdvertiserLinkProposal as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes approveDisplayVideo360AdvertiserLinkProposal with error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ApproveDisplayVideo360AdvertiserLinkProposalRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.ApproveDisplayVideo360AdvertiserLinkProposalRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.approveDisplayVideo360AdvertiserLinkProposal = + stubSimpleCall(undefined, expectedError); + await assert.rejects( + client.approveDisplayVideo360AdvertiserLinkProposal(request), + expectedError + ); + const actualRequest = ( + client.innerApiCalls + .approveDisplayVideo360AdvertiserLinkProposal as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls + .approveDisplayVideo360AdvertiserLinkProposal as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes approveDisplayVideo360AdvertiserLinkProposal with closed client', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ApproveDisplayVideo360AdvertiserLinkProposalRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.ApproveDisplayVideo360AdvertiserLinkProposalRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects( + client.approveDisplayVideo360AdvertiserLinkProposal(request), + expectedError + ); + }); + }); + + describe('cancelDisplayVideo360AdvertiserLinkProposal', () => { + it('invokes cancelDisplayVideo360AdvertiserLinkProposal without error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.CancelDisplayVideo360AdvertiserLinkProposalRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.CancelDisplayVideo360AdvertiserLinkProposalRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal() + ); + client.innerApiCalls.cancelDisplayVideo360AdvertiserLinkProposal = + stubSimpleCall(expectedResponse); + const [response] = + await client.cancelDisplayVideo360AdvertiserLinkProposal(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls + .cancelDisplayVideo360AdvertiserLinkProposal as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls + .cancelDisplayVideo360AdvertiserLinkProposal as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes cancelDisplayVideo360AdvertiserLinkProposal without error using callback', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.CancelDisplayVideo360AdvertiserLinkProposalRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.CancelDisplayVideo360AdvertiserLinkProposalRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal() + ); + client.innerApiCalls.cancelDisplayVideo360AdvertiserLinkProposal = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.cancelDisplayVideo360AdvertiserLinkProposal( + request, + ( + err?: Error | null, + result?: protos.google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLinkProposal | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls + .cancelDisplayVideo360AdvertiserLinkProposal as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls + .cancelDisplayVideo360AdvertiserLinkProposal as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes cancelDisplayVideo360AdvertiserLinkProposal with error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.CancelDisplayVideo360AdvertiserLinkProposalRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.CancelDisplayVideo360AdvertiserLinkProposalRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.cancelDisplayVideo360AdvertiserLinkProposal = + stubSimpleCall(undefined, expectedError); + await assert.rejects( + client.cancelDisplayVideo360AdvertiserLinkProposal(request), + expectedError + ); + const actualRequest = ( + client.innerApiCalls + .cancelDisplayVideo360AdvertiserLinkProposal as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls + .cancelDisplayVideo360AdvertiserLinkProposal as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes cancelDisplayVideo360AdvertiserLinkProposal with closed client', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.CancelDisplayVideo360AdvertiserLinkProposalRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.CancelDisplayVideo360AdvertiserLinkProposalRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects( + client.cancelDisplayVideo360AdvertiserLinkProposal(request), + expectedError + ); + }); + }); + + describe('createCustomDimension', () => { + it('invokes createCustomDimension without error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.CreateCustomDimensionRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.CreateCustomDimensionRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.CustomDimension() + ); + client.innerApiCalls.createCustomDimension = + stubSimpleCall(expectedResponse); + const [response] = await client.createCustomDimension(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createCustomDimension as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createCustomDimension as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createCustomDimension without error using callback', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.CreateCustomDimensionRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.CreateCustomDimensionRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.CustomDimension() + ); + client.innerApiCalls.createCustomDimension = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createCustomDimension( + request, + ( + err?: Error | null, + result?: protos.google.analytics.admin.v1alpha.ICustomDimension | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createCustomDimension as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createCustomDimension as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createCustomDimension with error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.CreateCustomDimensionRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.CreateCustomDimensionRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createCustomDimension = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.createCustomDimension(request), + expectedError + ); + const actualRequest = ( + client.innerApiCalls.createCustomDimension as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createCustomDimension as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createCustomDimension with closed client', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.CreateCustomDimensionRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.CreateCustomDimensionRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects( + client.createCustomDimension(request), + expectedError + ); + }); + }); + + describe('updateCustomDimension', () => { + it('invokes updateCustomDimension without error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.UpdateCustomDimensionRequest() + ); + request.customDimension ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.UpdateCustomDimensionRequest', + ['customDimension', 'name'] + ); + request.customDimension.name = defaultValue1; + const expectedHeaderRequestParams = `custom_dimension.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.CustomDimension() + ); + client.innerApiCalls.updateCustomDimension = + stubSimpleCall(expectedResponse); + const [response] = await client.updateCustomDimension(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateCustomDimension as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateCustomDimension as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateCustomDimension without error using callback', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.UpdateCustomDimensionRequest() + ); + request.customDimension ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.UpdateCustomDimensionRequest', + ['customDimension', 'name'] + ); + request.customDimension.name = defaultValue1; + const expectedHeaderRequestParams = `custom_dimension.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.CustomDimension() + ); + client.innerApiCalls.updateCustomDimension = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateCustomDimension( + request, + ( + err?: Error | null, + result?: protos.google.analytics.admin.v1alpha.ICustomDimension | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateCustomDimension as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateCustomDimension as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateCustomDimension with error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.UpdateCustomDimensionRequest() + ); + request.customDimension ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.UpdateCustomDimensionRequest', + ['customDimension', 'name'] + ); + request.customDimension.name = defaultValue1; + const expectedHeaderRequestParams = `custom_dimension.name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateCustomDimension = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.updateCustomDimension(request), + expectedError + ); + const actualRequest = ( + client.innerApiCalls.updateCustomDimension as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateCustomDimension as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateCustomDimension with closed client', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.UpdateCustomDimensionRequest() + ); + request.customDimension ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.UpdateCustomDimensionRequest', + ['customDimension', 'name'] + ); + request.customDimension.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects( + client.updateCustomDimension(request), + expectedError + ); + }); + }); + + describe('archiveCustomDimension', () => { + it('invokes archiveCustomDimension without error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ArchiveCustomDimensionRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.ArchiveCustomDimensionRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.archiveCustomDimension = + stubSimpleCall(expectedResponse); + const [response] = await client.archiveCustomDimension(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.archiveCustomDimension as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.archiveCustomDimension as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes archiveCustomDimension without error using callback', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ArchiveCustomDimensionRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.ArchiveCustomDimensionRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.archiveCustomDimension = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.archiveCustomDimension( + 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.archiveCustomDimension as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.archiveCustomDimension as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes archiveCustomDimension with error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ArchiveCustomDimensionRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.ArchiveCustomDimensionRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.archiveCustomDimension = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.archiveCustomDimension(request), + expectedError + ); + const actualRequest = ( + client.innerApiCalls.archiveCustomDimension as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.archiveCustomDimension as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes archiveCustomDimension with closed client', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ArchiveCustomDimensionRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.ArchiveCustomDimensionRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects( + client.archiveCustomDimension(request), + expectedError + ); + }); + }); + + describe('getCustomDimension', () => { + it('invokes getCustomDimension without error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.GetCustomDimensionRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.GetCustomDimensionRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.CustomDimension() + ); + client.innerApiCalls.getCustomDimension = + stubSimpleCall(expectedResponse); + const [response] = await client.getCustomDimension(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getCustomDimension as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getCustomDimension as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getCustomDimension without error using callback', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.GetCustomDimensionRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.GetCustomDimensionRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.CustomDimension() + ); + client.innerApiCalls.getCustomDimension = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getCustomDimension( + request, + ( + err?: Error | null, + result?: protos.google.analytics.admin.v1alpha.ICustomDimension | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getCustomDimension as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getCustomDimension as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getCustomDimension with error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.GetCustomDimensionRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.GetCustomDimensionRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getCustomDimension = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.getCustomDimension(request), expectedError); + const actualRequest = ( + client.innerApiCalls.getCustomDimension as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getCustomDimension as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getCustomDimension with closed client', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.GetCustomDimensionRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.GetCustomDimensionRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getCustomDimension(request), expectedError); + }); + }); + + describe('createCustomMetric', () => { + it('invokes createCustomMetric without error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.CreateCustomMetricRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.CreateCustomMetricRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.CustomMetric() + ); + client.innerApiCalls.createCustomMetric = + stubSimpleCall(expectedResponse); + const [response] = await client.createCustomMetric(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createCustomMetric as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createCustomMetric as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createCustomMetric without error using callback', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.CreateCustomMetricRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.CreateCustomMetricRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.CustomMetric() + ); + client.innerApiCalls.createCustomMetric = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createCustomMetric( + request, + ( + err?: Error | null, + result?: protos.google.analytics.admin.v1alpha.ICustomMetric | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createCustomMetric as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createCustomMetric as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createCustomMetric with error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.CreateCustomMetricRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.CreateCustomMetricRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createCustomMetric = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.createCustomMetric(request), expectedError); + const actualRequest = ( + client.innerApiCalls.createCustomMetric as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createCustomMetric as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createCustomMetric with closed client', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.CreateCustomMetricRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.CreateCustomMetricRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.createCustomMetric(request), expectedError); + }); + }); + + describe('updateCustomMetric', () => { + it('invokes updateCustomMetric without error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.UpdateCustomMetricRequest() + ); + request.customMetric ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.UpdateCustomMetricRequest', + ['customMetric', 'name'] + ); + request.customMetric.name = defaultValue1; + const expectedHeaderRequestParams = `custom_metric.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.CustomMetric() + ); + client.innerApiCalls.updateCustomMetric = + stubSimpleCall(expectedResponse); + const [response] = await client.updateCustomMetric(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateCustomMetric as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateCustomMetric as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateCustomMetric without error using callback', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.UpdateCustomMetricRequest() + ); + request.customMetric ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.UpdateCustomMetricRequest', + ['customMetric', 'name'] + ); + request.customMetric.name = defaultValue1; + const expectedHeaderRequestParams = `custom_metric.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.CustomMetric() + ); + client.innerApiCalls.updateCustomMetric = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateCustomMetric( + request, + ( + err?: Error | null, + result?: protos.google.analytics.admin.v1alpha.ICustomMetric | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateCustomMetric as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateCustomMetric as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateCustomMetric with error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.UpdateCustomMetricRequest() + ); + request.customMetric ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.UpdateCustomMetricRequest', + ['customMetric', 'name'] + ); + request.customMetric.name = defaultValue1; + const expectedHeaderRequestParams = `custom_metric.name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateCustomMetric = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.updateCustomMetric(request), expectedError); + const actualRequest = ( + client.innerApiCalls.updateCustomMetric as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateCustomMetric as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateCustomMetric with closed client', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.UpdateCustomMetricRequest() + ); + request.customMetric ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.UpdateCustomMetricRequest', + ['customMetric', 'name'] + ); + request.customMetric.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.updateCustomMetric(request), expectedError); + }); + }); + + describe('archiveCustomMetric', () => { + it('invokes archiveCustomMetric without error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ArchiveCustomMetricRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.ArchiveCustomMetricRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.archiveCustomMetric = + stubSimpleCall(expectedResponse); + const [response] = await client.archiveCustomMetric(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.archiveCustomMetric as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.archiveCustomMetric as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes archiveCustomMetric without error using callback', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ArchiveCustomMetricRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.ArchiveCustomMetricRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.archiveCustomMetric = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.archiveCustomMetric( + 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.archiveCustomMetric as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.archiveCustomMetric as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes archiveCustomMetric with error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ArchiveCustomMetricRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.ArchiveCustomMetricRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.archiveCustomMetric = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.archiveCustomMetric(request), expectedError); + const actualRequest = ( + client.innerApiCalls.archiveCustomMetric as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.archiveCustomMetric as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes archiveCustomMetric with closed client', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ArchiveCustomMetricRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.ArchiveCustomMetricRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.archiveCustomMetric(request), expectedError); + }); + }); + + describe('getCustomMetric', () => { + it('invokes getCustomMetric without error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.GetCustomMetricRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.GetCustomMetricRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.CustomMetric() + ); + client.innerApiCalls.getCustomMetric = stubSimpleCall(expectedResponse); + const [response] = await client.getCustomMetric(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getCustomMetric as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getCustomMetric as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getCustomMetric without error using callback', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.GetCustomMetricRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.GetCustomMetricRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.CustomMetric() + ); + client.innerApiCalls.getCustomMetric = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getCustomMetric( + request, + ( + err?: Error | null, + result?: protos.google.analytics.admin.v1alpha.ICustomMetric | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getCustomMetric as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getCustomMetric as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getCustomMetric with error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.GetCustomMetricRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.GetCustomMetricRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getCustomMetric = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.getCustomMetric(request), expectedError); + const actualRequest = ( + client.innerApiCalls.getCustomMetric as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getCustomMetric as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getCustomMetric with closed client', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.GetCustomMetricRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.GetCustomMetricRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getCustomMetric(request), expectedError); + }); + }); + + describe('getDataRetentionSettings', () => { + it('invokes getDataRetentionSettings without error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.GetDataRetentionSettingsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.GetDataRetentionSettingsRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.DataRetentionSettings() + ); + client.innerApiCalls.getDataRetentionSettings = + stubSimpleCall(expectedResponse); + const [response] = await client.getDataRetentionSettings(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getDataRetentionSettings as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getDataRetentionSettings as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getDataRetentionSettings without error using callback', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.GetDataRetentionSettingsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.GetDataRetentionSettingsRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.DataRetentionSettings() + ); + client.innerApiCalls.getDataRetentionSettings = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getDataRetentionSettings( + request, + ( + err?: Error | null, + result?: protos.google.analytics.admin.v1alpha.IDataRetentionSettings | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getDataRetentionSettings as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getDataRetentionSettings as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getDataRetentionSettings with error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.GetDataRetentionSettingsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.GetDataRetentionSettingsRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getDataRetentionSettings = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.getDataRetentionSettings(request), + expectedError + ); + const actualRequest = ( + client.innerApiCalls.getDataRetentionSettings as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getDataRetentionSettings as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getDataRetentionSettings with closed client', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.GetDataRetentionSettingsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.GetDataRetentionSettingsRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects( + client.getDataRetentionSettings(request), + expectedError + ); + }); + }); + + describe('updateDataRetentionSettings', () => { + it('invokes updateDataRetentionSettings without error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.UpdateDataRetentionSettingsRequest() + ); + request.dataRetentionSettings ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.UpdateDataRetentionSettingsRequest', + ['dataRetentionSettings', 'name'] + ); + request.dataRetentionSettings.name = defaultValue1; + const expectedHeaderRequestParams = `data_retention_settings.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.DataRetentionSettings() + ); + client.innerApiCalls.updateDataRetentionSettings = + stubSimpleCall(expectedResponse); + const [response] = await client.updateDataRetentionSettings(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateDataRetentionSettings as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateDataRetentionSettings as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateDataRetentionSettings without error using callback', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.UpdateDataRetentionSettingsRequest() + ); + request.dataRetentionSettings ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.UpdateDataRetentionSettingsRequest', + ['dataRetentionSettings', 'name'] + ); + request.dataRetentionSettings.name = defaultValue1; + const expectedHeaderRequestParams = `data_retention_settings.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.DataRetentionSettings() + ); + client.innerApiCalls.updateDataRetentionSettings = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateDataRetentionSettings( + request, + ( + err?: Error | null, + result?: protos.google.analytics.admin.v1alpha.IDataRetentionSettings | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateDataRetentionSettings as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateDataRetentionSettings as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateDataRetentionSettings with error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.UpdateDataRetentionSettingsRequest() + ); + request.dataRetentionSettings ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.UpdateDataRetentionSettingsRequest', + ['dataRetentionSettings', 'name'] + ); + request.dataRetentionSettings.name = defaultValue1; + const expectedHeaderRequestParams = `data_retention_settings.name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateDataRetentionSettings = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.updateDataRetentionSettings(request), + expectedError + ); + const actualRequest = ( + client.innerApiCalls.updateDataRetentionSettings as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateDataRetentionSettings as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateDataRetentionSettings with closed client', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.UpdateDataRetentionSettingsRequest() + ); + request.dataRetentionSettings ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.UpdateDataRetentionSettingsRequest', + ['dataRetentionSettings', 'name'] + ); + request.dataRetentionSettings.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects( + client.updateDataRetentionSettings(request), + expectedError + ); + }); + }); + + describe('createDataStream', () => { + it('invokes createDataStream without error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.CreateDataStreamRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.CreateDataStreamRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.DataStream() + ); + client.innerApiCalls.createDataStream = stubSimpleCall(expectedResponse); + const [response] = await client.createDataStream(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createDataStream as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createDataStream as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createDataStream without error using callback', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.CreateDataStreamRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.CreateDataStreamRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.DataStream() + ); + client.innerApiCalls.createDataStream = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createDataStream( + request, + ( + err?: Error | null, + result?: protos.google.analytics.admin.v1alpha.IDataStream | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createDataStream as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createDataStream as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createDataStream with error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.CreateDataStreamRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.CreateDataStreamRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createDataStream = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.createDataStream(request), expectedError); + const actualRequest = ( + client.innerApiCalls.createDataStream as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createDataStream as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createDataStream with closed client', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.CreateDataStreamRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.CreateDataStreamRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.createDataStream(request), expectedError); + }); + }); + + describe('deleteDataStream', () => { + it('invokes deleteDataStream without error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.DeleteDataStreamRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.DeleteDataStreamRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteDataStream = stubSimpleCall(expectedResponse); + const [response] = await client.deleteDataStream(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteDataStream as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteDataStream as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteDataStream without error using callback', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.DeleteDataStreamRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.DeleteDataStreamRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteDataStream = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteDataStream( + 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.deleteDataStream as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteDataStream as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteDataStream with error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.DeleteDataStreamRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.DeleteDataStreamRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteDataStream = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.deleteDataStream(request), expectedError); + const actualRequest = ( + client.innerApiCalls.deleteDataStream as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteDataStream as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteDataStream with closed client', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.DeleteDataStreamRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.DeleteDataStreamRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.deleteDataStream(request), expectedError); + }); + }); + + describe('updateDataStream', () => { + it('invokes updateDataStream without error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.UpdateDataStreamRequest() + ); + request.dataStream ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.UpdateDataStreamRequest', + ['dataStream', 'name'] + ); + request.dataStream.name = defaultValue1; + const expectedHeaderRequestParams = `data_stream.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.DataStream() + ); + client.innerApiCalls.updateDataStream = stubSimpleCall(expectedResponse); + const [response] = await client.updateDataStream(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateDataStream as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateDataStream as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateDataStream without error using callback', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.UpdateDataStreamRequest() + ); + request.dataStream ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.UpdateDataStreamRequest', + ['dataStream', 'name'] + ); + request.dataStream.name = defaultValue1; + const expectedHeaderRequestParams = `data_stream.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.DataStream() + ); + client.innerApiCalls.updateDataStream = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateDataStream( + request, + ( + err?: Error | null, + result?: protos.google.analytics.admin.v1alpha.IDataStream | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateDataStream as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateDataStream as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateDataStream with error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.UpdateDataStreamRequest() + ); + request.dataStream ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.UpdateDataStreamRequest', + ['dataStream', 'name'] + ); + request.dataStream.name = defaultValue1; + const expectedHeaderRequestParams = `data_stream.name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateDataStream = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.updateDataStream(request), expectedError); + const actualRequest = ( + client.innerApiCalls.updateDataStream as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateDataStream as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateDataStream with closed client', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.UpdateDataStreamRequest() + ); + request.dataStream ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.UpdateDataStreamRequest', + ['dataStream', 'name'] + ); + request.dataStream.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.updateDataStream(request), expectedError); + }); + }); + + describe('getDataStream', () => { + it('invokes getDataStream without error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.GetDataStreamRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.GetDataStreamRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.DataStream() + ); + client.innerApiCalls.getDataStream = stubSimpleCall(expectedResponse); + const [response] = await client.getDataStream(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getDataStream as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getDataStream as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getDataStream without error using callback', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.GetDataStreamRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.GetDataStreamRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.DataStream() + ); + client.innerApiCalls.getDataStream = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getDataStream( + request, + ( + err?: Error | null, + result?: protos.google.analytics.admin.v1alpha.IDataStream | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getDataStream as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getDataStream as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getDataStream with error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.GetDataStreamRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.GetDataStreamRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getDataStream = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.getDataStream(request), expectedError); + const actualRequest = ( + client.innerApiCalls.getDataStream as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getDataStream as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getDataStream with closed client', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.GetDataStreamRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.GetDataStreamRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getDataStream(request), expectedError); + }); + }); + + describe('getAudience', () => { + it('invokes getAudience without error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.GetAudienceRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.GetAudienceRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.Audience() + ); + client.innerApiCalls.getAudience = stubSimpleCall(expectedResponse); + const [response] = await client.getAudience(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getAudience as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getAudience as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getAudience without error using callback', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.GetAudienceRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.GetAudienceRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.Audience() + ); + client.innerApiCalls.getAudience = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getAudience( + request, + ( + err?: Error | null, + result?: protos.google.analytics.admin.v1alpha.IAudience | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getAudience as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getAudience as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getAudience with error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.GetAudienceRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.GetAudienceRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getAudience = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.getAudience(request), expectedError); + const actualRequest = ( + client.innerApiCalls.getAudience as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getAudience as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getAudience with closed client', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.GetAudienceRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.GetAudienceRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getAudience(request), expectedError); + }); + }); + + describe('createAudience', () => { + it('invokes createAudience without error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.CreateAudienceRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.CreateAudienceRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.Audience() + ); + client.innerApiCalls.createAudience = stubSimpleCall(expectedResponse); + const [response] = await client.createAudience(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createAudience as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createAudience as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createAudience without error using callback', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.CreateAudienceRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.CreateAudienceRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.Audience() + ); + client.innerApiCalls.createAudience = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createAudience( + request, + ( + err?: Error | null, + result?: protos.google.analytics.admin.v1alpha.IAudience | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createAudience as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createAudience as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createAudience with error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.CreateAudienceRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.CreateAudienceRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createAudience = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.createAudience(request), expectedError); + const actualRequest = ( + client.innerApiCalls.createAudience as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createAudience as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createAudience with closed client', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.CreateAudienceRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.CreateAudienceRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.createAudience(request), expectedError); + }); + }); + + describe('updateAudience', () => { + it('invokes updateAudience without error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.UpdateAudienceRequest() + ); + request.audience ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.UpdateAudienceRequest', + ['audience', 'name'] + ); + request.audience.name = defaultValue1; + const expectedHeaderRequestParams = `audience.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.Audience() + ); + client.innerApiCalls.updateAudience = stubSimpleCall(expectedResponse); + const [response] = await client.updateAudience(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateAudience as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateAudience as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateAudience without error using callback', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.UpdateAudienceRequest() + ); + request.audience ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.UpdateAudienceRequest', + ['audience', 'name'] + ); + request.audience.name = defaultValue1; + const expectedHeaderRequestParams = `audience.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.Audience() + ); + client.innerApiCalls.updateAudience = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateAudience( + request, + ( + err?: Error | null, + result?: protos.google.analytics.admin.v1alpha.IAudience | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateAudience as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateAudience as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateAudience with error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.UpdateAudienceRequest() + ); + request.audience ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.UpdateAudienceRequest', + ['audience', 'name'] + ); + request.audience.name = defaultValue1; + const expectedHeaderRequestParams = `audience.name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateAudience = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.updateAudience(request), expectedError); + const actualRequest = ( + client.innerApiCalls.updateAudience as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateAudience as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateAudience with closed client', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.UpdateAudienceRequest() + ); + request.audience ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.UpdateAudienceRequest', + ['audience', 'name'] + ); + request.audience.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.updateAudience(request), expectedError); + }); + }); + + describe('archiveAudience', () => { + it('invokes archiveAudience without error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ArchiveAudienceRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.ArchiveAudienceRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.archiveAudience = stubSimpleCall(expectedResponse); + const [response] = await client.archiveAudience(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.archiveAudience as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.archiveAudience as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes archiveAudience without error using callback', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ArchiveAudienceRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.ArchiveAudienceRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.archiveAudience = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.archiveAudience( + 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.archiveAudience as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.archiveAudience as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes archiveAudience with error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ArchiveAudienceRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.ArchiveAudienceRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.archiveAudience = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.archiveAudience(request), expectedError); + const actualRequest = ( + client.innerApiCalls.archiveAudience as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.archiveAudience as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes archiveAudience with closed client', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ArchiveAudienceRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.ArchiveAudienceRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.archiveAudience(request), expectedError); + }); + }); + + describe('getAttributionSettings', () => { + it('invokes getAttributionSettings without error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.GetAttributionSettingsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.GetAttributionSettingsRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.AttributionSettings() + ); + client.innerApiCalls.getAttributionSettings = + stubSimpleCall(expectedResponse); + const [response] = await client.getAttributionSettings(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getAttributionSettings as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getAttributionSettings as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getAttributionSettings without error using callback', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.GetAttributionSettingsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.GetAttributionSettingsRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.AttributionSettings() + ); + client.innerApiCalls.getAttributionSettings = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getAttributionSettings( + request, + ( + err?: Error | null, + result?: protos.google.analytics.admin.v1alpha.IAttributionSettings | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getAttributionSettings as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getAttributionSettings as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getAttributionSettings with error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.GetAttributionSettingsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.GetAttributionSettingsRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getAttributionSettings = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.getAttributionSettings(request), + expectedError + ); + const actualRequest = ( + client.innerApiCalls.getAttributionSettings as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getAttributionSettings as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getAttributionSettings with closed client', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.GetAttributionSettingsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.GetAttributionSettingsRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects( + client.getAttributionSettings(request), + expectedError + ); + }); + }); + + describe('updateAttributionSettings', () => { + it('invokes updateAttributionSettings without error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.UpdateAttributionSettingsRequest() + ); + request.attributionSettings ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.UpdateAttributionSettingsRequest', + ['attributionSettings', 'name'] + ); + request.attributionSettings.name = defaultValue1; + const expectedHeaderRequestParams = `attribution_settings.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.AttributionSettings() + ); + client.innerApiCalls.updateAttributionSettings = + stubSimpleCall(expectedResponse); + const [response] = await client.updateAttributionSettings(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateAttributionSettings as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateAttributionSettings as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateAttributionSettings without error using callback', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.UpdateAttributionSettingsRequest() + ); + request.attributionSettings ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.UpdateAttributionSettingsRequest', + ['attributionSettings', 'name'] + ); + request.attributionSettings.name = defaultValue1; + const expectedHeaderRequestParams = `attribution_settings.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.AttributionSettings() + ); + client.innerApiCalls.updateAttributionSettings = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateAttributionSettings( + request, + ( + err?: Error | null, + result?: protos.google.analytics.admin.v1alpha.IAttributionSettings | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateAttributionSettings as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateAttributionSettings as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateAttributionSettings with error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.UpdateAttributionSettingsRequest() + ); + request.attributionSettings ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.UpdateAttributionSettingsRequest', + ['attributionSettings', 'name'] + ); + request.attributionSettings.name = defaultValue1; + const expectedHeaderRequestParams = `attribution_settings.name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateAttributionSettings = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.updateAttributionSettings(request), + expectedError + ); + const actualRequest = ( + client.innerApiCalls.updateAttributionSettings as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateAttributionSettings as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateAttributionSettings with closed client', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.UpdateAttributionSettingsRequest() + ); + request.attributionSettings ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.UpdateAttributionSettingsRequest', + ['attributionSettings', 'name'] + ); + request.attributionSettings.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects( + client.updateAttributionSettings(request), + expectedError + ); + }); + }); + + describe('runAccessReport', () => { + it('invokes runAccessReport without error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.RunAccessReportRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.RunAccessReportRequest', + ['entity'] + ); + request.entity = defaultValue1; + const expectedHeaderRequestParams = `entity=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.RunAccessReportResponse() + ); + client.innerApiCalls.runAccessReport = stubSimpleCall(expectedResponse); + const [response] = await client.runAccessReport(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.runAccessReport as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.runAccessReport as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes runAccessReport without error using callback', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.RunAccessReportRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.RunAccessReportRequest', + ['entity'] + ); + request.entity = defaultValue1; + const expectedHeaderRequestParams = `entity=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.RunAccessReportResponse() + ); + client.innerApiCalls.runAccessReport = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.runAccessReport( + request, + ( + err?: Error | null, + result?: protos.google.analytics.admin.v1alpha.IRunAccessReportResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.runAccessReport as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.runAccessReport as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes runAccessReport with error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.RunAccessReportRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.RunAccessReportRequest', + ['entity'] + ); + request.entity = defaultValue1; + const expectedHeaderRequestParams = `entity=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.runAccessReport = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.runAccessReport(request), expectedError); + const actualRequest = ( + client.innerApiCalls.runAccessReport as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.runAccessReport as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes runAccessReport with closed client', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.RunAccessReportRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.RunAccessReportRequest', + ['entity'] + ); + request.entity = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.runAccessReport(request), expectedError); + }); + }); + + describe('listAccounts', () => { + it('invokes listAccounts without error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ListAccountsRequest() + ); + const expectedResponse = [ + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.Account() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.Account() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.Account() + ), + ]; + client.innerApiCalls.listAccounts = stubSimpleCall(expectedResponse); + const [response] = await client.listAccounts(request); + assert.deepStrictEqual(response, expectedResponse); + }); + + it('invokes listAccounts without error using callback', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ListAccountsRequest() + ); + const expectedResponse = [ + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.Account() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.Account() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.Account() + ), + ]; + client.innerApiCalls.listAccounts = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listAccounts( + request, + ( + err?: Error | null, + result?: protos.google.analytics.admin.v1alpha.IAccount[] | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + }); + + it('invokes listAccounts with error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ListAccountsRequest() + ); + const expectedError = new Error('expected'); + client.innerApiCalls.listAccounts = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.listAccounts(request), expectedError); + }); + + it('invokes listAccountsStream without error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ListAccountsRequest() + ); + const expectedResponse = [ + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.Account() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.Account() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.Account() + ), + ]; + client.descriptors.page.listAccounts.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listAccountsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.analytics.admin.v1alpha.Account[] = []; + stream.on( + 'data', + (response: protos.google.analytics.admin.v1alpha.Account) => { + 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.listAccounts.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listAccounts, request) + ); + }); + + it('invokes listAccountsStream with error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ListAccountsRequest() + ); + const expectedError = new Error('expected'); + client.descriptors.page.listAccounts.createStream = stubPageStreamingCall( + undefined, + expectedError + ); + const stream = client.listAccountsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.analytics.admin.v1alpha.Account[] = []; + stream.on( + 'data', + (response: protos.google.analytics.admin.v1alpha.Account) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listAccounts.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listAccounts, request) + ); + }); + + it('uses async iteration with listAccounts without error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ListAccountsRequest() + ); + const expectedResponse = [ + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.Account() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.Account() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.Account() + ), + ]; + client.descriptors.page.listAccounts.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.analytics.admin.v1alpha.IAccount[] = []; + const iterable = client.listAccountsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.listAccounts.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + }); + + it('uses async iteration with listAccounts with error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ListAccountsRequest() + ); + const expectedError = new Error('expected'); + client.descriptors.page.listAccounts.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listAccountsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.analytics.admin.v1alpha.IAccount[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.listAccounts.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + }); + }); + + describe('listAccountSummaries', () => { + it('invokes listAccountSummaries without error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ListAccountSummariesRequest() + ); + const expectedResponse = [ + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.AccountSummary() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.AccountSummary() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.AccountSummary() + ), + ]; + client.innerApiCalls.listAccountSummaries = + stubSimpleCall(expectedResponse); + const [response] = await client.listAccountSummaries(request); + assert.deepStrictEqual(response, expectedResponse); + }); + + it('invokes listAccountSummaries without error using callback', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ListAccountSummariesRequest() + ); + const expectedResponse = [ + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.AccountSummary() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.AccountSummary() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.AccountSummary() + ), + ]; + client.innerApiCalls.listAccountSummaries = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listAccountSummaries( + request, + ( + err?: Error | null, + result?: + | protos.google.analytics.admin.v1alpha.IAccountSummary[] + | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + }); + + it('invokes listAccountSummaries with error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ListAccountSummariesRequest() + ); + const expectedError = new Error('expected'); + client.innerApiCalls.listAccountSummaries = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.listAccountSummaries(request), expectedError); + }); + + it('invokes listAccountSummariesStream without error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ListAccountSummariesRequest() + ); + const expectedResponse = [ + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.AccountSummary() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.AccountSummary() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.AccountSummary() + ), + ]; + client.descriptors.page.listAccountSummaries.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listAccountSummariesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.analytics.admin.v1alpha.AccountSummary[] = + []; + stream.on( + 'data', + (response: protos.google.analytics.admin.v1alpha.AccountSummary) => { + 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.listAccountSummaries.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listAccountSummaries, request) + ); + }); + + it('invokes listAccountSummariesStream with error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ListAccountSummariesRequest() + ); + const expectedError = new Error('expected'); + client.descriptors.page.listAccountSummaries.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.listAccountSummariesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.analytics.admin.v1alpha.AccountSummary[] = + []; + stream.on( + 'data', + (response: protos.google.analytics.admin.v1alpha.AccountSummary) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listAccountSummaries.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listAccountSummaries, request) + ); + }); + + it('uses async iteration with listAccountSummaries without error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ListAccountSummariesRequest() + ); + const expectedResponse = [ + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.AccountSummary() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.AccountSummary() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.AccountSummary() + ), + ]; + client.descriptors.page.listAccountSummaries.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.analytics.admin.v1alpha.IAccountSummary[] = + []; + const iterable = client.listAccountSummariesAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.listAccountSummaries.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + }); + + it('uses async iteration with listAccountSummaries with error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ListAccountSummariesRequest() + ); + const expectedError = new Error('expected'); + client.descriptors.page.listAccountSummaries.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listAccountSummariesAsync(request); + await assert.rejects(async () => { + const responses: protos.google.analytics.admin.v1alpha.IAccountSummary[] = + []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.listAccountSummaries.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + }); + }); + + describe('listProperties', () => { + it('invokes listProperties without error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ListPropertiesRequest() + ); + const expectedResponse = [ + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.Property() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.Property() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.Property() + ), + ]; + client.innerApiCalls.listProperties = stubSimpleCall(expectedResponse); + const [response] = await client.listProperties(request); + assert.deepStrictEqual(response, expectedResponse); + }); + + it('invokes listProperties without error using callback', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ListPropertiesRequest() + ); + const expectedResponse = [ + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.Property() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.Property() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.Property() + ), + ]; + client.innerApiCalls.listProperties = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listProperties( + request, + ( + err?: Error | null, + result?: protos.google.analytics.admin.v1alpha.IProperty[] | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + }); + + it('invokes listProperties with error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ListPropertiesRequest() + ); + const expectedError = new Error('expected'); + client.innerApiCalls.listProperties = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.listProperties(request), expectedError); + }); + + it('invokes listPropertiesStream without error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ListPropertiesRequest() + ); + const expectedResponse = [ + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.Property() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.Property() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.Property() + ), + ]; + client.descriptors.page.listProperties.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listPropertiesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.analytics.admin.v1alpha.Property[] = []; + stream.on( + 'data', + (response: protos.google.analytics.admin.v1alpha.Property) => { + 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.listProperties.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listProperties, request) + ); + }); + + it('invokes listPropertiesStream with error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ListPropertiesRequest() + ); + const expectedError = new Error('expected'); + client.descriptors.page.listProperties.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.listPropertiesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.analytics.admin.v1alpha.Property[] = []; + stream.on( + 'data', + (response: protos.google.analytics.admin.v1alpha.Property) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listProperties.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listProperties, request) + ); + }); + + it('uses async iteration with listProperties without error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ListPropertiesRequest() + ); + const expectedResponse = [ + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.Property() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.Property() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.Property() + ), + ]; + client.descriptors.page.listProperties.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.analytics.admin.v1alpha.IProperty[] = []; + const iterable = client.listPropertiesAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.listProperties.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + }); + + it('uses async iteration with listProperties with error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ListPropertiesRequest() + ); + const expectedError = new Error('expected'); + client.descriptors.page.listProperties.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listPropertiesAsync(request); + await assert.rejects(async () => { + const responses: protos.google.analytics.admin.v1alpha.IProperty[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.listProperties.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + }); + }); + + describe('listUserLinks', () => { + it('invokes listUserLinks without error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ListUserLinksRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.ListUserLinksRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.UserLink() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.UserLink() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.UserLink() + ), + ]; + client.innerApiCalls.listUserLinks = stubSimpleCall(expectedResponse); + const [response] = await client.listUserLinks(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listUserLinks as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listUserLinks as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listUserLinks without error using callback', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ListUserLinksRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.ListUserLinksRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.UserLink() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.UserLink() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.UserLink() + ), + ]; + client.innerApiCalls.listUserLinks = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listUserLinks( + request, + ( + err?: Error | null, + result?: protos.google.analytics.admin.v1alpha.IUserLink[] | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listUserLinks as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listUserLinks as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listUserLinks with error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ListUserLinksRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.ListUserLinksRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listUserLinks = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.listUserLinks(request), expectedError); + const actualRequest = ( + client.innerApiCalls.listUserLinks as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listUserLinks as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listUserLinksStream without error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ListUserLinksRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.ListUserLinksRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.UserLink() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.UserLink() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.UserLink() + ), + ]; + client.descriptors.page.listUserLinks.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listUserLinksStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.analytics.admin.v1alpha.UserLink[] = []; + stream.on( + 'data', + (response: protos.google.analytics.admin.v1alpha.UserLink) => { + 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.listUserLinks.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listUserLinks, request) + ); + assert( + (client.descriptors.page.listUserLinks.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listUserLinksStream with error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ListUserLinksRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.ListUserLinksRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listUserLinks.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.listUserLinksStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.analytics.admin.v1alpha.UserLink[] = []; + stream.on( + 'data', + (response: protos.google.analytics.admin.v1alpha.UserLink) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listUserLinks.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listUserLinks, request) + ); + assert( + (client.descriptors.page.listUserLinks.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listUserLinks without error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ListUserLinksRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.ListUserLinksRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.UserLink() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.UserLink() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.UserLink() + ), + ]; + client.descriptors.page.listUserLinks.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.analytics.admin.v1alpha.IUserLink[] = []; + const iterable = client.listUserLinksAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.listUserLinks.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + (client.descriptors.page.listUserLinks.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listUserLinks with error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ListUserLinksRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.ListUserLinksRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listUserLinks.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listUserLinksAsync(request); + await assert.rejects(async () => { + const responses: protos.google.analytics.admin.v1alpha.IUserLink[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.listUserLinks.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + (client.descriptors.page.listUserLinks.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('auditUserLinks', () => { + it('invokes auditUserLinks without error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.AuditUserLinksRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.AuditUserLinksRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.AuditUserLink() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.AuditUserLink() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.AuditUserLink() + ), + ]; + client.innerApiCalls.auditUserLinks = stubSimpleCall(expectedResponse); + const [response] = await client.auditUserLinks(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.auditUserLinks as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.auditUserLinks as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes auditUserLinks without error using callback', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.AuditUserLinksRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.AuditUserLinksRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.AuditUserLink() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.AuditUserLink() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.AuditUserLink() + ), + ]; + client.innerApiCalls.auditUserLinks = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.auditUserLinks( + request, + ( + err?: Error | null, + result?: + | protos.google.analytics.admin.v1alpha.IAuditUserLink[] + | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.auditUserLinks as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.auditUserLinks as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes auditUserLinks with error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.AuditUserLinksRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.AuditUserLinksRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.auditUserLinks = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.auditUserLinks(request), expectedError); + const actualRequest = ( + client.innerApiCalls.auditUserLinks as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.auditUserLinks as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes auditUserLinksStream without error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.AuditUserLinksRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.AuditUserLinksRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.AuditUserLink() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.AuditUserLink() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.AuditUserLink() + ), + ]; + client.descriptors.page.auditUserLinks.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.auditUserLinksStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.analytics.admin.v1alpha.AuditUserLink[] = + []; + stream.on( + 'data', + (response: protos.google.analytics.admin.v1alpha.AuditUserLink) => { + 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.auditUserLinks.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.auditUserLinks, request) + ); + assert( + (client.descriptors.page.auditUserLinks.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes auditUserLinksStream with error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.AuditUserLinksRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.AuditUserLinksRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.auditUserLinks.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.auditUserLinksStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.analytics.admin.v1alpha.AuditUserLink[] = + []; + stream.on( + 'data', + (response: protos.google.analytics.admin.v1alpha.AuditUserLink) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.auditUserLinks.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.auditUserLinks, request) + ); + assert( + (client.descriptors.page.auditUserLinks.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with auditUserLinks without error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.AuditUserLinksRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.AuditUserLinksRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.AuditUserLink() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.AuditUserLink() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.AuditUserLink() + ), + ]; + client.descriptors.page.auditUserLinks.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.analytics.admin.v1alpha.IAuditUserLink[] = + []; + const iterable = client.auditUserLinksAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.auditUserLinks.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + (client.descriptors.page.auditUserLinks.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with auditUserLinks with error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.AuditUserLinksRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.AuditUserLinksRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.auditUserLinks.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.auditUserLinksAsync(request); + await assert.rejects(async () => { + const responses: protos.google.analytics.admin.v1alpha.IAuditUserLink[] = + []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.auditUserLinks.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + (client.descriptors.page.auditUserLinks.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('listFirebaseLinks', () => { + it('invokes listFirebaseLinks without error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ListFirebaseLinksRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.ListFirebaseLinksRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.FirebaseLink() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.FirebaseLink() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.FirebaseLink() + ), + ]; + client.innerApiCalls.listFirebaseLinks = stubSimpleCall(expectedResponse); + const [response] = await client.listFirebaseLinks(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listFirebaseLinks as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listFirebaseLinks as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listFirebaseLinks without error using callback', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ListFirebaseLinksRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.ListFirebaseLinksRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.FirebaseLink() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.FirebaseLink() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.FirebaseLink() + ), + ]; + client.innerApiCalls.listFirebaseLinks = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listFirebaseLinks( + request, + ( + err?: Error | null, + result?: + | protos.google.analytics.admin.v1alpha.IFirebaseLink[] + | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listFirebaseLinks as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listFirebaseLinks as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listFirebaseLinks with error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ListFirebaseLinksRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.ListFirebaseLinksRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listFirebaseLinks = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.listFirebaseLinks(request), expectedError); + const actualRequest = ( + client.innerApiCalls.listFirebaseLinks as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listFirebaseLinks as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listFirebaseLinksStream without error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ListFirebaseLinksRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.ListFirebaseLinksRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.FirebaseLink() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.FirebaseLink() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.FirebaseLink() + ), + ]; + client.descriptors.page.listFirebaseLinks.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listFirebaseLinksStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.analytics.admin.v1alpha.FirebaseLink[] = + []; + stream.on( + 'data', + (response: protos.google.analytics.admin.v1alpha.FirebaseLink) => { + 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.listFirebaseLinks.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listFirebaseLinks, request) + ); + assert( + (client.descriptors.page.listFirebaseLinks.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listFirebaseLinksStream with error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ListFirebaseLinksRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.ListFirebaseLinksRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listFirebaseLinks.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.listFirebaseLinksStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.analytics.admin.v1alpha.FirebaseLink[] = + []; + stream.on( + 'data', + (response: protos.google.analytics.admin.v1alpha.FirebaseLink) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listFirebaseLinks.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listFirebaseLinks, request) + ); + assert( + (client.descriptors.page.listFirebaseLinks.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listFirebaseLinks without error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ListFirebaseLinksRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.ListFirebaseLinksRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.FirebaseLink() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.FirebaseLink() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.FirebaseLink() + ), + ]; + client.descriptors.page.listFirebaseLinks.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.analytics.admin.v1alpha.IFirebaseLink[] = + []; + const iterable = client.listFirebaseLinksAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.listFirebaseLinks.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + (client.descriptors.page.listFirebaseLinks.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listFirebaseLinks with error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ListFirebaseLinksRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.ListFirebaseLinksRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listFirebaseLinks.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listFirebaseLinksAsync(request); + await assert.rejects(async () => { + const responses: protos.google.analytics.admin.v1alpha.IFirebaseLink[] = + []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.listFirebaseLinks.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + (client.descriptors.page.listFirebaseLinks.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('listGoogleAdsLinks', () => { + it('invokes listGoogleAdsLinks without error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ListGoogleAdsLinksRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.ListGoogleAdsLinksRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.GoogleAdsLink() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.GoogleAdsLink() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.GoogleAdsLink() + ), + ]; + client.innerApiCalls.listGoogleAdsLinks = + stubSimpleCall(expectedResponse); + const [response] = await client.listGoogleAdsLinks(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listGoogleAdsLinks as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listGoogleAdsLinks as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listGoogleAdsLinks without error using callback', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ListGoogleAdsLinksRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.ListGoogleAdsLinksRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.GoogleAdsLink() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.GoogleAdsLink() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.GoogleAdsLink() + ), + ]; + client.innerApiCalls.listGoogleAdsLinks = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listGoogleAdsLinks( + request, + ( + err?: Error | null, + result?: + | protos.google.analytics.admin.v1alpha.IGoogleAdsLink[] + | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listGoogleAdsLinks as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listGoogleAdsLinks as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listGoogleAdsLinks with error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ListGoogleAdsLinksRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.ListGoogleAdsLinksRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listGoogleAdsLinks = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.listGoogleAdsLinks(request), expectedError); + const actualRequest = ( + client.innerApiCalls.listGoogleAdsLinks as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listGoogleAdsLinks as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listGoogleAdsLinksStream without error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ListGoogleAdsLinksRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.ListGoogleAdsLinksRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.GoogleAdsLink() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.GoogleAdsLink() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.GoogleAdsLink() + ), + ]; + client.descriptors.page.listGoogleAdsLinks.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listGoogleAdsLinksStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.analytics.admin.v1alpha.GoogleAdsLink[] = + []; + stream.on( + 'data', + (response: protos.google.analytics.admin.v1alpha.GoogleAdsLink) => { + 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.listGoogleAdsLinks.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listGoogleAdsLinks, request) + ); + assert( + (client.descriptors.page.listGoogleAdsLinks.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listGoogleAdsLinksStream with error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ListGoogleAdsLinksRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.ListGoogleAdsLinksRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listGoogleAdsLinks.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.listGoogleAdsLinksStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.analytics.admin.v1alpha.GoogleAdsLink[] = + []; + stream.on( + 'data', + (response: protos.google.analytics.admin.v1alpha.GoogleAdsLink) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listGoogleAdsLinks.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listGoogleAdsLinks, request) + ); + assert( + (client.descriptors.page.listGoogleAdsLinks.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listGoogleAdsLinks without error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ListGoogleAdsLinksRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.ListGoogleAdsLinksRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.GoogleAdsLink() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.GoogleAdsLink() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.GoogleAdsLink() + ), + ]; + client.descriptors.page.listGoogleAdsLinks.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.analytics.admin.v1alpha.IGoogleAdsLink[] = + []; + const iterable = client.listGoogleAdsLinksAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.listGoogleAdsLinks.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + (client.descriptors.page.listGoogleAdsLinks.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listGoogleAdsLinks with error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ListGoogleAdsLinksRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.ListGoogleAdsLinksRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listGoogleAdsLinks.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listGoogleAdsLinksAsync(request); + await assert.rejects(async () => { + const responses: protos.google.analytics.admin.v1alpha.IGoogleAdsLink[] = + []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.listGoogleAdsLinks.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + (client.descriptors.page.listGoogleAdsLinks.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('listMeasurementProtocolSecrets', () => { + it('invokes listMeasurementProtocolSecrets without error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ListMeasurementProtocolSecretsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.ListMeasurementProtocolSecretsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.MeasurementProtocolSecret() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.MeasurementProtocolSecret() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.MeasurementProtocolSecret() + ), + ]; + client.innerApiCalls.listMeasurementProtocolSecrets = + stubSimpleCall(expectedResponse); + const [response] = await client.listMeasurementProtocolSecrets(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listMeasurementProtocolSecrets as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listMeasurementProtocolSecrets as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listMeasurementProtocolSecrets without error using callback', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ListMeasurementProtocolSecretsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.ListMeasurementProtocolSecretsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.MeasurementProtocolSecret() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.MeasurementProtocolSecret() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.MeasurementProtocolSecret() + ), + ]; + client.innerApiCalls.listMeasurementProtocolSecrets = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listMeasurementProtocolSecrets( + request, + ( + err?: Error | null, + result?: + | protos.google.analytics.admin.v1alpha.IMeasurementProtocolSecret[] + | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listMeasurementProtocolSecrets as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listMeasurementProtocolSecrets as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listMeasurementProtocolSecrets with error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ListMeasurementProtocolSecretsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.ListMeasurementProtocolSecretsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listMeasurementProtocolSecrets = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.listMeasurementProtocolSecrets(request), + expectedError + ); + const actualRequest = ( + client.innerApiCalls.listMeasurementProtocolSecrets as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listMeasurementProtocolSecrets as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listMeasurementProtocolSecretsStream without error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ListMeasurementProtocolSecretsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.ListMeasurementProtocolSecretsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.MeasurementProtocolSecret() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.MeasurementProtocolSecret() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.MeasurementProtocolSecret() + ), + ]; + client.descriptors.page.listMeasurementProtocolSecrets.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listMeasurementProtocolSecretsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.analytics.admin.v1alpha.MeasurementProtocolSecret[] = + []; + stream.on( + 'data', + ( + response: protos.google.analytics.admin.v1alpha.MeasurementProtocolSecret + ) => { + 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.listMeasurementProtocolSecrets + .createStream as SinonStub + ) + .getCall(0) + .calledWith( + client.innerApiCalls.listMeasurementProtocolSecrets, + request + ) + ); + assert( + ( + client.descriptors.page.listMeasurementProtocolSecrets + .createStream as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listMeasurementProtocolSecretsStream with error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ListMeasurementProtocolSecretsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.ListMeasurementProtocolSecretsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listMeasurementProtocolSecrets.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.listMeasurementProtocolSecretsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.analytics.admin.v1alpha.MeasurementProtocolSecret[] = + []; + stream.on( + 'data', + ( + response: protos.google.analytics.admin.v1alpha.MeasurementProtocolSecret + ) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + ( + client.descriptors.page.listMeasurementProtocolSecrets + .createStream as SinonStub + ) + .getCall(0) + .calledWith( + client.innerApiCalls.listMeasurementProtocolSecrets, + request + ) + ); + assert( + ( + client.descriptors.page.listMeasurementProtocolSecrets + .createStream as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listMeasurementProtocolSecrets without error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ListMeasurementProtocolSecretsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.ListMeasurementProtocolSecretsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.MeasurementProtocolSecret() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.MeasurementProtocolSecret() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.MeasurementProtocolSecret() + ), + ]; + client.descriptors.page.listMeasurementProtocolSecrets.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.analytics.admin.v1alpha.IMeasurementProtocolSecret[] = + []; + const iterable = client.listMeasurementProtocolSecretsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.listMeasurementProtocolSecrets + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + ( + client.descriptors.page.listMeasurementProtocolSecrets + .asyncIterate as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listMeasurementProtocolSecrets with error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ListMeasurementProtocolSecretsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.ListMeasurementProtocolSecretsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listMeasurementProtocolSecrets.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listMeasurementProtocolSecretsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.analytics.admin.v1alpha.IMeasurementProtocolSecret[] = + []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.listMeasurementProtocolSecrets + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + ( + client.descriptors.page.listMeasurementProtocolSecrets + .asyncIterate as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('searchChangeHistoryEvents', () => { + it('invokes searchChangeHistoryEvents without error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.SearchChangeHistoryEventsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.SearchChangeHistoryEventsRequest', + ['account'] + ); + request.account = defaultValue1; + const expectedHeaderRequestParams = `account=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ChangeHistoryEvent() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ChangeHistoryEvent() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ChangeHistoryEvent() + ), + ]; + client.innerApiCalls.searchChangeHistoryEvents = + stubSimpleCall(expectedResponse); + const [response] = await client.searchChangeHistoryEvents(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.searchChangeHistoryEvents as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.searchChangeHistoryEvents as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes searchChangeHistoryEvents without error using callback', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.SearchChangeHistoryEventsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.SearchChangeHistoryEventsRequest', + ['account'] + ); + request.account = defaultValue1; + const expectedHeaderRequestParams = `account=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ChangeHistoryEvent() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ChangeHistoryEvent() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ChangeHistoryEvent() + ), + ]; + client.innerApiCalls.searchChangeHistoryEvents = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.searchChangeHistoryEvents( + request, + ( + err?: Error | null, + result?: + | protos.google.analytics.admin.v1alpha.IChangeHistoryEvent[] + | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.searchChangeHistoryEvents as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.searchChangeHistoryEvents as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes searchChangeHistoryEvents with error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.SearchChangeHistoryEventsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.SearchChangeHistoryEventsRequest', + ['account'] + ); + request.account = defaultValue1; + const expectedHeaderRequestParams = `account=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.searchChangeHistoryEvents = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.searchChangeHistoryEvents(request), + expectedError + ); + const actualRequest = ( + client.innerApiCalls.searchChangeHistoryEvents as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.searchChangeHistoryEvents as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes searchChangeHistoryEventsStream without error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.SearchChangeHistoryEventsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.SearchChangeHistoryEventsRequest', + ['account'] + ); + request.account = defaultValue1; + const expectedHeaderRequestParams = `account=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ChangeHistoryEvent() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ChangeHistoryEvent() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ChangeHistoryEvent() + ), + ]; + client.descriptors.page.searchChangeHistoryEvents.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.searchChangeHistoryEventsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.analytics.admin.v1alpha.ChangeHistoryEvent[] = + []; + stream.on( + 'data', + ( + response: protos.google.analytics.admin.v1alpha.ChangeHistoryEvent + ) => { + 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.searchChangeHistoryEvents + .createStream as SinonStub + ) + .getCall(0) + .calledWith(client.innerApiCalls.searchChangeHistoryEvents, request) + ); + assert( + ( + client.descriptors.page.searchChangeHistoryEvents + .createStream as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes searchChangeHistoryEventsStream with error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.SearchChangeHistoryEventsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.SearchChangeHistoryEventsRequest', + ['account'] + ); + request.account = defaultValue1; + const expectedHeaderRequestParams = `account=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.searchChangeHistoryEvents.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.searchChangeHistoryEventsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.analytics.admin.v1alpha.ChangeHistoryEvent[] = + []; + stream.on( + 'data', + ( + response: protos.google.analytics.admin.v1alpha.ChangeHistoryEvent + ) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + ( + client.descriptors.page.searchChangeHistoryEvents + .createStream as SinonStub + ) + .getCall(0) + .calledWith(client.innerApiCalls.searchChangeHistoryEvents, request) + ); + assert( + ( + client.descriptors.page.searchChangeHistoryEvents + .createStream as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with searchChangeHistoryEvents without error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.SearchChangeHistoryEventsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.SearchChangeHistoryEventsRequest', + ['account'] + ); + request.account = defaultValue1; + const expectedHeaderRequestParams = `account=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ChangeHistoryEvent() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ChangeHistoryEvent() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ChangeHistoryEvent() + ), + ]; + client.descriptors.page.searchChangeHistoryEvents.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.analytics.admin.v1alpha.IChangeHistoryEvent[] = + []; + const iterable = client.searchChangeHistoryEventsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.searchChangeHistoryEvents + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + ( + client.descriptors.page.searchChangeHistoryEvents + .asyncIterate as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with searchChangeHistoryEvents with error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.SearchChangeHistoryEventsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.SearchChangeHistoryEventsRequest', + ['account'] + ); + request.account = defaultValue1; + const expectedHeaderRequestParams = `account=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.searchChangeHistoryEvents.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.searchChangeHistoryEventsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.analytics.admin.v1alpha.IChangeHistoryEvent[] = + []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.searchChangeHistoryEvents + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + ( + client.descriptors.page.searchChangeHistoryEvents + .asyncIterate as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('listConversionEvents', () => { + it('invokes listConversionEvents without error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ListConversionEventsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.ListConversionEventsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ConversionEvent() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ConversionEvent() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ConversionEvent() + ), + ]; + client.innerApiCalls.listConversionEvents = + stubSimpleCall(expectedResponse); + const [response] = await client.listConversionEvents(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listConversionEvents as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listConversionEvents as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listConversionEvents without error using callback', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ListConversionEventsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.ListConversionEventsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ConversionEvent() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ConversionEvent() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ConversionEvent() + ), + ]; + client.innerApiCalls.listConversionEvents = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listConversionEvents( + request, + ( + err?: Error | null, + result?: + | protos.google.analytics.admin.v1alpha.IConversionEvent[] + | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listConversionEvents as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listConversionEvents as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listConversionEvents with error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ListConversionEventsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.ListConversionEventsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listConversionEvents = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.listConversionEvents(request), expectedError); + const actualRequest = ( + client.innerApiCalls.listConversionEvents as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listConversionEvents as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listConversionEventsStream without error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ListConversionEventsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.ListConversionEventsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ConversionEvent() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ConversionEvent() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ConversionEvent() + ), + ]; + client.descriptors.page.listConversionEvents.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listConversionEventsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.analytics.admin.v1alpha.ConversionEvent[] = + []; + stream.on( + 'data', + (response: protos.google.analytics.admin.v1alpha.ConversionEvent) => { + 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.listConversionEvents.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listConversionEvents, request) + ); + assert( + (client.descriptors.page.listConversionEvents.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listConversionEventsStream with error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ListConversionEventsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.ListConversionEventsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listConversionEvents.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.listConversionEventsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.analytics.admin.v1alpha.ConversionEvent[] = + []; + stream.on( + 'data', + (response: protos.google.analytics.admin.v1alpha.ConversionEvent) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listConversionEvents.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listConversionEvents, request) + ); + assert( + (client.descriptors.page.listConversionEvents.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listConversionEvents without error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ListConversionEventsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.ListConversionEventsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ConversionEvent() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ConversionEvent() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ConversionEvent() + ), + ]; + client.descriptors.page.listConversionEvents.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.analytics.admin.v1alpha.IConversionEvent[] = + []; + const iterable = client.listConversionEventsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.listConversionEvents.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + (client.descriptors.page.listConversionEvents.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listConversionEvents with error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ListConversionEventsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.ListConversionEventsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listConversionEvents.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listConversionEventsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.analytics.admin.v1alpha.IConversionEvent[] = + []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.listConversionEvents.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + (client.descriptors.page.listConversionEvents.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('listDisplayVideo360AdvertiserLinks', () => { + it('invokes listDisplayVideo360AdvertiserLinks without error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinksRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinksRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink() + ), + ]; + client.innerApiCalls.listDisplayVideo360AdvertiserLinks = + stubSimpleCall(expectedResponse); + const [response] = await client.listDisplayVideo360AdvertiserLinks( + request + ); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listDisplayVideo360AdvertiserLinks as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listDisplayVideo360AdvertiserLinks as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listDisplayVideo360AdvertiserLinks without error using callback', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinksRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinksRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink() + ), + ]; + client.innerApiCalls.listDisplayVideo360AdvertiserLinks = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listDisplayVideo360AdvertiserLinks( + request, + ( + err?: Error | null, + result?: + | protos.google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLink[] + | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listDisplayVideo360AdvertiserLinks as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listDisplayVideo360AdvertiserLinks as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listDisplayVideo360AdvertiserLinks with error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinksRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinksRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listDisplayVideo360AdvertiserLinks = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.listDisplayVideo360AdvertiserLinks(request), + expectedError + ); + const actualRequest = ( + client.innerApiCalls.listDisplayVideo360AdvertiserLinks as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listDisplayVideo360AdvertiserLinks as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listDisplayVideo360AdvertiserLinksStream without error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinksRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinksRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink() + ), + ]; + client.descriptors.page.listDisplayVideo360AdvertiserLinks.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listDisplayVideo360AdvertiserLinksStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink[] = + []; + stream.on( + 'data', + ( + response: protos.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink + ) => { + 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.listDisplayVideo360AdvertiserLinks + .createStream as SinonStub + ) + .getCall(0) + .calledWith( + client.innerApiCalls.listDisplayVideo360AdvertiserLinks, + request + ) + ); + assert( + ( + client.descriptors.page.listDisplayVideo360AdvertiserLinks + .createStream as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listDisplayVideo360AdvertiserLinksStream with error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinksRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinksRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listDisplayVideo360AdvertiserLinks.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.listDisplayVideo360AdvertiserLinksStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink[] = + []; + stream.on( + 'data', + ( + response: protos.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink + ) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + ( + client.descriptors.page.listDisplayVideo360AdvertiserLinks + .createStream as SinonStub + ) + .getCall(0) + .calledWith( + client.innerApiCalls.listDisplayVideo360AdvertiserLinks, + request + ) + ); + assert( + ( + client.descriptors.page.listDisplayVideo360AdvertiserLinks + .createStream as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listDisplayVideo360AdvertiserLinks without error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinksRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinksRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLink() + ), + ]; + client.descriptors.page.listDisplayVideo360AdvertiserLinks.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLink[] = + []; + const iterable = client.listDisplayVideo360AdvertiserLinksAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.listDisplayVideo360AdvertiserLinks + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + ( + client.descriptors.page.listDisplayVideo360AdvertiserLinks + .asyncIterate as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listDisplayVideo360AdvertiserLinks with error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinksRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinksRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listDisplayVideo360AdvertiserLinks.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listDisplayVideo360AdvertiserLinksAsync(request); + await assert.rejects(async () => { + const responses: protos.google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLink[] = + []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.listDisplayVideo360AdvertiserLinks + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + ( + client.descriptors.page.listDisplayVideo360AdvertiserLinks + .asyncIterate as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('listDisplayVideo360AdvertiserLinkProposals', () => { + it('invokes listDisplayVideo360AdvertiserLinkProposals without error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinkProposalsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinkProposalsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal() + ), + ]; + client.innerApiCalls.listDisplayVideo360AdvertiserLinkProposals = + stubSimpleCall(expectedResponse); + const [response] = + await client.listDisplayVideo360AdvertiserLinkProposals(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls + .listDisplayVideo360AdvertiserLinkProposals as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls + .listDisplayVideo360AdvertiserLinkProposals as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listDisplayVideo360AdvertiserLinkProposals without error using callback', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinkProposalsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinkProposalsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal() + ), + ]; + client.innerApiCalls.listDisplayVideo360AdvertiserLinkProposals = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listDisplayVideo360AdvertiserLinkProposals( + request, + ( + err?: Error | null, + result?: + | protos.google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLinkProposal[] + | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls + .listDisplayVideo360AdvertiserLinkProposals as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls + .listDisplayVideo360AdvertiserLinkProposals as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listDisplayVideo360AdvertiserLinkProposals with error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinkProposalsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinkProposalsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listDisplayVideo360AdvertiserLinkProposals = + stubSimpleCall(undefined, expectedError); + await assert.rejects( + client.listDisplayVideo360AdvertiserLinkProposals(request), + expectedError + ); + const actualRequest = ( + client.innerApiCalls + .listDisplayVideo360AdvertiserLinkProposals as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls + .listDisplayVideo360AdvertiserLinkProposals as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listDisplayVideo360AdvertiserLinkProposalsStream without error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinkProposalsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinkProposalsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal() + ), + ]; + client.descriptors.page.listDisplayVideo360AdvertiserLinkProposals.createStream = + stubPageStreamingCall(expectedResponse); + const stream = + client.listDisplayVideo360AdvertiserLinkProposalsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal[] = + []; + stream.on( + 'data', + ( + response: protos.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal + ) => { + 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.listDisplayVideo360AdvertiserLinkProposals + .createStream as SinonStub + ) + .getCall(0) + .calledWith( + client.innerApiCalls.listDisplayVideo360AdvertiserLinkProposals, + request + ) + ); + assert( + ( + client.descriptors.page.listDisplayVideo360AdvertiserLinkProposals + .createStream as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listDisplayVideo360AdvertiserLinkProposalsStream with error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinkProposalsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinkProposalsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listDisplayVideo360AdvertiserLinkProposals.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = + client.listDisplayVideo360AdvertiserLinkProposalsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal[] = + []; + stream.on( + 'data', + ( + response: protos.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal + ) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + ( + client.descriptors.page.listDisplayVideo360AdvertiserLinkProposals + .createStream as SinonStub + ) + .getCall(0) + .calledWith( + client.innerApiCalls.listDisplayVideo360AdvertiserLinkProposals, + request + ) + ); + assert( + ( + client.descriptors.page.listDisplayVideo360AdvertiserLinkProposals + .createStream as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listDisplayVideo360AdvertiserLinkProposals without error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinkProposalsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinkProposalsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.DisplayVideo360AdvertiserLinkProposal() + ), + ]; + client.descriptors.page.listDisplayVideo360AdvertiserLinkProposals.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLinkProposal[] = + []; + const iterable = + client.listDisplayVideo360AdvertiserLinkProposalsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.listDisplayVideo360AdvertiserLinkProposals + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + ( + client.descriptors.page.listDisplayVideo360AdvertiserLinkProposals + .asyncIterate as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listDisplayVideo360AdvertiserLinkProposals with error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinkProposalsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.ListDisplayVideo360AdvertiserLinkProposalsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listDisplayVideo360AdvertiserLinkProposals.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = + client.listDisplayVideo360AdvertiserLinkProposalsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.analytics.admin.v1alpha.IDisplayVideo360AdvertiserLinkProposal[] = + []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.listDisplayVideo360AdvertiserLinkProposals + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + ( + client.descriptors.page.listDisplayVideo360AdvertiserLinkProposals + .asyncIterate as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('listCustomDimensions', () => { + it('invokes listCustomDimensions without error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ListCustomDimensionsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.ListCustomDimensionsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.CustomDimension() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.CustomDimension() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.CustomDimension() + ), + ]; + client.innerApiCalls.listCustomDimensions = + stubSimpleCall(expectedResponse); + const [response] = await client.listCustomDimensions(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listCustomDimensions as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listCustomDimensions as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listCustomDimensions without error using callback', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ListCustomDimensionsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.ListCustomDimensionsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.CustomDimension() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.CustomDimension() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.CustomDimension() + ), + ]; + client.innerApiCalls.listCustomDimensions = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listCustomDimensions( + request, + ( + err?: Error | null, + result?: + | protos.google.analytics.admin.v1alpha.ICustomDimension[] + | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listCustomDimensions as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listCustomDimensions as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listCustomDimensions with error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ListCustomDimensionsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.ListCustomDimensionsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listCustomDimensions = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.listCustomDimensions(request), expectedError); + const actualRequest = ( + client.innerApiCalls.listCustomDimensions as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listCustomDimensions as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listCustomDimensionsStream without error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ListCustomDimensionsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.ListCustomDimensionsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.CustomDimension() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.CustomDimension() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.CustomDimension() + ), + ]; + client.descriptors.page.listCustomDimensions.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listCustomDimensionsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.analytics.admin.v1alpha.CustomDimension[] = + []; + stream.on( + 'data', + (response: protos.google.analytics.admin.v1alpha.CustomDimension) => { + 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.listCustomDimensions.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listCustomDimensions, request) + ); + assert( + (client.descriptors.page.listCustomDimensions.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listCustomDimensionsStream with error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ListCustomDimensionsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.ListCustomDimensionsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listCustomDimensions.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.listCustomDimensionsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.analytics.admin.v1alpha.CustomDimension[] = + []; + stream.on( + 'data', + (response: protos.google.analytics.admin.v1alpha.CustomDimension) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listCustomDimensions.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listCustomDimensions, request) + ); + assert( + (client.descriptors.page.listCustomDimensions.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listCustomDimensions without error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ListCustomDimensionsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.ListCustomDimensionsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.CustomDimension() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.CustomDimension() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.CustomDimension() + ), + ]; + client.descriptors.page.listCustomDimensions.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.analytics.admin.v1alpha.ICustomDimension[] = + []; + const iterable = client.listCustomDimensionsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.listCustomDimensions.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + (client.descriptors.page.listCustomDimensions.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listCustomDimensions with error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ListCustomDimensionsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.ListCustomDimensionsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listCustomDimensions.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listCustomDimensionsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.analytics.admin.v1alpha.ICustomDimension[] = + []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.listCustomDimensions.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + (client.descriptors.page.listCustomDimensions.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('listCustomMetrics', () => { + it('invokes listCustomMetrics without error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ListCustomMetricsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.ListCustomMetricsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.CustomMetric() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.CustomMetric() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.CustomMetric() + ), + ]; + client.innerApiCalls.listCustomMetrics = stubSimpleCall(expectedResponse); + const [response] = await client.listCustomMetrics(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listCustomMetrics as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listCustomMetrics as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listCustomMetrics without error using callback', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ListCustomMetricsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.ListCustomMetricsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.CustomMetric() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.CustomMetric() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.CustomMetric() + ), + ]; + client.innerApiCalls.listCustomMetrics = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listCustomMetrics( + request, + ( + err?: Error | null, + result?: + | protos.google.analytics.admin.v1alpha.ICustomMetric[] + | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listCustomMetrics as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listCustomMetrics as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listCustomMetrics with error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ListCustomMetricsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.ListCustomMetricsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listCustomMetrics = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.listCustomMetrics(request), expectedError); + const actualRequest = ( + client.innerApiCalls.listCustomMetrics as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listCustomMetrics as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listCustomMetricsStream without error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ListCustomMetricsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.ListCustomMetricsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.CustomMetric() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.CustomMetric() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.CustomMetric() + ), + ]; + client.descriptors.page.listCustomMetrics.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listCustomMetricsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.analytics.admin.v1alpha.CustomMetric[] = + []; + stream.on( + 'data', + (response: protos.google.analytics.admin.v1alpha.CustomMetric) => { + 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.listCustomMetrics.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listCustomMetrics, request) + ); + assert( + (client.descriptors.page.listCustomMetrics.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listCustomMetricsStream with error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ListCustomMetricsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.ListCustomMetricsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listCustomMetrics.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.listCustomMetricsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.analytics.admin.v1alpha.CustomMetric[] = + []; + stream.on( + 'data', + (response: protos.google.analytics.admin.v1alpha.CustomMetric) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listCustomMetrics.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listCustomMetrics, request) + ); + assert( + (client.descriptors.page.listCustomMetrics.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listCustomMetrics without error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ListCustomMetricsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.ListCustomMetricsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.CustomMetric() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.CustomMetric() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.CustomMetric() + ), + ]; + client.descriptors.page.listCustomMetrics.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.analytics.admin.v1alpha.ICustomMetric[] = + []; + const iterable = client.listCustomMetricsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.listCustomMetrics.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + (client.descriptors.page.listCustomMetrics.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listCustomMetrics with error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ListCustomMetricsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.ListCustomMetricsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listCustomMetrics.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listCustomMetricsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.analytics.admin.v1alpha.ICustomMetric[] = + []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.listCustomMetrics.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + (client.descriptors.page.listCustomMetrics.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('listDataStreams', () => { + it('invokes listDataStreams without error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ListDataStreamsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.ListDataStreamsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.DataStream() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.DataStream() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.DataStream() + ), + ]; + client.innerApiCalls.listDataStreams = stubSimpleCall(expectedResponse); + const [response] = await client.listDataStreams(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listDataStreams as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listDataStreams as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listDataStreams without error using callback', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ListDataStreamsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.ListDataStreamsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.DataStream() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.DataStream() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.DataStream() + ), + ]; + client.innerApiCalls.listDataStreams = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listDataStreams( + request, + ( + err?: Error | null, + result?: protos.google.analytics.admin.v1alpha.IDataStream[] | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listDataStreams as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listDataStreams as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listDataStreams with error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ListDataStreamsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.ListDataStreamsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listDataStreams = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.listDataStreams(request), expectedError); + const actualRequest = ( + client.innerApiCalls.listDataStreams as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listDataStreams as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listDataStreamsStream without error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ListDataStreamsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.ListDataStreamsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.DataStream() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.DataStream() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.DataStream() + ), + ]; + client.descriptors.page.listDataStreams.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listDataStreamsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.analytics.admin.v1alpha.DataStream[] = + []; + stream.on( + 'data', + (response: protos.google.analytics.admin.v1alpha.DataStream) => { + 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.listDataStreams.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listDataStreams, request) + ); + assert( + (client.descriptors.page.listDataStreams.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listDataStreamsStream with error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ListDataStreamsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.ListDataStreamsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listDataStreams.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.listDataStreamsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.analytics.admin.v1alpha.DataStream[] = + []; + stream.on( + 'data', + (response: protos.google.analytics.admin.v1alpha.DataStream) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listDataStreams.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listDataStreams, request) + ); + assert( + (client.descriptors.page.listDataStreams.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listDataStreams without error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ListDataStreamsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.ListDataStreamsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.DataStream() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.DataStream() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.DataStream() + ), + ]; + client.descriptors.page.listDataStreams.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.analytics.admin.v1alpha.IDataStream[] = []; + const iterable = client.listDataStreamsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.listDataStreams.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + (client.descriptors.page.listDataStreams.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listDataStreams with error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ListDataStreamsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.ListDataStreamsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listDataStreams.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listDataStreamsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.analytics.admin.v1alpha.IDataStream[] = + []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.listDataStreams.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + (client.descriptors.page.listDataStreams.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('listAudiences', () => { + it('invokes listAudiences without error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ListAudiencesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.ListAudiencesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.Audience() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.Audience() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.Audience() + ), + ]; + client.innerApiCalls.listAudiences = stubSimpleCall(expectedResponse); + const [response] = await client.listAudiences(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listAudiences as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listAudiences as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listAudiences without error using callback', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ListAudiencesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.ListAudiencesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.Audience() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.Audience() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.Audience() + ), + ]; + client.innerApiCalls.listAudiences = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listAudiences( + request, + ( + err?: Error | null, + result?: protos.google.analytics.admin.v1alpha.IAudience[] | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listAudiences as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listAudiences as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listAudiences with error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ListAudiencesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.ListAudiencesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listAudiences = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.listAudiences(request), expectedError); + const actualRequest = ( + client.innerApiCalls.listAudiences as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listAudiences as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listAudiencesStream without error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ListAudiencesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.ListAudiencesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.Audience() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.Audience() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.Audience() + ), + ]; + client.descriptors.page.listAudiences.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listAudiencesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.analytics.admin.v1alpha.Audience[] = []; + stream.on( + 'data', + (response: protos.google.analytics.admin.v1alpha.Audience) => { + 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.listAudiences.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listAudiences, request) + ); + assert( + (client.descriptors.page.listAudiences.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listAudiencesStream with error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ListAudiencesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.ListAudiencesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listAudiences.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.listAudiencesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.analytics.admin.v1alpha.Audience[] = []; + stream.on( + 'data', + (response: protos.google.analytics.admin.v1alpha.Audience) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listAudiences.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listAudiences, request) + ); + assert( + (client.descriptors.page.listAudiences.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listAudiences without error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ListAudiencesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.ListAudiencesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.Audience() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.Audience() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1alpha.Audience() + ), + ]; + client.descriptors.page.listAudiences.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.analytics.admin.v1alpha.IAudience[] = []; + const iterable = client.listAudiencesAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.listAudiences.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + (client.descriptors.page.listAudiences.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listAudiences with error', async () => { + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1alpha.ListAudiencesRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1alpha.ListAudiencesRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listAudiences.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listAudiencesAsync(request); + await assert.rejects(async () => { + const responses: protos.google.analytics.admin.v1alpha.IAudience[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.listAudiences.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + (client.descriptors.page.listAudiences.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('Path templates', () => { + describe('account', () => { + const fakePath = '/rendered/path/account'; + const expectedParameters = { + account: 'accountValue', + }; + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.accountPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.accountPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('accountPath', () => { + const result = client.accountPath('accountValue'); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.accountPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchAccountFromAccountName', () => { + const result = client.matchAccountFromAccountName(fakePath); + assert.strictEqual(result, 'accountValue'); + assert( + (client.pathTemplates.accountPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('accountSummary', () => { + const fakePath = '/rendered/path/accountSummary'; + const expectedParameters = { + account_summary: 'accountSummaryValue', + }; + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.accountSummaryPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.accountSummaryPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('accountSummaryPath', () => { + const result = client.accountSummaryPath('accountSummaryValue'); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.accountSummaryPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchAccountSummaryFromAccountSummaryName', () => { + const result = + client.matchAccountSummaryFromAccountSummaryName(fakePath); + assert.strictEqual(result, 'accountSummaryValue'); + assert( + (client.pathTemplates.accountSummaryPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('accountUserLink', () => { + const fakePath = '/rendered/path/accountUserLink'; + const expectedParameters = { + account: 'accountValue', + user_link: 'userLinkValue', + }; + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.accountUserLinkPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.accountUserLinkPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('accountUserLinkPath', () => { + const result = client.accountUserLinkPath( + 'accountValue', + 'userLinkValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.accountUserLinkPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchAccountFromAccountUserLinkName', () => { + const result = client.matchAccountFromAccountUserLinkName(fakePath); + assert.strictEqual(result, 'accountValue'); + assert( + (client.pathTemplates.accountUserLinkPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchUserLinkFromAccountUserLinkName', () => { + const result = client.matchUserLinkFromAccountUserLinkName(fakePath); + assert.strictEqual(result, 'userLinkValue'); + assert( + (client.pathTemplates.accountUserLinkPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('attributionSettings', () => { + const fakePath = '/rendered/path/attributionSettings'; + const expectedParameters = { + property: 'propertyValue', + }; + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.attributionSettingsPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.attributionSettingsPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('attributionSettingsPath', () => { + const result = client.attributionSettingsPath('propertyValue'); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.attributionSettingsPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchPropertyFromAttributionSettingsName', () => { + const result = + client.matchPropertyFromAttributionSettingsName(fakePath); + assert.strictEqual(result, 'propertyValue'); + assert( + ( + client.pathTemplates.attributionSettingsPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('audience', () => { + const fakePath = '/rendered/path/audience'; + const expectedParameters = { + property: 'propertyValue', + audience: 'audienceValue', + }; + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.audiencePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.audiencePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('audiencePath', () => { + const result = client.audiencePath('propertyValue', 'audienceValue'); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.audiencePathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchPropertyFromAudienceName', () => { + const result = client.matchPropertyFromAudienceName(fakePath); + assert.strictEqual(result, 'propertyValue'); + assert( + (client.pathTemplates.audiencePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchAudienceFromAudienceName', () => { + const result = client.matchAudienceFromAudienceName(fakePath); + assert.strictEqual(result, 'audienceValue'); + assert( + (client.pathTemplates.audiencePathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('conversionEvent', () => { + const fakePath = '/rendered/path/conversionEvent'; + const expectedParameters = { + property: 'propertyValue', + conversion_event: 'conversionEventValue', + }; + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.conversionEventPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.conversionEventPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('conversionEventPath', () => { + const result = client.conversionEventPath( + 'propertyValue', + 'conversionEventValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.conversionEventPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchPropertyFromConversionEventName', () => { + const result = client.matchPropertyFromConversionEventName(fakePath); + assert.strictEqual(result, 'propertyValue'); + assert( + (client.pathTemplates.conversionEventPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchConversionEventFromConversionEventName', () => { + const result = + client.matchConversionEventFromConversionEventName(fakePath); + assert.strictEqual(result, 'conversionEventValue'); + assert( + (client.pathTemplates.conversionEventPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('customDimension', () => { + const fakePath = '/rendered/path/customDimension'; + const expectedParameters = { + property: 'propertyValue', + custom_dimension: 'customDimensionValue', + }; + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.customDimensionPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.customDimensionPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('customDimensionPath', () => { + const result = client.customDimensionPath( + 'propertyValue', + 'customDimensionValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.customDimensionPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchPropertyFromCustomDimensionName', () => { + const result = client.matchPropertyFromCustomDimensionName(fakePath); + assert.strictEqual(result, 'propertyValue'); + assert( + (client.pathTemplates.customDimensionPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchCustomDimensionFromCustomDimensionName', () => { + const result = + client.matchCustomDimensionFromCustomDimensionName(fakePath); + assert.strictEqual(result, 'customDimensionValue'); + assert( + (client.pathTemplates.customDimensionPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('customMetric', () => { + const fakePath = '/rendered/path/customMetric'; + const expectedParameters = { + property: 'propertyValue', + custom_metric: 'customMetricValue', + }; + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.customMetricPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.customMetricPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('customMetricPath', () => { + const result = client.customMetricPath( + 'propertyValue', + 'customMetricValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.customMetricPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchPropertyFromCustomMetricName', () => { + const result = client.matchPropertyFromCustomMetricName(fakePath); + assert.strictEqual(result, 'propertyValue'); + assert( + (client.pathTemplates.customMetricPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchCustomMetricFromCustomMetricName', () => { + const result = client.matchCustomMetricFromCustomMetricName(fakePath); + assert.strictEqual(result, 'customMetricValue'); + assert( + (client.pathTemplates.customMetricPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('dataRetentionSettings', () => { + const fakePath = '/rendered/path/dataRetentionSettings'; + const expectedParameters = { + property: 'propertyValue', + }; + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.dataRetentionSettingsPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.dataRetentionSettingsPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('dataRetentionSettingsPath', () => { + const result = client.dataRetentionSettingsPath('propertyValue'); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.dataRetentionSettingsPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchPropertyFromDataRetentionSettingsName', () => { + const result = + client.matchPropertyFromDataRetentionSettingsName(fakePath); + assert.strictEqual(result, 'propertyValue'); + assert( + ( + client.pathTemplates.dataRetentionSettingsPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('dataSharingSettings', () => { + const fakePath = '/rendered/path/dataSharingSettings'; + const expectedParameters = { + account: 'accountValue', + }; + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.dataSharingSettingsPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.dataSharingSettingsPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('dataSharingSettingsPath', () => { + const result = client.dataSharingSettingsPath('accountValue'); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.dataSharingSettingsPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchAccountFromDataSharingSettingsName', () => { + const result = client.matchAccountFromDataSharingSettingsName(fakePath); + assert.strictEqual(result, 'accountValue'); + assert( + ( + client.pathTemplates.dataSharingSettingsPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('dataStream', () => { + const fakePath = '/rendered/path/dataStream'; + const expectedParameters = { + property: 'propertyValue', + data_stream: 'dataStreamValue', + }; + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.dataStreamPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.dataStreamPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('dataStreamPath', () => { + const result = client.dataStreamPath( + 'propertyValue', + 'dataStreamValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.dataStreamPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchPropertyFromDataStreamName', () => { + const result = client.matchPropertyFromDataStreamName(fakePath); + assert.strictEqual(result, 'propertyValue'); + assert( + (client.pathTemplates.dataStreamPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDataStreamFromDataStreamName', () => { + const result = client.matchDataStreamFromDataStreamName(fakePath); + assert.strictEqual(result, 'dataStreamValue'); + assert( + (client.pathTemplates.dataStreamPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('displayVideo360AdvertiserLink', () => { + const fakePath = '/rendered/path/displayVideo360AdvertiserLink'; + const expectedParameters = { + property: 'propertyValue', + }; + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.displayVideo360AdvertiserLinkPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.displayVideo360AdvertiserLinkPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('displayVideo360AdvertiserLinkPath', () => { + const result = + client.displayVideo360AdvertiserLinkPath('propertyValue'); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.displayVideo360AdvertiserLinkPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchPropertyFromDisplayVideo360AdvertiserLinkName', () => { + const result = + client.matchPropertyFromDisplayVideo360AdvertiserLinkName(fakePath); + assert.strictEqual(result, 'propertyValue'); + assert( + ( + client.pathTemplates.displayVideo360AdvertiserLinkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('displayVideo360AdvertiserLinkProposal', () => { + const fakePath = '/rendered/path/displayVideo360AdvertiserLinkProposal'; + const expectedParameters = { + property: 'propertyValue', + }; + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.displayVideo360AdvertiserLinkProposalPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.displayVideo360AdvertiserLinkProposalPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('displayVideo360AdvertiserLinkProposalPath', () => { + const result = + client.displayVideo360AdvertiserLinkProposalPath('propertyValue'); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates + .displayVideo360AdvertiserLinkProposalPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchPropertyFromDisplayVideo360AdvertiserLinkProposalName', () => { + const result = + client.matchPropertyFromDisplayVideo360AdvertiserLinkProposalName( + fakePath + ); + assert.strictEqual(result, 'propertyValue'); + assert( + ( + client.pathTemplates + .displayVideo360AdvertiserLinkProposalPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('firebaseLink', () => { + const fakePath = '/rendered/path/firebaseLink'; + const expectedParameters = { + property: 'propertyValue', + firebase_link: 'firebaseLinkValue', + }; + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.firebaseLinkPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.firebaseLinkPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('firebaseLinkPath', () => { + const result = client.firebaseLinkPath( + 'propertyValue', + 'firebaseLinkValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.firebaseLinkPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchPropertyFromFirebaseLinkName', () => { + const result = client.matchPropertyFromFirebaseLinkName(fakePath); + assert.strictEqual(result, 'propertyValue'); + assert( + (client.pathTemplates.firebaseLinkPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchFirebaseLinkFromFirebaseLinkName', () => { + const result = client.matchFirebaseLinkFromFirebaseLinkName(fakePath); + assert.strictEqual(result, 'firebaseLinkValue'); + assert( + (client.pathTemplates.firebaseLinkPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('globalSiteTag', () => { + const fakePath = '/rendered/path/globalSiteTag'; + const expectedParameters = { + property: 'propertyValue', + data_stream: 'dataStreamValue', + }; + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.globalSiteTagPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.globalSiteTagPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('globalSiteTagPath', () => { + const result = client.globalSiteTagPath( + 'propertyValue', + 'dataStreamValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.globalSiteTagPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchPropertyFromGlobalSiteTagName', () => { + const result = client.matchPropertyFromGlobalSiteTagName(fakePath); + assert.strictEqual(result, 'propertyValue'); + assert( + (client.pathTemplates.globalSiteTagPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDataStreamFromGlobalSiteTagName', () => { + const result = client.matchDataStreamFromGlobalSiteTagName(fakePath); + assert.strictEqual(result, 'dataStreamValue'); + assert( + (client.pathTemplates.globalSiteTagPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('googleAdsLink', () => { + const fakePath = '/rendered/path/googleAdsLink'; + const expectedParameters = { + property: 'propertyValue', + google_ads_link: 'googleAdsLinkValue', + }; + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.googleAdsLinkPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.googleAdsLinkPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('googleAdsLinkPath', () => { + const result = client.googleAdsLinkPath( + 'propertyValue', + 'googleAdsLinkValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.googleAdsLinkPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchPropertyFromGoogleAdsLinkName', () => { + const result = client.matchPropertyFromGoogleAdsLinkName(fakePath); + assert.strictEqual(result, 'propertyValue'); + assert( + (client.pathTemplates.googleAdsLinkPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchGoogleAdsLinkFromGoogleAdsLinkName', () => { + const result = client.matchGoogleAdsLinkFromGoogleAdsLinkName(fakePath); + assert.strictEqual(result, 'googleAdsLinkValue'); + assert( + (client.pathTemplates.googleAdsLinkPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('googleSignalsSettings', () => { + const fakePath = '/rendered/path/googleSignalsSettings'; + const expectedParameters = { + property: 'propertyValue', + }; + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.googleSignalsSettingsPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.googleSignalsSettingsPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('googleSignalsSettingsPath', () => { + const result = client.googleSignalsSettingsPath('propertyValue'); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.googleSignalsSettingsPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchPropertyFromGoogleSignalsSettingsName', () => { + const result = + client.matchPropertyFromGoogleSignalsSettingsName(fakePath); + assert.strictEqual(result, 'propertyValue'); + assert( + ( + client.pathTemplates.googleSignalsSettingsPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('measurementProtocolSecret', () => { + const fakePath = '/rendered/path/measurementProtocolSecret'; + const expectedParameters = { + property: 'propertyValue', + data_stream: 'dataStreamValue', + measurement_protocol_secret: 'measurementProtocolSecretValue', + }; + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.measurementProtocolSecretPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.measurementProtocolSecretPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('measurementProtocolSecretPath', () => { + const result = client.measurementProtocolSecretPath( + 'propertyValue', + 'dataStreamValue', + 'measurementProtocolSecretValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.measurementProtocolSecretPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchPropertyFromMeasurementProtocolSecretName', () => { + const result = + client.matchPropertyFromMeasurementProtocolSecretName(fakePath); + assert.strictEqual(result, 'propertyValue'); + assert( + ( + client.pathTemplates.measurementProtocolSecretPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDataStreamFromMeasurementProtocolSecretName', () => { + const result = + client.matchDataStreamFromMeasurementProtocolSecretName(fakePath); + assert.strictEqual(result, 'dataStreamValue'); + assert( + ( + client.pathTemplates.measurementProtocolSecretPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchMeasurementProtocolSecretFromMeasurementProtocolSecretName', () => { + const result = + client.matchMeasurementProtocolSecretFromMeasurementProtocolSecretName( + fakePath + ); + assert.strictEqual(result, 'measurementProtocolSecretValue'); + assert( + ( + client.pathTemplates.measurementProtocolSecretPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('property', () => { + const fakePath = '/rendered/path/property'; + const expectedParameters = { + property: 'propertyValue', + }; + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.propertyPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.propertyPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('propertyPath', () => { + const result = client.propertyPath('propertyValue'); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.propertyPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchPropertyFromPropertyName', () => { + const result = client.matchPropertyFromPropertyName(fakePath); + assert.strictEqual(result, 'propertyValue'); + assert( + (client.pathTemplates.propertyPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('propertyUserLink', () => { + const fakePath = '/rendered/path/propertyUserLink'; + const expectedParameters = { + property: 'propertyValue', + user_link: 'userLinkValue', + }; + const client = + new analyticsadminserviceModule.v1alpha.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.propertyUserLinkPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.propertyUserLinkPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('propertyUserLinkPath', () => { + const result = client.propertyUserLinkPath( + 'propertyValue', + 'userLinkValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.propertyUserLinkPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchPropertyFromPropertyUserLinkName', () => { + const result = client.matchPropertyFromPropertyUserLinkName(fakePath); + assert.strictEqual(result, 'propertyValue'); + assert( + (client.pathTemplates.propertyUserLinkPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchUserLinkFromPropertyUserLinkName', () => { + const result = client.matchUserLinkFromPropertyUserLinkName(fakePath); + assert.strictEqual(result, 'userLinkValue'); + assert( + (client.pathTemplates.propertyUserLinkPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + }); +}); diff --git a/packages/google-analytics-admin/test/gapic_analytics_admin_service_v1beta.ts b/packages/google-analytics-admin/test/gapic_analytics_admin_service_v1beta.ts new file mode 100644 index 00000000000..bce6a388254 --- /dev/null +++ b/packages/google-analytics-admin/test/gapic_analytics_admin_service_v1beta.ts @@ -0,0 +1,9205 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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 analyticsadminserviceModule 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('v1beta.AnalyticsAdminServiceClient', () => { + describe('Common methods', () => { + it('has servicePath', () => { + const servicePath = + analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient + .servicePath; + assert(servicePath); + }); + + it('has apiEndpoint', () => { + const apiEndpoint = + analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient + .apiEndpoint; + assert(apiEndpoint); + }); + + it('has port', () => { + const port = + analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no option', () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient(); + assert(client); + }); + + it('should create a client with gRPC fallback', () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + fallback: true, + }); + assert(client); + }); + + it('has initialize method and supports deferred initialization', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.analyticsAdminServiceStub, undefined); + await client.initialize(); + assert(client.analyticsAdminServiceStub); + }); + + it('has close method for the initialized client', done => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + assert(client.analyticsAdminServiceStub); + client.close().then(() => { + done(); + }); + }); + + it('has close method for the non-initialized client', done => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.analyticsAdminServiceStub, undefined); + client.close().then(() => { + done(); + }); + }); + + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + 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 analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + 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('getAccount', () => { + it('invokes getAccount without error', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.GetAccountRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.GetAccountRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1beta.Account() + ); + client.innerApiCalls.getAccount = stubSimpleCall(expectedResponse); + const [response] = await client.getAccount(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getAccount as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getAccount as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getAccount without error using callback', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.GetAccountRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.GetAccountRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1beta.Account() + ); + client.innerApiCalls.getAccount = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getAccount( + request, + ( + err?: Error | null, + result?: protos.google.analytics.admin.v1beta.IAccount | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getAccount as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getAccount as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getAccount with error', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.GetAccountRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.GetAccountRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getAccount = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.getAccount(request), expectedError); + const actualRequest = ( + client.innerApiCalls.getAccount as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getAccount as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getAccount with closed client', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.GetAccountRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.GetAccountRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getAccount(request), expectedError); + }); + }); + + describe('deleteAccount', () => { + it('invokes deleteAccount without error', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.DeleteAccountRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.DeleteAccountRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteAccount = stubSimpleCall(expectedResponse); + const [response] = await client.deleteAccount(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteAccount as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteAccount as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteAccount without error using callback', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.DeleteAccountRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.DeleteAccountRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteAccount = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteAccount( + 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.deleteAccount as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteAccount as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteAccount with error', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.DeleteAccountRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.DeleteAccountRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteAccount = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.deleteAccount(request), expectedError); + const actualRequest = ( + client.innerApiCalls.deleteAccount as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteAccount as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteAccount with closed client', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.DeleteAccountRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.DeleteAccountRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.deleteAccount(request), expectedError); + }); + }); + + describe('updateAccount', () => { + it('invokes updateAccount without error', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.UpdateAccountRequest() + ); + request.account ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.UpdateAccountRequest', + ['account', 'name'] + ); + request.account.name = defaultValue1; + const expectedHeaderRequestParams = `account.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1beta.Account() + ); + client.innerApiCalls.updateAccount = stubSimpleCall(expectedResponse); + const [response] = await client.updateAccount(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateAccount as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateAccount as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateAccount without error using callback', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.UpdateAccountRequest() + ); + request.account ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.UpdateAccountRequest', + ['account', 'name'] + ); + request.account.name = defaultValue1; + const expectedHeaderRequestParams = `account.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1beta.Account() + ); + client.innerApiCalls.updateAccount = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateAccount( + request, + ( + err?: Error | null, + result?: protos.google.analytics.admin.v1beta.IAccount | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateAccount as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateAccount as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateAccount with error', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.UpdateAccountRequest() + ); + request.account ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.UpdateAccountRequest', + ['account', 'name'] + ); + request.account.name = defaultValue1; + const expectedHeaderRequestParams = `account.name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateAccount = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.updateAccount(request), expectedError); + const actualRequest = ( + client.innerApiCalls.updateAccount as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateAccount as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateAccount with closed client', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.UpdateAccountRequest() + ); + request.account ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.UpdateAccountRequest', + ['account', 'name'] + ); + request.account.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.updateAccount(request), expectedError); + }); + }); + + describe('provisionAccountTicket', () => { + it('invokes provisionAccountTicket without error', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.ProvisionAccountTicketRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1beta.ProvisionAccountTicketResponse() + ); + client.innerApiCalls.provisionAccountTicket = + stubSimpleCall(expectedResponse); + const [response] = await client.provisionAccountTicket(request); + assert.deepStrictEqual(response, expectedResponse); + }); + + it('invokes provisionAccountTicket without error using callback', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.ProvisionAccountTicketRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1beta.ProvisionAccountTicketResponse() + ); + client.innerApiCalls.provisionAccountTicket = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.provisionAccountTicket( + request, + ( + err?: Error | null, + result?: protos.google.analytics.admin.v1beta.IProvisionAccountTicketResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + }); + + it('invokes provisionAccountTicket with error', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.ProvisionAccountTicketRequest() + ); + const expectedError = new Error('expected'); + client.innerApiCalls.provisionAccountTicket = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.provisionAccountTicket(request), + expectedError + ); + }); + + it('invokes provisionAccountTicket with closed client', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.ProvisionAccountTicketRequest() + ); + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects( + client.provisionAccountTicket(request), + expectedError + ); + }); + }); + + describe('getProperty', () => { + it('invokes getProperty without error', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.GetPropertyRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.GetPropertyRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1beta.Property() + ); + client.innerApiCalls.getProperty = stubSimpleCall(expectedResponse); + const [response] = await client.getProperty(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getProperty as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getProperty as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getProperty without error using callback', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.GetPropertyRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.GetPropertyRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1beta.Property() + ); + client.innerApiCalls.getProperty = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getProperty( + request, + ( + err?: Error | null, + result?: protos.google.analytics.admin.v1beta.IProperty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getProperty as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getProperty as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getProperty with error', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.GetPropertyRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.GetPropertyRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getProperty = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.getProperty(request), expectedError); + const actualRequest = ( + client.innerApiCalls.getProperty as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getProperty as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getProperty with closed client', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.GetPropertyRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.GetPropertyRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getProperty(request), expectedError); + }); + }); + + describe('createProperty', () => { + it('invokes createProperty without error', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.CreatePropertyRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1beta.Property() + ); + client.innerApiCalls.createProperty = stubSimpleCall(expectedResponse); + const [response] = await client.createProperty(request); + assert.deepStrictEqual(response, expectedResponse); + }); + + it('invokes createProperty without error using callback', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.CreatePropertyRequest() + ); + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1beta.Property() + ); + client.innerApiCalls.createProperty = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createProperty( + request, + ( + err?: Error | null, + result?: protos.google.analytics.admin.v1beta.IProperty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + }); + + it('invokes createProperty with error', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.CreatePropertyRequest() + ); + const expectedError = new Error('expected'); + client.innerApiCalls.createProperty = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.createProperty(request), expectedError); + }); + + it('invokes createProperty with closed client', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.CreatePropertyRequest() + ); + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.createProperty(request), expectedError); + }); + }); + + describe('deleteProperty', () => { + it('invokes deleteProperty without error', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.DeletePropertyRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.DeletePropertyRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1beta.Property() + ); + client.innerApiCalls.deleteProperty = stubSimpleCall(expectedResponse); + const [response] = await client.deleteProperty(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteProperty as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteProperty as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteProperty without error using callback', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.DeletePropertyRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.DeletePropertyRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1beta.Property() + ); + client.innerApiCalls.deleteProperty = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteProperty( + request, + ( + err?: Error | null, + result?: protos.google.analytics.admin.v1beta.IProperty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteProperty as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteProperty as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteProperty with error', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.DeletePropertyRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.DeletePropertyRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteProperty = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.deleteProperty(request), expectedError); + const actualRequest = ( + client.innerApiCalls.deleteProperty as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteProperty as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteProperty with closed client', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.DeletePropertyRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.DeletePropertyRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.deleteProperty(request), expectedError); + }); + }); + + describe('updateProperty', () => { + it('invokes updateProperty without error', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.UpdatePropertyRequest() + ); + request.property ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.UpdatePropertyRequest', + ['property', 'name'] + ); + request.property.name = defaultValue1; + const expectedHeaderRequestParams = `property.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1beta.Property() + ); + client.innerApiCalls.updateProperty = stubSimpleCall(expectedResponse); + const [response] = await client.updateProperty(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateProperty as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateProperty as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateProperty without error using callback', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.UpdatePropertyRequest() + ); + request.property ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.UpdatePropertyRequest', + ['property', 'name'] + ); + request.property.name = defaultValue1; + const expectedHeaderRequestParams = `property.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1beta.Property() + ); + client.innerApiCalls.updateProperty = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateProperty( + request, + ( + err?: Error | null, + result?: protos.google.analytics.admin.v1beta.IProperty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateProperty as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateProperty as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateProperty with error', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.UpdatePropertyRequest() + ); + request.property ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.UpdatePropertyRequest', + ['property', 'name'] + ); + request.property.name = defaultValue1; + const expectedHeaderRequestParams = `property.name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateProperty = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.updateProperty(request), expectedError); + const actualRequest = ( + client.innerApiCalls.updateProperty as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateProperty as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateProperty with closed client', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.UpdatePropertyRequest() + ); + request.property ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.UpdatePropertyRequest', + ['property', 'name'] + ); + request.property.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.updateProperty(request), expectedError); + }); + }); + + describe('createFirebaseLink', () => { + it('invokes createFirebaseLink without error', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.CreateFirebaseLinkRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.CreateFirebaseLinkRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1beta.FirebaseLink() + ); + client.innerApiCalls.createFirebaseLink = + stubSimpleCall(expectedResponse); + const [response] = await client.createFirebaseLink(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createFirebaseLink as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createFirebaseLink as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createFirebaseLink without error using callback', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.CreateFirebaseLinkRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.CreateFirebaseLinkRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1beta.FirebaseLink() + ); + client.innerApiCalls.createFirebaseLink = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createFirebaseLink( + request, + ( + err?: Error | null, + result?: protos.google.analytics.admin.v1beta.IFirebaseLink | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createFirebaseLink as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createFirebaseLink as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createFirebaseLink with error', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.CreateFirebaseLinkRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.CreateFirebaseLinkRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createFirebaseLink = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.createFirebaseLink(request), expectedError); + const actualRequest = ( + client.innerApiCalls.createFirebaseLink as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createFirebaseLink as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createFirebaseLink with closed client', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.CreateFirebaseLinkRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.CreateFirebaseLinkRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.createFirebaseLink(request), expectedError); + }); + }); + + describe('deleteFirebaseLink', () => { + it('invokes deleteFirebaseLink without error', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.DeleteFirebaseLinkRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.DeleteFirebaseLinkRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteFirebaseLink = + stubSimpleCall(expectedResponse); + const [response] = await client.deleteFirebaseLink(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteFirebaseLink as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteFirebaseLink as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteFirebaseLink without error using callback', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.DeleteFirebaseLinkRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.DeleteFirebaseLinkRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteFirebaseLink = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteFirebaseLink( + 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.deleteFirebaseLink as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteFirebaseLink as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteFirebaseLink with error', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.DeleteFirebaseLinkRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.DeleteFirebaseLinkRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteFirebaseLink = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.deleteFirebaseLink(request), expectedError); + const actualRequest = ( + client.innerApiCalls.deleteFirebaseLink as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteFirebaseLink as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteFirebaseLink with closed client', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.DeleteFirebaseLinkRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.DeleteFirebaseLinkRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.deleteFirebaseLink(request), expectedError); + }); + }); + + describe('createGoogleAdsLink', () => { + it('invokes createGoogleAdsLink without error', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.CreateGoogleAdsLinkRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.CreateGoogleAdsLinkRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1beta.GoogleAdsLink() + ); + client.innerApiCalls.createGoogleAdsLink = + stubSimpleCall(expectedResponse); + const [response] = await client.createGoogleAdsLink(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createGoogleAdsLink as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createGoogleAdsLink as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createGoogleAdsLink without error using callback', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.CreateGoogleAdsLinkRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.CreateGoogleAdsLinkRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1beta.GoogleAdsLink() + ); + client.innerApiCalls.createGoogleAdsLink = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createGoogleAdsLink( + request, + ( + err?: Error | null, + result?: protos.google.analytics.admin.v1beta.IGoogleAdsLink | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createGoogleAdsLink as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createGoogleAdsLink as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createGoogleAdsLink with error', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.CreateGoogleAdsLinkRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.CreateGoogleAdsLinkRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createGoogleAdsLink = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.createGoogleAdsLink(request), expectedError); + const actualRequest = ( + client.innerApiCalls.createGoogleAdsLink as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createGoogleAdsLink as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createGoogleAdsLink with closed client', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.CreateGoogleAdsLinkRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.CreateGoogleAdsLinkRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.createGoogleAdsLink(request), expectedError); + }); + }); + + describe('updateGoogleAdsLink', () => { + it('invokes updateGoogleAdsLink without error', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.UpdateGoogleAdsLinkRequest() + ); + request.googleAdsLink ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.UpdateGoogleAdsLinkRequest', + ['googleAdsLink', 'name'] + ); + request.googleAdsLink.name = defaultValue1; + const expectedHeaderRequestParams = `google_ads_link.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1beta.GoogleAdsLink() + ); + client.innerApiCalls.updateGoogleAdsLink = + stubSimpleCall(expectedResponse); + const [response] = await client.updateGoogleAdsLink(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateGoogleAdsLink as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateGoogleAdsLink as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateGoogleAdsLink without error using callback', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.UpdateGoogleAdsLinkRequest() + ); + request.googleAdsLink ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.UpdateGoogleAdsLinkRequest', + ['googleAdsLink', 'name'] + ); + request.googleAdsLink.name = defaultValue1; + const expectedHeaderRequestParams = `google_ads_link.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1beta.GoogleAdsLink() + ); + client.innerApiCalls.updateGoogleAdsLink = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateGoogleAdsLink( + request, + ( + err?: Error | null, + result?: protos.google.analytics.admin.v1beta.IGoogleAdsLink | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateGoogleAdsLink as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateGoogleAdsLink as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateGoogleAdsLink with error', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.UpdateGoogleAdsLinkRequest() + ); + request.googleAdsLink ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.UpdateGoogleAdsLinkRequest', + ['googleAdsLink', 'name'] + ); + request.googleAdsLink.name = defaultValue1; + const expectedHeaderRequestParams = `google_ads_link.name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateGoogleAdsLink = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.updateGoogleAdsLink(request), expectedError); + const actualRequest = ( + client.innerApiCalls.updateGoogleAdsLink as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateGoogleAdsLink as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateGoogleAdsLink with closed client', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.UpdateGoogleAdsLinkRequest() + ); + request.googleAdsLink ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.UpdateGoogleAdsLinkRequest', + ['googleAdsLink', 'name'] + ); + request.googleAdsLink.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.updateGoogleAdsLink(request), expectedError); + }); + }); + + describe('deleteGoogleAdsLink', () => { + it('invokes deleteGoogleAdsLink without error', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.DeleteGoogleAdsLinkRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.DeleteGoogleAdsLinkRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteGoogleAdsLink = + stubSimpleCall(expectedResponse); + const [response] = await client.deleteGoogleAdsLink(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteGoogleAdsLink as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteGoogleAdsLink as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteGoogleAdsLink without error using callback', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.DeleteGoogleAdsLinkRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.DeleteGoogleAdsLinkRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteGoogleAdsLink = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteGoogleAdsLink( + 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.deleteGoogleAdsLink as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteGoogleAdsLink as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteGoogleAdsLink with error', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.DeleteGoogleAdsLinkRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.DeleteGoogleAdsLinkRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteGoogleAdsLink = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.deleteGoogleAdsLink(request), expectedError); + const actualRequest = ( + client.innerApiCalls.deleteGoogleAdsLink as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteGoogleAdsLink as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteGoogleAdsLink with closed client', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.DeleteGoogleAdsLinkRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.DeleteGoogleAdsLinkRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.deleteGoogleAdsLink(request), expectedError); + }); + }); + + describe('getDataSharingSettings', () => { + it('invokes getDataSharingSettings without error', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.GetDataSharingSettingsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.GetDataSharingSettingsRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1beta.DataSharingSettings() + ); + client.innerApiCalls.getDataSharingSettings = + stubSimpleCall(expectedResponse); + const [response] = await client.getDataSharingSettings(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getDataSharingSettings as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getDataSharingSettings as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getDataSharingSettings without error using callback', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.GetDataSharingSettingsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.GetDataSharingSettingsRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1beta.DataSharingSettings() + ); + client.innerApiCalls.getDataSharingSettings = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getDataSharingSettings( + request, + ( + err?: Error | null, + result?: protos.google.analytics.admin.v1beta.IDataSharingSettings | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getDataSharingSettings as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getDataSharingSettings as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getDataSharingSettings with error', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.GetDataSharingSettingsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.GetDataSharingSettingsRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getDataSharingSettings = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.getDataSharingSettings(request), + expectedError + ); + const actualRequest = ( + client.innerApiCalls.getDataSharingSettings as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getDataSharingSettings as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getDataSharingSettings with closed client', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.GetDataSharingSettingsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.GetDataSharingSettingsRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects( + client.getDataSharingSettings(request), + expectedError + ); + }); + }); + + describe('getMeasurementProtocolSecret', () => { + it('invokes getMeasurementProtocolSecret without error', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.GetMeasurementProtocolSecretRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.GetMeasurementProtocolSecretRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1beta.MeasurementProtocolSecret() + ); + client.innerApiCalls.getMeasurementProtocolSecret = + stubSimpleCall(expectedResponse); + const [response] = await client.getMeasurementProtocolSecret(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getMeasurementProtocolSecret as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getMeasurementProtocolSecret as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getMeasurementProtocolSecret without error using callback', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.GetMeasurementProtocolSecretRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.GetMeasurementProtocolSecretRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1beta.MeasurementProtocolSecret() + ); + client.innerApiCalls.getMeasurementProtocolSecret = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getMeasurementProtocolSecret( + request, + ( + err?: Error | null, + result?: protos.google.analytics.admin.v1beta.IMeasurementProtocolSecret | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getMeasurementProtocolSecret as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getMeasurementProtocolSecret as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getMeasurementProtocolSecret with error', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.GetMeasurementProtocolSecretRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.GetMeasurementProtocolSecretRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getMeasurementProtocolSecret = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.getMeasurementProtocolSecret(request), + expectedError + ); + const actualRequest = ( + client.innerApiCalls.getMeasurementProtocolSecret as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getMeasurementProtocolSecret as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getMeasurementProtocolSecret with closed client', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.GetMeasurementProtocolSecretRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.GetMeasurementProtocolSecretRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects( + client.getMeasurementProtocolSecret(request), + expectedError + ); + }); + }); + + describe('createMeasurementProtocolSecret', () => { + it('invokes createMeasurementProtocolSecret without error', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.CreateMeasurementProtocolSecretRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.CreateMeasurementProtocolSecretRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1beta.MeasurementProtocolSecret() + ); + client.innerApiCalls.createMeasurementProtocolSecret = + stubSimpleCall(expectedResponse); + const [response] = await client.createMeasurementProtocolSecret(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createMeasurementProtocolSecret as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createMeasurementProtocolSecret as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createMeasurementProtocolSecret without error using callback', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.CreateMeasurementProtocolSecretRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.CreateMeasurementProtocolSecretRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1beta.MeasurementProtocolSecret() + ); + client.innerApiCalls.createMeasurementProtocolSecret = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createMeasurementProtocolSecret( + request, + ( + err?: Error | null, + result?: protos.google.analytics.admin.v1beta.IMeasurementProtocolSecret | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createMeasurementProtocolSecret as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createMeasurementProtocolSecret as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createMeasurementProtocolSecret with error', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.CreateMeasurementProtocolSecretRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.CreateMeasurementProtocolSecretRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createMeasurementProtocolSecret = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.createMeasurementProtocolSecret(request), + expectedError + ); + const actualRequest = ( + client.innerApiCalls.createMeasurementProtocolSecret as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createMeasurementProtocolSecret as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createMeasurementProtocolSecret with closed client', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.CreateMeasurementProtocolSecretRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.CreateMeasurementProtocolSecretRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects( + client.createMeasurementProtocolSecret(request), + expectedError + ); + }); + }); + + describe('deleteMeasurementProtocolSecret', () => { + it('invokes deleteMeasurementProtocolSecret without error', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.DeleteMeasurementProtocolSecretRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.DeleteMeasurementProtocolSecretRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteMeasurementProtocolSecret = + stubSimpleCall(expectedResponse); + const [response] = await client.deleteMeasurementProtocolSecret(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteMeasurementProtocolSecret as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteMeasurementProtocolSecret as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteMeasurementProtocolSecret without error using callback', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.DeleteMeasurementProtocolSecretRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.DeleteMeasurementProtocolSecretRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteMeasurementProtocolSecret = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteMeasurementProtocolSecret( + 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.deleteMeasurementProtocolSecret as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteMeasurementProtocolSecret as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteMeasurementProtocolSecret with error', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.DeleteMeasurementProtocolSecretRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.DeleteMeasurementProtocolSecretRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteMeasurementProtocolSecret = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.deleteMeasurementProtocolSecret(request), + expectedError + ); + const actualRequest = ( + client.innerApiCalls.deleteMeasurementProtocolSecret as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteMeasurementProtocolSecret as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteMeasurementProtocolSecret with closed client', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.DeleteMeasurementProtocolSecretRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.DeleteMeasurementProtocolSecretRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects( + client.deleteMeasurementProtocolSecret(request), + expectedError + ); + }); + }); + + describe('updateMeasurementProtocolSecret', () => { + it('invokes updateMeasurementProtocolSecret without error', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.UpdateMeasurementProtocolSecretRequest() + ); + request.measurementProtocolSecret ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.UpdateMeasurementProtocolSecretRequest', + ['measurementProtocolSecret', 'name'] + ); + request.measurementProtocolSecret.name = defaultValue1; + const expectedHeaderRequestParams = `measurement_protocol_secret.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1beta.MeasurementProtocolSecret() + ); + client.innerApiCalls.updateMeasurementProtocolSecret = + stubSimpleCall(expectedResponse); + const [response] = await client.updateMeasurementProtocolSecret(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateMeasurementProtocolSecret as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateMeasurementProtocolSecret as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateMeasurementProtocolSecret without error using callback', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.UpdateMeasurementProtocolSecretRequest() + ); + request.measurementProtocolSecret ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.UpdateMeasurementProtocolSecretRequest', + ['measurementProtocolSecret', 'name'] + ); + request.measurementProtocolSecret.name = defaultValue1; + const expectedHeaderRequestParams = `measurement_protocol_secret.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1beta.MeasurementProtocolSecret() + ); + client.innerApiCalls.updateMeasurementProtocolSecret = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateMeasurementProtocolSecret( + request, + ( + err?: Error | null, + result?: protos.google.analytics.admin.v1beta.IMeasurementProtocolSecret | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateMeasurementProtocolSecret as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateMeasurementProtocolSecret as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateMeasurementProtocolSecret with error', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.UpdateMeasurementProtocolSecretRequest() + ); + request.measurementProtocolSecret ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.UpdateMeasurementProtocolSecretRequest', + ['measurementProtocolSecret', 'name'] + ); + request.measurementProtocolSecret.name = defaultValue1; + const expectedHeaderRequestParams = `measurement_protocol_secret.name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateMeasurementProtocolSecret = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.updateMeasurementProtocolSecret(request), + expectedError + ); + const actualRequest = ( + client.innerApiCalls.updateMeasurementProtocolSecret as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateMeasurementProtocolSecret as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateMeasurementProtocolSecret with closed client', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.UpdateMeasurementProtocolSecretRequest() + ); + request.measurementProtocolSecret ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.UpdateMeasurementProtocolSecretRequest', + ['measurementProtocolSecret', 'name'] + ); + request.measurementProtocolSecret.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects( + client.updateMeasurementProtocolSecret(request), + expectedError + ); + }); + }); + + describe('acknowledgeUserDataCollection', () => { + it('invokes acknowledgeUserDataCollection without error', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.AcknowledgeUserDataCollectionRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.AcknowledgeUserDataCollectionRequest', + ['property'] + ); + request.property = defaultValue1; + const expectedHeaderRequestParams = `property=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1beta.AcknowledgeUserDataCollectionResponse() + ); + client.innerApiCalls.acknowledgeUserDataCollection = + stubSimpleCall(expectedResponse); + const [response] = await client.acknowledgeUserDataCollection(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.acknowledgeUserDataCollection as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.acknowledgeUserDataCollection as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes acknowledgeUserDataCollection without error using callback', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.AcknowledgeUserDataCollectionRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.AcknowledgeUserDataCollectionRequest', + ['property'] + ); + request.property = defaultValue1; + const expectedHeaderRequestParams = `property=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1beta.AcknowledgeUserDataCollectionResponse() + ); + client.innerApiCalls.acknowledgeUserDataCollection = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.acknowledgeUserDataCollection( + request, + ( + err?: Error | null, + result?: protos.google.analytics.admin.v1beta.IAcknowledgeUserDataCollectionResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.acknowledgeUserDataCollection as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.acknowledgeUserDataCollection as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes acknowledgeUserDataCollection with error', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.AcknowledgeUserDataCollectionRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.AcknowledgeUserDataCollectionRequest', + ['property'] + ); + request.property = defaultValue1; + const expectedHeaderRequestParams = `property=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.acknowledgeUserDataCollection = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.acknowledgeUserDataCollection(request), + expectedError + ); + const actualRequest = ( + client.innerApiCalls.acknowledgeUserDataCollection as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.acknowledgeUserDataCollection as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes acknowledgeUserDataCollection with closed client', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.AcknowledgeUserDataCollectionRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.AcknowledgeUserDataCollectionRequest', + ['property'] + ); + request.property = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects( + client.acknowledgeUserDataCollection(request), + expectedError + ); + }); + }); + + describe('createConversionEvent', () => { + it('invokes createConversionEvent without error', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.CreateConversionEventRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.CreateConversionEventRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1beta.ConversionEvent() + ); + client.innerApiCalls.createConversionEvent = + stubSimpleCall(expectedResponse); + const [response] = await client.createConversionEvent(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createConversionEvent as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createConversionEvent as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createConversionEvent without error using callback', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.CreateConversionEventRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.CreateConversionEventRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1beta.ConversionEvent() + ); + client.innerApiCalls.createConversionEvent = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createConversionEvent( + request, + ( + err?: Error | null, + result?: protos.google.analytics.admin.v1beta.IConversionEvent | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createConversionEvent as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createConversionEvent as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createConversionEvent with error', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.CreateConversionEventRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.CreateConversionEventRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createConversionEvent = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.createConversionEvent(request), + expectedError + ); + const actualRequest = ( + client.innerApiCalls.createConversionEvent as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createConversionEvent as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createConversionEvent with closed client', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.CreateConversionEventRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.CreateConversionEventRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects( + client.createConversionEvent(request), + expectedError + ); + }); + }); + + describe('getConversionEvent', () => { + it('invokes getConversionEvent without error', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.GetConversionEventRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.GetConversionEventRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1beta.ConversionEvent() + ); + client.innerApiCalls.getConversionEvent = + stubSimpleCall(expectedResponse); + const [response] = await client.getConversionEvent(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getConversionEvent as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getConversionEvent as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getConversionEvent without error using callback', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.GetConversionEventRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.GetConversionEventRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1beta.ConversionEvent() + ); + client.innerApiCalls.getConversionEvent = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getConversionEvent( + request, + ( + err?: Error | null, + result?: protos.google.analytics.admin.v1beta.IConversionEvent | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getConversionEvent as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getConversionEvent as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getConversionEvent with error', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.GetConversionEventRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.GetConversionEventRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getConversionEvent = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.getConversionEvent(request), expectedError); + const actualRequest = ( + client.innerApiCalls.getConversionEvent as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getConversionEvent as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getConversionEvent with closed client', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.GetConversionEventRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.GetConversionEventRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getConversionEvent(request), expectedError); + }); + }); + + describe('deleteConversionEvent', () => { + it('invokes deleteConversionEvent without error', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.DeleteConversionEventRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.DeleteConversionEventRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteConversionEvent = + stubSimpleCall(expectedResponse); + const [response] = await client.deleteConversionEvent(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteConversionEvent as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteConversionEvent as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteConversionEvent without error using callback', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.DeleteConversionEventRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.DeleteConversionEventRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteConversionEvent = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteConversionEvent( + 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.deleteConversionEvent as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteConversionEvent as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteConversionEvent with error', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.DeleteConversionEventRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.DeleteConversionEventRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteConversionEvent = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.deleteConversionEvent(request), + expectedError + ); + const actualRequest = ( + client.innerApiCalls.deleteConversionEvent as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteConversionEvent as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteConversionEvent with closed client', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.DeleteConversionEventRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.DeleteConversionEventRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects( + client.deleteConversionEvent(request), + expectedError + ); + }); + }); + + describe('createCustomDimension', () => { + it('invokes createCustomDimension without error', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.CreateCustomDimensionRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.CreateCustomDimensionRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1beta.CustomDimension() + ); + client.innerApiCalls.createCustomDimension = + stubSimpleCall(expectedResponse); + const [response] = await client.createCustomDimension(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createCustomDimension as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createCustomDimension as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createCustomDimension without error using callback', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.CreateCustomDimensionRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.CreateCustomDimensionRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1beta.CustomDimension() + ); + client.innerApiCalls.createCustomDimension = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createCustomDimension( + request, + ( + err?: Error | null, + result?: protos.google.analytics.admin.v1beta.ICustomDimension | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createCustomDimension as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createCustomDimension as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createCustomDimension with error', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.CreateCustomDimensionRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.CreateCustomDimensionRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createCustomDimension = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.createCustomDimension(request), + expectedError + ); + const actualRequest = ( + client.innerApiCalls.createCustomDimension as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createCustomDimension as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createCustomDimension with closed client', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.CreateCustomDimensionRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.CreateCustomDimensionRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects( + client.createCustomDimension(request), + expectedError + ); + }); + }); + + describe('updateCustomDimension', () => { + it('invokes updateCustomDimension without error', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.UpdateCustomDimensionRequest() + ); + request.customDimension ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.UpdateCustomDimensionRequest', + ['customDimension', 'name'] + ); + request.customDimension.name = defaultValue1; + const expectedHeaderRequestParams = `custom_dimension.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1beta.CustomDimension() + ); + client.innerApiCalls.updateCustomDimension = + stubSimpleCall(expectedResponse); + const [response] = await client.updateCustomDimension(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateCustomDimension as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateCustomDimension as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateCustomDimension without error using callback', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.UpdateCustomDimensionRequest() + ); + request.customDimension ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.UpdateCustomDimensionRequest', + ['customDimension', 'name'] + ); + request.customDimension.name = defaultValue1; + const expectedHeaderRequestParams = `custom_dimension.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1beta.CustomDimension() + ); + client.innerApiCalls.updateCustomDimension = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateCustomDimension( + request, + ( + err?: Error | null, + result?: protos.google.analytics.admin.v1beta.ICustomDimension | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateCustomDimension as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateCustomDimension as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateCustomDimension with error', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.UpdateCustomDimensionRequest() + ); + request.customDimension ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.UpdateCustomDimensionRequest', + ['customDimension', 'name'] + ); + request.customDimension.name = defaultValue1; + const expectedHeaderRequestParams = `custom_dimension.name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateCustomDimension = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.updateCustomDimension(request), + expectedError + ); + const actualRequest = ( + client.innerApiCalls.updateCustomDimension as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateCustomDimension as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateCustomDimension with closed client', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.UpdateCustomDimensionRequest() + ); + request.customDimension ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.UpdateCustomDimensionRequest', + ['customDimension', 'name'] + ); + request.customDimension.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects( + client.updateCustomDimension(request), + expectedError + ); + }); + }); + + describe('archiveCustomDimension', () => { + it('invokes archiveCustomDimension without error', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.ArchiveCustomDimensionRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.ArchiveCustomDimensionRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.archiveCustomDimension = + stubSimpleCall(expectedResponse); + const [response] = await client.archiveCustomDimension(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.archiveCustomDimension as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.archiveCustomDimension as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes archiveCustomDimension without error using callback', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.ArchiveCustomDimensionRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.ArchiveCustomDimensionRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.archiveCustomDimension = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.archiveCustomDimension( + 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.archiveCustomDimension as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.archiveCustomDimension as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes archiveCustomDimension with error', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.ArchiveCustomDimensionRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.ArchiveCustomDimensionRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.archiveCustomDimension = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.archiveCustomDimension(request), + expectedError + ); + const actualRequest = ( + client.innerApiCalls.archiveCustomDimension as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.archiveCustomDimension as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes archiveCustomDimension with closed client', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.ArchiveCustomDimensionRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.ArchiveCustomDimensionRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects( + client.archiveCustomDimension(request), + expectedError + ); + }); + }); + + describe('getCustomDimension', () => { + it('invokes getCustomDimension without error', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.GetCustomDimensionRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.GetCustomDimensionRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1beta.CustomDimension() + ); + client.innerApiCalls.getCustomDimension = + stubSimpleCall(expectedResponse); + const [response] = await client.getCustomDimension(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getCustomDimension as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getCustomDimension as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getCustomDimension without error using callback', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.GetCustomDimensionRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.GetCustomDimensionRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1beta.CustomDimension() + ); + client.innerApiCalls.getCustomDimension = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getCustomDimension( + request, + ( + err?: Error | null, + result?: protos.google.analytics.admin.v1beta.ICustomDimension | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getCustomDimension as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getCustomDimension as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getCustomDimension with error', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.GetCustomDimensionRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.GetCustomDimensionRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getCustomDimension = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.getCustomDimension(request), expectedError); + const actualRequest = ( + client.innerApiCalls.getCustomDimension as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getCustomDimension as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getCustomDimension with closed client', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.GetCustomDimensionRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.GetCustomDimensionRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getCustomDimension(request), expectedError); + }); + }); + + describe('createCustomMetric', () => { + it('invokes createCustomMetric without error', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.CreateCustomMetricRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.CreateCustomMetricRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1beta.CustomMetric() + ); + client.innerApiCalls.createCustomMetric = + stubSimpleCall(expectedResponse); + const [response] = await client.createCustomMetric(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createCustomMetric as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createCustomMetric as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createCustomMetric without error using callback', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.CreateCustomMetricRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.CreateCustomMetricRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1beta.CustomMetric() + ); + client.innerApiCalls.createCustomMetric = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createCustomMetric( + request, + ( + err?: Error | null, + result?: protos.google.analytics.admin.v1beta.ICustomMetric | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createCustomMetric as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createCustomMetric as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createCustomMetric with error', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.CreateCustomMetricRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.CreateCustomMetricRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createCustomMetric = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.createCustomMetric(request), expectedError); + const actualRequest = ( + client.innerApiCalls.createCustomMetric as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createCustomMetric as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createCustomMetric with closed client', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.CreateCustomMetricRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.CreateCustomMetricRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.createCustomMetric(request), expectedError); + }); + }); + + describe('updateCustomMetric', () => { + it('invokes updateCustomMetric without error', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.UpdateCustomMetricRequest() + ); + request.customMetric ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.UpdateCustomMetricRequest', + ['customMetric', 'name'] + ); + request.customMetric.name = defaultValue1; + const expectedHeaderRequestParams = `custom_metric.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1beta.CustomMetric() + ); + client.innerApiCalls.updateCustomMetric = + stubSimpleCall(expectedResponse); + const [response] = await client.updateCustomMetric(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateCustomMetric as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateCustomMetric as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateCustomMetric without error using callback', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.UpdateCustomMetricRequest() + ); + request.customMetric ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.UpdateCustomMetricRequest', + ['customMetric', 'name'] + ); + request.customMetric.name = defaultValue1; + const expectedHeaderRequestParams = `custom_metric.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1beta.CustomMetric() + ); + client.innerApiCalls.updateCustomMetric = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateCustomMetric( + request, + ( + err?: Error | null, + result?: protos.google.analytics.admin.v1beta.ICustomMetric | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateCustomMetric as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateCustomMetric as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateCustomMetric with error', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.UpdateCustomMetricRequest() + ); + request.customMetric ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.UpdateCustomMetricRequest', + ['customMetric', 'name'] + ); + request.customMetric.name = defaultValue1; + const expectedHeaderRequestParams = `custom_metric.name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateCustomMetric = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.updateCustomMetric(request), expectedError); + const actualRequest = ( + client.innerApiCalls.updateCustomMetric as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateCustomMetric as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateCustomMetric with closed client', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.UpdateCustomMetricRequest() + ); + request.customMetric ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.UpdateCustomMetricRequest', + ['customMetric', 'name'] + ); + request.customMetric.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.updateCustomMetric(request), expectedError); + }); + }); + + describe('archiveCustomMetric', () => { + it('invokes archiveCustomMetric without error', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.ArchiveCustomMetricRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.ArchiveCustomMetricRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.archiveCustomMetric = + stubSimpleCall(expectedResponse); + const [response] = await client.archiveCustomMetric(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.archiveCustomMetric as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.archiveCustomMetric as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes archiveCustomMetric without error using callback', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.ArchiveCustomMetricRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.ArchiveCustomMetricRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.archiveCustomMetric = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.archiveCustomMetric( + 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.archiveCustomMetric as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.archiveCustomMetric as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes archiveCustomMetric with error', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.ArchiveCustomMetricRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.ArchiveCustomMetricRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.archiveCustomMetric = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.archiveCustomMetric(request), expectedError); + const actualRequest = ( + client.innerApiCalls.archiveCustomMetric as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.archiveCustomMetric as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes archiveCustomMetric with closed client', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.ArchiveCustomMetricRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.ArchiveCustomMetricRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.archiveCustomMetric(request), expectedError); + }); + }); + + describe('getCustomMetric', () => { + it('invokes getCustomMetric without error', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.GetCustomMetricRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.GetCustomMetricRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1beta.CustomMetric() + ); + client.innerApiCalls.getCustomMetric = stubSimpleCall(expectedResponse); + const [response] = await client.getCustomMetric(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getCustomMetric as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getCustomMetric as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getCustomMetric without error using callback', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.GetCustomMetricRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.GetCustomMetricRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1beta.CustomMetric() + ); + client.innerApiCalls.getCustomMetric = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getCustomMetric( + request, + ( + err?: Error | null, + result?: protos.google.analytics.admin.v1beta.ICustomMetric | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getCustomMetric as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getCustomMetric as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getCustomMetric with error', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.GetCustomMetricRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.GetCustomMetricRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getCustomMetric = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.getCustomMetric(request), expectedError); + const actualRequest = ( + client.innerApiCalls.getCustomMetric as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getCustomMetric as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getCustomMetric with closed client', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.GetCustomMetricRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.GetCustomMetricRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getCustomMetric(request), expectedError); + }); + }); + + describe('getDataRetentionSettings', () => { + it('invokes getDataRetentionSettings without error', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.GetDataRetentionSettingsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.GetDataRetentionSettingsRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1beta.DataRetentionSettings() + ); + client.innerApiCalls.getDataRetentionSettings = + stubSimpleCall(expectedResponse); + const [response] = await client.getDataRetentionSettings(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getDataRetentionSettings as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getDataRetentionSettings as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getDataRetentionSettings without error using callback', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.GetDataRetentionSettingsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.GetDataRetentionSettingsRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1beta.DataRetentionSettings() + ); + client.innerApiCalls.getDataRetentionSettings = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getDataRetentionSettings( + request, + ( + err?: Error | null, + result?: protos.google.analytics.admin.v1beta.IDataRetentionSettings | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getDataRetentionSettings as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getDataRetentionSettings as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getDataRetentionSettings with error', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.GetDataRetentionSettingsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.GetDataRetentionSettingsRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getDataRetentionSettings = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.getDataRetentionSettings(request), + expectedError + ); + const actualRequest = ( + client.innerApiCalls.getDataRetentionSettings as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getDataRetentionSettings as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getDataRetentionSettings with closed client', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.GetDataRetentionSettingsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.GetDataRetentionSettingsRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects( + client.getDataRetentionSettings(request), + expectedError + ); + }); + }); + + describe('updateDataRetentionSettings', () => { + it('invokes updateDataRetentionSettings without error', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.UpdateDataRetentionSettingsRequest() + ); + request.dataRetentionSettings ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.UpdateDataRetentionSettingsRequest', + ['dataRetentionSettings', 'name'] + ); + request.dataRetentionSettings.name = defaultValue1; + const expectedHeaderRequestParams = `data_retention_settings.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1beta.DataRetentionSettings() + ); + client.innerApiCalls.updateDataRetentionSettings = + stubSimpleCall(expectedResponse); + const [response] = await client.updateDataRetentionSettings(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateDataRetentionSettings as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateDataRetentionSettings as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateDataRetentionSettings without error using callback', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.UpdateDataRetentionSettingsRequest() + ); + request.dataRetentionSettings ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.UpdateDataRetentionSettingsRequest', + ['dataRetentionSettings', 'name'] + ); + request.dataRetentionSettings.name = defaultValue1; + const expectedHeaderRequestParams = `data_retention_settings.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1beta.DataRetentionSettings() + ); + client.innerApiCalls.updateDataRetentionSettings = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateDataRetentionSettings( + request, + ( + err?: Error | null, + result?: protos.google.analytics.admin.v1beta.IDataRetentionSettings | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateDataRetentionSettings as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateDataRetentionSettings as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateDataRetentionSettings with error', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.UpdateDataRetentionSettingsRequest() + ); + request.dataRetentionSettings ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.UpdateDataRetentionSettingsRequest', + ['dataRetentionSettings', 'name'] + ); + request.dataRetentionSettings.name = defaultValue1; + const expectedHeaderRequestParams = `data_retention_settings.name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateDataRetentionSettings = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.updateDataRetentionSettings(request), + expectedError + ); + const actualRequest = ( + client.innerApiCalls.updateDataRetentionSettings as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateDataRetentionSettings as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateDataRetentionSettings with closed client', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.UpdateDataRetentionSettingsRequest() + ); + request.dataRetentionSettings ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.UpdateDataRetentionSettingsRequest', + ['dataRetentionSettings', 'name'] + ); + request.dataRetentionSettings.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects( + client.updateDataRetentionSettings(request), + expectedError + ); + }); + }); + + describe('createDataStream', () => { + it('invokes createDataStream without error', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.CreateDataStreamRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.CreateDataStreamRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1beta.DataStream() + ); + client.innerApiCalls.createDataStream = stubSimpleCall(expectedResponse); + const [response] = await client.createDataStream(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createDataStream as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createDataStream as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createDataStream without error using callback', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.CreateDataStreamRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.CreateDataStreamRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1beta.DataStream() + ); + client.innerApiCalls.createDataStream = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createDataStream( + request, + ( + err?: Error | null, + result?: protos.google.analytics.admin.v1beta.IDataStream | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createDataStream as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createDataStream as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createDataStream with error', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.CreateDataStreamRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.CreateDataStreamRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createDataStream = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.createDataStream(request), expectedError); + const actualRequest = ( + client.innerApiCalls.createDataStream as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createDataStream as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createDataStream with closed client', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.CreateDataStreamRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.CreateDataStreamRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.createDataStream(request), expectedError); + }); + }); + + describe('deleteDataStream', () => { + it('invokes deleteDataStream without error', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.DeleteDataStreamRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.DeleteDataStreamRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteDataStream = stubSimpleCall(expectedResponse); + const [response] = await client.deleteDataStream(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteDataStream as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteDataStream as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteDataStream without error using callback', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.DeleteDataStreamRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.DeleteDataStreamRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteDataStream = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteDataStream( + 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.deleteDataStream as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteDataStream as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteDataStream with error', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.DeleteDataStreamRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.DeleteDataStreamRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteDataStream = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.deleteDataStream(request), expectedError); + const actualRequest = ( + client.innerApiCalls.deleteDataStream as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteDataStream as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteDataStream with closed client', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.DeleteDataStreamRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.DeleteDataStreamRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.deleteDataStream(request), expectedError); + }); + }); + + describe('updateDataStream', () => { + it('invokes updateDataStream without error', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.UpdateDataStreamRequest() + ); + request.dataStream ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.UpdateDataStreamRequest', + ['dataStream', 'name'] + ); + request.dataStream.name = defaultValue1; + const expectedHeaderRequestParams = `data_stream.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1beta.DataStream() + ); + client.innerApiCalls.updateDataStream = stubSimpleCall(expectedResponse); + const [response] = await client.updateDataStream(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateDataStream as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateDataStream as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateDataStream without error using callback', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.UpdateDataStreamRequest() + ); + request.dataStream ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.UpdateDataStreamRequest', + ['dataStream', 'name'] + ); + request.dataStream.name = defaultValue1; + const expectedHeaderRequestParams = `data_stream.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1beta.DataStream() + ); + client.innerApiCalls.updateDataStream = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateDataStream( + request, + ( + err?: Error | null, + result?: protos.google.analytics.admin.v1beta.IDataStream | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateDataStream as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateDataStream as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateDataStream with error', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.UpdateDataStreamRequest() + ); + request.dataStream ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.UpdateDataStreamRequest', + ['dataStream', 'name'] + ); + request.dataStream.name = defaultValue1; + const expectedHeaderRequestParams = `data_stream.name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateDataStream = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.updateDataStream(request), expectedError); + const actualRequest = ( + client.innerApiCalls.updateDataStream as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateDataStream as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateDataStream with closed client', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.UpdateDataStreamRequest() + ); + request.dataStream ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.UpdateDataStreamRequest', + ['dataStream', 'name'] + ); + request.dataStream.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.updateDataStream(request), expectedError); + }); + }); + + describe('getDataStream', () => { + it('invokes getDataStream without error', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.GetDataStreamRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.GetDataStreamRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1beta.DataStream() + ); + client.innerApiCalls.getDataStream = stubSimpleCall(expectedResponse); + const [response] = await client.getDataStream(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getDataStream as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getDataStream as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getDataStream without error using callback', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.GetDataStreamRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.GetDataStreamRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.analytics.admin.v1beta.DataStream() + ); + client.innerApiCalls.getDataStream = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getDataStream( + request, + ( + err?: Error | null, + result?: protos.google.analytics.admin.v1beta.IDataStream | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getDataStream as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getDataStream as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getDataStream with error', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.GetDataStreamRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.GetDataStreamRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getDataStream = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.getDataStream(request), expectedError); + const actualRequest = ( + client.innerApiCalls.getDataStream as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getDataStream as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getDataStream with closed client', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.GetDataStreamRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.GetDataStreamRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getDataStream(request), expectedError); + }); + }); + + describe('listAccounts', () => { + it('invokes listAccounts without error', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.ListAccountsRequest() + ); + const expectedResponse = [ + generateSampleMessage( + new protos.google.analytics.admin.v1beta.Account() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1beta.Account() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1beta.Account() + ), + ]; + client.innerApiCalls.listAccounts = stubSimpleCall(expectedResponse); + const [response] = await client.listAccounts(request); + assert.deepStrictEqual(response, expectedResponse); + }); + + it('invokes listAccounts without error using callback', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.ListAccountsRequest() + ); + const expectedResponse = [ + generateSampleMessage( + new protos.google.analytics.admin.v1beta.Account() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1beta.Account() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1beta.Account() + ), + ]; + client.innerApiCalls.listAccounts = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listAccounts( + request, + ( + err?: Error | null, + result?: protos.google.analytics.admin.v1beta.IAccount[] | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + }); + + it('invokes listAccounts with error', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.ListAccountsRequest() + ); + const expectedError = new Error('expected'); + client.innerApiCalls.listAccounts = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.listAccounts(request), expectedError); + }); + + it('invokes listAccountsStream without error', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.ListAccountsRequest() + ); + const expectedResponse = [ + generateSampleMessage( + new protos.google.analytics.admin.v1beta.Account() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1beta.Account() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1beta.Account() + ), + ]; + client.descriptors.page.listAccounts.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listAccountsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.analytics.admin.v1beta.Account[] = []; + stream.on( + 'data', + (response: protos.google.analytics.admin.v1beta.Account) => { + 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.listAccounts.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listAccounts, request) + ); + }); + + it('invokes listAccountsStream with error', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.ListAccountsRequest() + ); + const expectedError = new Error('expected'); + client.descriptors.page.listAccounts.createStream = stubPageStreamingCall( + undefined, + expectedError + ); + const stream = client.listAccountsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.analytics.admin.v1beta.Account[] = []; + stream.on( + 'data', + (response: protos.google.analytics.admin.v1beta.Account) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listAccounts.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listAccounts, request) + ); + }); + + it('uses async iteration with listAccounts without error', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.ListAccountsRequest() + ); + const expectedResponse = [ + generateSampleMessage( + new protos.google.analytics.admin.v1beta.Account() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1beta.Account() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1beta.Account() + ), + ]; + client.descriptors.page.listAccounts.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.analytics.admin.v1beta.IAccount[] = []; + const iterable = client.listAccountsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.listAccounts.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + }); + + it('uses async iteration with listAccounts with error', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.ListAccountsRequest() + ); + const expectedError = new Error('expected'); + client.descriptors.page.listAccounts.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listAccountsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.analytics.admin.v1beta.IAccount[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.listAccounts.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + }); + }); + + describe('listAccountSummaries', () => { + it('invokes listAccountSummaries without error', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.ListAccountSummariesRequest() + ); + const expectedResponse = [ + generateSampleMessage( + new protos.google.analytics.admin.v1beta.AccountSummary() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1beta.AccountSummary() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1beta.AccountSummary() + ), + ]; + client.innerApiCalls.listAccountSummaries = + stubSimpleCall(expectedResponse); + const [response] = await client.listAccountSummaries(request); + assert.deepStrictEqual(response, expectedResponse); + }); + + it('invokes listAccountSummaries without error using callback', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.ListAccountSummariesRequest() + ); + const expectedResponse = [ + generateSampleMessage( + new protos.google.analytics.admin.v1beta.AccountSummary() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1beta.AccountSummary() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1beta.AccountSummary() + ), + ]; + client.innerApiCalls.listAccountSummaries = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listAccountSummaries( + request, + ( + err?: Error | null, + result?: + | protos.google.analytics.admin.v1beta.IAccountSummary[] + | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + }); + + it('invokes listAccountSummaries with error', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.ListAccountSummariesRequest() + ); + const expectedError = new Error('expected'); + client.innerApiCalls.listAccountSummaries = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.listAccountSummaries(request), expectedError); + }); + + it('invokes listAccountSummariesStream without error', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.ListAccountSummariesRequest() + ); + const expectedResponse = [ + generateSampleMessage( + new protos.google.analytics.admin.v1beta.AccountSummary() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1beta.AccountSummary() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1beta.AccountSummary() + ), + ]; + client.descriptors.page.listAccountSummaries.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listAccountSummariesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.analytics.admin.v1beta.AccountSummary[] = + []; + stream.on( + 'data', + (response: protos.google.analytics.admin.v1beta.AccountSummary) => { + 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.listAccountSummaries.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listAccountSummaries, request) + ); + }); + + it('invokes listAccountSummariesStream with error', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.ListAccountSummariesRequest() + ); + const expectedError = new Error('expected'); + client.descriptors.page.listAccountSummaries.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.listAccountSummariesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.analytics.admin.v1beta.AccountSummary[] = + []; + stream.on( + 'data', + (response: protos.google.analytics.admin.v1beta.AccountSummary) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listAccountSummaries.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listAccountSummaries, request) + ); + }); + + it('uses async iteration with listAccountSummaries without error', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.ListAccountSummariesRequest() + ); + const expectedResponse = [ + generateSampleMessage( + new protos.google.analytics.admin.v1beta.AccountSummary() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1beta.AccountSummary() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1beta.AccountSummary() + ), + ]; + client.descriptors.page.listAccountSummaries.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.analytics.admin.v1beta.IAccountSummary[] = + []; + const iterable = client.listAccountSummariesAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.listAccountSummaries.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + }); + + it('uses async iteration with listAccountSummaries with error', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.ListAccountSummariesRequest() + ); + const expectedError = new Error('expected'); + client.descriptors.page.listAccountSummaries.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listAccountSummariesAsync(request); + await assert.rejects(async () => { + const responses: protos.google.analytics.admin.v1beta.IAccountSummary[] = + []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.listAccountSummaries.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + }); + }); + + describe('listProperties', () => { + it('invokes listProperties without error', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.ListPropertiesRequest() + ); + const expectedResponse = [ + generateSampleMessage( + new protos.google.analytics.admin.v1beta.Property() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1beta.Property() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1beta.Property() + ), + ]; + client.innerApiCalls.listProperties = stubSimpleCall(expectedResponse); + const [response] = await client.listProperties(request); + assert.deepStrictEqual(response, expectedResponse); + }); + + it('invokes listProperties without error using callback', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.ListPropertiesRequest() + ); + const expectedResponse = [ + generateSampleMessage( + new protos.google.analytics.admin.v1beta.Property() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1beta.Property() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1beta.Property() + ), + ]; + client.innerApiCalls.listProperties = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listProperties( + request, + ( + err?: Error | null, + result?: protos.google.analytics.admin.v1beta.IProperty[] | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + }); + + it('invokes listProperties with error', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.ListPropertiesRequest() + ); + const expectedError = new Error('expected'); + client.innerApiCalls.listProperties = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.listProperties(request), expectedError); + }); + + it('invokes listPropertiesStream without error', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.ListPropertiesRequest() + ); + const expectedResponse = [ + generateSampleMessage( + new protos.google.analytics.admin.v1beta.Property() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1beta.Property() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1beta.Property() + ), + ]; + client.descriptors.page.listProperties.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listPropertiesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.analytics.admin.v1beta.Property[] = []; + stream.on( + 'data', + (response: protos.google.analytics.admin.v1beta.Property) => { + 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.listProperties.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listProperties, request) + ); + }); + + it('invokes listPropertiesStream with error', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.ListPropertiesRequest() + ); + const expectedError = new Error('expected'); + client.descriptors.page.listProperties.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.listPropertiesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.analytics.admin.v1beta.Property[] = []; + stream.on( + 'data', + (response: protos.google.analytics.admin.v1beta.Property) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listProperties.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listProperties, request) + ); + }); + + it('uses async iteration with listProperties without error', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.ListPropertiesRequest() + ); + const expectedResponse = [ + generateSampleMessage( + new protos.google.analytics.admin.v1beta.Property() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1beta.Property() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1beta.Property() + ), + ]; + client.descriptors.page.listProperties.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.analytics.admin.v1beta.IProperty[] = []; + const iterable = client.listPropertiesAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.listProperties.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + }); + + it('uses async iteration with listProperties with error', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.ListPropertiesRequest() + ); + const expectedError = new Error('expected'); + client.descriptors.page.listProperties.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listPropertiesAsync(request); + await assert.rejects(async () => { + const responses: protos.google.analytics.admin.v1beta.IProperty[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.listProperties.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + }); + }); + + describe('listFirebaseLinks', () => { + it('invokes listFirebaseLinks without error', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.ListFirebaseLinksRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.ListFirebaseLinksRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.analytics.admin.v1beta.FirebaseLink() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1beta.FirebaseLink() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1beta.FirebaseLink() + ), + ]; + client.innerApiCalls.listFirebaseLinks = stubSimpleCall(expectedResponse); + const [response] = await client.listFirebaseLinks(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listFirebaseLinks as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listFirebaseLinks as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listFirebaseLinks without error using callback', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.ListFirebaseLinksRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.ListFirebaseLinksRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.analytics.admin.v1beta.FirebaseLink() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1beta.FirebaseLink() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1beta.FirebaseLink() + ), + ]; + client.innerApiCalls.listFirebaseLinks = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listFirebaseLinks( + request, + ( + err?: Error | null, + result?: protos.google.analytics.admin.v1beta.IFirebaseLink[] | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listFirebaseLinks as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listFirebaseLinks as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listFirebaseLinks with error', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.ListFirebaseLinksRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.ListFirebaseLinksRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listFirebaseLinks = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.listFirebaseLinks(request), expectedError); + const actualRequest = ( + client.innerApiCalls.listFirebaseLinks as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listFirebaseLinks as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listFirebaseLinksStream without error', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.ListFirebaseLinksRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.ListFirebaseLinksRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.analytics.admin.v1beta.FirebaseLink() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1beta.FirebaseLink() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1beta.FirebaseLink() + ), + ]; + client.descriptors.page.listFirebaseLinks.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listFirebaseLinksStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.analytics.admin.v1beta.FirebaseLink[] = + []; + stream.on( + 'data', + (response: protos.google.analytics.admin.v1beta.FirebaseLink) => { + 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.listFirebaseLinks.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listFirebaseLinks, request) + ); + assert( + (client.descriptors.page.listFirebaseLinks.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listFirebaseLinksStream with error', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.ListFirebaseLinksRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.ListFirebaseLinksRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listFirebaseLinks.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.listFirebaseLinksStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.analytics.admin.v1beta.FirebaseLink[] = + []; + stream.on( + 'data', + (response: protos.google.analytics.admin.v1beta.FirebaseLink) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listFirebaseLinks.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listFirebaseLinks, request) + ); + assert( + (client.descriptors.page.listFirebaseLinks.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listFirebaseLinks without error', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.ListFirebaseLinksRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.ListFirebaseLinksRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.analytics.admin.v1beta.FirebaseLink() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1beta.FirebaseLink() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1beta.FirebaseLink() + ), + ]; + client.descriptors.page.listFirebaseLinks.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.analytics.admin.v1beta.IFirebaseLink[] = + []; + const iterable = client.listFirebaseLinksAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.listFirebaseLinks.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + (client.descriptors.page.listFirebaseLinks.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listFirebaseLinks with error', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.ListFirebaseLinksRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.ListFirebaseLinksRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listFirebaseLinks.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listFirebaseLinksAsync(request); + await assert.rejects(async () => { + const responses: protos.google.analytics.admin.v1beta.IFirebaseLink[] = + []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.listFirebaseLinks.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + (client.descriptors.page.listFirebaseLinks.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('listGoogleAdsLinks', () => { + it('invokes listGoogleAdsLinks without error', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.ListGoogleAdsLinksRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.ListGoogleAdsLinksRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.analytics.admin.v1beta.GoogleAdsLink() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1beta.GoogleAdsLink() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1beta.GoogleAdsLink() + ), + ]; + client.innerApiCalls.listGoogleAdsLinks = + stubSimpleCall(expectedResponse); + const [response] = await client.listGoogleAdsLinks(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listGoogleAdsLinks as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listGoogleAdsLinks as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listGoogleAdsLinks without error using callback', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.ListGoogleAdsLinksRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.ListGoogleAdsLinksRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.analytics.admin.v1beta.GoogleAdsLink() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1beta.GoogleAdsLink() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1beta.GoogleAdsLink() + ), + ]; + client.innerApiCalls.listGoogleAdsLinks = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listGoogleAdsLinks( + request, + ( + err?: Error | null, + result?: + | protos.google.analytics.admin.v1beta.IGoogleAdsLink[] + | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listGoogleAdsLinks as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listGoogleAdsLinks as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listGoogleAdsLinks with error', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.ListGoogleAdsLinksRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.ListGoogleAdsLinksRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listGoogleAdsLinks = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.listGoogleAdsLinks(request), expectedError); + const actualRequest = ( + client.innerApiCalls.listGoogleAdsLinks as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listGoogleAdsLinks as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listGoogleAdsLinksStream without error', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.ListGoogleAdsLinksRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.ListGoogleAdsLinksRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.analytics.admin.v1beta.GoogleAdsLink() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1beta.GoogleAdsLink() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1beta.GoogleAdsLink() + ), + ]; + client.descriptors.page.listGoogleAdsLinks.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listGoogleAdsLinksStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.analytics.admin.v1beta.GoogleAdsLink[] = + []; + stream.on( + 'data', + (response: protos.google.analytics.admin.v1beta.GoogleAdsLink) => { + 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.listGoogleAdsLinks.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listGoogleAdsLinks, request) + ); + assert( + (client.descriptors.page.listGoogleAdsLinks.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listGoogleAdsLinksStream with error', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.ListGoogleAdsLinksRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.ListGoogleAdsLinksRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listGoogleAdsLinks.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.listGoogleAdsLinksStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.analytics.admin.v1beta.GoogleAdsLink[] = + []; + stream.on( + 'data', + (response: protos.google.analytics.admin.v1beta.GoogleAdsLink) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listGoogleAdsLinks.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listGoogleAdsLinks, request) + ); + assert( + (client.descriptors.page.listGoogleAdsLinks.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listGoogleAdsLinks without error', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.ListGoogleAdsLinksRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.ListGoogleAdsLinksRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.analytics.admin.v1beta.GoogleAdsLink() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1beta.GoogleAdsLink() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1beta.GoogleAdsLink() + ), + ]; + client.descriptors.page.listGoogleAdsLinks.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.analytics.admin.v1beta.IGoogleAdsLink[] = + []; + const iterable = client.listGoogleAdsLinksAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.listGoogleAdsLinks.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + (client.descriptors.page.listGoogleAdsLinks.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listGoogleAdsLinks with error', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.ListGoogleAdsLinksRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.ListGoogleAdsLinksRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listGoogleAdsLinks.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listGoogleAdsLinksAsync(request); + await assert.rejects(async () => { + const responses: protos.google.analytics.admin.v1beta.IGoogleAdsLink[] = + []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.listGoogleAdsLinks.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + (client.descriptors.page.listGoogleAdsLinks.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('listMeasurementProtocolSecrets', () => { + it('invokes listMeasurementProtocolSecrets without error', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.ListMeasurementProtocolSecretsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.ListMeasurementProtocolSecretsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.analytics.admin.v1beta.MeasurementProtocolSecret() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1beta.MeasurementProtocolSecret() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1beta.MeasurementProtocolSecret() + ), + ]; + client.innerApiCalls.listMeasurementProtocolSecrets = + stubSimpleCall(expectedResponse); + const [response] = await client.listMeasurementProtocolSecrets(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listMeasurementProtocolSecrets as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listMeasurementProtocolSecrets as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listMeasurementProtocolSecrets without error using callback', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.ListMeasurementProtocolSecretsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.ListMeasurementProtocolSecretsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.analytics.admin.v1beta.MeasurementProtocolSecret() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1beta.MeasurementProtocolSecret() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1beta.MeasurementProtocolSecret() + ), + ]; + client.innerApiCalls.listMeasurementProtocolSecrets = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listMeasurementProtocolSecrets( + request, + ( + err?: Error | null, + result?: + | protos.google.analytics.admin.v1beta.IMeasurementProtocolSecret[] + | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listMeasurementProtocolSecrets as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listMeasurementProtocolSecrets as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listMeasurementProtocolSecrets with error', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.ListMeasurementProtocolSecretsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.ListMeasurementProtocolSecretsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listMeasurementProtocolSecrets = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.listMeasurementProtocolSecrets(request), + expectedError + ); + const actualRequest = ( + client.innerApiCalls.listMeasurementProtocolSecrets as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listMeasurementProtocolSecrets as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listMeasurementProtocolSecretsStream without error', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.ListMeasurementProtocolSecretsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.ListMeasurementProtocolSecretsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.analytics.admin.v1beta.MeasurementProtocolSecret() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1beta.MeasurementProtocolSecret() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1beta.MeasurementProtocolSecret() + ), + ]; + client.descriptors.page.listMeasurementProtocolSecrets.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listMeasurementProtocolSecretsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.analytics.admin.v1beta.MeasurementProtocolSecret[] = + []; + stream.on( + 'data', + ( + response: protos.google.analytics.admin.v1beta.MeasurementProtocolSecret + ) => { + 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.listMeasurementProtocolSecrets + .createStream as SinonStub + ) + .getCall(0) + .calledWith( + client.innerApiCalls.listMeasurementProtocolSecrets, + request + ) + ); + assert( + ( + client.descriptors.page.listMeasurementProtocolSecrets + .createStream as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listMeasurementProtocolSecretsStream with error', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.ListMeasurementProtocolSecretsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.ListMeasurementProtocolSecretsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listMeasurementProtocolSecrets.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.listMeasurementProtocolSecretsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.analytics.admin.v1beta.MeasurementProtocolSecret[] = + []; + stream.on( + 'data', + ( + response: protos.google.analytics.admin.v1beta.MeasurementProtocolSecret + ) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + ( + client.descriptors.page.listMeasurementProtocolSecrets + .createStream as SinonStub + ) + .getCall(0) + .calledWith( + client.innerApiCalls.listMeasurementProtocolSecrets, + request + ) + ); + assert( + ( + client.descriptors.page.listMeasurementProtocolSecrets + .createStream as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listMeasurementProtocolSecrets without error', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.ListMeasurementProtocolSecretsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.ListMeasurementProtocolSecretsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.analytics.admin.v1beta.MeasurementProtocolSecret() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1beta.MeasurementProtocolSecret() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1beta.MeasurementProtocolSecret() + ), + ]; + client.descriptors.page.listMeasurementProtocolSecrets.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.analytics.admin.v1beta.IMeasurementProtocolSecret[] = + []; + const iterable = client.listMeasurementProtocolSecretsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.listMeasurementProtocolSecrets + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + ( + client.descriptors.page.listMeasurementProtocolSecrets + .asyncIterate as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listMeasurementProtocolSecrets with error', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.ListMeasurementProtocolSecretsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.ListMeasurementProtocolSecretsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listMeasurementProtocolSecrets.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listMeasurementProtocolSecretsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.analytics.admin.v1beta.IMeasurementProtocolSecret[] = + []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.listMeasurementProtocolSecrets + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + ( + client.descriptors.page.listMeasurementProtocolSecrets + .asyncIterate as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('searchChangeHistoryEvents', () => { + it('invokes searchChangeHistoryEvents without error', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.SearchChangeHistoryEventsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.SearchChangeHistoryEventsRequest', + ['account'] + ); + request.account = defaultValue1; + const expectedHeaderRequestParams = `account=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.analytics.admin.v1beta.ChangeHistoryEvent() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1beta.ChangeHistoryEvent() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1beta.ChangeHistoryEvent() + ), + ]; + client.innerApiCalls.searchChangeHistoryEvents = + stubSimpleCall(expectedResponse); + const [response] = await client.searchChangeHistoryEvents(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.searchChangeHistoryEvents as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.searchChangeHistoryEvents as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes searchChangeHistoryEvents without error using callback', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.SearchChangeHistoryEventsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.SearchChangeHistoryEventsRequest', + ['account'] + ); + request.account = defaultValue1; + const expectedHeaderRequestParams = `account=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.analytics.admin.v1beta.ChangeHistoryEvent() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1beta.ChangeHistoryEvent() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1beta.ChangeHistoryEvent() + ), + ]; + client.innerApiCalls.searchChangeHistoryEvents = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.searchChangeHistoryEvents( + request, + ( + err?: Error | null, + result?: + | protos.google.analytics.admin.v1beta.IChangeHistoryEvent[] + | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.searchChangeHistoryEvents as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.searchChangeHistoryEvents as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes searchChangeHistoryEvents with error', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.SearchChangeHistoryEventsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.SearchChangeHistoryEventsRequest', + ['account'] + ); + request.account = defaultValue1; + const expectedHeaderRequestParams = `account=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.searchChangeHistoryEvents = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.searchChangeHistoryEvents(request), + expectedError + ); + const actualRequest = ( + client.innerApiCalls.searchChangeHistoryEvents as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.searchChangeHistoryEvents as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes searchChangeHistoryEventsStream without error', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.SearchChangeHistoryEventsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.SearchChangeHistoryEventsRequest', + ['account'] + ); + request.account = defaultValue1; + const expectedHeaderRequestParams = `account=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.analytics.admin.v1beta.ChangeHistoryEvent() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1beta.ChangeHistoryEvent() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1beta.ChangeHistoryEvent() + ), + ]; + client.descriptors.page.searchChangeHistoryEvents.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.searchChangeHistoryEventsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.analytics.admin.v1beta.ChangeHistoryEvent[] = + []; + stream.on( + 'data', + ( + response: protos.google.analytics.admin.v1beta.ChangeHistoryEvent + ) => { + 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.searchChangeHistoryEvents + .createStream as SinonStub + ) + .getCall(0) + .calledWith(client.innerApiCalls.searchChangeHistoryEvents, request) + ); + assert( + ( + client.descriptors.page.searchChangeHistoryEvents + .createStream as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes searchChangeHistoryEventsStream with error', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.SearchChangeHistoryEventsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.SearchChangeHistoryEventsRequest', + ['account'] + ); + request.account = defaultValue1; + const expectedHeaderRequestParams = `account=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.searchChangeHistoryEvents.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.searchChangeHistoryEventsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.analytics.admin.v1beta.ChangeHistoryEvent[] = + []; + stream.on( + 'data', + ( + response: protos.google.analytics.admin.v1beta.ChangeHistoryEvent + ) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + ( + client.descriptors.page.searchChangeHistoryEvents + .createStream as SinonStub + ) + .getCall(0) + .calledWith(client.innerApiCalls.searchChangeHistoryEvents, request) + ); + assert( + ( + client.descriptors.page.searchChangeHistoryEvents + .createStream as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with searchChangeHistoryEvents without error', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.SearchChangeHistoryEventsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.SearchChangeHistoryEventsRequest', + ['account'] + ); + request.account = defaultValue1; + const expectedHeaderRequestParams = `account=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.analytics.admin.v1beta.ChangeHistoryEvent() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1beta.ChangeHistoryEvent() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1beta.ChangeHistoryEvent() + ), + ]; + client.descriptors.page.searchChangeHistoryEvents.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.analytics.admin.v1beta.IChangeHistoryEvent[] = + []; + const iterable = client.searchChangeHistoryEventsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.searchChangeHistoryEvents + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + ( + client.descriptors.page.searchChangeHistoryEvents + .asyncIterate as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with searchChangeHistoryEvents with error', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.SearchChangeHistoryEventsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.SearchChangeHistoryEventsRequest', + ['account'] + ); + request.account = defaultValue1; + const expectedHeaderRequestParams = `account=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.searchChangeHistoryEvents.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.searchChangeHistoryEventsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.analytics.admin.v1beta.IChangeHistoryEvent[] = + []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.searchChangeHistoryEvents + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + ( + client.descriptors.page.searchChangeHistoryEvents + .asyncIterate as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('listConversionEvents', () => { + it('invokes listConversionEvents without error', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.ListConversionEventsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.ListConversionEventsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.analytics.admin.v1beta.ConversionEvent() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1beta.ConversionEvent() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1beta.ConversionEvent() + ), + ]; + client.innerApiCalls.listConversionEvents = + stubSimpleCall(expectedResponse); + const [response] = await client.listConversionEvents(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listConversionEvents as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listConversionEvents as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listConversionEvents without error using callback', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.ListConversionEventsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.ListConversionEventsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.analytics.admin.v1beta.ConversionEvent() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1beta.ConversionEvent() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1beta.ConversionEvent() + ), + ]; + client.innerApiCalls.listConversionEvents = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listConversionEvents( + request, + ( + err?: Error | null, + result?: + | protos.google.analytics.admin.v1beta.IConversionEvent[] + | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listConversionEvents as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listConversionEvents as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listConversionEvents with error', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.ListConversionEventsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.ListConversionEventsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listConversionEvents = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.listConversionEvents(request), expectedError); + const actualRequest = ( + client.innerApiCalls.listConversionEvents as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listConversionEvents as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listConversionEventsStream without error', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.ListConversionEventsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.ListConversionEventsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.analytics.admin.v1beta.ConversionEvent() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1beta.ConversionEvent() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1beta.ConversionEvent() + ), + ]; + client.descriptors.page.listConversionEvents.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listConversionEventsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.analytics.admin.v1beta.ConversionEvent[] = + []; + stream.on( + 'data', + (response: protos.google.analytics.admin.v1beta.ConversionEvent) => { + 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.listConversionEvents.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listConversionEvents, request) + ); + assert( + (client.descriptors.page.listConversionEvents.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listConversionEventsStream with error', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.ListConversionEventsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.ListConversionEventsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listConversionEvents.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.listConversionEventsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.analytics.admin.v1beta.ConversionEvent[] = + []; + stream.on( + 'data', + (response: protos.google.analytics.admin.v1beta.ConversionEvent) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listConversionEvents.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listConversionEvents, request) + ); + assert( + (client.descriptors.page.listConversionEvents.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listConversionEvents without error', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.ListConversionEventsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.ListConversionEventsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.analytics.admin.v1beta.ConversionEvent() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1beta.ConversionEvent() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1beta.ConversionEvent() + ), + ]; + client.descriptors.page.listConversionEvents.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.analytics.admin.v1beta.IConversionEvent[] = + []; + const iterable = client.listConversionEventsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.listConversionEvents.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + (client.descriptors.page.listConversionEvents.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listConversionEvents with error', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.ListConversionEventsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.ListConversionEventsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listConversionEvents.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listConversionEventsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.analytics.admin.v1beta.IConversionEvent[] = + []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.listConversionEvents.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + (client.descriptors.page.listConversionEvents.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('listCustomDimensions', () => { + it('invokes listCustomDimensions without error', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.ListCustomDimensionsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.ListCustomDimensionsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.analytics.admin.v1beta.CustomDimension() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1beta.CustomDimension() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1beta.CustomDimension() + ), + ]; + client.innerApiCalls.listCustomDimensions = + stubSimpleCall(expectedResponse); + const [response] = await client.listCustomDimensions(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listCustomDimensions as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listCustomDimensions as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listCustomDimensions without error using callback', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.ListCustomDimensionsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.ListCustomDimensionsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.analytics.admin.v1beta.CustomDimension() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1beta.CustomDimension() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1beta.CustomDimension() + ), + ]; + client.innerApiCalls.listCustomDimensions = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listCustomDimensions( + request, + ( + err?: Error | null, + result?: + | protos.google.analytics.admin.v1beta.ICustomDimension[] + | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listCustomDimensions as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listCustomDimensions as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listCustomDimensions with error', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.ListCustomDimensionsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.ListCustomDimensionsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listCustomDimensions = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.listCustomDimensions(request), expectedError); + const actualRequest = ( + client.innerApiCalls.listCustomDimensions as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listCustomDimensions as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listCustomDimensionsStream without error', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.ListCustomDimensionsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.ListCustomDimensionsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.analytics.admin.v1beta.CustomDimension() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1beta.CustomDimension() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1beta.CustomDimension() + ), + ]; + client.descriptors.page.listCustomDimensions.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listCustomDimensionsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.analytics.admin.v1beta.CustomDimension[] = + []; + stream.on( + 'data', + (response: protos.google.analytics.admin.v1beta.CustomDimension) => { + 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.listCustomDimensions.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listCustomDimensions, request) + ); + assert( + (client.descriptors.page.listCustomDimensions.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listCustomDimensionsStream with error', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.ListCustomDimensionsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.ListCustomDimensionsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listCustomDimensions.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.listCustomDimensionsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.analytics.admin.v1beta.CustomDimension[] = + []; + stream.on( + 'data', + (response: protos.google.analytics.admin.v1beta.CustomDimension) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listCustomDimensions.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listCustomDimensions, request) + ); + assert( + (client.descriptors.page.listCustomDimensions.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listCustomDimensions without error', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.ListCustomDimensionsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.ListCustomDimensionsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.analytics.admin.v1beta.CustomDimension() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1beta.CustomDimension() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1beta.CustomDimension() + ), + ]; + client.descriptors.page.listCustomDimensions.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.analytics.admin.v1beta.ICustomDimension[] = + []; + const iterable = client.listCustomDimensionsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.listCustomDimensions.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + (client.descriptors.page.listCustomDimensions.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listCustomDimensions with error', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.ListCustomDimensionsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.ListCustomDimensionsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listCustomDimensions.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listCustomDimensionsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.analytics.admin.v1beta.ICustomDimension[] = + []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.listCustomDimensions.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + (client.descriptors.page.listCustomDimensions.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('listCustomMetrics', () => { + it('invokes listCustomMetrics without error', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.ListCustomMetricsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.ListCustomMetricsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.analytics.admin.v1beta.CustomMetric() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1beta.CustomMetric() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1beta.CustomMetric() + ), + ]; + client.innerApiCalls.listCustomMetrics = stubSimpleCall(expectedResponse); + const [response] = await client.listCustomMetrics(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listCustomMetrics as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listCustomMetrics as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listCustomMetrics without error using callback', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.ListCustomMetricsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.ListCustomMetricsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.analytics.admin.v1beta.CustomMetric() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1beta.CustomMetric() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1beta.CustomMetric() + ), + ]; + client.innerApiCalls.listCustomMetrics = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listCustomMetrics( + request, + ( + err?: Error | null, + result?: protos.google.analytics.admin.v1beta.ICustomMetric[] | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listCustomMetrics as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listCustomMetrics as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listCustomMetrics with error', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.ListCustomMetricsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.ListCustomMetricsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listCustomMetrics = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.listCustomMetrics(request), expectedError); + const actualRequest = ( + client.innerApiCalls.listCustomMetrics as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listCustomMetrics as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listCustomMetricsStream without error', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.ListCustomMetricsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.ListCustomMetricsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.analytics.admin.v1beta.CustomMetric() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1beta.CustomMetric() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1beta.CustomMetric() + ), + ]; + client.descriptors.page.listCustomMetrics.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listCustomMetricsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.analytics.admin.v1beta.CustomMetric[] = + []; + stream.on( + 'data', + (response: protos.google.analytics.admin.v1beta.CustomMetric) => { + 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.listCustomMetrics.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listCustomMetrics, request) + ); + assert( + (client.descriptors.page.listCustomMetrics.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listCustomMetricsStream with error', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.ListCustomMetricsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.ListCustomMetricsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listCustomMetrics.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.listCustomMetricsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.analytics.admin.v1beta.CustomMetric[] = + []; + stream.on( + 'data', + (response: protos.google.analytics.admin.v1beta.CustomMetric) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listCustomMetrics.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listCustomMetrics, request) + ); + assert( + (client.descriptors.page.listCustomMetrics.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listCustomMetrics without error', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.ListCustomMetricsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.ListCustomMetricsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.analytics.admin.v1beta.CustomMetric() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1beta.CustomMetric() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1beta.CustomMetric() + ), + ]; + client.descriptors.page.listCustomMetrics.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.analytics.admin.v1beta.ICustomMetric[] = + []; + const iterable = client.listCustomMetricsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.listCustomMetrics.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + (client.descriptors.page.listCustomMetrics.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listCustomMetrics with error', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.ListCustomMetricsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.ListCustomMetricsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listCustomMetrics.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listCustomMetricsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.analytics.admin.v1beta.ICustomMetric[] = + []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.listCustomMetrics.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + (client.descriptors.page.listCustomMetrics.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('listDataStreams', () => { + it('invokes listDataStreams without error', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.ListDataStreamsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.ListDataStreamsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.analytics.admin.v1beta.DataStream() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1beta.DataStream() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1beta.DataStream() + ), + ]; + client.innerApiCalls.listDataStreams = stubSimpleCall(expectedResponse); + const [response] = await client.listDataStreams(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listDataStreams as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listDataStreams as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listDataStreams without error using callback', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.ListDataStreamsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.ListDataStreamsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.analytics.admin.v1beta.DataStream() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1beta.DataStream() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1beta.DataStream() + ), + ]; + client.innerApiCalls.listDataStreams = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listDataStreams( + request, + ( + err?: Error | null, + result?: protos.google.analytics.admin.v1beta.IDataStream[] | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listDataStreams as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listDataStreams as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listDataStreams with error', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.ListDataStreamsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.ListDataStreamsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listDataStreams = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.listDataStreams(request), expectedError); + const actualRequest = ( + client.innerApiCalls.listDataStreams as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listDataStreams as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listDataStreamsStream without error', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.ListDataStreamsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.ListDataStreamsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.analytics.admin.v1beta.DataStream() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1beta.DataStream() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1beta.DataStream() + ), + ]; + client.descriptors.page.listDataStreams.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listDataStreamsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.analytics.admin.v1beta.DataStream[] = []; + stream.on( + 'data', + (response: protos.google.analytics.admin.v1beta.DataStream) => { + 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.listDataStreams.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listDataStreams, request) + ); + assert( + (client.descriptors.page.listDataStreams.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listDataStreamsStream with error', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.ListDataStreamsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.ListDataStreamsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listDataStreams.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.listDataStreamsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.analytics.admin.v1beta.DataStream[] = []; + stream.on( + 'data', + (response: protos.google.analytics.admin.v1beta.DataStream) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listDataStreams.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listDataStreams, request) + ); + assert( + (client.descriptors.page.listDataStreams.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listDataStreams without error', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.ListDataStreamsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.ListDataStreamsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.analytics.admin.v1beta.DataStream() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1beta.DataStream() + ), + generateSampleMessage( + new protos.google.analytics.admin.v1beta.DataStream() + ), + ]; + client.descriptors.page.listDataStreams.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.analytics.admin.v1beta.IDataStream[] = []; + const iterable = client.listDataStreamsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.listDataStreams.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + (client.descriptors.page.listDataStreams.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listDataStreams with error', async () => { + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.analytics.admin.v1beta.ListDataStreamsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.analytics.admin.v1beta.ListDataStreamsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listDataStreams.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listDataStreamsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.analytics.admin.v1beta.IDataStream[] = + []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.listDataStreams.asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + (client.descriptors.page.listDataStreams.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('Path templates', () => { + describe('account', () => { + const fakePath = '/rendered/path/account'; + const expectedParameters = { + account: 'accountValue', + }; + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.accountPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.accountPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('accountPath', () => { + const result = client.accountPath('accountValue'); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.accountPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchAccountFromAccountName', () => { + const result = client.matchAccountFromAccountName(fakePath); + assert.strictEqual(result, 'accountValue'); + assert( + (client.pathTemplates.accountPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('accountSummary', () => { + const fakePath = '/rendered/path/accountSummary'; + const expectedParameters = { + account_summary: 'accountSummaryValue', + }; + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.accountSummaryPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.accountSummaryPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('accountSummaryPath', () => { + const result = client.accountSummaryPath('accountSummaryValue'); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.accountSummaryPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchAccountSummaryFromAccountSummaryName', () => { + const result = + client.matchAccountSummaryFromAccountSummaryName(fakePath); + assert.strictEqual(result, 'accountSummaryValue'); + assert( + (client.pathTemplates.accountSummaryPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('conversionEvent', () => { + const fakePath = '/rendered/path/conversionEvent'; + const expectedParameters = { + property: 'propertyValue', + conversion_event: 'conversionEventValue', + }; + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.conversionEventPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.conversionEventPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('conversionEventPath', () => { + const result = client.conversionEventPath( + 'propertyValue', + 'conversionEventValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.conversionEventPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchPropertyFromConversionEventName', () => { + const result = client.matchPropertyFromConversionEventName(fakePath); + assert.strictEqual(result, 'propertyValue'); + assert( + (client.pathTemplates.conversionEventPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchConversionEventFromConversionEventName', () => { + const result = + client.matchConversionEventFromConversionEventName(fakePath); + assert.strictEqual(result, 'conversionEventValue'); + assert( + (client.pathTemplates.conversionEventPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('customDimension', () => { + const fakePath = '/rendered/path/customDimension'; + const expectedParameters = { + property: 'propertyValue', + custom_dimension: 'customDimensionValue', + }; + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.customDimensionPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.customDimensionPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('customDimensionPath', () => { + const result = client.customDimensionPath( + 'propertyValue', + 'customDimensionValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.customDimensionPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchPropertyFromCustomDimensionName', () => { + const result = client.matchPropertyFromCustomDimensionName(fakePath); + assert.strictEqual(result, 'propertyValue'); + assert( + (client.pathTemplates.customDimensionPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchCustomDimensionFromCustomDimensionName', () => { + const result = + client.matchCustomDimensionFromCustomDimensionName(fakePath); + assert.strictEqual(result, 'customDimensionValue'); + assert( + (client.pathTemplates.customDimensionPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('customMetric', () => { + const fakePath = '/rendered/path/customMetric'; + const expectedParameters = { + property: 'propertyValue', + custom_metric: 'customMetricValue', + }; + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.customMetricPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.customMetricPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('customMetricPath', () => { + const result = client.customMetricPath( + 'propertyValue', + 'customMetricValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.customMetricPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchPropertyFromCustomMetricName', () => { + const result = client.matchPropertyFromCustomMetricName(fakePath); + assert.strictEqual(result, 'propertyValue'); + assert( + (client.pathTemplates.customMetricPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchCustomMetricFromCustomMetricName', () => { + const result = client.matchCustomMetricFromCustomMetricName(fakePath); + assert.strictEqual(result, 'customMetricValue'); + assert( + (client.pathTemplates.customMetricPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('dataRetentionSettings', () => { + const fakePath = '/rendered/path/dataRetentionSettings'; + const expectedParameters = { + property: 'propertyValue', + }; + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.dataRetentionSettingsPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.dataRetentionSettingsPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('dataRetentionSettingsPath', () => { + const result = client.dataRetentionSettingsPath('propertyValue'); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.dataRetentionSettingsPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchPropertyFromDataRetentionSettingsName', () => { + const result = + client.matchPropertyFromDataRetentionSettingsName(fakePath); + assert.strictEqual(result, 'propertyValue'); + assert( + ( + client.pathTemplates.dataRetentionSettingsPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('dataSharingSettings', () => { + const fakePath = '/rendered/path/dataSharingSettings'; + const expectedParameters = { + account: 'accountValue', + }; + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.dataSharingSettingsPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.dataSharingSettingsPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('dataSharingSettingsPath', () => { + const result = client.dataSharingSettingsPath('accountValue'); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.dataSharingSettingsPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchAccountFromDataSharingSettingsName', () => { + const result = client.matchAccountFromDataSharingSettingsName(fakePath); + assert.strictEqual(result, 'accountValue'); + assert( + ( + client.pathTemplates.dataSharingSettingsPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('dataStream', () => { + const fakePath = '/rendered/path/dataStream'; + const expectedParameters = { + property: 'propertyValue', + data_stream: 'dataStreamValue', + }; + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.dataStreamPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.dataStreamPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('dataStreamPath', () => { + const result = client.dataStreamPath( + 'propertyValue', + 'dataStreamValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.dataStreamPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchPropertyFromDataStreamName', () => { + const result = client.matchPropertyFromDataStreamName(fakePath); + assert.strictEqual(result, 'propertyValue'); + assert( + (client.pathTemplates.dataStreamPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDataStreamFromDataStreamName', () => { + const result = client.matchDataStreamFromDataStreamName(fakePath); + assert.strictEqual(result, 'dataStreamValue'); + assert( + (client.pathTemplates.dataStreamPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('firebaseLink', () => { + const fakePath = '/rendered/path/firebaseLink'; + const expectedParameters = { + property: 'propertyValue', + firebase_link: 'firebaseLinkValue', + }; + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.firebaseLinkPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.firebaseLinkPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('firebaseLinkPath', () => { + const result = client.firebaseLinkPath( + 'propertyValue', + 'firebaseLinkValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.firebaseLinkPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchPropertyFromFirebaseLinkName', () => { + const result = client.matchPropertyFromFirebaseLinkName(fakePath); + assert.strictEqual(result, 'propertyValue'); + assert( + (client.pathTemplates.firebaseLinkPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchFirebaseLinkFromFirebaseLinkName', () => { + const result = client.matchFirebaseLinkFromFirebaseLinkName(fakePath); + assert.strictEqual(result, 'firebaseLinkValue'); + assert( + (client.pathTemplates.firebaseLinkPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('googleAdsLink', () => { + const fakePath = '/rendered/path/googleAdsLink'; + const expectedParameters = { + property: 'propertyValue', + google_ads_link: 'googleAdsLinkValue', + }; + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.googleAdsLinkPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.googleAdsLinkPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('googleAdsLinkPath', () => { + const result = client.googleAdsLinkPath( + 'propertyValue', + 'googleAdsLinkValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.googleAdsLinkPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchPropertyFromGoogleAdsLinkName', () => { + const result = client.matchPropertyFromGoogleAdsLinkName(fakePath); + assert.strictEqual(result, 'propertyValue'); + assert( + (client.pathTemplates.googleAdsLinkPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchGoogleAdsLinkFromGoogleAdsLinkName', () => { + const result = client.matchGoogleAdsLinkFromGoogleAdsLinkName(fakePath); + assert.strictEqual(result, 'googleAdsLinkValue'); + assert( + (client.pathTemplates.googleAdsLinkPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('measurementProtocolSecret', () => { + const fakePath = '/rendered/path/measurementProtocolSecret'; + const expectedParameters = { + property: 'propertyValue', + data_stream: 'dataStreamValue', + measurement_protocol_secret: 'measurementProtocolSecretValue', + }; + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.measurementProtocolSecretPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.measurementProtocolSecretPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('measurementProtocolSecretPath', () => { + const result = client.measurementProtocolSecretPath( + 'propertyValue', + 'dataStreamValue', + 'measurementProtocolSecretValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.measurementProtocolSecretPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchPropertyFromMeasurementProtocolSecretName', () => { + const result = + client.matchPropertyFromMeasurementProtocolSecretName(fakePath); + assert.strictEqual(result, 'propertyValue'); + assert( + ( + client.pathTemplates.measurementProtocolSecretPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchDataStreamFromMeasurementProtocolSecretName', () => { + const result = + client.matchDataStreamFromMeasurementProtocolSecretName(fakePath); + assert.strictEqual(result, 'dataStreamValue'); + assert( + ( + client.pathTemplates.measurementProtocolSecretPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchMeasurementProtocolSecretFromMeasurementProtocolSecretName', () => { + const result = + client.matchMeasurementProtocolSecretFromMeasurementProtocolSecretName( + fakePath + ); + assert.strictEqual(result, 'measurementProtocolSecretValue'); + assert( + ( + client.pathTemplates.measurementProtocolSecretPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('property', () => { + const fakePath = '/rendered/path/property'; + const expectedParameters = { + property: 'propertyValue', + }; + const client = + new analyticsadminserviceModule.v1beta.AnalyticsAdminServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.propertyPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.propertyPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('propertyPath', () => { + const result = client.propertyPath('propertyValue'); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.propertyPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchPropertyFromPropertyName', () => { + const result = client.matchPropertyFromPropertyName(fakePath); + assert.strictEqual(result, 'propertyValue'); + assert( + (client.pathTemplates.propertyPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + }); +}); diff --git a/packages/google-analytics-admin/tsconfig.json b/packages/google-analytics-admin/tsconfig.json new file mode 100644 index 00000000000..c78f1c884ef --- /dev/null +++ b/packages/google-analytics-admin/tsconfig.json @@ -0,0 +1,19 @@ +{ + "extends": "./node_modules/gts/tsconfig-google.json", + "compilerOptions": { + "rootDir": ".", + "outDir": "build", + "resolveJsonModule": true, + "lib": [ + "es2018", + "dom" + ] + }, + "include": [ + "src/*.ts", + "src/**/*.ts", + "test/*.ts", + "test/**/*.ts", + "system-test/*.ts" + ] +} diff --git a/packages/google-analytics-admin/webpack.config.js b/packages/google-analytics-admin/webpack.config.js new file mode 100644 index 00000000000..27157b29125 --- /dev/null +++ b/packages/google-analytics-admin/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: 'AnalyticsAdminService', + filename: './analytics-admin-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-cloud-retail/README.md b/packages/google-cloud-retail/README.md index 1ca590f9d1b..dd0aa0fdcef 100644 --- a/packages/google-cloud-retail/README.md +++ b/packages/google-cloud-retail/README.md @@ -86,153 +86,153 @@ Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/ | Sample | Source Code | Try it | | --------------------------- | --------------------------------- | ------ | -| Catalog_service.add_catalog_attribute | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2/catalog_service.add_catalog_attribute.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2/catalog_service.add_catalog_attribute.js,samples/README.md) | -| Catalog_service.get_attributes_config | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2/catalog_service.get_attributes_config.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2/catalog_service.get_attributes_config.js,samples/README.md) | -| Catalog_service.get_completion_config | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2/catalog_service.get_completion_config.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2/catalog_service.get_completion_config.js,samples/README.md) | -| Catalog_service.get_default_branch | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2/catalog_service.get_default_branch.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2/catalog_service.get_default_branch.js,samples/README.md) | -| Catalog_service.list_catalogs | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2/catalog_service.list_catalogs.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2/catalog_service.list_catalogs.js,samples/README.md) | -| Catalog_service.remove_catalog_attribute | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2/catalog_service.remove_catalog_attribute.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2/catalog_service.remove_catalog_attribute.js,samples/README.md) | -| Catalog_service.replace_catalog_attribute | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2/catalog_service.replace_catalog_attribute.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2/catalog_service.replace_catalog_attribute.js,samples/README.md) | -| Catalog_service.set_default_branch | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2/catalog_service.set_default_branch.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2/catalog_service.set_default_branch.js,samples/README.md) | -| Catalog_service.update_attributes_config | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2/catalog_service.update_attributes_config.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2/catalog_service.update_attributes_config.js,samples/README.md) | -| Catalog_service.update_catalog | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2/catalog_service.update_catalog.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2/catalog_service.update_catalog.js,samples/README.md) | -| Catalog_service.update_completion_config | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2/catalog_service.update_completion_config.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2/catalog_service.update_completion_config.js,samples/README.md) | -| Completion_service.complete_query | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2/completion_service.complete_query.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2/completion_service.complete_query.js,samples/README.md) | -| Completion_service.import_completion_data | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2/completion_service.import_completion_data.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2/completion_service.import_completion_data.js,samples/README.md) | -| Control_service.create_control | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2/control_service.create_control.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2/control_service.create_control.js,samples/README.md) | -| Control_service.delete_control | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2/control_service.delete_control.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2/control_service.delete_control.js,samples/README.md) | -| Control_service.get_control | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2/control_service.get_control.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2/control_service.get_control.js,samples/README.md) | -| Control_service.list_controls | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2/control_service.list_controls.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2/control_service.list_controls.js,samples/README.md) | -| Control_service.update_control | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2/control_service.update_control.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2/control_service.update_control.js,samples/README.md) | -| Prediction_service.predict | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2/prediction_service.predict.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2/prediction_service.predict.js,samples/README.md) | -| Product_service.add_fulfillment_places | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2/product_service.add_fulfillment_places.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2/product_service.add_fulfillment_places.js,samples/README.md) | -| Product_service.add_local_inventories | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2/product_service.add_local_inventories.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2/product_service.add_local_inventories.js,samples/README.md) | -| Product_service.create_product | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2/product_service.create_product.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2/product_service.create_product.js,samples/README.md) | -| Product_service.delete_product | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2/product_service.delete_product.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2/product_service.delete_product.js,samples/README.md) | -| Product_service.get_product | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2/product_service.get_product.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2/product_service.get_product.js,samples/README.md) | -| Product_service.import_products | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2/product_service.import_products.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2/product_service.import_products.js,samples/README.md) | -| Product_service.list_products | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2/product_service.list_products.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2/product_service.list_products.js,samples/README.md) | -| Product_service.remove_fulfillment_places | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2/product_service.remove_fulfillment_places.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2/product_service.remove_fulfillment_places.js,samples/README.md) | -| Product_service.remove_local_inventories | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2/product_service.remove_local_inventories.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2/product_service.remove_local_inventories.js,samples/README.md) | -| Product_service.set_inventory | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2/product_service.set_inventory.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2/product_service.set_inventory.js,samples/README.md) | -| Product_service.update_product | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2/product_service.update_product.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2/product_service.update_product.js,samples/README.md) | -| Search_service.search | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2/search_service.search.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2/search_service.search.js,samples/README.md) | -| Serving_config_service.add_control | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2/serving_config_service.add_control.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2/serving_config_service.add_control.js,samples/README.md) | -| Serving_config_service.create_serving_config | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2/serving_config_service.create_serving_config.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2/serving_config_service.create_serving_config.js,samples/README.md) | -| Serving_config_service.delete_serving_config | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2/serving_config_service.delete_serving_config.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2/serving_config_service.delete_serving_config.js,samples/README.md) | -| Serving_config_service.get_serving_config | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2/serving_config_service.get_serving_config.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2/serving_config_service.get_serving_config.js,samples/README.md) | -| Serving_config_service.list_serving_configs | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2/serving_config_service.list_serving_configs.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2/serving_config_service.list_serving_configs.js,samples/README.md) | -| Serving_config_service.remove_control | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2/serving_config_service.remove_control.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2/serving_config_service.remove_control.js,samples/README.md) | -| Serving_config_service.update_serving_config | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2/serving_config_service.update_serving_config.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2/serving_config_service.update_serving_config.js,samples/README.md) | -| User_event_service.collect_user_event | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2/user_event_service.collect_user_event.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2/user_event_service.collect_user_event.js,samples/README.md) | -| User_event_service.import_user_events | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2/user_event_service.import_user_events.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2/user_event_service.import_user_events.js,samples/README.md) | -| User_event_service.purge_user_events | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2/user_event_service.purge_user_events.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2/user_event_service.purge_user_events.js,samples/README.md) | -| User_event_service.rejoin_user_events | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2/user_event_service.rejoin_user_events.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2/user_event_service.rejoin_user_events.js,samples/README.md) | -| User_event_service.write_user_event | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2/user_event_service.write_user_event.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2/user_event_service.write_user_event.js,samples/README.md) | -| Catalog_service.add_catalog_attribute | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2alpha/catalog_service.add_catalog_attribute.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2alpha/catalog_service.add_catalog_attribute.js,samples/README.md) | -| Catalog_service.get_attributes_config | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2alpha/catalog_service.get_attributes_config.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2alpha/catalog_service.get_attributes_config.js,samples/README.md) | -| Catalog_service.get_completion_config | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2alpha/catalog_service.get_completion_config.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2alpha/catalog_service.get_completion_config.js,samples/README.md) | -| Catalog_service.get_default_branch | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2alpha/catalog_service.get_default_branch.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2alpha/catalog_service.get_default_branch.js,samples/README.md) | -| Catalog_service.list_catalogs | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2alpha/catalog_service.list_catalogs.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2alpha/catalog_service.list_catalogs.js,samples/README.md) | -| Catalog_service.remove_catalog_attribute | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2alpha/catalog_service.remove_catalog_attribute.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2alpha/catalog_service.remove_catalog_attribute.js,samples/README.md) | -| Catalog_service.replace_catalog_attribute | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2alpha/catalog_service.replace_catalog_attribute.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2alpha/catalog_service.replace_catalog_attribute.js,samples/README.md) | -| Catalog_service.set_default_branch | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2alpha/catalog_service.set_default_branch.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2alpha/catalog_service.set_default_branch.js,samples/README.md) | -| Catalog_service.update_attributes_config | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2alpha/catalog_service.update_attributes_config.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2alpha/catalog_service.update_attributes_config.js,samples/README.md) | -| Catalog_service.update_catalog | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2alpha/catalog_service.update_catalog.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2alpha/catalog_service.update_catalog.js,samples/README.md) | -| Catalog_service.update_completion_config | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2alpha/catalog_service.update_completion_config.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2alpha/catalog_service.update_completion_config.js,samples/README.md) | -| Completion_service.complete_query | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2alpha/completion_service.complete_query.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2alpha/completion_service.complete_query.js,samples/README.md) | -| Completion_service.import_completion_data | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2alpha/completion_service.import_completion_data.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2alpha/completion_service.import_completion_data.js,samples/README.md) | -| Control_service.create_control | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2alpha/control_service.create_control.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2alpha/control_service.create_control.js,samples/README.md) | -| Control_service.delete_control | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2alpha/control_service.delete_control.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2alpha/control_service.delete_control.js,samples/README.md) | -| Control_service.get_control | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2alpha/control_service.get_control.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2alpha/control_service.get_control.js,samples/README.md) | -| Control_service.list_controls | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2alpha/control_service.list_controls.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2alpha/control_service.list_controls.js,samples/README.md) | -| Control_service.update_control | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2alpha/control_service.update_control.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2alpha/control_service.update_control.js,samples/README.md) | -| Model_service.create_model | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2alpha/model_service.create_model.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2alpha/model_service.create_model.js,samples/README.md) | -| Model_service.delete_model | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2alpha/model_service.delete_model.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2alpha/model_service.delete_model.js,samples/README.md) | -| Model_service.list_models | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2alpha/model_service.list_models.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2alpha/model_service.list_models.js,samples/README.md) | -| Model_service.pause_model | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2alpha/model_service.pause_model.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2alpha/model_service.pause_model.js,samples/README.md) | -| Model_service.resume_model | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2alpha/model_service.resume_model.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2alpha/model_service.resume_model.js,samples/README.md) | -| Model_service.tune_model | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2alpha/model_service.tune_model.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2alpha/model_service.tune_model.js,samples/README.md) | -| Model_service.update_model | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2alpha/model_service.update_model.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2alpha/model_service.update_model.js,samples/README.md) | -| Prediction_service.predict | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2alpha/prediction_service.predict.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2alpha/prediction_service.predict.js,samples/README.md) | -| Product_service.add_fulfillment_places | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2alpha/product_service.add_fulfillment_places.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2alpha/product_service.add_fulfillment_places.js,samples/README.md) | -| Product_service.add_local_inventories | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2alpha/product_service.add_local_inventories.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2alpha/product_service.add_local_inventories.js,samples/README.md) | -| Product_service.create_product | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2alpha/product_service.create_product.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2alpha/product_service.create_product.js,samples/README.md) | -| Product_service.delete_product | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2alpha/product_service.delete_product.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2alpha/product_service.delete_product.js,samples/README.md) | -| Product_service.get_product | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2alpha/product_service.get_product.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2alpha/product_service.get_product.js,samples/README.md) | -| Product_service.import_products | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2alpha/product_service.import_products.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2alpha/product_service.import_products.js,samples/README.md) | -| Product_service.list_products | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2alpha/product_service.list_products.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2alpha/product_service.list_products.js,samples/README.md) | -| Product_service.purge_products | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2alpha/product_service.purge_products.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2alpha/product_service.purge_products.js,samples/README.md) | -| Product_service.remove_fulfillment_places | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2alpha/product_service.remove_fulfillment_places.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2alpha/product_service.remove_fulfillment_places.js,samples/README.md) | -| Product_service.remove_local_inventories | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2alpha/product_service.remove_local_inventories.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2alpha/product_service.remove_local_inventories.js,samples/README.md) | -| Product_service.set_inventory | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2alpha/product_service.set_inventory.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2alpha/product_service.set_inventory.js,samples/README.md) | -| Product_service.update_product | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2alpha/product_service.update_product.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2alpha/product_service.update_product.js,samples/README.md) | -| Search_service.search | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2alpha/search_service.search.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2alpha/search_service.search.js,samples/README.md) | -| Serving_config_service.add_control | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2alpha/serving_config_service.add_control.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2alpha/serving_config_service.add_control.js,samples/README.md) | -| Serving_config_service.create_serving_config | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2alpha/serving_config_service.create_serving_config.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2alpha/serving_config_service.create_serving_config.js,samples/README.md) | -| Serving_config_service.delete_serving_config | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2alpha/serving_config_service.delete_serving_config.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2alpha/serving_config_service.delete_serving_config.js,samples/README.md) | -| Serving_config_service.get_serving_config | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2alpha/serving_config_service.get_serving_config.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2alpha/serving_config_service.get_serving_config.js,samples/README.md) | -| Serving_config_service.list_serving_configs | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2alpha/serving_config_service.list_serving_configs.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2alpha/serving_config_service.list_serving_configs.js,samples/README.md) | -| Serving_config_service.remove_control | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2alpha/serving_config_service.remove_control.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2alpha/serving_config_service.remove_control.js,samples/README.md) | -| Serving_config_service.update_serving_config | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2alpha/serving_config_service.update_serving_config.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2alpha/serving_config_service.update_serving_config.js,samples/README.md) | -| User_event_service.collect_user_event | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2alpha/user_event_service.collect_user_event.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2alpha/user_event_service.collect_user_event.js,samples/README.md) | -| User_event_service.import_user_events | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2alpha/user_event_service.import_user_events.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2alpha/user_event_service.import_user_events.js,samples/README.md) | -| User_event_service.purge_user_events | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2alpha/user_event_service.purge_user_events.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2alpha/user_event_service.purge_user_events.js,samples/README.md) | -| User_event_service.rejoin_user_events | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2alpha/user_event_service.rejoin_user_events.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2alpha/user_event_service.rejoin_user_events.js,samples/README.md) | -| User_event_service.write_user_event | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2alpha/user_event_service.write_user_event.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2alpha/user_event_service.write_user_event.js,samples/README.md) | -| Catalog_service.add_catalog_attribute | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2beta/catalog_service.add_catalog_attribute.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2beta/catalog_service.add_catalog_attribute.js,samples/README.md) | -| Catalog_service.batch_remove_catalog_attributes | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2beta/catalog_service.batch_remove_catalog_attributes.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2beta/catalog_service.batch_remove_catalog_attributes.js,samples/README.md) | -| Catalog_service.get_attributes_config | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2beta/catalog_service.get_attributes_config.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2beta/catalog_service.get_attributes_config.js,samples/README.md) | -| Catalog_service.get_completion_config | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2beta/catalog_service.get_completion_config.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2beta/catalog_service.get_completion_config.js,samples/README.md) | -| Catalog_service.get_default_branch | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2beta/catalog_service.get_default_branch.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2beta/catalog_service.get_default_branch.js,samples/README.md) | -| Catalog_service.list_catalogs | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2beta/catalog_service.list_catalogs.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2beta/catalog_service.list_catalogs.js,samples/README.md) | -| Catalog_service.remove_catalog_attribute | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2beta/catalog_service.remove_catalog_attribute.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2beta/catalog_service.remove_catalog_attribute.js,samples/README.md) | -| Catalog_service.replace_catalog_attribute | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2beta/catalog_service.replace_catalog_attribute.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2beta/catalog_service.replace_catalog_attribute.js,samples/README.md) | -| Catalog_service.set_default_branch | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2beta/catalog_service.set_default_branch.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2beta/catalog_service.set_default_branch.js,samples/README.md) | -| Catalog_service.update_attributes_config | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2beta/catalog_service.update_attributes_config.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2beta/catalog_service.update_attributes_config.js,samples/README.md) | -| Catalog_service.update_catalog | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2beta/catalog_service.update_catalog.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2beta/catalog_service.update_catalog.js,samples/README.md) | -| Catalog_service.update_completion_config | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2beta/catalog_service.update_completion_config.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2beta/catalog_service.update_completion_config.js,samples/README.md) | -| Completion_service.complete_query | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2beta/completion_service.complete_query.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2beta/completion_service.complete_query.js,samples/README.md) | -| Completion_service.import_completion_data | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2beta/completion_service.import_completion_data.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2beta/completion_service.import_completion_data.js,samples/README.md) | -| Control_service.create_control | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2beta/control_service.create_control.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2beta/control_service.create_control.js,samples/README.md) | -| Control_service.delete_control | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2beta/control_service.delete_control.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2beta/control_service.delete_control.js,samples/README.md) | -| Control_service.get_control | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2beta/control_service.get_control.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2beta/control_service.get_control.js,samples/README.md) | -| Control_service.list_controls | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2beta/control_service.list_controls.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2beta/control_service.list_controls.js,samples/README.md) | -| Control_service.update_control | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2beta/control_service.update_control.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2beta/control_service.update_control.js,samples/README.md) | -| Model_service.create_model | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2beta/model_service.create_model.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2beta/model_service.create_model.js,samples/README.md) | -| Model_service.delete_model | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2beta/model_service.delete_model.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2beta/model_service.delete_model.js,samples/README.md) | -| Model_service.list_models | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2beta/model_service.list_models.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2beta/model_service.list_models.js,samples/README.md) | -| Model_service.pause_model | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2beta/model_service.pause_model.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2beta/model_service.pause_model.js,samples/README.md) | -| Model_service.resume_model | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2beta/model_service.resume_model.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2beta/model_service.resume_model.js,samples/README.md) | -| Model_service.tune_model | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2beta/model_service.tune_model.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2beta/model_service.tune_model.js,samples/README.md) | -| Model_service.update_model | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2beta/model_service.update_model.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2beta/model_service.update_model.js,samples/README.md) | -| Prediction_service.predict | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2beta/prediction_service.predict.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2beta/prediction_service.predict.js,samples/README.md) | -| Product_service.add_fulfillment_places | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2beta/product_service.add_fulfillment_places.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2beta/product_service.add_fulfillment_places.js,samples/README.md) | -| Product_service.add_local_inventories | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2beta/product_service.add_local_inventories.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2beta/product_service.add_local_inventories.js,samples/README.md) | -| Product_service.create_product | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2beta/product_service.create_product.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2beta/product_service.create_product.js,samples/README.md) | -| Product_service.delete_product | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2beta/product_service.delete_product.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2beta/product_service.delete_product.js,samples/README.md) | -| Product_service.get_product | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2beta/product_service.get_product.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2beta/product_service.get_product.js,samples/README.md) | -| Product_service.import_products | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2beta/product_service.import_products.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2beta/product_service.import_products.js,samples/README.md) | -| Product_service.list_products | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2beta/product_service.list_products.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2beta/product_service.list_products.js,samples/README.md) | -| Product_service.remove_fulfillment_places | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2beta/product_service.remove_fulfillment_places.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2beta/product_service.remove_fulfillment_places.js,samples/README.md) | -| Product_service.remove_local_inventories | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2beta/product_service.remove_local_inventories.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2beta/product_service.remove_local_inventories.js,samples/README.md) | -| Product_service.set_inventory | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2beta/product_service.set_inventory.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2beta/product_service.set_inventory.js,samples/README.md) | -| Product_service.update_product | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2beta/product_service.update_product.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2beta/product_service.update_product.js,samples/README.md) | -| Search_service.search | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2beta/search_service.search.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2beta/search_service.search.js,samples/README.md) | -| Serving_config_service.add_control | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2beta/serving_config_service.add_control.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2beta/serving_config_service.add_control.js,samples/README.md) | -| Serving_config_service.create_serving_config | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2beta/serving_config_service.create_serving_config.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2beta/serving_config_service.create_serving_config.js,samples/README.md) | -| Serving_config_service.delete_serving_config | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2beta/serving_config_service.delete_serving_config.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2beta/serving_config_service.delete_serving_config.js,samples/README.md) | -| Serving_config_service.get_serving_config | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2beta/serving_config_service.get_serving_config.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2beta/serving_config_service.get_serving_config.js,samples/README.md) | -| Serving_config_service.list_serving_configs | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2beta/serving_config_service.list_serving_configs.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2beta/serving_config_service.list_serving_configs.js,samples/README.md) | -| Serving_config_service.remove_control | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2beta/serving_config_service.remove_control.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2beta/serving_config_service.remove_control.js,samples/README.md) | -| Serving_config_service.update_serving_config | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2beta/serving_config_service.update_serving_config.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2beta/serving_config_service.update_serving_config.js,samples/README.md) | -| User_event_service.collect_user_event | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2beta/user_event_service.collect_user_event.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2beta/user_event_service.collect_user_event.js,samples/README.md) | -| User_event_service.import_user_events | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2beta/user_event_service.import_user_events.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2beta/user_event_service.import_user_events.js,samples/README.md) | -| User_event_service.purge_user_events | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2beta/user_event_service.purge_user_events.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2beta/user_event_service.purge_user_events.js,samples/README.md) | -| User_event_service.rejoin_user_events | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2beta/user_event_service.rejoin_user_events.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2beta/user_event_service.rejoin_user_events.js,samples/README.md) | -| User_event_service.write_user_event | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2beta/user_event_service.write_user_event.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2beta/user_event_service.write_user_event.js,samples/README.md) | -| Quickstart | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/quickstart.js,samples/README.md) | -| Quickstart | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/test/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/test/quickstart.js,samples/README.md) | +| Catalog_service.add_catalog_attribute | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2/catalog_service.add_catalog_attribute.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2/catalog_service.add_catalog_attribute.js,samples/README.md) | +| Catalog_service.get_attributes_config | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2/catalog_service.get_attributes_config.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2/catalog_service.get_attributes_config.js,samples/README.md) | +| Catalog_service.get_completion_config | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2/catalog_service.get_completion_config.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2/catalog_service.get_completion_config.js,samples/README.md) | +| Catalog_service.get_default_branch | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2/catalog_service.get_default_branch.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2/catalog_service.get_default_branch.js,samples/README.md) | +| Catalog_service.list_catalogs | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2/catalog_service.list_catalogs.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2/catalog_service.list_catalogs.js,samples/README.md) | +| Catalog_service.remove_catalog_attribute | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2/catalog_service.remove_catalog_attribute.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2/catalog_service.remove_catalog_attribute.js,samples/README.md) | +| Catalog_service.replace_catalog_attribute | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2/catalog_service.replace_catalog_attribute.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2/catalog_service.replace_catalog_attribute.js,samples/README.md) | +| Catalog_service.set_default_branch | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2/catalog_service.set_default_branch.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2/catalog_service.set_default_branch.js,samples/README.md) | +| Catalog_service.update_attributes_config | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2/catalog_service.update_attributes_config.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2/catalog_service.update_attributes_config.js,samples/README.md) | +| Catalog_service.update_catalog | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2/catalog_service.update_catalog.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2/catalog_service.update_catalog.js,samples/README.md) | +| Catalog_service.update_completion_config | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2/catalog_service.update_completion_config.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2/catalog_service.update_completion_config.js,samples/README.md) | +| Completion_service.complete_query | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2/completion_service.complete_query.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2/completion_service.complete_query.js,samples/README.md) | +| Completion_service.import_completion_data | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2/completion_service.import_completion_data.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2/completion_service.import_completion_data.js,samples/README.md) | +| Control_service.create_control | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2/control_service.create_control.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2/control_service.create_control.js,samples/README.md) | +| Control_service.delete_control | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2/control_service.delete_control.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2/control_service.delete_control.js,samples/README.md) | +| Control_service.get_control | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2/control_service.get_control.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2/control_service.get_control.js,samples/README.md) | +| Control_service.list_controls | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2/control_service.list_controls.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2/control_service.list_controls.js,samples/README.md) | +| Control_service.update_control | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2/control_service.update_control.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2/control_service.update_control.js,samples/README.md) | +| Prediction_service.predict | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2/prediction_service.predict.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2/prediction_service.predict.js,samples/README.md) | +| Product_service.add_fulfillment_places | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2/product_service.add_fulfillment_places.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2/product_service.add_fulfillment_places.js,samples/README.md) | +| Product_service.add_local_inventories | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2/product_service.add_local_inventories.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2/product_service.add_local_inventories.js,samples/README.md) | +| Product_service.create_product | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2/product_service.create_product.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2/product_service.create_product.js,samples/README.md) | +| Product_service.delete_product | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2/product_service.delete_product.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2/product_service.delete_product.js,samples/README.md) | +| Product_service.get_product | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2/product_service.get_product.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2/product_service.get_product.js,samples/README.md) | +| Product_service.import_products | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2/product_service.import_products.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2/product_service.import_products.js,samples/README.md) | +| Product_service.list_products | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2/product_service.list_products.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2/product_service.list_products.js,samples/README.md) | +| Product_service.remove_fulfillment_places | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2/product_service.remove_fulfillment_places.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2/product_service.remove_fulfillment_places.js,samples/README.md) | +| Product_service.remove_local_inventories | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2/product_service.remove_local_inventories.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2/product_service.remove_local_inventories.js,samples/README.md) | +| Product_service.set_inventory | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2/product_service.set_inventory.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2/product_service.set_inventory.js,samples/README.md) | +| Product_service.update_product | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2/product_service.update_product.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2/product_service.update_product.js,samples/README.md) | +| Search_service.search | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2/search_service.search.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2/search_service.search.js,samples/README.md) | +| Serving_config_service.add_control | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2/serving_config_service.add_control.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2/serving_config_service.add_control.js,samples/README.md) | +| Serving_config_service.create_serving_config | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2/serving_config_service.create_serving_config.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2/serving_config_service.create_serving_config.js,samples/README.md) | +| Serving_config_service.delete_serving_config | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2/serving_config_service.delete_serving_config.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2/serving_config_service.delete_serving_config.js,samples/README.md) | +| Serving_config_service.get_serving_config | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2/serving_config_service.get_serving_config.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2/serving_config_service.get_serving_config.js,samples/README.md) | +| Serving_config_service.list_serving_configs | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2/serving_config_service.list_serving_configs.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2/serving_config_service.list_serving_configs.js,samples/README.md) | +| Serving_config_service.remove_control | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2/serving_config_service.remove_control.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2/serving_config_service.remove_control.js,samples/README.md) | +| Serving_config_service.update_serving_config | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2/serving_config_service.update_serving_config.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2/serving_config_service.update_serving_config.js,samples/README.md) | +| User_event_service.collect_user_event | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2/user_event_service.collect_user_event.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2/user_event_service.collect_user_event.js,samples/README.md) | +| User_event_service.import_user_events | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2/user_event_service.import_user_events.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2/user_event_service.import_user_events.js,samples/README.md) | +| User_event_service.purge_user_events | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2/user_event_service.purge_user_events.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2/user_event_service.purge_user_events.js,samples/README.md) | +| User_event_service.rejoin_user_events | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2/user_event_service.rejoin_user_events.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2/user_event_service.rejoin_user_events.js,samples/README.md) | +| User_event_service.write_user_event | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2/user_event_service.write_user_event.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2/user_event_service.write_user_event.js,samples/README.md) | +| Catalog_service.add_catalog_attribute | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2alpha/catalog_service.add_catalog_attribute.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2alpha/catalog_service.add_catalog_attribute.js,samples/README.md) | +| Catalog_service.get_attributes_config | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2alpha/catalog_service.get_attributes_config.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2alpha/catalog_service.get_attributes_config.js,samples/README.md) | +| Catalog_service.get_completion_config | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2alpha/catalog_service.get_completion_config.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2alpha/catalog_service.get_completion_config.js,samples/README.md) | +| Catalog_service.get_default_branch | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2alpha/catalog_service.get_default_branch.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2alpha/catalog_service.get_default_branch.js,samples/README.md) | +| Catalog_service.list_catalogs | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2alpha/catalog_service.list_catalogs.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2alpha/catalog_service.list_catalogs.js,samples/README.md) | +| Catalog_service.remove_catalog_attribute | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2alpha/catalog_service.remove_catalog_attribute.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2alpha/catalog_service.remove_catalog_attribute.js,samples/README.md) | +| Catalog_service.replace_catalog_attribute | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2alpha/catalog_service.replace_catalog_attribute.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2alpha/catalog_service.replace_catalog_attribute.js,samples/README.md) | +| Catalog_service.set_default_branch | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2alpha/catalog_service.set_default_branch.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2alpha/catalog_service.set_default_branch.js,samples/README.md) | +| Catalog_service.update_attributes_config | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2alpha/catalog_service.update_attributes_config.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2alpha/catalog_service.update_attributes_config.js,samples/README.md) | +| Catalog_service.update_catalog | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2alpha/catalog_service.update_catalog.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2alpha/catalog_service.update_catalog.js,samples/README.md) | +| Catalog_service.update_completion_config | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2alpha/catalog_service.update_completion_config.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2alpha/catalog_service.update_completion_config.js,samples/README.md) | +| Completion_service.complete_query | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2alpha/completion_service.complete_query.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2alpha/completion_service.complete_query.js,samples/README.md) | +| Completion_service.import_completion_data | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2alpha/completion_service.import_completion_data.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2alpha/completion_service.import_completion_data.js,samples/README.md) | +| Control_service.create_control | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2alpha/control_service.create_control.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2alpha/control_service.create_control.js,samples/README.md) | +| Control_service.delete_control | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2alpha/control_service.delete_control.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2alpha/control_service.delete_control.js,samples/README.md) | +| Control_service.get_control | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2alpha/control_service.get_control.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2alpha/control_service.get_control.js,samples/README.md) | +| Control_service.list_controls | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2alpha/control_service.list_controls.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2alpha/control_service.list_controls.js,samples/README.md) | +| Control_service.update_control | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2alpha/control_service.update_control.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2alpha/control_service.update_control.js,samples/README.md) | +| Model_service.create_model | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2alpha/model_service.create_model.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2alpha/model_service.create_model.js,samples/README.md) | +| Model_service.delete_model | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2alpha/model_service.delete_model.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2alpha/model_service.delete_model.js,samples/README.md) | +| Model_service.list_models | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2alpha/model_service.list_models.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2alpha/model_service.list_models.js,samples/README.md) | +| Model_service.pause_model | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2alpha/model_service.pause_model.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2alpha/model_service.pause_model.js,samples/README.md) | +| Model_service.resume_model | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2alpha/model_service.resume_model.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2alpha/model_service.resume_model.js,samples/README.md) | +| Model_service.tune_model | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2alpha/model_service.tune_model.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2alpha/model_service.tune_model.js,samples/README.md) | +| Model_service.update_model | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2alpha/model_service.update_model.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2alpha/model_service.update_model.js,samples/README.md) | +| Prediction_service.predict | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2alpha/prediction_service.predict.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2alpha/prediction_service.predict.js,samples/README.md) | +| Product_service.add_fulfillment_places | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2alpha/product_service.add_fulfillment_places.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2alpha/product_service.add_fulfillment_places.js,samples/README.md) | +| Product_service.add_local_inventories | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2alpha/product_service.add_local_inventories.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2alpha/product_service.add_local_inventories.js,samples/README.md) | +| Product_service.create_product | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2alpha/product_service.create_product.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2alpha/product_service.create_product.js,samples/README.md) | +| Product_service.delete_product | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2alpha/product_service.delete_product.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2alpha/product_service.delete_product.js,samples/README.md) | +| Product_service.get_product | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2alpha/product_service.get_product.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2alpha/product_service.get_product.js,samples/README.md) | +| Product_service.import_products | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2alpha/product_service.import_products.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2alpha/product_service.import_products.js,samples/README.md) | +| Product_service.list_products | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2alpha/product_service.list_products.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2alpha/product_service.list_products.js,samples/README.md) | +| Product_service.purge_products | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2alpha/product_service.purge_products.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2alpha/product_service.purge_products.js,samples/README.md) | +| Product_service.remove_fulfillment_places | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2alpha/product_service.remove_fulfillment_places.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2alpha/product_service.remove_fulfillment_places.js,samples/README.md) | +| Product_service.remove_local_inventories | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2alpha/product_service.remove_local_inventories.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2alpha/product_service.remove_local_inventories.js,samples/README.md) | +| Product_service.set_inventory | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2alpha/product_service.set_inventory.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2alpha/product_service.set_inventory.js,samples/README.md) | +| Product_service.update_product | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2alpha/product_service.update_product.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2alpha/product_service.update_product.js,samples/README.md) | +| Search_service.search | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2alpha/search_service.search.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2alpha/search_service.search.js,samples/README.md) | +| Serving_config_service.add_control | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2alpha/serving_config_service.add_control.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2alpha/serving_config_service.add_control.js,samples/README.md) | +| Serving_config_service.create_serving_config | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2alpha/serving_config_service.create_serving_config.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2alpha/serving_config_service.create_serving_config.js,samples/README.md) | +| Serving_config_service.delete_serving_config | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2alpha/serving_config_service.delete_serving_config.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2alpha/serving_config_service.delete_serving_config.js,samples/README.md) | +| Serving_config_service.get_serving_config | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2alpha/serving_config_service.get_serving_config.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2alpha/serving_config_service.get_serving_config.js,samples/README.md) | +| Serving_config_service.list_serving_configs | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2alpha/serving_config_service.list_serving_configs.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2alpha/serving_config_service.list_serving_configs.js,samples/README.md) | +| Serving_config_service.remove_control | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2alpha/serving_config_service.remove_control.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2alpha/serving_config_service.remove_control.js,samples/README.md) | +| Serving_config_service.update_serving_config | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2alpha/serving_config_service.update_serving_config.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2alpha/serving_config_service.update_serving_config.js,samples/README.md) | +| User_event_service.collect_user_event | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2alpha/user_event_service.collect_user_event.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2alpha/user_event_service.collect_user_event.js,samples/README.md) | +| User_event_service.import_user_events | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2alpha/user_event_service.import_user_events.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2alpha/user_event_service.import_user_events.js,samples/README.md) | +| User_event_service.purge_user_events | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2alpha/user_event_service.purge_user_events.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2alpha/user_event_service.purge_user_events.js,samples/README.md) | +| User_event_service.rejoin_user_events | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2alpha/user_event_service.rejoin_user_events.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2alpha/user_event_service.rejoin_user_events.js,samples/README.md) | +| User_event_service.write_user_event | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2alpha/user_event_service.write_user_event.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2alpha/user_event_service.write_user_event.js,samples/README.md) | +| Catalog_service.add_catalog_attribute | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2beta/catalog_service.add_catalog_attribute.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2beta/catalog_service.add_catalog_attribute.js,samples/README.md) | +| Catalog_service.batch_remove_catalog_attributes | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2beta/catalog_service.batch_remove_catalog_attributes.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2beta/catalog_service.batch_remove_catalog_attributes.js,samples/README.md) | +| Catalog_service.get_attributes_config | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2beta/catalog_service.get_attributes_config.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2beta/catalog_service.get_attributes_config.js,samples/README.md) | +| Catalog_service.get_completion_config | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2beta/catalog_service.get_completion_config.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2beta/catalog_service.get_completion_config.js,samples/README.md) | +| Catalog_service.get_default_branch | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2beta/catalog_service.get_default_branch.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2beta/catalog_service.get_default_branch.js,samples/README.md) | +| Catalog_service.list_catalogs | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2beta/catalog_service.list_catalogs.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2beta/catalog_service.list_catalogs.js,samples/README.md) | +| Catalog_service.remove_catalog_attribute | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2beta/catalog_service.remove_catalog_attribute.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2beta/catalog_service.remove_catalog_attribute.js,samples/README.md) | +| Catalog_service.replace_catalog_attribute | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2beta/catalog_service.replace_catalog_attribute.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2beta/catalog_service.replace_catalog_attribute.js,samples/README.md) | +| Catalog_service.set_default_branch | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2beta/catalog_service.set_default_branch.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2beta/catalog_service.set_default_branch.js,samples/README.md) | +| Catalog_service.update_attributes_config | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2beta/catalog_service.update_attributes_config.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2beta/catalog_service.update_attributes_config.js,samples/README.md) | +| Catalog_service.update_catalog | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2beta/catalog_service.update_catalog.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2beta/catalog_service.update_catalog.js,samples/README.md) | +| Catalog_service.update_completion_config | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2beta/catalog_service.update_completion_config.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2beta/catalog_service.update_completion_config.js,samples/README.md) | +| Completion_service.complete_query | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2beta/completion_service.complete_query.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2beta/completion_service.complete_query.js,samples/README.md) | +| Completion_service.import_completion_data | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2beta/completion_service.import_completion_data.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2beta/completion_service.import_completion_data.js,samples/README.md) | +| Control_service.create_control | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2beta/control_service.create_control.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2beta/control_service.create_control.js,samples/README.md) | +| Control_service.delete_control | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2beta/control_service.delete_control.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2beta/control_service.delete_control.js,samples/README.md) | +| Control_service.get_control | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2beta/control_service.get_control.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2beta/control_service.get_control.js,samples/README.md) | +| Control_service.list_controls | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2beta/control_service.list_controls.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2beta/control_service.list_controls.js,samples/README.md) | +| Control_service.update_control | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2beta/control_service.update_control.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2beta/control_service.update_control.js,samples/README.md) | +| Model_service.create_model | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2beta/model_service.create_model.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2beta/model_service.create_model.js,samples/README.md) | +| Model_service.delete_model | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2beta/model_service.delete_model.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2beta/model_service.delete_model.js,samples/README.md) | +| Model_service.list_models | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2beta/model_service.list_models.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2beta/model_service.list_models.js,samples/README.md) | +| Model_service.pause_model | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2beta/model_service.pause_model.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2beta/model_service.pause_model.js,samples/README.md) | +| Model_service.resume_model | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2beta/model_service.resume_model.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2beta/model_service.resume_model.js,samples/README.md) | +| Model_service.tune_model | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2beta/model_service.tune_model.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2beta/model_service.tune_model.js,samples/README.md) | +| Model_service.update_model | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2beta/model_service.update_model.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2beta/model_service.update_model.js,samples/README.md) | +| Prediction_service.predict | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2beta/prediction_service.predict.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2beta/prediction_service.predict.js,samples/README.md) | +| Product_service.add_fulfillment_places | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2beta/product_service.add_fulfillment_places.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2beta/product_service.add_fulfillment_places.js,samples/README.md) | +| Product_service.add_local_inventories | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2beta/product_service.add_local_inventories.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2beta/product_service.add_local_inventories.js,samples/README.md) | +| Product_service.create_product | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2beta/product_service.create_product.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2beta/product_service.create_product.js,samples/README.md) | +| Product_service.delete_product | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2beta/product_service.delete_product.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2beta/product_service.delete_product.js,samples/README.md) | +| Product_service.get_product | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2beta/product_service.get_product.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2beta/product_service.get_product.js,samples/README.md) | +| Product_service.import_products | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2beta/product_service.import_products.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2beta/product_service.import_products.js,samples/README.md) | +| Product_service.list_products | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2beta/product_service.list_products.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2beta/product_service.list_products.js,samples/README.md) | +| Product_service.remove_fulfillment_places | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2beta/product_service.remove_fulfillment_places.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2beta/product_service.remove_fulfillment_places.js,samples/README.md) | +| Product_service.remove_local_inventories | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2beta/product_service.remove_local_inventories.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2beta/product_service.remove_local_inventories.js,samples/README.md) | +| Product_service.set_inventory | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2beta/product_service.set_inventory.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2beta/product_service.set_inventory.js,samples/README.md) | +| Product_service.update_product | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2beta/product_service.update_product.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2beta/product_service.update_product.js,samples/README.md) | +| Search_service.search | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2beta/search_service.search.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2beta/search_service.search.js,samples/README.md) | +| Serving_config_service.add_control | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2beta/serving_config_service.add_control.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2beta/serving_config_service.add_control.js,samples/README.md) | +| Serving_config_service.create_serving_config | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2beta/serving_config_service.create_serving_config.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2beta/serving_config_service.create_serving_config.js,samples/README.md) | +| Serving_config_service.delete_serving_config | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2beta/serving_config_service.delete_serving_config.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2beta/serving_config_service.delete_serving_config.js,samples/README.md) | +| Serving_config_service.get_serving_config | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2beta/serving_config_service.get_serving_config.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2beta/serving_config_service.get_serving_config.js,samples/README.md) | +| Serving_config_service.list_serving_configs | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2beta/serving_config_service.list_serving_configs.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2beta/serving_config_service.list_serving_configs.js,samples/README.md) | +| Serving_config_service.remove_control | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2beta/serving_config_service.remove_control.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2beta/serving_config_service.remove_control.js,samples/README.md) | +| Serving_config_service.update_serving_config | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2beta/serving_config_service.update_serving_config.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2beta/serving_config_service.update_serving_config.js,samples/README.md) | +| User_event_service.collect_user_event | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2beta/user_event_service.collect_user_event.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2beta/user_event_service.collect_user_event.js,samples/README.md) | +| User_event_service.import_user_events | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2beta/user_event_service.import_user_events.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2beta/user_event_service.import_user_events.js,samples/README.md) | +| User_event_service.purge_user_events | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2beta/user_event_service.purge_user_events.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2beta/user_event_service.purge_user_events.js,samples/README.md) | +| User_event_service.rejoin_user_events | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2beta/user_event_service.rejoin_user_events.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2beta/user_event_service.rejoin_user_events.js,samples/README.md) | +| User_event_service.write_user_event | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2beta/user_event_service.write_user_event.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2beta/user_event_service.write_user_event.js,samples/README.md) | +| Quickstart | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/quickstart.js,samples/README.md) | +| Quickstart | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/test/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/test/quickstart.js,samples/README.md) | diff --git a/packages/google-cloud-retail/samples/README.md b/packages/google-cloud-retail/samples/README.md index ccdc4ee0229..43cb51ffbbb 100644 --- a/packages/google-cloud-retail/samples/README.md +++ b/packages/google-cloud-retail/samples/README.md @@ -177,14 +177,14 @@ Before running the samples, make sure you've followed the steps outlined in ### Catalog_service.add_catalog_attribute -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2/catalog_service.add_catalog_attribute.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2/catalog_service.add_catalog_attribute.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2/catalog_service.add_catalog_attribute.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2/catalog_service.add_catalog_attribute.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v2/catalog_service.add_catalog_attribute.js` +`node packages/google-cloud-retail/samples/generated/v2/catalog_service.add_catalog_attribute.js` ----- @@ -194,14 +194,14 @@ __Usage:__ ### Catalog_service.get_attributes_config -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2/catalog_service.get_attributes_config.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2/catalog_service.get_attributes_config.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2/catalog_service.get_attributes_config.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2/catalog_service.get_attributes_config.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v2/catalog_service.get_attributes_config.js` +`node packages/google-cloud-retail/samples/generated/v2/catalog_service.get_attributes_config.js` ----- @@ -211,14 +211,14 @@ __Usage:__ ### Catalog_service.get_completion_config -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2/catalog_service.get_completion_config.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2/catalog_service.get_completion_config.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2/catalog_service.get_completion_config.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2/catalog_service.get_completion_config.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v2/catalog_service.get_completion_config.js` +`node packages/google-cloud-retail/samples/generated/v2/catalog_service.get_completion_config.js` ----- @@ -228,14 +228,14 @@ __Usage:__ ### Catalog_service.get_default_branch -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2/catalog_service.get_default_branch.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2/catalog_service.get_default_branch.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2/catalog_service.get_default_branch.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2/catalog_service.get_default_branch.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v2/catalog_service.get_default_branch.js` +`node packages/google-cloud-retail/samples/generated/v2/catalog_service.get_default_branch.js` ----- @@ -245,14 +245,14 @@ __Usage:__ ### Catalog_service.list_catalogs -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2/catalog_service.list_catalogs.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2/catalog_service.list_catalogs.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2/catalog_service.list_catalogs.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2/catalog_service.list_catalogs.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v2/catalog_service.list_catalogs.js` +`node packages/google-cloud-retail/samples/generated/v2/catalog_service.list_catalogs.js` ----- @@ -262,14 +262,14 @@ __Usage:__ ### Catalog_service.remove_catalog_attribute -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2/catalog_service.remove_catalog_attribute.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2/catalog_service.remove_catalog_attribute.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2/catalog_service.remove_catalog_attribute.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2/catalog_service.remove_catalog_attribute.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v2/catalog_service.remove_catalog_attribute.js` +`node packages/google-cloud-retail/samples/generated/v2/catalog_service.remove_catalog_attribute.js` ----- @@ -279,14 +279,14 @@ __Usage:__ ### Catalog_service.replace_catalog_attribute -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2/catalog_service.replace_catalog_attribute.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2/catalog_service.replace_catalog_attribute.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2/catalog_service.replace_catalog_attribute.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2/catalog_service.replace_catalog_attribute.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v2/catalog_service.replace_catalog_attribute.js` +`node packages/google-cloud-retail/samples/generated/v2/catalog_service.replace_catalog_attribute.js` ----- @@ -296,14 +296,14 @@ __Usage:__ ### Catalog_service.set_default_branch -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2/catalog_service.set_default_branch.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2/catalog_service.set_default_branch.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2/catalog_service.set_default_branch.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2/catalog_service.set_default_branch.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v2/catalog_service.set_default_branch.js` +`node packages/google-cloud-retail/samples/generated/v2/catalog_service.set_default_branch.js` ----- @@ -313,14 +313,14 @@ __Usage:__ ### Catalog_service.update_attributes_config -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2/catalog_service.update_attributes_config.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2/catalog_service.update_attributes_config.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2/catalog_service.update_attributes_config.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2/catalog_service.update_attributes_config.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v2/catalog_service.update_attributes_config.js` +`node packages/google-cloud-retail/samples/generated/v2/catalog_service.update_attributes_config.js` ----- @@ -330,14 +330,14 @@ __Usage:__ ### Catalog_service.update_catalog -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2/catalog_service.update_catalog.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2/catalog_service.update_catalog.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2/catalog_service.update_catalog.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2/catalog_service.update_catalog.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v2/catalog_service.update_catalog.js` +`node packages/google-cloud-retail/samples/generated/v2/catalog_service.update_catalog.js` ----- @@ -347,14 +347,14 @@ __Usage:__ ### Catalog_service.update_completion_config -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2/catalog_service.update_completion_config.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2/catalog_service.update_completion_config.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2/catalog_service.update_completion_config.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2/catalog_service.update_completion_config.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v2/catalog_service.update_completion_config.js` +`node packages/google-cloud-retail/samples/generated/v2/catalog_service.update_completion_config.js` ----- @@ -364,14 +364,14 @@ __Usage:__ ### Completion_service.complete_query -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2/completion_service.complete_query.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2/completion_service.complete_query.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2/completion_service.complete_query.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2/completion_service.complete_query.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v2/completion_service.complete_query.js` +`node packages/google-cloud-retail/samples/generated/v2/completion_service.complete_query.js` ----- @@ -381,14 +381,14 @@ __Usage:__ ### Completion_service.import_completion_data -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2/completion_service.import_completion_data.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2/completion_service.import_completion_data.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2/completion_service.import_completion_data.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2/completion_service.import_completion_data.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v2/completion_service.import_completion_data.js` +`node packages/google-cloud-retail/samples/generated/v2/completion_service.import_completion_data.js` ----- @@ -398,14 +398,14 @@ __Usage:__ ### Control_service.create_control -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2/control_service.create_control.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2/control_service.create_control.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2/control_service.create_control.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2/control_service.create_control.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v2/control_service.create_control.js` +`node packages/google-cloud-retail/samples/generated/v2/control_service.create_control.js` ----- @@ -415,14 +415,14 @@ __Usage:__ ### Control_service.delete_control -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2/control_service.delete_control.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2/control_service.delete_control.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2/control_service.delete_control.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2/control_service.delete_control.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v2/control_service.delete_control.js` +`node packages/google-cloud-retail/samples/generated/v2/control_service.delete_control.js` ----- @@ -432,14 +432,14 @@ __Usage:__ ### Control_service.get_control -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2/control_service.get_control.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2/control_service.get_control.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2/control_service.get_control.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2/control_service.get_control.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v2/control_service.get_control.js` +`node packages/google-cloud-retail/samples/generated/v2/control_service.get_control.js` ----- @@ -449,14 +449,14 @@ __Usage:__ ### Control_service.list_controls -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2/control_service.list_controls.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2/control_service.list_controls.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2/control_service.list_controls.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2/control_service.list_controls.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v2/control_service.list_controls.js` +`node packages/google-cloud-retail/samples/generated/v2/control_service.list_controls.js` ----- @@ -466,14 +466,14 @@ __Usage:__ ### Control_service.update_control -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2/control_service.update_control.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2/control_service.update_control.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2/control_service.update_control.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2/control_service.update_control.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v2/control_service.update_control.js` +`node packages/google-cloud-retail/samples/generated/v2/control_service.update_control.js` ----- @@ -483,14 +483,14 @@ __Usage:__ ### Prediction_service.predict -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2/prediction_service.predict.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2/prediction_service.predict.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2/prediction_service.predict.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2/prediction_service.predict.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v2/prediction_service.predict.js` +`node packages/google-cloud-retail/samples/generated/v2/prediction_service.predict.js` ----- @@ -500,14 +500,14 @@ __Usage:__ ### Product_service.add_fulfillment_places -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2/product_service.add_fulfillment_places.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2/product_service.add_fulfillment_places.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2/product_service.add_fulfillment_places.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2/product_service.add_fulfillment_places.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v2/product_service.add_fulfillment_places.js` +`node packages/google-cloud-retail/samples/generated/v2/product_service.add_fulfillment_places.js` ----- @@ -517,14 +517,14 @@ __Usage:__ ### Product_service.add_local_inventories -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2/product_service.add_local_inventories.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2/product_service.add_local_inventories.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2/product_service.add_local_inventories.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2/product_service.add_local_inventories.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v2/product_service.add_local_inventories.js` +`node packages/google-cloud-retail/samples/generated/v2/product_service.add_local_inventories.js` ----- @@ -534,14 +534,14 @@ __Usage:__ ### Product_service.create_product -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2/product_service.create_product.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2/product_service.create_product.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2/product_service.create_product.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2/product_service.create_product.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v2/product_service.create_product.js` +`node packages/google-cloud-retail/samples/generated/v2/product_service.create_product.js` ----- @@ -551,14 +551,14 @@ __Usage:__ ### Product_service.delete_product -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2/product_service.delete_product.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2/product_service.delete_product.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2/product_service.delete_product.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2/product_service.delete_product.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v2/product_service.delete_product.js` +`node packages/google-cloud-retail/samples/generated/v2/product_service.delete_product.js` ----- @@ -568,14 +568,14 @@ __Usage:__ ### Product_service.get_product -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2/product_service.get_product.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2/product_service.get_product.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2/product_service.get_product.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2/product_service.get_product.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v2/product_service.get_product.js` +`node packages/google-cloud-retail/samples/generated/v2/product_service.get_product.js` ----- @@ -585,14 +585,14 @@ __Usage:__ ### Product_service.import_products -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2/product_service.import_products.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2/product_service.import_products.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2/product_service.import_products.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2/product_service.import_products.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v2/product_service.import_products.js` +`node packages/google-cloud-retail/samples/generated/v2/product_service.import_products.js` ----- @@ -602,14 +602,14 @@ __Usage:__ ### Product_service.list_products -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2/product_service.list_products.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2/product_service.list_products.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2/product_service.list_products.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2/product_service.list_products.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v2/product_service.list_products.js` +`node packages/google-cloud-retail/samples/generated/v2/product_service.list_products.js` ----- @@ -619,14 +619,14 @@ __Usage:__ ### Product_service.remove_fulfillment_places -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2/product_service.remove_fulfillment_places.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2/product_service.remove_fulfillment_places.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2/product_service.remove_fulfillment_places.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2/product_service.remove_fulfillment_places.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v2/product_service.remove_fulfillment_places.js` +`node packages/google-cloud-retail/samples/generated/v2/product_service.remove_fulfillment_places.js` ----- @@ -636,14 +636,14 @@ __Usage:__ ### Product_service.remove_local_inventories -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2/product_service.remove_local_inventories.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2/product_service.remove_local_inventories.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2/product_service.remove_local_inventories.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2/product_service.remove_local_inventories.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v2/product_service.remove_local_inventories.js` +`node packages/google-cloud-retail/samples/generated/v2/product_service.remove_local_inventories.js` ----- @@ -653,14 +653,14 @@ __Usage:__ ### Product_service.set_inventory -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2/product_service.set_inventory.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2/product_service.set_inventory.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2/product_service.set_inventory.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2/product_service.set_inventory.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v2/product_service.set_inventory.js` +`node packages/google-cloud-retail/samples/generated/v2/product_service.set_inventory.js` ----- @@ -670,14 +670,14 @@ __Usage:__ ### Product_service.update_product -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2/product_service.update_product.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2/product_service.update_product.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2/product_service.update_product.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2/product_service.update_product.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v2/product_service.update_product.js` +`node packages/google-cloud-retail/samples/generated/v2/product_service.update_product.js` ----- @@ -687,14 +687,14 @@ __Usage:__ ### Search_service.search -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2/search_service.search.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2/search_service.search.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2/search_service.search.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2/search_service.search.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v2/search_service.search.js` +`node packages/google-cloud-retail/samples/generated/v2/search_service.search.js` ----- @@ -704,14 +704,14 @@ __Usage:__ ### Serving_config_service.add_control -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2/serving_config_service.add_control.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2/serving_config_service.add_control.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2/serving_config_service.add_control.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2/serving_config_service.add_control.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v2/serving_config_service.add_control.js` +`node packages/google-cloud-retail/samples/generated/v2/serving_config_service.add_control.js` ----- @@ -721,14 +721,14 @@ __Usage:__ ### Serving_config_service.create_serving_config -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2/serving_config_service.create_serving_config.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2/serving_config_service.create_serving_config.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2/serving_config_service.create_serving_config.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2/serving_config_service.create_serving_config.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v2/serving_config_service.create_serving_config.js` +`node packages/google-cloud-retail/samples/generated/v2/serving_config_service.create_serving_config.js` ----- @@ -738,14 +738,14 @@ __Usage:__ ### Serving_config_service.delete_serving_config -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2/serving_config_service.delete_serving_config.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2/serving_config_service.delete_serving_config.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2/serving_config_service.delete_serving_config.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2/serving_config_service.delete_serving_config.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v2/serving_config_service.delete_serving_config.js` +`node packages/google-cloud-retail/samples/generated/v2/serving_config_service.delete_serving_config.js` ----- @@ -755,14 +755,14 @@ __Usage:__ ### Serving_config_service.get_serving_config -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2/serving_config_service.get_serving_config.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2/serving_config_service.get_serving_config.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2/serving_config_service.get_serving_config.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2/serving_config_service.get_serving_config.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v2/serving_config_service.get_serving_config.js` +`node packages/google-cloud-retail/samples/generated/v2/serving_config_service.get_serving_config.js` ----- @@ -772,14 +772,14 @@ __Usage:__ ### Serving_config_service.list_serving_configs -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2/serving_config_service.list_serving_configs.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2/serving_config_service.list_serving_configs.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2/serving_config_service.list_serving_configs.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2/serving_config_service.list_serving_configs.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v2/serving_config_service.list_serving_configs.js` +`node packages/google-cloud-retail/samples/generated/v2/serving_config_service.list_serving_configs.js` ----- @@ -789,14 +789,14 @@ __Usage:__ ### Serving_config_service.remove_control -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2/serving_config_service.remove_control.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2/serving_config_service.remove_control.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2/serving_config_service.remove_control.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2/serving_config_service.remove_control.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v2/serving_config_service.remove_control.js` +`node packages/google-cloud-retail/samples/generated/v2/serving_config_service.remove_control.js` ----- @@ -806,14 +806,14 @@ __Usage:__ ### Serving_config_service.update_serving_config -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2/serving_config_service.update_serving_config.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2/serving_config_service.update_serving_config.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2/serving_config_service.update_serving_config.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2/serving_config_service.update_serving_config.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v2/serving_config_service.update_serving_config.js` +`node packages/google-cloud-retail/samples/generated/v2/serving_config_service.update_serving_config.js` ----- @@ -823,14 +823,14 @@ __Usage:__ ### User_event_service.collect_user_event -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2/user_event_service.collect_user_event.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2/user_event_service.collect_user_event.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2/user_event_service.collect_user_event.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2/user_event_service.collect_user_event.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v2/user_event_service.collect_user_event.js` +`node packages/google-cloud-retail/samples/generated/v2/user_event_service.collect_user_event.js` ----- @@ -840,14 +840,14 @@ __Usage:__ ### User_event_service.import_user_events -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2/user_event_service.import_user_events.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2/user_event_service.import_user_events.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2/user_event_service.import_user_events.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2/user_event_service.import_user_events.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v2/user_event_service.import_user_events.js` +`node packages/google-cloud-retail/samples/generated/v2/user_event_service.import_user_events.js` ----- @@ -857,14 +857,14 @@ __Usage:__ ### User_event_service.purge_user_events -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2/user_event_service.purge_user_events.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2/user_event_service.purge_user_events.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2/user_event_service.purge_user_events.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2/user_event_service.purge_user_events.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v2/user_event_service.purge_user_events.js` +`node packages/google-cloud-retail/samples/generated/v2/user_event_service.purge_user_events.js` ----- @@ -874,14 +874,14 @@ __Usage:__ ### User_event_service.rejoin_user_events -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2/user_event_service.rejoin_user_events.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2/user_event_service.rejoin_user_events.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2/user_event_service.rejoin_user_events.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2/user_event_service.rejoin_user_events.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v2/user_event_service.rejoin_user_events.js` +`node packages/google-cloud-retail/samples/generated/v2/user_event_service.rejoin_user_events.js` ----- @@ -891,14 +891,14 @@ __Usage:__ ### User_event_service.write_user_event -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2/user_event_service.write_user_event.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2/user_event_service.write_user_event.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2/user_event_service.write_user_event.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2/user_event_service.write_user_event.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v2/user_event_service.write_user_event.js` +`node packages/google-cloud-retail/samples/generated/v2/user_event_service.write_user_event.js` ----- @@ -908,14 +908,14 @@ __Usage:__ ### Catalog_service.add_catalog_attribute -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2alpha/catalog_service.add_catalog_attribute.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2alpha/catalog_service.add_catalog_attribute.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2alpha/catalog_service.add_catalog_attribute.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2alpha/catalog_service.add_catalog_attribute.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v2alpha/catalog_service.add_catalog_attribute.js` +`node packages/google-cloud-retail/samples/generated/v2alpha/catalog_service.add_catalog_attribute.js` ----- @@ -925,14 +925,14 @@ __Usage:__ ### Catalog_service.get_attributes_config -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2alpha/catalog_service.get_attributes_config.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2alpha/catalog_service.get_attributes_config.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2alpha/catalog_service.get_attributes_config.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2alpha/catalog_service.get_attributes_config.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v2alpha/catalog_service.get_attributes_config.js` +`node packages/google-cloud-retail/samples/generated/v2alpha/catalog_service.get_attributes_config.js` ----- @@ -942,14 +942,14 @@ __Usage:__ ### Catalog_service.get_completion_config -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2alpha/catalog_service.get_completion_config.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2alpha/catalog_service.get_completion_config.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2alpha/catalog_service.get_completion_config.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2alpha/catalog_service.get_completion_config.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v2alpha/catalog_service.get_completion_config.js` +`node packages/google-cloud-retail/samples/generated/v2alpha/catalog_service.get_completion_config.js` ----- @@ -959,14 +959,14 @@ __Usage:__ ### Catalog_service.get_default_branch -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2alpha/catalog_service.get_default_branch.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2alpha/catalog_service.get_default_branch.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2alpha/catalog_service.get_default_branch.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2alpha/catalog_service.get_default_branch.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v2alpha/catalog_service.get_default_branch.js` +`node packages/google-cloud-retail/samples/generated/v2alpha/catalog_service.get_default_branch.js` ----- @@ -976,14 +976,14 @@ __Usage:__ ### Catalog_service.list_catalogs -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2alpha/catalog_service.list_catalogs.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2alpha/catalog_service.list_catalogs.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2alpha/catalog_service.list_catalogs.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2alpha/catalog_service.list_catalogs.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v2alpha/catalog_service.list_catalogs.js` +`node packages/google-cloud-retail/samples/generated/v2alpha/catalog_service.list_catalogs.js` ----- @@ -993,14 +993,14 @@ __Usage:__ ### Catalog_service.remove_catalog_attribute -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2alpha/catalog_service.remove_catalog_attribute.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2alpha/catalog_service.remove_catalog_attribute.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2alpha/catalog_service.remove_catalog_attribute.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2alpha/catalog_service.remove_catalog_attribute.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v2alpha/catalog_service.remove_catalog_attribute.js` +`node packages/google-cloud-retail/samples/generated/v2alpha/catalog_service.remove_catalog_attribute.js` ----- @@ -1010,14 +1010,14 @@ __Usage:__ ### Catalog_service.replace_catalog_attribute -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2alpha/catalog_service.replace_catalog_attribute.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2alpha/catalog_service.replace_catalog_attribute.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2alpha/catalog_service.replace_catalog_attribute.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2alpha/catalog_service.replace_catalog_attribute.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v2alpha/catalog_service.replace_catalog_attribute.js` +`node packages/google-cloud-retail/samples/generated/v2alpha/catalog_service.replace_catalog_attribute.js` ----- @@ -1027,14 +1027,14 @@ __Usage:__ ### Catalog_service.set_default_branch -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2alpha/catalog_service.set_default_branch.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2alpha/catalog_service.set_default_branch.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2alpha/catalog_service.set_default_branch.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2alpha/catalog_service.set_default_branch.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v2alpha/catalog_service.set_default_branch.js` +`node packages/google-cloud-retail/samples/generated/v2alpha/catalog_service.set_default_branch.js` ----- @@ -1044,14 +1044,14 @@ __Usage:__ ### Catalog_service.update_attributes_config -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2alpha/catalog_service.update_attributes_config.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2alpha/catalog_service.update_attributes_config.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2alpha/catalog_service.update_attributes_config.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2alpha/catalog_service.update_attributes_config.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v2alpha/catalog_service.update_attributes_config.js` +`node packages/google-cloud-retail/samples/generated/v2alpha/catalog_service.update_attributes_config.js` ----- @@ -1061,14 +1061,14 @@ __Usage:__ ### Catalog_service.update_catalog -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2alpha/catalog_service.update_catalog.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2alpha/catalog_service.update_catalog.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2alpha/catalog_service.update_catalog.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2alpha/catalog_service.update_catalog.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v2alpha/catalog_service.update_catalog.js` +`node packages/google-cloud-retail/samples/generated/v2alpha/catalog_service.update_catalog.js` ----- @@ -1078,14 +1078,14 @@ __Usage:__ ### Catalog_service.update_completion_config -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2alpha/catalog_service.update_completion_config.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2alpha/catalog_service.update_completion_config.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2alpha/catalog_service.update_completion_config.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2alpha/catalog_service.update_completion_config.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v2alpha/catalog_service.update_completion_config.js` +`node packages/google-cloud-retail/samples/generated/v2alpha/catalog_service.update_completion_config.js` ----- @@ -1095,14 +1095,14 @@ __Usage:__ ### Completion_service.complete_query -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2alpha/completion_service.complete_query.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2alpha/completion_service.complete_query.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2alpha/completion_service.complete_query.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2alpha/completion_service.complete_query.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v2alpha/completion_service.complete_query.js` +`node packages/google-cloud-retail/samples/generated/v2alpha/completion_service.complete_query.js` ----- @@ -1112,14 +1112,14 @@ __Usage:__ ### Completion_service.import_completion_data -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2alpha/completion_service.import_completion_data.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2alpha/completion_service.import_completion_data.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2alpha/completion_service.import_completion_data.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2alpha/completion_service.import_completion_data.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v2alpha/completion_service.import_completion_data.js` +`node packages/google-cloud-retail/samples/generated/v2alpha/completion_service.import_completion_data.js` ----- @@ -1129,14 +1129,14 @@ __Usage:__ ### Control_service.create_control -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2alpha/control_service.create_control.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2alpha/control_service.create_control.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2alpha/control_service.create_control.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2alpha/control_service.create_control.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v2alpha/control_service.create_control.js` +`node packages/google-cloud-retail/samples/generated/v2alpha/control_service.create_control.js` ----- @@ -1146,14 +1146,14 @@ __Usage:__ ### Control_service.delete_control -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2alpha/control_service.delete_control.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2alpha/control_service.delete_control.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2alpha/control_service.delete_control.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2alpha/control_service.delete_control.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v2alpha/control_service.delete_control.js` +`node packages/google-cloud-retail/samples/generated/v2alpha/control_service.delete_control.js` ----- @@ -1163,14 +1163,14 @@ __Usage:__ ### Control_service.get_control -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2alpha/control_service.get_control.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2alpha/control_service.get_control.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2alpha/control_service.get_control.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2alpha/control_service.get_control.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v2alpha/control_service.get_control.js` +`node packages/google-cloud-retail/samples/generated/v2alpha/control_service.get_control.js` ----- @@ -1180,14 +1180,14 @@ __Usage:__ ### Control_service.list_controls -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2alpha/control_service.list_controls.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2alpha/control_service.list_controls.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2alpha/control_service.list_controls.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2alpha/control_service.list_controls.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v2alpha/control_service.list_controls.js` +`node packages/google-cloud-retail/samples/generated/v2alpha/control_service.list_controls.js` ----- @@ -1197,14 +1197,14 @@ __Usage:__ ### Control_service.update_control -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2alpha/control_service.update_control.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2alpha/control_service.update_control.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2alpha/control_service.update_control.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2alpha/control_service.update_control.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v2alpha/control_service.update_control.js` +`node packages/google-cloud-retail/samples/generated/v2alpha/control_service.update_control.js` ----- @@ -1214,14 +1214,14 @@ __Usage:__ ### Model_service.create_model -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2alpha/model_service.create_model.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2alpha/model_service.create_model.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2alpha/model_service.create_model.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2alpha/model_service.create_model.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v2alpha/model_service.create_model.js` +`node packages/google-cloud-retail/samples/generated/v2alpha/model_service.create_model.js` ----- @@ -1231,14 +1231,14 @@ __Usage:__ ### Model_service.delete_model -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2alpha/model_service.delete_model.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2alpha/model_service.delete_model.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2alpha/model_service.delete_model.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2alpha/model_service.delete_model.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v2alpha/model_service.delete_model.js` +`node packages/google-cloud-retail/samples/generated/v2alpha/model_service.delete_model.js` ----- @@ -1248,14 +1248,14 @@ __Usage:__ ### Model_service.list_models -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2alpha/model_service.list_models.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2alpha/model_service.list_models.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2alpha/model_service.list_models.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2alpha/model_service.list_models.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v2alpha/model_service.list_models.js` +`node packages/google-cloud-retail/samples/generated/v2alpha/model_service.list_models.js` ----- @@ -1265,14 +1265,14 @@ __Usage:__ ### Model_service.pause_model -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2alpha/model_service.pause_model.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2alpha/model_service.pause_model.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2alpha/model_service.pause_model.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2alpha/model_service.pause_model.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v2alpha/model_service.pause_model.js` +`node packages/google-cloud-retail/samples/generated/v2alpha/model_service.pause_model.js` ----- @@ -1282,14 +1282,14 @@ __Usage:__ ### Model_service.resume_model -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2alpha/model_service.resume_model.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2alpha/model_service.resume_model.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2alpha/model_service.resume_model.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2alpha/model_service.resume_model.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v2alpha/model_service.resume_model.js` +`node packages/google-cloud-retail/samples/generated/v2alpha/model_service.resume_model.js` ----- @@ -1299,14 +1299,14 @@ __Usage:__ ### Model_service.tune_model -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2alpha/model_service.tune_model.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2alpha/model_service.tune_model.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2alpha/model_service.tune_model.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2alpha/model_service.tune_model.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v2alpha/model_service.tune_model.js` +`node packages/google-cloud-retail/samples/generated/v2alpha/model_service.tune_model.js` ----- @@ -1316,14 +1316,14 @@ __Usage:__ ### Model_service.update_model -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2alpha/model_service.update_model.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2alpha/model_service.update_model.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2alpha/model_service.update_model.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2alpha/model_service.update_model.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v2alpha/model_service.update_model.js` +`node packages/google-cloud-retail/samples/generated/v2alpha/model_service.update_model.js` ----- @@ -1333,14 +1333,14 @@ __Usage:__ ### Prediction_service.predict -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2alpha/prediction_service.predict.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2alpha/prediction_service.predict.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2alpha/prediction_service.predict.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2alpha/prediction_service.predict.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v2alpha/prediction_service.predict.js` +`node packages/google-cloud-retail/samples/generated/v2alpha/prediction_service.predict.js` ----- @@ -1350,14 +1350,14 @@ __Usage:__ ### Product_service.add_fulfillment_places -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2alpha/product_service.add_fulfillment_places.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2alpha/product_service.add_fulfillment_places.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2alpha/product_service.add_fulfillment_places.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2alpha/product_service.add_fulfillment_places.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v2alpha/product_service.add_fulfillment_places.js` +`node packages/google-cloud-retail/samples/generated/v2alpha/product_service.add_fulfillment_places.js` ----- @@ -1367,14 +1367,14 @@ __Usage:__ ### Product_service.add_local_inventories -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2alpha/product_service.add_local_inventories.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2alpha/product_service.add_local_inventories.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2alpha/product_service.add_local_inventories.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2alpha/product_service.add_local_inventories.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v2alpha/product_service.add_local_inventories.js` +`node packages/google-cloud-retail/samples/generated/v2alpha/product_service.add_local_inventories.js` ----- @@ -1384,14 +1384,14 @@ __Usage:__ ### Product_service.create_product -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2alpha/product_service.create_product.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2alpha/product_service.create_product.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2alpha/product_service.create_product.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2alpha/product_service.create_product.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v2alpha/product_service.create_product.js` +`node packages/google-cloud-retail/samples/generated/v2alpha/product_service.create_product.js` ----- @@ -1401,14 +1401,14 @@ __Usage:__ ### Product_service.delete_product -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2alpha/product_service.delete_product.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2alpha/product_service.delete_product.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2alpha/product_service.delete_product.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2alpha/product_service.delete_product.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v2alpha/product_service.delete_product.js` +`node packages/google-cloud-retail/samples/generated/v2alpha/product_service.delete_product.js` ----- @@ -1418,14 +1418,14 @@ __Usage:__ ### Product_service.get_product -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2alpha/product_service.get_product.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2alpha/product_service.get_product.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2alpha/product_service.get_product.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2alpha/product_service.get_product.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v2alpha/product_service.get_product.js` +`node packages/google-cloud-retail/samples/generated/v2alpha/product_service.get_product.js` ----- @@ -1435,14 +1435,14 @@ __Usage:__ ### Product_service.import_products -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2alpha/product_service.import_products.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2alpha/product_service.import_products.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2alpha/product_service.import_products.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2alpha/product_service.import_products.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v2alpha/product_service.import_products.js` +`node packages/google-cloud-retail/samples/generated/v2alpha/product_service.import_products.js` ----- @@ -1452,14 +1452,14 @@ __Usage:__ ### Product_service.list_products -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2alpha/product_service.list_products.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2alpha/product_service.list_products.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2alpha/product_service.list_products.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2alpha/product_service.list_products.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v2alpha/product_service.list_products.js` +`node packages/google-cloud-retail/samples/generated/v2alpha/product_service.list_products.js` ----- @@ -1469,14 +1469,14 @@ __Usage:__ ### Product_service.purge_products -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2alpha/product_service.purge_products.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2alpha/product_service.purge_products.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2alpha/product_service.purge_products.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2alpha/product_service.purge_products.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v2alpha/product_service.purge_products.js` +`node packages/google-cloud-retail/samples/generated/v2alpha/product_service.purge_products.js` ----- @@ -1486,14 +1486,14 @@ __Usage:__ ### Product_service.remove_fulfillment_places -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2alpha/product_service.remove_fulfillment_places.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2alpha/product_service.remove_fulfillment_places.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2alpha/product_service.remove_fulfillment_places.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2alpha/product_service.remove_fulfillment_places.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v2alpha/product_service.remove_fulfillment_places.js` +`node packages/google-cloud-retail/samples/generated/v2alpha/product_service.remove_fulfillment_places.js` ----- @@ -1503,14 +1503,14 @@ __Usage:__ ### Product_service.remove_local_inventories -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2alpha/product_service.remove_local_inventories.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2alpha/product_service.remove_local_inventories.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2alpha/product_service.remove_local_inventories.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2alpha/product_service.remove_local_inventories.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v2alpha/product_service.remove_local_inventories.js` +`node packages/google-cloud-retail/samples/generated/v2alpha/product_service.remove_local_inventories.js` ----- @@ -1520,14 +1520,14 @@ __Usage:__ ### Product_service.set_inventory -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2alpha/product_service.set_inventory.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2alpha/product_service.set_inventory.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2alpha/product_service.set_inventory.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2alpha/product_service.set_inventory.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v2alpha/product_service.set_inventory.js` +`node packages/google-cloud-retail/samples/generated/v2alpha/product_service.set_inventory.js` ----- @@ -1537,14 +1537,14 @@ __Usage:__ ### Product_service.update_product -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2alpha/product_service.update_product.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2alpha/product_service.update_product.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2alpha/product_service.update_product.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2alpha/product_service.update_product.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v2alpha/product_service.update_product.js` +`node packages/google-cloud-retail/samples/generated/v2alpha/product_service.update_product.js` ----- @@ -1554,14 +1554,14 @@ __Usage:__ ### Search_service.search -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2alpha/search_service.search.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2alpha/search_service.search.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2alpha/search_service.search.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2alpha/search_service.search.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v2alpha/search_service.search.js` +`node packages/google-cloud-retail/samples/generated/v2alpha/search_service.search.js` ----- @@ -1571,14 +1571,14 @@ __Usage:__ ### Serving_config_service.add_control -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2alpha/serving_config_service.add_control.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2alpha/serving_config_service.add_control.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2alpha/serving_config_service.add_control.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2alpha/serving_config_service.add_control.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v2alpha/serving_config_service.add_control.js` +`node packages/google-cloud-retail/samples/generated/v2alpha/serving_config_service.add_control.js` ----- @@ -1588,14 +1588,14 @@ __Usage:__ ### Serving_config_service.create_serving_config -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2alpha/serving_config_service.create_serving_config.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2alpha/serving_config_service.create_serving_config.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2alpha/serving_config_service.create_serving_config.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2alpha/serving_config_service.create_serving_config.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v2alpha/serving_config_service.create_serving_config.js` +`node packages/google-cloud-retail/samples/generated/v2alpha/serving_config_service.create_serving_config.js` ----- @@ -1605,14 +1605,14 @@ __Usage:__ ### Serving_config_service.delete_serving_config -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2alpha/serving_config_service.delete_serving_config.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2alpha/serving_config_service.delete_serving_config.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2alpha/serving_config_service.delete_serving_config.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2alpha/serving_config_service.delete_serving_config.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v2alpha/serving_config_service.delete_serving_config.js` +`node packages/google-cloud-retail/samples/generated/v2alpha/serving_config_service.delete_serving_config.js` ----- @@ -1622,14 +1622,14 @@ __Usage:__ ### Serving_config_service.get_serving_config -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2alpha/serving_config_service.get_serving_config.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2alpha/serving_config_service.get_serving_config.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2alpha/serving_config_service.get_serving_config.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2alpha/serving_config_service.get_serving_config.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v2alpha/serving_config_service.get_serving_config.js` +`node packages/google-cloud-retail/samples/generated/v2alpha/serving_config_service.get_serving_config.js` ----- @@ -1639,14 +1639,14 @@ __Usage:__ ### Serving_config_service.list_serving_configs -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2alpha/serving_config_service.list_serving_configs.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2alpha/serving_config_service.list_serving_configs.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2alpha/serving_config_service.list_serving_configs.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2alpha/serving_config_service.list_serving_configs.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v2alpha/serving_config_service.list_serving_configs.js` +`node packages/google-cloud-retail/samples/generated/v2alpha/serving_config_service.list_serving_configs.js` ----- @@ -1656,14 +1656,14 @@ __Usage:__ ### Serving_config_service.remove_control -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2alpha/serving_config_service.remove_control.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2alpha/serving_config_service.remove_control.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2alpha/serving_config_service.remove_control.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2alpha/serving_config_service.remove_control.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v2alpha/serving_config_service.remove_control.js` +`node packages/google-cloud-retail/samples/generated/v2alpha/serving_config_service.remove_control.js` ----- @@ -1673,14 +1673,14 @@ __Usage:__ ### Serving_config_service.update_serving_config -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2alpha/serving_config_service.update_serving_config.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2alpha/serving_config_service.update_serving_config.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2alpha/serving_config_service.update_serving_config.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2alpha/serving_config_service.update_serving_config.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v2alpha/serving_config_service.update_serving_config.js` +`node packages/google-cloud-retail/samples/generated/v2alpha/serving_config_service.update_serving_config.js` ----- @@ -1690,14 +1690,14 @@ __Usage:__ ### User_event_service.collect_user_event -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2alpha/user_event_service.collect_user_event.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2alpha/user_event_service.collect_user_event.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2alpha/user_event_service.collect_user_event.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2alpha/user_event_service.collect_user_event.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v2alpha/user_event_service.collect_user_event.js` +`node packages/google-cloud-retail/samples/generated/v2alpha/user_event_service.collect_user_event.js` ----- @@ -1707,14 +1707,14 @@ __Usage:__ ### User_event_service.import_user_events -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2alpha/user_event_service.import_user_events.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2alpha/user_event_service.import_user_events.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2alpha/user_event_service.import_user_events.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2alpha/user_event_service.import_user_events.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v2alpha/user_event_service.import_user_events.js` +`node packages/google-cloud-retail/samples/generated/v2alpha/user_event_service.import_user_events.js` ----- @@ -1724,14 +1724,14 @@ __Usage:__ ### User_event_service.purge_user_events -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2alpha/user_event_service.purge_user_events.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2alpha/user_event_service.purge_user_events.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2alpha/user_event_service.purge_user_events.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2alpha/user_event_service.purge_user_events.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v2alpha/user_event_service.purge_user_events.js` +`node packages/google-cloud-retail/samples/generated/v2alpha/user_event_service.purge_user_events.js` ----- @@ -1741,14 +1741,14 @@ __Usage:__ ### User_event_service.rejoin_user_events -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2alpha/user_event_service.rejoin_user_events.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2alpha/user_event_service.rejoin_user_events.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2alpha/user_event_service.rejoin_user_events.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2alpha/user_event_service.rejoin_user_events.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v2alpha/user_event_service.rejoin_user_events.js` +`node packages/google-cloud-retail/samples/generated/v2alpha/user_event_service.rejoin_user_events.js` ----- @@ -1758,14 +1758,14 @@ __Usage:__ ### User_event_service.write_user_event -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2alpha/user_event_service.write_user_event.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2alpha/user_event_service.write_user_event.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2alpha/user_event_service.write_user_event.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2alpha/user_event_service.write_user_event.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v2alpha/user_event_service.write_user_event.js` +`node packages/google-cloud-retail/samples/generated/v2alpha/user_event_service.write_user_event.js` ----- @@ -1775,14 +1775,14 @@ __Usage:__ ### Catalog_service.add_catalog_attribute -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2beta/catalog_service.add_catalog_attribute.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2beta/catalog_service.add_catalog_attribute.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2beta/catalog_service.add_catalog_attribute.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2beta/catalog_service.add_catalog_attribute.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v2beta/catalog_service.add_catalog_attribute.js` +`node packages/google-cloud-retail/samples/generated/v2beta/catalog_service.add_catalog_attribute.js` ----- @@ -1792,14 +1792,14 @@ __Usage:__ ### Catalog_service.batch_remove_catalog_attributes -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2beta/catalog_service.batch_remove_catalog_attributes.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2beta/catalog_service.batch_remove_catalog_attributes.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2beta/catalog_service.batch_remove_catalog_attributes.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2beta/catalog_service.batch_remove_catalog_attributes.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v2beta/catalog_service.batch_remove_catalog_attributes.js` +`node packages/google-cloud-retail/samples/generated/v2beta/catalog_service.batch_remove_catalog_attributes.js` ----- @@ -1809,14 +1809,14 @@ __Usage:__ ### Catalog_service.get_attributes_config -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2beta/catalog_service.get_attributes_config.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2beta/catalog_service.get_attributes_config.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2beta/catalog_service.get_attributes_config.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2beta/catalog_service.get_attributes_config.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v2beta/catalog_service.get_attributes_config.js` +`node packages/google-cloud-retail/samples/generated/v2beta/catalog_service.get_attributes_config.js` ----- @@ -1826,14 +1826,14 @@ __Usage:__ ### Catalog_service.get_completion_config -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2beta/catalog_service.get_completion_config.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2beta/catalog_service.get_completion_config.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2beta/catalog_service.get_completion_config.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2beta/catalog_service.get_completion_config.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v2beta/catalog_service.get_completion_config.js` +`node packages/google-cloud-retail/samples/generated/v2beta/catalog_service.get_completion_config.js` ----- @@ -1843,14 +1843,14 @@ __Usage:__ ### Catalog_service.get_default_branch -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2beta/catalog_service.get_default_branch.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2beta/catalog_service.get_default_branch.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2beta/catalog_service.get_default_branch.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2beta/catalog_service.get_default_branch.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v2beta/catalog_service.get_default_branch.js` +`node packages/google-cloud-retail/samples/generated/v2beta/catalog_service.get_default_branch.js` ----- @@ -1860,14 +1860,14 @@ __Usage:__ ### Catalog_service.list_catalogs -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2beta/catalog_service.list_catalogs.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2beta/catalog_service.list_catalogs.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2beta/catalog_service.list_catalogs.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2beta/catalog_service.list_catalogs.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v2beta/catalog_service.list_catalogs.js` +`node packages/google-cloud-retail/samples/generated/v2beta/catalog_service.list_catalogs.js` ----- @@ -1877,14 +1877,14 @@ __Usage:__ ### Catalog_service.remove_catalog_attribute -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2beta/catalog_service.remove_catalog_attribute.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2beta/catalog_service.remove_catalog_attribute.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2beta/catalog_service.remove_catalog_attribute.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2beta/catalog_service.remove_catalog_attribute.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v2beta/catalog_service.remove_catalog_attribute.js` +`node packages/google-cloud-retail/samples/generated/v2beta/catalog_service.remove_catalog_attribute.js` ----- @@ -1894,14 +1894,14 @@ __Usage:__ ### Catalog_service.replace_catalog_attribute -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2beta/catalog_service.replace_catalog_attribute.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2beta/catalog_service.replace_catalog_attribute.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2beta/catalog_service.replace_catalog_attribute.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2beta/catalog_service.replace_catalog_attribute.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v2beta/catalog_service.replace_catalog_attribute.js` +`node packages/google-cloud-retail/samples/generated/v2beta/catalog_service.replace_catalog_attribute.js` ----- @@ -1911,14 +1911,14 @@ __Usage:__ ### Catalog_service.set_default_branch -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2beta/catalog_service.set_default_branch.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2beta/catalog_service.set_default_branch.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2beta/catalog_service.set_default_branch.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2beta/catalog_service.set_default_branch.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v2beta/catalog_service.set_default_branch.js` +`node packages/google-cloud-retail/samples/generated/v2beta/catalog_service.set_default_branch.js` ----- @@ -1928,14 +1928,14 @@ __Usage:__ ### Catalog_service.update_attributes_config -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2beta/catalog_service.update_attributes_config.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2beta/catalog_service.update_attributes_config.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2beta/catalog_service.update_attributes_config.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2beta/catalog_service.update_attributes_config.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v2beta/catalog_service.update_attributes_config.js` +`node packages/google-cloud-retail/samples/generated/v2beta/catalog_service.update_attributes_config.js` ----- @@ -1945,14 +1945,14 @@ __Usage:__ ### Catalog_service.update_catalog -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2beta/catalog_service.update_catalog.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2beta/catalog_service.update_catalog.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2beta/catalog_service.update_catalog.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2beta/catalog_service.update_catalog.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v2beta/catalog_service.update_catalog.js` +`node packages/google-cloud-retail/samples/generated/v2beta/catalog_service.update_catalog.js` ----- @@ -1962,14 +1962,14 @@ __Usage:__ ### Catalog_service.update_completion_config -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2beta/catalog_service.update_completion_config.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2beta/catalog_service.update_completion_config.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2beta/catalog_service.update_completion_config.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2beta/catalog_service.update_completion_config.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v2beta/catalog_service.update_completion_config.js` +`node packages/google-cloud-retail/samples/generated/v2beta/catalog_service.update_completion_config.js` ----- @@ -1979,14 +1979,14 @@ __Usage:__ ### Completion_service.complete_query -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2beta/completion_service.complete_query.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2beta/completion_service.complete_query.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2beta/completion_service.complete_query.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2beta/completion_service.complete_query.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v2beta/completion_service.complete_query.js` +`node packages/google-cloud-retail/samples/generated/v2beta/completion_service.complete_query.js` ----- @@ -1996,14 +1996,14 @@ __Usage:__ ### Completion_service.import_completion_data -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2beta/completion_service.import_completion_data.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2beta/completion_service.import_completion_data.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2beta/completion_service.import_completion_data.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2beta/completion_service.import_completion_data.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v2beta/completion_service.import_completion_data.js` +`node packages/google-cloud-retail/samples/generated/v2beta/completion_service.import_completion_data.js` ----- @@ -2013,14 +2013,14 @@ __Usage:__ ### Control_service.create_control -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2beta/control_service.create_control.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2beta/control_service.create_control.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2beta/control_service.create_control.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2beta/control_service.create_control.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v2beta/control_service.create_control.js` +`node packages/google-cloud-retail/samples/generated/v2beta/control_service.create_control.js` ----- @@ -2030,14 +2030,14 @@ __Usage:__ ### Control_service.delete_control -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2beta/control_service.delete_control.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2beta/control_service.delete_control.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2beta/control_service.delete_control.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2beta/control_service.delete_control.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v2beta/control_service.delete_control.js` +`node packages/google-cloud-retail/samples/generated/v2beta/control_service.delete_control.js` ----- @@ -2047,14 +2047,14 @@ __Usage:__ ### Control_service.get_control -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2beta/control_service.get_control.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2beta/control_service.get_control.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2beta/control_service.get_control.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2beta/control_service.get_control.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v2beta/control_service.get_control.js` +`node packages/google-cloud-retail/samples/generated/v2beta/control_service.get_control.js` ----- @@ -2064,14 +2064,14 @@ __Usage:__ ### Control_service.list_controls -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2beta/control_service.list_controls.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2beta/control_service.list_controls.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2beta/control_service.list_controls.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2beta/control_service.list_controls.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v2beta/control_service.list_controls.js` +`node packages/google-cloud-retail/samples/generated/v2beta/control_service.list_controls.js` ----- @@ -2081,14 +2081,14 @@ __Usage:__ ### Control_service.update_control -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2beta/control_service.update_control.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2beta/control_service.update_control.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2beta/control_service.update_control.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2beta/control_service.update_control.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v2beta/control_service.update_control.js` +`node packages/google-cloud-retail/samples/generated/v2beta/control_service.update_control.js` ----- @@ -2098,14 +2098,14 @@ __Usage:__ ### Model_service.create_model -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2beta/model_service.create_model.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2beta/model_service.create_model.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2beta/model_service.create_model.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2beta/model_service.create_model.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v2beta/model_service.create_model.js` +`node packages/google-cloud-retail/samples/generated/v2beta/model_service.create_model.js` ----- @@ -2115,14 +2115,14 @@ __Usage:__ ### Model_service.delete_model -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2beta/model_service.delete_model.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2beta/model_service.delete_model.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2beta/model_service.delete_model.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2beta/model_service.delete_model.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v2beta/model_service.delete_model.js` +`node packages/google-cloud-retail/samples/generated/v2beta/model_service.delete_model.js` ----- @@ -2132,14 +2132,14 @@ __Usage:__ ### Model_service.list_models -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2beta/model_service.list_models.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2beta/model_service.list_models.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2beta/model_service.list_models.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2beta/model_service.list_models.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v2beta/model_service.list_models.js` +`node packages/google-cloud-retail/samples/generated/v2beta/model_service.list_models.js` ----- @@ -2149,14 +2149,14 @@ __Usage:__ ### Model_service.pause_model -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2beta/model_service.pause_model.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2beta/model_service.pause_model.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2beta/model_service.pause_model.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2beta/model_service.pause_model.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v2beta/model_service.pause_model.js` +`node packages/google-cloud-retail/samples/generated/v2beta/model_service.pause_model.js` ----- @@ -2166,14 +2166,14 @@ __Usage:__ ### Model_service.resume_model -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2beta/model_service.resume_model.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2beta/model_service.resume_model.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2beta/model_service.resume_model.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2beta/model_service.resume_model.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v2beta/model_service.resume_model.js` +`node packages/google-cloud-retail/samples/generated/v2beta/model_service.resume_model.js` ----- @@ -2183,14 +2183,14 @@ __Usage:__ ### Model_service.tune_model -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2beta/model_service.tune_model.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2beta/model_service.tune_model.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2beta/model_service.tune_model.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2beta/model_service.tune_model.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v2beta/model_service.tune_model.js` +`node packages/google-cloud-retail/samples/generated/v2beta/model_service.tune_model.js` ----- @@ -2200,14 +2200,14 @@ __Usage:__ ### Model_service.update_model -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2beta/model_service.update_model.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2beta/model_service.update_model.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2beta/model_service.update_model.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2beta/model_service.update_model.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v2beta/model_service.update_model.js` +`node packages/google-cloud-retail/samples/generated/v2beta/model_service.update_model.js` ----- @@ -2217,14 +2217,14 @@ __Usage:__ ### Prediction_service.predict -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2beta/prediction_service.predict.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2beta/prediction_service.predict.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2beta/prediction_service.predict.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2beta/prediction_service.predict.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v2beta/prediction_service.predict.js` +`node packages/google-cloud-retail/samples/generated/v2beta/prediction_service.predict.js` ----- @@ -2234,14 +2234,14 @@ __Usage:__ ### Product_service.add_fulfillment_places -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2beta/product_service.add_fulfillment_places.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2beta/product_service.add_fulfillment_places.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2beta/product_service.add_fulfillment_places.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2beta/product_service.add_fulfillment_places.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v2beta/product_service.add_fulfillment_places.js` +`node packages/google-cloud-retail/samples/generated/v2beta/product_service.add_fulfillment_places.js` ----- @@ -2251,14 +2251,14 @@ __Usage:__ ### Product_service.add_local_inventories -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2beta/product_service.add_local_inventories.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2beta/product_service.add_local_inventories.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2beta/product_service.add_local_inventories.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2beta/product_service.add_local_inventories.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v2beta/product_service.add_local_inventories.js` +`node packages/google-cloud-retail/samples/generated/v2beta/product_service.add_local_inventories.js` ----- @@ -2268,14 +2268,14 @@ __Usage:__ ### Product_service.create_product -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2beta/product_service.create_product.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2beta/product_service.create_product.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2beta/product_service.create_product.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2beta/product_service.create_product.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v2beta/product_service.create_product.js` +`node packages/google-cloud-retail/samples/generated/v2beta/product_service.create_product.js` ----- @@ -2285,14 +2285,14 @@ __Usage:__ ### Product_service.delete_product -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2beta/product_service.delete_product.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2beta/product_service.delete_product.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2beta/product_service.delete_product.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2beta/product_service.delete_product.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v2beta/product_service.delete_product.js` +`node packages/google-cloud-retail/samples/generated/v2beta/product_service.delete_product.js` ----- @@ -2302,14 +2302,14 @@ __Usage:__ ### Product_service.get_product -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2beta/product_service.get_product.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2beta/product_service.get_product.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2beta/product_service.get_product.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2beta/product_service.get_product.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v2beta/product_service.get_product.js` +`node packages/google-cloud-retail/samples/generated/v2beta/product_service.get_product.js` ----- @@ -2319,14 +2319,14 @@ __Usage:__ ### Product_service.import_products -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2beta/product_service.import_products.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2beta/product_service.import_products.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2beta/product_service.import_products.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2beta/product_service.import_products.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v2beta/product_service.import_products.js` +`node packages/google-cloud-retail/samples/generated/v2beta/product_service.import_products.js` ----- @@ -2336,14 +2336,14 @@ __Usage:__ ### Product_service.list_products -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2beta/product_service.list_products.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2beta/product_service.list_products.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2beta/product_service.list_products.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2beta/product_service.list_products.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v2beta/product_service.list_products.js` +`node packages/google-cloud-retail/samples/generated/v2beta/product_service.list_products.js` ----- @@ -2353,14 +2353,14 @@ __Usage:__ ### Product_service.remove_fulfillment_places -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2beta/product_service.remove_fulfillment_places.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2beta/product_service.remove_fulfillment_places.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2beta/product_service.remove_fulfillment_places.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2beta/product_service.remove_fulfillment_places.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v2beta/product_service.remove_fulfillment_places.js` +`node packages/google-cloud-retail/samples/generated/v2beta/product_service.remove_fulfillment_places.js` ----- @@ -2370,14 +2370,14 @@ __Usage:__ ### Product_service.remove_local_inventories -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2beta/product_service.remove_local_inventories.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2beta/product_service.remove_local_inventories.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2beta/product_service.remove_local_inventories.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2beta/product_service.remove_local_inventories.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v2beta/product_service.remove_local_inventories.js` +`node packages/google-cloud-retail/samples/generated/v2beta/product_service.remove_local_inventories.js` ----- @@ -2387,14 +2387,14 @@ __Usage:__ ### Product_service.set_inventory -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2beta/product_service.set_inventory.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2beta/product_service.set_inventory.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2beta/product_service.set_inventory.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2beta/product_service.set_inventory.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v2beta/product_service.set_inventory.js` +`node packages/google-cloud-retail/samples/generated/v2beta/product_service.set_inventory.js` ----- @@ -2404,14 +2404,14 @@ __Usage:__ ### Product_service.update_product -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2beta/product_service.update_product.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2beta/product_service.update_product.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2beta/product_service.update_product.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2beta/product_service.update_product.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v2beta/product_service.update_product.js` +`node packages/google-cloud-retail/samples/generated/v2beta/product_service.update_product.js` ----- @@ -2421,14 +2421,14 @@ __Usage:__ ### Search_service.search -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2beta/search_service.search.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2beta/search_service.search.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2beta/search_service.search.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2beta/search_service.search.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v2beta/search_service.search.js` +`node packages/google-cloud-retail/samples/generated/v2beta/search_service.search.js` ----- @@ -2438,14 +2438,14 @@ __Usage:__ ### Serving_config_service.add_control -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2beta/serving_config_service.add_control.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2beta/serving_config_service.add_control.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2beta/serving_config_service.add_control.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2beta/serving_config_service.add_control.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v2beta/serving_config_service.add_control.js` +`node packages/google-cloud-retail/samples/generated/v2beta/serving_config_service.add_control.js` ----- @@ -2455,14 +2455,14 @@ __Usage:__ ### Serving_config_service.create_serving_config -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2beta/serving_config_service.create_serving_config.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2beta/serving_config_service.create_serving_config.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2beta/serving_config_service.create_serving_config.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2beta/serving_config_service.create_serving_config.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v2beta/serving_config_service.create_serving_config.js` +`node packages/google-cloud-retail/samples/generated/v2beta/serving_config_service.create_serving_config.js` ----- @@ -2472,14 +2472,14 @@ __Usage:__ ### Serving_config_service.delete_serving_config -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2beta/serving_config_service.delete_serving_config.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2beta/serving_config_service.delete_serving_config.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2beta/serving_config_service.delete_serving_config.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2beta/serving_config_service.delete_serving_config.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v2beta/serving_config_service.delete_serving_config.js` +`node packages/google-cloud-retail/samples/generated/v2beta/serving_config_service.delete_serving_config.js` ----- @@ -2489,14 +2489,14 @@ __Usage:__ ### Serving_config_service.get_serving_config -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2beta/serving_config_service.get_serving_config.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2beta/serving_config_service.get_serving_config.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2beta/serving_config_service.get_serving_config.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2beta/serving_config_service.get_serving_config.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v2beta/serving_config_service.get_serving_config.js` +`node packages/google-cloud-retail/samples/generated/v2beta/serving_config_service.get_serving_config.js` ----- @@ -2506,14 +2506,14 @@ __Usage:__ ### Serving_config_service.list_serving_configs -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2beta/serving_config_service.list_serving_configs.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2beta/serving_config_service.list_serving_configs.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2beta/serving_config_service.list_serving_configs.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2beta/serving_config_service.list_serving_configs.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v2beta/serving_config_service.list_serving_configs.js` +`node packages/google-cloud-retail/samples/generated/v2beta/serving_config_service.list_serving_configs.js` ----- @@ -2523,14 +2523,14 @@ __Usage:__ ### Serving_config_service.remove_control -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2beta/serving_config_service.remove_control.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2beta/serving_config_service.remove_control.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2beta/serving_config_service.remove_control.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2beta/serving_config_service.remove_control.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v2beta/serving_config_service.remove_control.js` +`node packages/google-cloud-retail/samples/generated/v2beta/serving_config_service.remove_control.js` ----- @@ -2540,14 +2540,14 @@ __Usage:__ ### Serving_config_service.update_serving_config -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2beta/serving_config_service.update_serving_config.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2beta/serving_config_service.update_serving_config.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2beta/serving_config_service.update_serving_config.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2beta/serving_config_service.update_serving_config.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v2beta/serving_config_service.update_serving_config.js` +`node packages/google-cloud-retail/samples/generated/v2beta/serving_config_service.update_serving_config.js` ----- @@ -2557,14 +2557,14 @@ __Usage:__ ### User_event_service.collect_user_event -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2beta/user_event_service.collect_user_event.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2beta/user_event_service.collect_user_event.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2beta/user_event_service.collect_user_event.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2beta/user_event_service.collect_user_event.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v2beta/user_event_service.collect_user_event.js` +`node packages/google-cloud-retail/samples/generated/v2beta/user_event_service.collect_user_event.js` ----- @@ -2574,14 +2574,14 @@ __Usage:__ ### User_event_service.import_user_events -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2beta/user_event_service.import_user_events.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2beta/user_event_service.import_user_events.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2beta/user_event_service.import_user_events.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2beta/user_event_service.import_user_events.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v2beta/user_event_service.import_user_events.js` +`node packages/google-cloud-retail/samples/generated/v2beta/user_event_service.import_user_events.js` ----- @@ -2591,14 +2591,14 @@ __Usage:__ ### User_event_service.purge_user_events -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2beta/user_event_service.purge_user_events.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2beta/user_event_service.purge_user_events.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2beta/user_event_service.purge_user_events.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2beta/user_event_service.purge_user_events.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v2beta/user_event_service.purge_user_events.js` +`node packages/google-cloud-retail/samples/generated/v2beta/user_event_service.purge_user_events.js` ----- @@ -2608,14 +2608,14 @@ __Usage:__ ### User_event_service.rejoin_user_events -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2beta/user_event_service.rejoin_user_events.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2beta/user_event_service.rejoin_user_events.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2beta/user_event_service.rejoin_user_events.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2beta/user_event_service.rejoin_user_events.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v2beta/user_event_service.rejoin_user_events.js` +`node packages/google-cloud-retail/samples/generated/v2beta/user_event_service.rejoin_user_events.js` ----- @@ -2625,14 +2625,14 @@ __Usage:__ ### User_event_service.write_user_event -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v2beta/user_event_service.write_user_event.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/generated/v2beta/user_event_service.write_user_event.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v2beta/user_event_service.write_user_event.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/generated/v2beta/user_event_service.write_user_event.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/generated/v2beta/user_event_service.write_user_event.js` +`node packages/google-cloud-retail/samples/generated/v2beta/user_event_service.write_user_event.js` ----- @@ -2642,14 +2642,14 @@ __Usage:__ ### Quickstart -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/quickstart.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/quickstart.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/quickstart.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/quickstart.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/quickstart.js` +`node packages/google-cloud-retail/samples/quickstart.js` ----- @@ -2659,14 +2659,14 @@ __Usage:__ ### Quickstart -View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/test/quickstart.js). +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-retail/samples/test/quickstart.js). -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/test/quickstart.js,samples/README.md) +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-retail/samples/test/quickstart.js,samples/README.md) __Usage:__ -`node /workspace/google-cloud-node/samples/test/quickstart.js` +`node packages/google-cloud-retail/samples/test/quickstart.js` diff --git a/release-please-config.json b/release-please-config.json index 74617c70ba7..07ad2c0508b 100644 --- a/release-please-config.json +++ b/release-please-config.json @@ -1,6 +1,7 @@ { "initial-version": "0.1.0", "packages": { + "packages/google-analytics-admin": {}, "packages/google-analytics-data": {}, "packages/google-api-apikeys": {}, "packages/google-area120-tables": {}, @@ -127,4 +128,4 @@ } ], "release-type": "node" -} +} \ No newline at end of file